summaryrefslogtreecommitdiffstats
path: root/btif/include/btif_common.h
diff options
context:
space:
mode:
authorAndre Eisenbach <andre@broadcom.com>2012-09-18 01:35:44 -0700
committerMatthew Xie <mattx@google.com>2012-09-18 10:06:32 -0700
commitcc914cffd521b2e6e1be804c82aea2388b843ebf (patch)
treea4859572083eb29c931cc5066645f9c0a2929d71 /btif/include/btif_common.h
parent6ed67e2ac54c83d18701d2b4ee1b9d729e99a38c (diff)
downloadexternal_bluetooth_bluedroid-cc914cffd521b2e6e1be804c82aea2388b843ebf.zip
external_bluetooth_bluedroid-cc914cffd521b2e6e1be804c82aea2388b843ebf.tar.gz
external_bluetooth_bluedroid-cc914cffd521b2e6e1be804c82aea2388b843ebf.tar.bz2
Header file and whitespace cleanups
Also fixed file permission to remove executable bit from source files. Change-Id: I6954c2d16190bc35b1b0d38386543253696b1112
Diffstat (limited to 'btif/include/btif_common.h')
-rw-r--r--btif/include/btif_common.h73
1 files changed, 37 insertions, 36 deletions
diff --git a/btif/include/btif_common.h b/btif/include/btif_common.h
index 8e5c275..24eaace 100644
--- a/btif/include/btif_common.h
+++ b/btif/include/btif_common.h
@@ -45,14 +45,6 @@
*
************************************************************************************/
-/************************************************************************************
- *
- * Filename: btif_common.h
- *
- * Description:
- *
- ***********************************************************************************/
-
#ifndef BTIF_COMMON_H
#define BTIF_COMMON_H
@@ -66,21 +58,22 @@
#include <utils/Log.h>
-/************************************************************************************
+/*******************************************************************************
** Constants & Macros
-************************************************************************************/
+********************************************************************************/
-#define ASSERTC(cond, msg, val) if (!(cond)) {ALOGE("### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
+#define ASSERTC(cond, msg, val) if (!(cond)) { ALOGE( \
+ "### ASSERT : %s line %d %s (%d) ###", __FILE__, __LINE__, msg, val);}
/* Calculate start of event enumeration; id is top 8 bits of event */
#define BTIF_SIG_START(id) ((id) << 8)
-/* for upstream the MSB bit is always SET */
+/* For upstream the MSB bit is always SET */
#define BTIF_SIG_CB_BIT (0x8000)
#define BTIF_SIG_CB_START(id) (((id) << 8) | BTIF_SIG_CB_BIT)
/* BTIF sub-systems */
-#define BTIF_CORE 0 /* core */
+#define BTIF_CORE 0
#define BTIF_DM 1
#define BTIF_HFP 2
#define BTIF_AV 3
@@ -97,8 +90,10 @@ extern bt_callbacks_t *bt_hal_cbacks;
ASSERTC(0, "Callback is NULL", 0); \
}
-/* btif events for requests that require context switch to btif task
- on downstreams path */
+/**
+ * BTIF events for requests that require context switch to btif task
+ * on downstreams path
+ */
enum
{
BTIF_CORE_API_START = BTIF_SIG_START(BTIF_CORE),
@@ -123,12 +118,13 @@ enum
BTIF_AV_API_START = BTIF_SIG_START(BTIF_AV),
/* add here */
-
};
-/* btif events for callbacks that require context switch to btif task
- on upstream path - Typically these would be non-BTA events
- that are generated by the BTIF layer */
+/**
+ * BTIF events for callbacks that require context switch to btif task
+ * on upstream path - Typically these would be non-BTA events
+ * that are generated by the BTIF layer.
+ */
enum
{
BTIF_CORE_CB_START = BTIF_SIG_CB_START(BTIF_CORE),
@@ -149,33 +145,38 @@ enum
};
/* Macro definitions for BD ADDR persistence */
-/* PROPERTY_BT_BDADDR_PATH
- The property key stores the storage location of Bluetooth Device Address
-*/
+
+/**
+ * PROPERTY_BT_BDADDR_PATH
+ * The property key stores the storage location of Bluetooth Device Address
+ */
#ifndef PROPERTY_BT_BDADDR_PATH
#define PROPERTY_BT_BDADDR_PATH "ro.bt.bdaddr_path"
#endif
-/* PERSIST_BDADDR_PROPERTY
- If there is no valid bdaddr available from PROPERTY_BT_BDADDR_PATH,
- generating a random BDADDR and keeping it in the PERSIST_BDADDR_DROP.
-*/
+/**
+ * PERSIST_BDADDR_PROPERTY
+ * If there is no valid bdaddr available from PROPERTY_BT_BDADDR_PATH,
+ * generating a random BDADDR and keeping it in the PERSIST_BDADDR_DROP.
+ */
#ifndef PERSIST_BDADDR_PROPERTY
#define PERSIST_BDADDR_PROPERTY "persist.service.bdroid.bdaddr"
#endif
#define FACTORY_BT_BDADDR_STORAGE_LEN 17
-/************************************************************************************
+
+/*******************************************************************************
** Type definitions for callback functions
-************************************************************************************/
+********************************************************************************/
typedef void (tBTIF_CBACK) (UINT16 event, char *p_param);
typedef void (tBTIF_COPY_CBACK) (UINT16 event, char *p_dest, char *p_src);
-/************************************************************************************
+
+/*******************************************************************************
** Type definitions and return values
-************************************************************************************/
+********************************************************************************/
/* this type handles all btif context switches between BTU and HAL */
typedef struct
@@ -189,23 +190,23 @@ typedef struct
} tBTIF_CONTEXT_SWITCH_CBACK;
-/************************************************************************************
+/*******************************************************************************
** Functions
-************************************************************************************/
-bt_status_t btif_transfer_context (tBTIF_CBACK *p_cback, UINT16 event, char* p_params, int param_len, tBTIF_COPY_CBACK *p_copy_cback);
+********************************************************************************/
+
+bt_status_t btif_transfer_context (tBTIF_CBACK *p_cback, UINT16 event, char* p_params,
+ int param_len, tBTIF_COPY_CBACK *p_copy_cback);
tBTA_SERVICE_MASK btif_get_enabled_services_mask(void);
bt_status_t btif_enable_service(tBTA_SERVICE_ID service_id);
bt_status_t btif_disable_service(tBTA_SERVICE_ID service_id);
int btif_is_enabled(void);
-/*
+/**
* BTIF_Events
*/
-
void btif_enable_bluetooth_evt(tBTA_STATUS status, BD_ADDR local_bd);
void btif_disable_bluetooth_evt(void);
void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props, bt_property_t *p_props);
void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t *remote_addr,
uint32_t num_props, bt_property_t *p_props);
#endif /* BTIF_COMMON_H */
-