OSDN Git Service

Remove extern "C" from header files
authorJack He <siyuanh@google.com>
Sat, 10 Dec 2016 01:42:28 +0000 (17:42 -0800)
committerJack He <siyuanh@google.com>
Sat, 10 Dec 2016 03:24:00 +0000 (19:24 -0800)
Since change 290046, most files in system/bt is compiled as C++ source.
Therefore, there is no longer a need for the extern "C" wrapper around
includes that export symbols from those sources.

The following python script is applied to each file in the directory:

front = '#ifdef\s+__cplusplus\s+extern\s+"C"\s+{\s+#endif\s+'
back = '#ifdef\s+__cplusplus\s+}\s+#endif'
with open(sys.argv[1], "r") as f:
  data = f.read()
  data = re.sub(front, "", data)
  data = re.sub(back, "", data)
  print data

through a shell script:

for file in $(find . -name "*.h"); do
  python remove_cpp_extern_c.py $file > tmp
  cat tmp > $file
  rm tmp
done

with following files not edited:
* stack/include/a2dp_*
* include/bt_trace.h
* embdrv/sbc/*

Bug: 33492510
Test: Code compilation, BtFunhausMetricsTest, BtStressTest
Change-Id: Iac21cdfb1924b50478dd0b82326e092602cbc9d4

145 files changed:
audio_a2dp_hw/audio_a2dp_hw.h
bta/ag/bta_ag_at.h
bta/ag/bta_ag_int.h
bta/ar/bta_ar_int.h
bta/closure/bta_closure_int.h
bta/hl/bta_hl_int.h
bta/include/bta_ag_api.h
bta/include/bta_ag_ci.h
bta/include/bta_ag_co.h
bta/include/bta_api.h
bta/include/bta_ar_api.h
bta/include/bta_av_api.h
bta/include/bta_av_ci.h
bta/include/bta_av_co.h
bta/include/bta_dm_api.h
bta/include/bta_dm_ci.h
bta/include/bta_dm_co.h
bta/include/bta_gatts_co.h
bta/include/bta_hf_client_api.h
bta/include/bta_hh_api.h
bta/include/bta_hh_co.h
bta/include/bta_hl_api.h
bta/include/bta_hl_ci.h
bta/include/bta_hl_co.h
bta/include/bta_jv_api.h
bta/include/bta_jv_co.h
bta/include/bta_mce_api.h
bta/include/bta_pan_api.h
bta/include/bta_pan_ci.h
bta/include/bta_pan_co.h
bta/include/bta_sdp_api.h
bta/include/utl.h
bta/sys/bta_sys.h
bta/test/bta_closure_test.cc
btcore/include/bdaddr.h
btcore/include/device_class.h
btcore/include/device_features.h
btcore/include/event_mask.h
btcore/include/hal_util.h
btcore/include/iac.h
btcore/include/module.h
btcore/include/osi_module.h
btcore/include/property.h
btcore/include/uuid.h
btcore/include/version.h
btif/include/btif_a2dp.h
btif/include/btif_a2dp_control.h
btif/include/btif_a2dp_sink.h
btif/include/btif_a2dp_source.h
btif/include/btif_av_co.h
btif/include/btif_common.h
btif/include/btif_hf.h
device/include/controller.h
device/include/interop.h
hci/include/bt_vendor_lib.h
hci/include/btsnoop.h
hci/include/btsnoop_mem.h
hci/include/buffer_allocator.h
hci/include/hci_audio.h
hci/include/hci_hal.h
hci/include/hci_inject.h
hci/include/hci_layer.h
hci/include/hci_packet_factory.h
hci/include/hci_packet_parser.h
hci/include/low_power_manager.h
hci/include/packet_fragmenter.h
hci/include/userial.h
hci/include/vendor.h
include/bte.h
include/bte_appl.h
include/stack_config.h
main/main_int.h
osi/include/alarm.h
osi/include/allocation_tracker.h
osi/include/allocator.h
osi/include/array.h
osi/include/buffer.h
osi/include/compat.h
osi/include/config.h
osi/include/data_dispatcher.h
osi/include/eager_reader.h
osi/include/fixed_queue.h
osi/include/future.h
osi/include/list.h
osi/include/metrics.h
osi/include/mutex.h
osi/include/osi.h
osi/include/properties.h
osi/include/reactor.h
osi/include/ringbuffer.h
osi/include/semaphore.h
osi/include/socket.h
osi/include/socket_utils/socket_local.h
osi/include/socket_utils/sockets.h
osi/include/thread.h
osi/include/time.h
osi/include/wakelock.h
osi/test/test_stubs.h
stack/a2dp/a2dp_int.h
stack/avct/avct_int.h
stack/avdt/avdt_int.h
stack/avrc/avrc_int.h
stack/bnep/bnep_int.h
stack/btm/btm_ble_int.h
stack/btm/btm_ble_int_types.h
stack/btm/btm_int.h
stack/btm/btm_int_types.h
stack/gatt/gatt_int.h
stack/hid/hidh_int.h
stack/include/avct_api.h
stack/include/avdt_api.h
stack/include/avdtc_api.h
stack/include/avrc_api.h
stack/include/ble_advertiser.h
stack/include/bnep_api.h
stack/include/btm_api.h
stack/include/btm_ble_api.h
stack/include/btm_ble_api_types.h
stack/include/btu.h
stack/include/gap_api.h
stack/include/gatt_api.h
stack/include/hcimsgs.h
stack/include/hidh_api.h
stack/include/l2c_api.h
stack/include/mca_api.h
stack/include/pan_api.h
stack/include/port_api.h
stack/include/sdp_api.h
stack/include/smp_api.h
stack/include/smp_api_types.h
stack/include/srvc_api.h
stack/l2cap/l2c_int.h
stack/mcap/mca_int.h
stack/pan/pan_int.h
stack/rfcomm/port_int.h
stack/rfcomm/rfc_int.h
stack/sdp/sdpint.h
stack/smp/smp_int.h
stack/srvc/srvc_battery_int.h
stack/srvc/srvc_dis_int.h
stack/srvc/srvc_eng_int.h
udrv/include/uipc.h
udrv/ulinux/uipc_linux.h
utils/include/bt_utils.h
vnd/include/vendor_api.h

index df66d87..8fc6f7c 100644 (file)
@@ -113,15 +113,7 @@ typedef uint8_t tA2DP_BITS_PER_SAMPLE;
  *  Functions
  *****************************************************************************/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Returns a string representation of |event|.
 extern const char* audio_a2dp_hw_dump_ctrl_event(tA2DP_CTRL_CMD event);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* A2DP_AUDIO_HW_H */
index f5636e0..144bc38 100644 (file)
 #ifndef BTA_AG_AT_H
 #define BTA_AG_AT_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -121,8 +117,4 @@ extern void bta_ag_at_reinit(tBTA_AG_AT_CB* p_cb);
  ****************************************************************************/
 extern void bta_ag_at_parse(tBTA_AG_AT_CB* p_cb, char* p_buf, uint16_t len);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AG_AT_H */
index c52f364..1fae063 100644 (file)
 #include "bta_api.h"
 #include "bta_sys.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -414,8 +410,4 @@ extern void bta_ag_set_esco_param(bool set_reset, tBTM_ESCO_PARAMS* param);
 extern void bta_ag_ci_rx_data(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data);
 extern void bta_ag_rcvd_slc_ready(tBTA_AG_SCB* p_scb, tBTA_AG_DATA* p_data);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AG_INT_H */
index 679cd03..4661e74 100644 (file)
 
 #include "bta_av_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifndef BTA_AR_DEBUG
 #define BTA_AR_DEBUG TRUE
 #endif
@@ -59,8 +55,4 @@ typedef struct {
 /* control block declaration */
 extern tBTA_AR_CB bta_ar_cb;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AR_INT_H */
index 39aaab3..b0cc726 100644 (file)
 #include "bta_api.h"
 #include "include/bt_trace.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Accept bta_sys_register, and bta_sys_sendmsg. Those parameters can be used to
  * override system methods for tests.
  */
 void bta_closure_init(tBTA_SYS_REGISTER registerer, tBTA_SYS_SENDMSG sender);
 bool bta_closure_execute(BT_HDR* p_msg);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_CLOSURE_INT_H */
index e5acb52..4d5168d 100644 (file)
 #include "bta_sys.h"
 #include "l2cdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef uint16_t(tBTA_HL_ALLOCATE_PSM)(void);
 
 /*****************************************************************************
@@ -853,7 +849,5 @@ extern void bta_hl_build_sdp_query_cfm(tBTA_HL* p_evt_data, uint8_t app_id,
 extern const char* bta_hl_status_code(tBTA_HL_STATUS status);
 extern const char* bta_hl_evt_code(tBTA_HL_INT_EVT evt_code);
 #endif
-#ifdef __cplusplus
-}
-#endif
+
 #endif /* BTA_MSE_INT_H */
index 39eba00..52222b5 100644 (file)
 
 #include "bta_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -590,8 +586,4 @@ void BTA_AgResult(uint16_t handle, tBTA_AG_RES result,
  ******************************************************************************/
 void BTA_AgSetCodec(uint16_t handle, tBTA_AG_PEER_CODEC codec);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AG_API_H */
index 984625a..01e3870 100644 (file)
 /*****************************************************************************
  *  Function Declarations
  ****************************************************************************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *
  * Function         bta_ag_ci_rx_write
@@ -71,8 +67,4 @@ extern void bta_ag_ci_slc_ready(uint16_t handle);
  *****************************************************************************/
 extern void bta_ag_ci_wbs_command(uint16_t handle, char* p_data, uint16_t len);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AG_CI_H */
index f03322f..60f6322 100644 (file)
 #include "bta_ag_api.h"
 #include "hci/include/hci_audio.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *
  * Function         bta_ag_co_init
@@ -117,8 +113,4 @@ extern void bta_ag_co_data_close(uint16_t handle);
  ******************************************************************************/
 extern void bta_ag_co_tx_write(uint16_t handle, uint8_t* p_data, uint16_t len);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AG_CO_H */
index f40d990..30c5a1c 100644 (file)
 #include "btm_api.h"
 #include "btm_ble_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -2138,8 +2134,4 @@ extern void BTA_VendorInit(void);
  ******************************************************************************/
 extern void BTA_VendorCleanup(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_API_H */
index d6a8147..75a5096 100644 (file)
 #include "bta_sys.h"
 #include "sdp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -141,8 +137,4 @@ extern void bta_ar_reg_avrc(uint16_t service_uuid, const char* p_service_name,
  *****************************************************************************/
 extern void bta_ar_dereg_avrc(uint16_t service_uuid, tBTA_SYS_ID sys_id);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AR_API_H */
index edc21de..f8104db 100644 (file)
 #include "avrc_api.h"
 #include "bta_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -793,8 +789,4 @@ void BTA_AvOffloadStart(tBTA_AV_HNDL hndl);
  ******************************************************************************/
 void BTA_AvOffloadStartRsp(tBTA_AV_HNDL hndl, tBTA_AV_STATUS status);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AV_API_H */
index f4b4a37..3b68f05 100644 (file)
 /*****************************************************************************
  *  Function Declarations
  ****************************************************************************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *
  * Function         bta_av_ci_src_data_ready
@@ -64,8 +60,4 @@ extern void bta_av_ci_setconfig(tBTA_AV_HNDL hndl, uint8_t err_code,
                                 uint8_t* p_seid, bool recfg_needed,
                                 uint8_t avdt_handle);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AV_CI_H */
index 7ab27e0..d1d751b 100644 (file)
 #include "bta_av_api.h"
 #include "l2c_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -201,8 +197,4 @@ void bta_av_co_audio_drop(tBTA_AV_HNDL hndl);
  ******************************************************************************/
 void bta_av_co_audio_delay(tBTA_AV_HNDL hndl, uint16_t delay);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_AV_CO_H */
index 673465f..5a42f27 100644 (file)
 
 #include "stack/include/bt_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Brings connection to active mode
 void bta_dm_pm_active(BD_ADDR peer_addr);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_DM_API_H */
index 7354476..f6f0abd 100644 (file)
 /*****************************************************************************
  *  Function Declarations
  ****************************************************************************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *
  * Function         bta_dm_ci_io_req
@@ -72,8 +68,4 @@ extern void bta_dm_ci_rmt_oob(bool accept, BD_ADDR bd_addr, BT_OCTET16 c,
  ******************************************************************************/
 extern void bta_dm_sco_ci_data_ready(uint16_t event, uint16_t sco_handle);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 13f3020..560dd0f 100644 (file)
 
 #include "bta_sys.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifndef BTA_SCO_OUT_PKT_SIZE
 #define BTA_SCO_OUT_PKT_SIZE BTM_SCO_DATA_SIZE_MAX
 #endif
@@ -276,8 +272,4 @@ extern void bta_dm_co_ble_io_req(BD_ADDR bd_addr, tBTA_IO_CAP* p_io_cap,
                                  tBTA_LE_KEY_TYPE* p_init_key,
                                  tBTA_LE_KEY_TYPE* p_resp_key);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_DM_CO_H */
index ed7f1c8..bf8277f 100644 (file)
 
 #include "bta_gatt_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *
  * Function         bta_gatts_co_update_handle_range
@@ -83,8 +79,4 @@ extern bool bta_gatts_co_srv_chg(tBTA_GATTS_SRV_CHG_CMD cmd,
 extern bool bta_gatts_co_load_handle_range(uint8_t index,
                                            tBTA_GATTS_HNDL_RANGE* p_handle);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_GATTS_CO_H */
index 4b8b142..befcabe 100644 (file)
 
 #include "bta_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -372,8 +368,4 @@ void BTA_HfClientSendAT(uint16_t handle, tBTA_HF_CLIENT_AT_CMD_TYPE at,
  ******************************************************************************/
 void BTA_HfClientDumpStatistics(int fd);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_HF_CLIENT_API_H */
index 9f33722..c5cc27a 100644 (file)
 #include "gatt_api.h"
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and Type Definitions
  ****************************************************************************/
@@ -515,8 +511,4 @@ extern void BTA_HhParseBootRpt(tBTA_HH_BOOT_RPT* p_data, uint8_t* p_report,
 /* test commands */
 extern void bta_hh_le_hid_read_rpt_clt_cfg(BD_ADDR bd_addr, uint8_t rpt_id);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_HH_API_H */
index 946acf6..d2b0382 100644 (file)
 
 #include "bta_hh_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct {
   uint16_t rpt_uuid;
   uint8_t rpt_id;
@@ -137,8 +133,4 @@ extern void bta_hh_le_co_reset_rpt_cache(BD_ADDR remote_bda, uint8_t app_id);
 
 #endif /* #if (BTA_HH_LE_INCLUDED == TRUE) */
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_HH_CO_H */
index 39a43f8..e31a8ca 100644 (file)
 #include "btm_api.h"
 #include "mca_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -825,8 +821,4 @@ extern void BTA_HlSdpQuery(uint8_t app_id, tBTA_HL_APP_HANDLE app_handle,
 extern void BTA_HlDchCreateRsp(tBTA_HL_MCL_HANDLE mcl_handle,
                                tBTA_HL_DCH_CREATE_RSP_PARAM* p_rsp_param);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_HL_API_H */
index f12ed12..ad1499f 100644 (file)
 #include "bta_api.h"
 #include "bta_hl_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and Data Types
  ****************************************************************************/
@@ -117,8 +113,4 @@ extern void bta_hl_ci_get_echo_data(tBTA_HL_MCL_HANDLE mcl_handle,
 extern void bta_hl_ci_put_echo_data(tBTA_HL_MCL_HANDLE mcl_handle,
                                     tBTA_HL_STATUS status, uint16_t evt);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_HL_CI_H */
index efdd1d3..82b6243 100644 (file)
 #include "bta_api.h"
 #include "bta_hl_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and Data Types
  ****************************************************************************/
@@ -241,8 +237,4 @@ extern void bta_hl_co_put_echo_data(uint8_t app_id,
                                     uint16_t data_size, uint8_t* p_data,
                                     uint16_t evt);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_HL_CO_H */
index aee0108..046ed81 100644 (file)
 #include "btm_api.h"
 #include "l2c_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -833,8 +829,4 @@ tBTA_JV_STATUS BTA_JvSetPmProfile(uint32_t handle, tBTA_JV_PM_ID app_id,
  ******************************************************************************/
 uint16_t BTA_JvRfcommGetPortHdl(uint32_t handle);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_JV_API_H */
index f1f57c7..84c5bfe 100644 (file)
 
 #include "bta_jv_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Function Declarations
  ****************************************************************************/
@@ -55,8 +51,4 @@ extern int bta_co_l2cap_data_outgoing_size(void* user_data, int* size);
 extern int bta_co_l2cap_data_outgoing(void* user_data, uint8_t* buf,
                                       uint16_t size);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_DG_CO_H */
index ef5525d..e773689 100644 (file)
 #include "bta_api.h"
 #include "btm_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -122,8 +118,4 @@ extern tBTA_MCE_STATUS BTA_MceEnable(tBTA_MCE_DM_CBACK* p_cback);
  ******************************************************************************/
 extern tBTA_MCE_STATUS BTA_MceGetRemoteMasInstances(BD_ADDR bd_addr);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_MCE_API_H */
index 4e91828..bb4e724 100644 (file)
 #include "bta_api.h"
 #include "pan_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -180,8 +176,4 @@ void BTA_PanOpen(BD_ADDR bd_addr, tBTA_PAN_ROLE local_role,
  ******************************************************************************/
 extern void BTA_PanClose(uint16_t handle);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_PAN_API_H */
index 7c46cce..d14ea2b 100644 (file)
 /*****************************************************************************
  *  Function Declarations
  ****************************************************************************/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *
  * Function         bta_pan_ci_tx_ready
@@ -143,8 +139,4 @@ extern void bta_pan_ci_set_mfilters(uint16_t handle, uint16_t num_mcast_filters,
                                     uint8_t* p_start_array,
                                     uint8_t* p_end_array);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_PAN_CI_H */
index f3d80f2..14a45b3 100644 (file)
 
 #include "bta_pan_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -200,8 +196,4 @@ extern void bta_pan_co_mfilt_ind(uint16_t handle, bool indication,
                                  tBTA_PAN_STATUS result, uint16_t len,
                                  uint8_t* p_filters);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_PAN_CO_H */
index 37a7774..1b98787 100644 (file)
 #include "bta_api.h"
 #include "btm_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* status values */
 #define BTA_SDP_SUCCESS 0 /* Successful operation. */
 #define BTA_SDP_FAILURE 1 /* Generic failure. */
@@ -137,8 +133,4 @@ extern tBTA_SDP_STATUS BTA_SdpCreateRecordByUser(void* user_data);
  ******************************************************************************/
 extern tBTA_SDP_STATUS BTA_SdpRemoveRecordByUser(void* user_data);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_SDP_API_H */
index 71b186f..88ec332 100644 (file)
 #include "bt_types.h"
 #include "bt_utils.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -166,8 +162,4 @@ extern bool utl_isdialchar(const char d);
  ******************************************************************************/
 extern bool utl_isdialstr(const char* p_s);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* UTL_H */
index c97d8f1..093952e 100644 (file)
 #include "bt_target.h"
 #include "osi/include/alarm.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and data types
  ****************************************************************************/
@@ -278,8 +274,4 @@ extern void bta_sys_clear_policy(uint8_t id, uint8_t policy, BD_ADDR peer_addr);
 extern void bta_sys_set_default_policy(uint8_t id, uint8_t policy);
 extern void bta_sys_clear_default_policy(uint8_t id, uint8_t policy);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTA_SYS_H */
index 75473c8..daa096f 100644 (file)
@@ -52,7 +52,7 @@ bool fake_bta_sys_sendmsg_execute() { return closure_handler((BT_HDR*)msg); }
 
 // TODO(jpawlowski): there is some weird dependency issue in tests, and the
 // tests here fail to compile without this definition.
-extern "C" void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
+void LogMsg(uint32_t trace_set_mask, const char* fmt_str, ...) {}
 
 TEST(ClosureTest, test_post_task) {
   msg_send_counter = 0;
index 6992c1c..9dabc5d 100644 (file)
 #include <stdbool.h>
 #include <stddef.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Note: the string representation of a bdaddr is expected to have the format
 // xx:xx:xx:xx:xx:xx
 // where each 'x' is a hex digit. The API presented in this header will accept
@@ -62,7 +58,3 @@ bool string_is_bdaddr(const char* string);
 // returns false. Otherwise, it returns true. Neither |string| nor |addr| may be
 // NULL.
 bool string_to_bdaddr(const char* string, bt_bdaddr_t* addr);
-
-#ifdef __cplusplus
-}
-#endif
index 7a5f009..2a11400 100644 (file)
 // [Class Of Device]
 // (https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband)
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Device class may be defined in other structures.
 // Only use defined methods to manipulate internals.
 typedef struct bt_device_class_t {
@@ -98,7 +94,3 @@ void device_class_set_telephony(bt_device_class_t* dc, bool set);
 
 bool device_class_get_information(const bt_device_class_t* dc);
 void device_class_set_information(bt_device_class_t* dc, bool set);
-
-#ifdef __cplusplus
-}
-#endif
index 2b667af..bf62949 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Represents a page of device feature enabled/disabled bits returned
 // by the local controller. See the bluetooth spec for bit indexes.
 typedef struct { uint8_t as_array[8]; } bt_device_features_t;
-
-#ifdef __cplusplus
-}
-#endif
index c7eb7bc..cabac9e 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Represents a mask which can be used to tell the controller which
 // HCI events the stack wishes to be informed about. See the bluetooth
 // spec for more information on what each bit means.
 typedef struct { const uint8_t as_array[8]; } bt_event_mask_t;
-
-#ifdef __cplusplus
-}
-#endif
index 7afa5cf..46e4906 100644 (file)
 
 #pragma once
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct hw_module_t;
 
 // Loads the Bluetooth library. If OS_GENERIC is defined, this function looks
 // explicitly for libbluetooth.default.so and loads it. On Android, this calls
 // the hw_get_module routine with the Bluetooth stack module id.
 int hal_util_load_bt_library(const struct hw_module_t** module);
-
-#ifdef __cplusplus
-}
-#endif
index d5a2a3d..6272b0a 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Inquiry Access Code
 // [Bluetooth Baseband]
 // (https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband)
 typedef struct {
   uint8_t iac[3];
 } __attribute__((packed)) bt_inquiry_access_code_t;
-
-#ifdef __cplusplus
-}
-#endif
index a6305c8..1b29fbb 100644 (file)
 #include "osi/include/future.h"
 #include "osi/include/thread.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef future_t* (*module_lifecycle_fn)(void);
 
 #define BTCORE_MAX_MODULE_DEPENDENCIES 10
@@ -70,7 +66,3 @@ void module_clean_up(const module_t* module);
 void module_start_up_callbacked_wrapper(const module_t* module,
                                         thread_t* callback_thread,
                                         thread_fn callback);
-
-#ifdef __cplusplus
-}
-#endif
index 2411e35..964a3fa 100644 (file)
 
 #pragma once
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char OSI_MODULE[] = "osi_module";
-
-#ifdef __cplusplus
-}
-#endif
index 9439475..010c995 100644 (file)
 
 #include "btcore/include/device_class.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Copies an array of consecutive properties of |count| to a newly
 // allocated array. |properties| must not be NULL.
 bt_property_t* property_copy_array(const bt_property_t* properties,
@@ -82,7 +78,3 @@ int8_t property_as_rssi(const bt_property_t* property);
 bt_scan_mode_t property_as_scan_mode(const bt_property_t* property);
 const bt_uuid_t* property_as_uuids(const bt_property_t* property,
                                    size_t* count);
-
-#ifdef __cplusplus
-}
-#endif
index 1348a63..6114ab3 100644 (file)
 #include <hardware/bluetooth.h>
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct uuid_string_t uuid_string_t;
 
 // Creates uuid string structure to hold a well formed UUID
@@ -77,7 +73,3 @@ void uuid_to_string(const bt_uuid_t* uuid, uuid_string_t* uuid_string);
 // |uuid|, |uuid16| and |uuid32| must not be NULL.
 bool uuid_128_to_16(const bt_uuid_t* uuid, uint16_t* uuid16);
 bool uuid_128_to_32(const bt_uuid_t* uuid, uint32_t* uuid32);
-
-#ifdef __cplusplus
-}
-#endif
index ad0c38b..a0696ad 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct {
   uint8_t hci_version;
   uint16_t hci_revision;
@@ -31,7 +27,3 @@ typedef struct {
   uint16_t manufacturer;
   uint16_t lmp_subversion;
 } bt_version_t;
-
-#ifdef __cplusplus
-}
-#endif
index a9b56a3..f701614 100644 (file)
 
 #include "bta_av_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Process 'idle' request from the BTIF state machine during initialization.
 void btif_a2dp_on_idle(void);
 
@@ -66,8 +62,4 @@ void btif_debug_a2dp_dump(int fd);
 // This function should be called before collecting the metrics.
 void btif_update_a2dp_metrics(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_A2DP_H */
index 59af29f..fdd4c06 100644 (file)
 
 #include "audio_a2dp_hw/audio_a2dp_hw.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Initialize the A2DP control module. It should be called during the
 // startup stage of A2DP streaming.
 void btif_a2dp_control_init(void);
@@ -38,8 +34,4 @@ void btif_a2dp_control_cleanup(void);
 // |status| is the acknowledement status - see |tA2DP_CTRL_ACK|.
 void btif_a2dp_command_ack(tA2DP_CTRL_ACK status);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_A2DP_CONTROL_H */
index ccf9ff2..5057a39 100644 (file)
 #include "bt_types.h"
 #include "bta_av_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 //
 // Audio focus state for audio track.
 //
@@ -105,8 +101,4 @@ void btif_a2dp_sink_set_focus_state_req(btif_a2dp_sink_focus_state_t state);
 // |gain| is the audio track gain value to use.
 void btif_a2dp_sink_set_audio_track_gain(float gain);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_A2DP_SINK_H */
index 5d654a0..d076cbe 100644 (file)
 
 #include "bta_av_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Initialize and startup the A2DP Source module.
 // This function should be called by the BTIF state machine prior to using the
 // module.
@@ -90,8 +86,4 @@ void btif_a2dp_source_debug_dump(int fd);
 // This function should be called before collecting the metrics.
 void btif_a2dp_source_update_metrics(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_A2DP_SOURCE_H */
index f123e0e..9427747 100644 (file)
  *  Constants & Macros
  ******************************************************************************/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*******************************************************************************
  *  Functions
  ******************************************************************************/
@@ -61,8 +57,4 @@ const tA2DP_ENCODER_INTERFACE* bta_av_co_get_encoder_interface(void);
  ******************************************************************************/
 void bta_av_co_init(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_AV_CO_H */
index cca9ae9..0fbcfb0 100644 (file)
@@ -216,10 +216,6 @@ void btif_adapter_properties_evt(bt_status_t status, uint32_t num_props,
 void btif_remote_properties_evt(bt_status_t status, bt_bdaddr_t* remote_addr,
                                 uint32_t num_props, bt_property_t* p_props);
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void bte_load_did_conf(const char* p_path);
 void bte_main_boot_entry(void);
 void bte_main_enable(void);
@@ -236,8 +232,4 @@ bt_status_t btif_transfer_context(tBTIF_CBACK* p_cback, uint16_t event,
 
 void btif_init_ok(UNUSED_ATTR uint16_t event, UNUSED_ATTR char* p_param);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_COMMON_H */
index 4642e2a..1cafb8b 100644 (file)
 
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Check whether there is a Hands-Free call in progress.
 // Returns true if no call is in progress.
 bool btif_hf_is_call_idle(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTIF_HF_H */
index 62e9029..4d219c1 100644 (file)
 #include "hci_packet_factory.h"
 #include "hci_packet_parser.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char CONTROLLER_MODULE[] = "controller_module";
 
 typedef struct controller_t {
@@ -88,7 +84,3 @@ const controller_t* controller_get_test_interface(
     const hci_t* hci_interface,
     const hci_packet_factory_t* packet_factory_interface,
     const hci_packet_parser_t* packet_parser_interface);
-
-#ifdef __cplusplus
-}
-#endif
index d7ff6d9..66b3fcd 100644 (file)
 
 #include "btcore/include/bdaddr.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char INTEROP_MODULE[] = "interop_module";
 
 // NOTE:
@@ -98,7 +94,3 @@ void interop_database_add(const uint16_t feature, const bt_bdaddr_t* addr,
 
 // Clear the dynamic portion of the interoperability workaround database.
 void interop_database_clear(void);
-
-#ifdef __cplusplus
-}
-#endif
index edfe757..f364ae3 100644 (file)
 #include <sys/cdefs.h>
 #include <sys/types.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /** Struct types */
 
 /** Typedefs and defines */
@@ -412,8 +408,4 @@ typedef struct {
  */
 extern const bt_vendor_interface_t BLUETOOTH_VENDOR_LIB_INTERFACE;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BT_VENDOR_LIB_H */
index 14896ca..544318d 100644 (file)
 
 #include "bt_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char BTSNOOP_MODULE[] = "btsnoop_module";
 
 typedef struct btsnoop_t {
@@ -41,7 +37,3 @@ typedef struct btsnoop_t {
 } btsnoop_t;
 
 const btsnoop_t* btsnoop_get_interface(void);
-
-#ifdef __cplusplus
-}
-#endif
index 052b9e8..ef56048 100644 (file)
 
 #include "bt_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Callback invoked for each HCI packet.
 // Highlander mode - there can be only one...
 typedef void (*btsnoop_data_cb)(const uint16_t type, const uint8_t* p_data,
@@ -39,7 +35,3 @@ void btsnoop_mem_set_callback(btsnoop_data_cb cb);
 // is sent/received. Packets will be filtered  and then
 // forwarded to the |btsnoop_data_cb|.
 void btsnoop_mem_capture(const BT_HDR* p_buf);
-
-#ifdef __cplusplus
-}
-#endif
index 7f650ce..63fb217 100644 (file)
 
 #include "osi/include/allocator.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 const allocator_t* buffer_allocator_get_interface();
-
-#ifdef __cplusplus
-}
-#endif
index 764ae3e..3ca019c 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Audio state definitions.
 typedef enum {
   SCO_STATE_OFF = 0,       // Audio is off.
@@ -42,7 +38,3 @@ typedef enum {
 // Set the audio state on the controller for SCO (PCM, WBS, ...) using the
 // vendor library.
 void set_audio_state(uint16_t handle, sco_codec_t codec, sco_state_t state);
-
-#ifdef __cplusplus
-}
-#endif
index 74f2f67..53595c0 100644 (file)
 #include "osi/include/thread.h"
 #include "vendor.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef enum {
   DATA_TYPE_UNKNOWN = 0,
   DATA_TYPE_COMMAND = 1,
@@ -94,7 +90,3 @@ const hci_hal_t* hci_hal_h4_get_test_interface(vendor_t* vendor_interface);
 
 const hci_hal_t* hci_hal_mct_get_interface(void);
 const hci_hal_t* hci_hal_mct_get_test_interface(vendor_t* vendor_interface);
-
-#ifdef __cplusplus
-}
-#endif
index f194226..12870d5 100644 (file)
 
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct hci_t hci_t;
 
 typedef struct hci_inject_t {
@@ -36,7 +32,3 @@ typedef struct hci_inject_t {
 } hci_inject_t;
 
 const hci_inject_t* hci_inject_get_interface();
-
-#ifdef __cplusplus
-}
-#endif
index 1e6d137..d5da34b 100644 (file)
 #include "osi/include/future.h"
 #include "osi/include/osi.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char HCI_MODULE[] = "hci_module";
 
 ///// LEGACY DEFINITIONS /////
@@ -115,7 +111,3 @@ const hci_t* hci_layer_get_test_interface(
     const low_power_manager_t* low_power_manager_interface);
 
 void hci_layer_cleanup_interface();
-
-#ifdef __cplusplus
-}
-#endif
index e2a5b7b..b665e32 100644 (file)
 #include "bt_types.h"
 #include "event_mask.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct {
   BT_HDR* (*make_reset)(void);
   BT_HDR* (*make_read_buffer_size)(void);
@@ -50,7 +46,3 @@ typedef struct {
 } hci_packet_factory_t;
 
 const hci_packet_factory_t* hci_packet_factory_get_interface();
-
-#ifdef __cplusplus
-}
-#endif
index 1604b91..f13e1de 100644 (file)
 #include "osi/include/allocator.h"
 #include "version.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct {
   void (*parse_generic_command_complete)(BT_HDR* response);
 
@@ -82,7 +78,3 @@ const hci_packet_parser_t* hci_packet_parser_get_interface();
 
 const hci_packet_parser_t* hci_packet_parser_get_test_interface(
     allocator_t* buffer_allocator_interface);
-
-#ifdef __cplusplus
-}
-#endif
index e9408bf..47e3b6d 100644 (file)
 
 #include "hci_layer.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct thread_t thread_t;
 typedef struct vendor_t vendor_t;
 
@@ -51,7 +47,3 @@ typedef struct low_power_manager_t {
 const low_power_manager_t* low_power_manager_get_interface();
 const low_power_manager_t* low_power_manager_get_test_interface(
     const vendor_t* vendor_interface);
-
-#ifdef __cplusplus
-}
-#endif
index e072d4b..935ea94 100644 (file)
 #include "hci_layer.h"
 #include "osi/include/allocator.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef void (*transmit_finished_cb)(BT_HDR* packet, bool all_fragments_sent);
 typedef void (*packet_reassembled_cb)(BT_HDR* packet);
 typedef void (*packet_fragmented_cb)(BT_HDR* packet,
@@ -66,7 +62,3 @@ const packet_fragmenter_t* packet_fragmenter_get_interface();
 const packet_fragmenter_t* packet_fragmenter_get_test_interface(
     const controller_t* controller_interface,
     const allocator_t* buffer_allocator_interface);
-
-#ifdef __cplusplus
-}
-#endif
index b428257..becb407 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef enum {
   USERIAL_PORT_1,
   USERIAL_PORT_2,
@@ -73,7 +69,3 @@ uint16_t userial_read(uint16_t msg_id, uint8_t* p_buffer, uint16_t len);
 // This function returns the number of bytes actually written, which may be
 // less than |len|. This function may block.
 uint16_t userial_write(uint16_t msg_id, const uint8_t* p_data, uint16_t len);
-
-#ifdef __cplusplus
-}
-#endif
index 1910263..70a2cef 100644 (file)
 #include "hci_internals.h"
 #include "hci_layer.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef enum {
   VENDOR_CHIP_POWER_CONTROL = BT_VND_OP_POWER_CTRL,
   VENDOR_OPEN_USERIAL = BT_VND_OP_USERIAL_OPEN,
@@ -72,7 +68,3 @@ typedef struct vendor_t {
 } vendor_t;
 
 const vendor_t* vendor_get_interface();
-
-#ifdef __cplusplus
-}
-#endif
index c3606b6..90c9590 100644 (file)
 #include <signal.h>
 #include "bt_target.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* By default on shutdown, the baud rate is reset to 115kbits. This should NOT
  * be needed for platforms that kill the BTE driver and remove/reset BT chip.
  */
@@ -132,8 +128,4 @@ typedef struct tBAUD_REG_tag {
 
 extern const tBAUD_REG baud_rate_regs[];
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTE_H */
index 40cc75b..b2aaa02 100644 (file)
 
 #pragma once
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct {
   uint8_t ble_auth_req;
   uint8_t ble_io_cap;
@@ -37,7 +33,3 @@ typedef struct {
 } tBTE_APPL_CFG;
 
 extern tBTE_APPL_CFG bte_appl_cfg;
-
-#ifdef __cplusplus
-}
-#endif
index ae6d2ab..02e5b91 100644 (file)
 #include "module.h"
 #include "osi/include/config.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char STACK_CONFIG_MODULE[] = "stack_config_module";
 
 typedef struct {
@@ -43,7 +39,3 @@ typedef struct {
 } stack_config_t;
 
 const stack_config_t* stack_config_get_interface(void);
-
-#ifdef __cplusplus
-}
-#endif
index 8e07236..3ca01c9 100644 (file)
 
 #include "osi/include/config.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Initiates the logging for C++ */
 void init_cpp_logging(config_t* config);
 
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // MAIN_INT_H
\ No newline at end of file
+#endif  // MAIN_INT_H
index 5899d15..a59f12d 100644 (file)
 #include <stdint.h>
 #include "osi/include/time.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct alarm_t alarm_t;
 typedef struct fixed_queue_t fixed_queue_t;
 typedef struct thread_t thread_t;
@@ -121,7 +117,3 @@ void alarm_cleanup(void);
 // Dump alarm-related statistics and debug info to the |fd| file descriptor.
 // The information is in user-readable text format. The |fd| must be valid.
 void alarm_debug_dump(int fd);
-
-#ifdef __cplusplus
-}
-#endif
index 9496ce6..1e3fa07 100644 (file)
 #include <stddef.h>
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct allocation_tracker_t allocation_tracker_t;
 typedef uint8_t allocator_id_t;
 
@@ -61,7 +57,3 @@ void* allocation_tracker_notify_free(allocator_id_t allocator_id, void* ptr);
 // Get the full size for an allocation, taking into account the size of
 // canaries.
 size_t allocation_tracker_resize_for_canary(size_t size);
-
-#ifdef __cplusplus
-}
-#endif
index c7e870a..890722b 100644 (file)
 #include <stdint.h>
 #include <stdlib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef void* (*alloc_fn)(size_t size);
 typedef void (*free_fn)(void* ptr);
 
@@ -50,7 +46,3 @@ void osi_free(void* ptr);
 // |p_ptr| is a pointer to the buffer pointer to be reset.
 // |p_ptr| cannot be NULL.
 void osi_free_and_reset(void** p_ptr);
-
-#ifdef __cplusplus
-}
-#endif
index ecbb1bc..bdae2fa 100644 (file)
 #include <stddef.h>
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct array_t array_t;
 
 // Returns a new array object that stores elements of size |element_size|. The
@@ -60,7 +56,3 @@ bool array_append_value(array_t* array, uint32_t value);
 // Neither |array| nor |data| may be NULL. Returns true if the element could be
 // inserted into the array, false on error.
 bool array_append_ptr(array_t* array, void* data);
-
-#ifdef __cplusplus
-}
-#endif
index 6589c70..b81c9e9 100644 (file)
 #include <stdbool.h>
 #include <stddef.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct buffer_t buffer_t;
 
 // Returns a new buffer of |size| bytes. Returns NULL if a buffer could not be
@@ -58,7 +54,3 @@ void* buffer_ptr(const buffer_t* buf);
 // Returns the length of the writeable memory region referred to by |buf|.
 // |buf| must not be NULL.
 size_t buffer_length(const buffer_t* buf);
-
-#ifdef __cplusplus
-}
-#endif
index 981c452..95fe037 100644 (file)
 #include <features.h>
 #include <sys/types.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #if __GLIBC__
 
 #include <unistd.h>
@@ -39,7 +35,3 @@ size_t strlcpy(char* dst, const char* src, size_t siz);
 size_t strlcat(char* dst, const char* src, size_t siz);
 
 #endif
-
-#ifdef __cplusplus
-}
-#endif
index 1480151..0ca4b3a 100644 (file)
 
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // The default section name to use if a key/value pair is not defined within
 // a section.
 #define CONFIG_DEFAULT_SECTION "Global"
@@ -152,7 +148,3 @@ const char* config_section_name(const config_section_node_t* iter);
 // |config_save|, all comments and special formatting in the original file will
 // be lost. Neither |config| nor |filename| may be NULL.
 bool config_save(const config_t* config, const char* filename);
-
-#ifdef __cplusplus
-}
-#endif
index 7349444..7c231f8 100644 (file)
 
 #include "osi/include/fixed_queue.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define DISPATCHER_NAME_MAX 16
 
 typedef struct data_dispatcher_t data_dispatcher_t;
@@ -62,7 +58,3 @@ void data_dispatcher_register_default(data_dispatcher_t* dispatcher,
 // Returns true if data dispatch was successful.
 bool data_dispatcher_dispatch(data_dispatcher_t* dispatcher,
                               data_dispatcher_type_t type, void* data);
-
-#ifdef __cplusplus
-}
-#endif
index 6b8b25f..15cdf4b 100644 (file)
 #include "osi/include/allocator.h"
 #include "osi/include/thread.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct eager_reader_t eager_reader_t;
 typedef struct reactor_t reactor_t;
 
@@ -70,7 +66,3 @@ size_t eager_reader_read(eager_reader_t* reader, uint8_t* buffer,
 // Returns the inbound read thread for a given |reader| or NULL if the thread
 // is not running.
 thread_t* eager_reader_get_read_thread(const eager_reader_t* reader);
-
-#ifdef __cplusplus
-}
-#endif
index dd8a273..6b98f7e 100644 (file)
 
 #include "osi/include/list.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct fixed_queue_t;
 typedef struct fixed_queue_t fixed_queue_t;
 typedef struct reactor_t reactor_t;
@@ -135,7 +131,3 @@ void fixed_queue_register_dequeue(fixed_queue_t* queue, reactor_t* reactor,
 // Unregisters the dequeue ready callback for |queue| from whichever reactor
 // it is registered with, if any. This function is idempotent.
 void fixed_queue_unregister_dequeue(fixed_queue_t* queue);
-
-#ifdef __cplusplus
-}
-#endif
index e9928d3..3ed1a21 100644 (file)
 
 #pragma once
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct future_t future_t;
 
 #define FUTURE_SUCCESS ((void*)1)
@@ -43,7 +39,3 @@ void future_ready(future_t* future, void* value);
 // Waits for the |future| to be ready. Returns the value set in |future_ready|.
 // Frees the future before return. |future| may not be NULL.
 void* future_await(future_t* async_result);
-
-#ifdef __cplusplus
-}
-#endif
index e38977b..50c3e2c 100644 (file)
 #include <stdbool.h>
 #include <stdlib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct list_node_t;
 typedef struct list_node_t list_node_t;
 
@@ -141,7 +137,3 @@ list_node_t* list_next(const list_node_t* node);
 // Returns the value stored at the location pointed to by the iterator |node|.
 // |node| must not equal the value returned by |list_end|.
 void* list_node(const list_node_t* node);
-
-#ifdef __cplusplus
-}
-#endif
index 05ad191..abe2225 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef enum {
   DEVICE_TYPE_UNKNOWN,
   DEVICE_TYPE_BREDR,
@@ -91,7 +87,3 @@ void metrics_a2dp_session(
 // Writes the metrics, in packed protobuf format, into the descriptor |fd|.
 // If |clear| is true, metrics events are cleared afterwards.
 void metrics_write(int fd, bool clear);
-
-#ifdef __cplusplus
-}
-#endif
index 81a98d2..bf00983 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Lock the global mutex
 void mutex_global_lock(void);
 
 // Unlock the global mutex
 void mutex_global_unlock(void);
-
-#ifdef __cplusplus
-}
-#endif
index c540812..3359cbf 100644 (file)
 #include <stdbool.h>
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define UNUSED_ATTR __attribute__((unused))
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 #define INVALID_FD (-1)
@@ -69,7 +65,3 @@ int osi_rand(void);
 #define OSI_NO_INTR(fn) \
   do {                  \
   } while ((fn) == -1 && errno == EINTR)
-
-#ifdef __cplusplus
-}
-#endif
index c20a3f8..1f6fb07 100644 (file)
 #include <cutils/properties.h>
 #endif  // defined(OS_GENERIC)
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Get value associated with key |key| into |value|.
 // Returns the length of the value which will never be greater than
 // PROPERTY_VALUE_MAX - 1 and will always be zero terminated.
@@ -39,7 +35,3 @@ int osi_property_get(const char* key, char* value, const char* default_value);
 // Write value of property associated with key |key| to |value|.
 // Returns 0 on success, < 0 on failure
 int osi_property_set(const char* key, const char* value);
-
-#ifdef __cplusplus
-}
-#endif
index 28af1f4..c868a01 100644 (file)
 // This module implements the Reactor pattern.
 // See http://en.wikipedia.org/wiki/Reactor_pattern for details.
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct reactor_t reactor_t;
 typedef struct reactor_object_t reactor_object_t;
 
@@ -89,7 +85,3 @@ bool reactor_change_registration(reactor_object_t* object,
 // may not be NULL. |obj| is invalid after calling this function so the caller
 // must drop all references to it.
 void reactor_unregister(reactor_object_t* obj);
-
-#ifdef __cplusplus
-}
-#endif
index 34d8dc4..6a3c3fa 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct ringbuffer_t ringbuffer_t;
 
 // NOTE:
@@ -64,7 +60,3 @@ size_t ringbuffer_pop(ringbuffer_t* rb, uint8_t* p, size_t length);
 // Deletes |length| bytes from the ringbuffer starting from the head
 // Return actual number of bytes deleted.
 size_t ringbuffer_delete(ringbuffer_t* rb, size_t length);
-
-#ifdef __cplusplus
-}
-#endif
index a3d47ad..9c8f6fb 100644 (file)
 
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 struct semaphore_t;
 typedef struct semaphore_t semaphore_t;
 
@@ -59,7 +55,3 @@ void semaphore_post(semaphore_t* semaphore);
 // The caller must not close the returned file descriptor. |semaphore| may not
 // be NULL.
 int semaphore_get_fd(const semaphore_t* semaphore);
-
-#ifdef __cplusplus
-}
-#endif
index 5b360b9..5cd8938 100644 (file)
 #include <stdint.h>
 #include <sys/types.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef struct reactor_t reactor_t;
 typedef struct socket_t socket_t;
 typedef uint16_t port_t;
@@ -111,7 +107,3 @@ void socket_register(socket_t* socket, reactor_t* reactor, void* context,
 // Unregisters |socket| from whichever reactor it is registered with, if any.
 // This function is idempotent.
 void socket_unregister(socket_t* socket);
-
-#ifdef __cplusplus
-}
-#endif
index 08b20c3..fd3b00c 100644 (file)
 
 #pragma once
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define FILESYSTEM_SOCKET_PREFIX "/tmp/"
 #define ANDROID_RESERVED_SOCKET_PREFIX "/dev/socket/"
 
@@ -38,7 +34,3 @@ extern "C" {
  */
 int osi_socket_make_sockaddr_un(const char* name, int namespaceId,
                                 struct sockaddr_un* p_addr, socklen_t* alen);
-
-#ifdef __cplusplus
-}
-#endif
index 4508a30..fc7514f 100644 (file)
 #define ANDROID_SOCKET_ENV_PREFIX "ANDROID_SOCKET_"
 #define ANDROID_SOCKET_DIR "/dev/socket"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * osi_android_get_control_socket - simple helper function to get the file
  * descriptor of our init-managed Unix domain socket. `name' is the name of the
@@ -72,7 +68,3 @@ extern int osi_socket_local_server_bind(int s, const char* name,
 extern int osi_socket_local_client_connect(int fd, const char* name,
                                            int namespaceId, int type);
 extern int osi_socket_local_client(const char* name, int namespaceId, int type);
-
-#ifdef __cplusplus
-}
-#endif
index 7f9ef80..de359f7 100644 (file)
 #include <stdbool.h>
 #include <stdlib.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define THREAD_NAME_MAX 16
 
 typedef struct reactor_t reactor_t;
@@ -79,7 +75,3 @@ reactor_t* thread_get_reactor(const thread_t* thread);
 
 // Returns the name of the given |thread|. |thread| may not be NULL.
 const char* thread_name(const thread_t* thread);
-
-#ifdef __cplusplus
-}
-#endif
index 8392484..46ac704 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef uint64_t period_ms_t;
 
 // Get the OS boot time in milliseconds.
@@ -41,7 +37,3 @@ uint32_t time_get_os_boottime_ms(void);
 
 // Get the OS boot time in microseconds.
 uint64_t time_get_os_boottime_us(void);
-
-#ifdef __cplusplus
-}
-#endif
index 0d8415f..502f9fb 100644 (file)
 #include <hardware/bluetooth.h>
 #include <stdbool.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Set the Bluetooth OS callouts to |callouts|.
 // This function should be called when native kernel wakelocks are not used
 // directly. If this function is not called, or |callouts| is NULL, then native
@@ -56,7 +52,3 @@ void wakelock_set_paths(const char* lock_path, const char* unlock_path);
 // Dump wakelock-related debug info to the |fd| file descriptor.
 // The caller is responsible for closing the |fd|.
 void wakelock_debug_dump(int fd);
-
-#ifdef __cplusplus
-}
-#endif
index 007d9a4..cbaa967 100644 (file)
 
 #pragma once
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // Helper macros for stubbing out functions and modules for testing.
 
 // Stub out a function, with call counting and mode awareness
@@ -103,7 +99,3 @@ extern "C" {
 #define CURRENT_TEST_MODE _current_mode
 
 #define TEST_MODES_T _test_modes_t
-
-#ifdef __cplusplus
-}
-#endif
index a22bd5a..6fb4543 100644 (file)
 
 #include "a2dp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -66,8 +62,4 @@ extern tA2DP_CB a2dp_cb;
 /* Used only for conformance testing */
 extern void a2dp_set_avdt_sdp_ver(uint16_t avdt_sdp_ver);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* A2DP_INT_H */
index 5a73866..9674cbc 100644 (file)
 #include "l2c_api.h"
 #include "osi/include/fixed_queue.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  * constants
  ****************************************************************************/
@@ -224,8 +220,4 @@ extern tAVCT_CB avct_cb;
 extern const tL2CAP_APPL_INFO avct_l2c_appl;
 extern const tL2CAP_APPL_INFO avct_l2c_br_appl;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVCT_INT_H */
index fb6ead2..5a90433 100644 (file)
 #include "osi/include/alarm.h"
 #include "osi/include/fixed_queue.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifndef AVDT_DEBUG
 #define AVDT_DEBUG false
 #endif
@@ -715,8 +711,5 @@ extern const tL2CAP_APPL_INFO avdt_l2c_appl;
 
 /* reject message event lookup table */
 extern const uint8_t avdt_msg_rej_2_evt[];
-#ifdef __cplusplus
-}
-#endif
 
 #endif /* AVDT_INT_H */
index de30595..d6c79c8 100644 (file)
 #include "osi/include/alarm.h"
 #include "osi/include/fixed_queue.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*      DEBUG FLAGS
  *
  * #define META_DEBUG_ENABLED
@@ -177,8 +173,4 @@ extern void avrc_flush_cmd_q(uint8_t handle);
 void avrc_start_cmd_timer(uint8_t handle, uint8_t label, uint8_t msg_mask);
 void avrc_send_next_vendor_cmd(uint8_t handle);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVRC_INT_H */
index 60a3113..9703963 100644 (file)
 #include "btm_int.h"
 #include "btu.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* BNEP frame types
 */
 #define BNEP_FRAME_GENERAL_ETHERNET 0x00
@@ -235,8 +231,4 @@ extern tBNEP_RESULT bnep_is_packet_allowed(tBNEP_CONN* p_bcb,
                                            uint8_t* p_data);
 extern uint32_t bnep_get_uuid32(tBT_UUID* src_uuid);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 30f1aec..204622e 100644 (file)
 #include "hcidefs.h"
 #include "smp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 extern void btm_ble_refresh_raddr_timer_timeout(void* data);
 extern void btm_ble_process_adv_pkt(uint8_t* p);
 extern void btm_ble_proc_scan_rsp_rpt(uint8_t* p);
@@ -197,8 +193,4 @@ extern void btm_set_random_address(BD_ADDR random_bda);
 extern void btm_ble_set_keep_rfu_in_auth_req(bool keep_rfu);
 #endif
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 5871ad5..656d30c 100644 (file)
 
 #include "osi/include/alarm.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* scanning enable status */
 #define BTM_BLE_SCAN_ENABLE 0x01
 #define BTM_BLE_SCAN_DISABLE 0x00
@@ -343,8 +339,4 @@ typedef struct {
   uint8_t link_count[2];          /* total link count master and slave*/
 } tBTM_BLE_CB;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif  // BTM_BLE_INT_TYPES_H
index 7852d0b..fcda0dc 100644 (file)
 #include "btm_int_types.h"
 #include "smp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 extern tBTM_CB btm_cb;
 
 /* Internal functions provided by btm_main.cc
@@ -276,8 +272,4 @@ extern void btm_acl_paging(BT_HDR* p, BD_ADDR dest);
 extern uint8_t btm_sec_clr_service_by_psm(uint16_t psm);
 extern void btm_sec_clr_temp_auth_service(BD_ADDR bda);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 46b0582..c4fba35 100644 (file)
 #include "osi/include/list.h"
 #include "rfcdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];
 
 #define BTM_ACL_IS_CONNECTED(bda) \
@@ -883,8 +879,4 @@ typedef struct {
 
 typedef uint8_t tBTM_SEC_ACTION;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif  // BTM_INT_TYPES_H
index 7a75390..03a33dd 100644 (file)
 
 #include <string.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define GATT_CREATE_CONN_ID(tcb_idx, gatt_if) \
   ((uint16_t)((((uint8_t)(tcb_idx)) << 8) | ((uint8_t)(gatt_if))))
 #define GATT_GET_TCB_IDX(conn_id) ((uint8_t)(((uint16_t)(conn_id)) >> 8))
@@ -449,10 +445,6 @@ extern void gatt_set_err_rsp(bool enable, uint8_t req_op_code,
                              uint8_t err_status);
 #endif
 
-#ifdef __cplusplus
-}
-#endif
-
 /* from gatt_main.cc */
 extern bool gatt_disconnect(tGATT_TCB* p_tcb);
 extern bool gatt_act_connect(tGATT_REG* p_reg, BD_ADDR bd_addr,
index 38f32a2..e584320 100644 (file)
 #include "hidh_api.h"
 #include "l2c_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 enum { HID_DEV_NO_CONN, HID_DEV_CONNECTED };
 
 typedef struct per_device_ctb {
@@ -79,8 +75,4 @@ extern void hidh_try_repage(uint8_t dhandle);
  ******************************************************************************/
 extern tHID_HOST_CTB hh_cb;
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 62a2af4..6c6914c 100644 (file)
 #include "bt_target.h"
 #include "bt_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -277,8 +273,4 @@ extern uint16_t AVCT_GetPeerMtu(uint8_t handle);
 extern uint16_t AVCT_MsgReq(uint8_t handle, uint8_t label, uint8_t cr,
                             BT_HDR* p_msg);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVCT_API_H */
index def0ecd..24108bc 100644 (file)
 #include "bt_target.h"
 #include "bt_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -925,8 +921,4 @@ extern uint16_t AVDT_SendReport(uint8_t handle, AVDT_REPORT_TYPE type,
  *****************************************************************************/
 extern uint8_t AVDT_SetTraceLevel(uint8_t new_level);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVDT_API_H */
index 4748b44..6009a8c 100644 (file)
 
 #include "avdt_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* start AVDTC events here to distinguish from AVDT events */
 #define AVDTC_EVT_BEGIN 0x80
 
@@ -237,8 +233,4 @@ extern void AVDTC_AbortRsp(uint8_t handle, uint8_t label);
 extern void AVDTC_Rej(uint8_t handle, BD_ADDR bd_addr, uint8_t cmd,
                       uint8_t label, uint8_t err_code, uint8_t err_param);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVDT_CAPI_H */
index 9e72a56..5227089 100644 (file)
 #include "bt_target.h"
 #include "sdp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  constants
  ****************************************************************************/
@@ -708,8 +704,4 @@ extern bool AVRC_IsValidAvcType(uint8_t pdu_id, uint8_t avc_type);
  ******************************************************************************/
 extern bool AVRC_IsValidPlayerAttr(uint8_t attr);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* AVRC_API_H */
index 7f089dd..2ee910e 100644 (file)
@@ -29,7 +29,6 @@
 
 using MultiAdvCb = base::Callback<void(uint8_t /* status */)>;
 
-extern "C" {
 // methods we must have defined
 void btm_ble_update_dmt_flag_bits(uint8_t* flag_value,
                                   const uint16_t connect_mode,
@@ -40,7 +39,6 @@ void btm_acl_update_conn_addr(uint8_t conn_handle, BD_ADDR address);
 // methods we expose to c code:
 void btm_ble_multi_adv_cleanup(void);
 void btm_ble_multi_adv_init();
-}
 
 typedef struct {
   uint16_t adv_int_min;
index 4a3b940..95b6122 100644 (file)
 
 #include "l2c_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -429,8 +425,4 @@ extern void BNEP_Init(void);
  ******************************************************************************/
 extern tBNEP_RESULT BNEP_GetStatus(uint16_t handle, tBNEP_STATUS* p_status);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 5e7c937..cadf1f7 100644 (file)
 
 #include "btm_api_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  DEVICE CONTROL and COMMON
  ****************************************************************************/
@@ -2092,8 +2088,4 @@ extern void BTM_PCM2Setup_Write(bool clk_master, tBTM_VSC_CMPL_CB* p_arc_cb);
  ******************************************************************************/
 extern tBTM_CONTRL_STATE BTM_PM_ReadControllerState(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BTM_API_H */
index 8ce50af..b1f2d65 100644 (file)
 #include "btm_ble_api_types.h"
 #include "osi/include/alarm.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 tBTM_BLE_SCAN_SETUP_CBACK bta_ble_scan_setup_cb;
 
 /*****************************************************************************
@@ -914,8 +910,4 @@ extern tBTM_STATUS BTM_SetBleDataLength(BD_ADDR bd_addr,
 
 extern void btm_ble_multi_adv_cleanup(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 87aab69..dabddee 100644 (file)
 
 #include <hardware/bt_common_types.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define CHNL_MAP_LEN 5
 typedef uint8_t tBTM_BLE_CHNL_MAP[CHNL_MAP_LEN];
 
@@ -697,8 +693,4 @@ typedef void(tBTM_BLE_SCAN_REQ_CBACK)(BD_ADDR remote_bda,
 typedef void (*tBLE_SCAN_PARAM_SETUP_CBACK)(tGATT_IF client_if,
                                             tBTM_STATUS status);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif  // BTM_BLE_API_TYPES_H
index eb61309..b9947a3 100644 (file)
 #include "bt_target.h"
 #include "osi/include/alarm.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 // HACK(zachoverflow): temporary dark magic
 #define BTU_POST_TO_TASK_NO_GOOD_HORRIBLE_HACK \
   0x1700  // didn't look used in bt_types...here goes nothing
@@ -81,8 +77,4 @@ extern void btu_free_core(void);
 void BTU_StartUp(void);
 void BTU_ShutDown(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 56532cc..7954296 100644 (file)
 #include "l2c_api.h"
 #include "profiles_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -400,8 +396,4 @@ extern bool GAP_BleReadPeerAddressResolutionCap(BD_ADDR peer_bda,
  ******************************************************************************/
 extern bool GAP_BleCancelReadPeerDevName(BD_ADDR peer_bda);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* GAP_API_H */
index 53cde7e..7c583c3 100644 (file)
 #include "btm_ble_api.h"
 #include "gattdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -1093,8 +1089,4 @@ extern void gatt_notify_enc_cmpl(BD_ADDR bd_addr);
 // Reset bg device list.
 extern void gatt_reset_bgdev_list(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* GATT_API_H */
index 598d6fd..2c7e4a3 100644 (file)
 #include "bt_types.h"
 #include "hcidefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 void bte_main_hci_send(BT_HDR* p_msg, uint16_t event);
 void bte_main_lpm_allow_bt_device_sleep(void);
 
@@ -828,8 +824,4 @@ extern void btsnd_hcic_write_authenticated_payload_tout(uint16_t handle,
 #define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_HANDLE_OFF 0
 #define HCI__WRITE_AUTHENT_PAYLOAD_TOUT_TOUT_OFF 2
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 3529e4f..9ff6f49 100644 (file)
 #include "hiddefs.h"
 #include "sdp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -232,8 +228,4 @@ bool hid_known_hid_device(BD_ADDR bd_addr);
  ******************************************************************************/
 extern uint8_t HID_HostSetTraceLevel(uint8_t new_level);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* HIDH_API_H */
index ac5f133..a1c72a7 100644 (file)
 #include "hcidefs.h"
 #include "l2cdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -1237,8 +1233,4 @@ extern uint8_t L2CA_GetBleConnRole(BD_ADDR bd_addr);
 extern uint16_t L2CA_GetDisconnectReason(BD_ADDR remote_bda,
                                          tBT_TRANSPORT transport);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* L2C_API_H */
index 860d37c..037d280 100644 (file)
 #include "bt_target.h"
 #include "l2c_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* move the following to bt_target.h or other place later */
 #define MCA_NUM_TC_TBL ((MCA_NUM_REGS) * (MCA_NUM_LINKS) * (MCA_NUM_MDLS + 1))
 /* Number of control channel control blocks    */
@@ -515,8 +511,4 @@ extern tMCA_RESULT MCA_WriteReq(tMCA_DL mdl, BT_HDR* p_pkt);
  ******************************************************************************/
 extern uint16_t MCA_GetL2CapChannel(tMCA_DL mdl);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* MCA_API_H */
index f220e3d..b4c880c 100644 (file)
 
 #include "bnep_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -424,8 +420,4 @@ extern uint8_t PAN_SetTraceLevel(uint8_t new_level);
  ******************************************************************************/
 extern void PAN_Init(void);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* PAN_API_H */
index 15aea9f..ac7aeab 100644 (file)
 
 #include "bt_target.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants and Types
  ****************************************************************************/
@@ -653,8 +649,4 @@ extern uint8_t PORT_SetTraceLevel(uint8_t new_level);
  ******************************************************************************/
 extern const char* PORT_GetResultString(const uint8_t result_code);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* PORT_API_H */
index 3f1dd43..a5eead1 100644 (file)
 #include "bt_target.h"
 #include "sdpdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  Constants
  ****************************************************************************/
@@ -646,8 +642,4 @@ bool SDP_FindServiceUUIDInRec(tSDP_DISC_REC* p_rec, tBT_UUID* p_uuid);
 // The result with the expanded 128-bit UUID is stored in |p_uuid128|.
 void sdpu_uuid16_to_uuid128(uint16_t uuid16, uint8_t* p_uuid128);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* SDP_API_H */
index d448555..7e84217 100644 (file)
 #include "bt_target.h"
 #include "smp_api_types.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  *  External Function Declarations
  ****************************************************************************/
@@ -242,7 +238,4 @@ extern void smp_link_encrypted(BD_ADDR bda, uint8_t encr_enable);
 bool aes_cipher_msg_auth_code(BT_OCTET16 key, uint8_t* input, uint16_t length,
                               uint16_t tlen, uint8_t* p_signature);
 
-#ifdef __cplusplus
-}
-#endif
 #endif /* SMP_API_H */
index 636da26..3e47aad 100644 (file)
 
 #include "bt_target.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define SMP_PIN_CODE_LEN_MAX PIN_CODE_LEN
 #define SMP_PIN_CODE_LEN_MIN 6
 
@@ -279,8 +275,4 @@ typedef uint8_t(tSMP_CALLBACK)(tSMP_EVT event, BD_ADDR bd_addr,
 typedef void(tCMAC_CMPL_CBACK)(uint8_t* p_mac, uint16_t tlen,
                                uint32_t sign_counter);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif  // SMP_API_TYPES_H
index 4a64a7c..3219e20 100644 (file)
 #include "gatt_api.h"
 #include "gattdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define DIS_SUCCESS GATT_SUCCESS
 #define DIS_ILLEGAL_PARAM GATT_ILLEGAL_PARAMETER
 #define DIS_NO_RESOURCES GATT_NO_RESOURCES
@@ -200,8 +196,4 @@ extern void Battery_Rsp(uint8_t app_id, tGATT_STATUS st, uint8_t event,
 extern void Battery_Notify(uint8_t app_id, BD_ADDR remote_bda,
                            uint8_t battery_level);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index c979300..05a026a 100644 (file)
 #include "osi/include/fixed_queue.h"
 #include "osi/include/list.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define L2CAP_MIN_MTU 48 /* Minimum acceptable MTU is 48 bytes */
 
 /* LE credit based L2CAP connection parameters */
@@ -828,8 +824,4 @@ extern void l2cble_process_data_length_change_event(uint16_t handle,
 
 extern void l2cu_process_fixed_disc_cback(tL2C_LCB* p_lcb);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index ff1366f..b2e449b 100644 (file)
 #include "mca_api.h"
 #include "osi/include/alarm.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*****************************************************************************
  * constants
  ****************************************************************************/
@@ -371,8 +367,4 @@ extern const tL2CAP_APPL_INFO mca_l2c_int_appl;
 extern const tL2CAP_FCR_OPTS mca_l2c_fcr_opts_def;
 extern const uint8_t mca_std_msg_len[];
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* MCA_INT_H */
index 75e17e6..b9cd343 100644 (file)
 
 #include "pan_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * This role is used to shutdown the profile. Used internally
  * Applications should call PAN_Deregister to shutdown the profile
@@ -129,8 +125,4 @@ extern void pan_dump_status(void);
 
 /******************************************************************************/
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index bfb793d..8534e30 100644 (file)
 #include "port_api.h"
 #include "rfcdefs.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Local events passed when application event is sent from the api to PORT */
 /* ???*/
 #define PORT_EVENT_OPEN (1 | BT_EVT_TO_BTU_SP_EVT)
@@ -242,8 +238,4 @@ extern void port_start_control(tPORT* p_port);
 extern void port_start_close(tPORT* p_port);
 extern void port_rfc_closed(tPORT* p_port, uint8_t res);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 36a505a..2505595 100644 (file)
 #include "l2c_api.h"
 #include "port_int.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /*
  * Define RFCOMM result codes
 */
@@ -379,8 +375,4 @@ extern void PORT_ControlCnf(tRFC_MCB* p_mcb, uint8_t dlci, tPORT_CTRL* p_pars);
 extern void PORT_LineStatusInd(tRFC_MCB* p_mcb, uint8_t dlci,
                                uint8_t line_status);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 5dfa082..9c1f112 100644 (file)
 #include "osi/include/alarm.h"
 #include "sdp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Continuation length - we use a 2-byte offset */
 #define SDP_CONTINUATION_LEN 2
 #define SDP_MAX_CONTINUATION_LEN 16 /* As per the spec */
@@ -306,8 +302,4 @@ extern void sdp_server_handle_client_req(tCONN_CB* p_ccb, BT_HDR* p_msg);
 extern void sdp_disc_connected(tCONN_CB* p_ccb);
 extern void sdp_disc_server_rsp(tCONN_CB* p_ccb, BT_HDR* p_msg);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif
index 0fca16d..52331d4 100644 (file)
 #include "btu.h"
 #include "smp_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* Legacy mode */
 #define SMP_MODEL_ENCRYPTION_ONLY 0 /* Just Works model */
 #define SMP_MODEL_PASSKEY 1         /* Passkey Entry model, input the key */
@@ -360,10 +356,6 @@ typedef void (*tSMP_ACT)(tSMP_CB* p_cb, tSMP_INT_DATA* p_data);
 
 extern tSMP_CB smp_cb;
 
-#ifdef __cplusplus
-}
-#endif
-
 /* Functions provided by att_main.cc */
 extern void smp_init(void);
 
index f649af0..fc191e8 100644 (file)
 #include "gatt_api.h"
 #include "srvc_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #ifndef BA_MAX_INT_NUM
 #define BA_MAX_INT_NUM 4
 #endif
@@ -67,7 +63,4 @@ extern uint8_t battery_s_read_attr_value(uint8_t clcb_idx, uint16_t handle,
                                          tGATT_VALUE* p_value, bool is_long,
                                          tGATT_STATUS* p_status);
 
-#ifdef __cplusplus
-}
-#endif
 #endif
index d690adc..880f068 100644 (file)
 #include "srvc_api.h"
 #include "srvc_eng_int.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define DIS_MAX_CHAR_NUM 9
 
 typedef struct {
@@ -67,7 +63,4 @@ extern uint8_t dis_write_attr_value(tGATT_WRITE_REQ* p_data,
 extern void dis_c_cmpl_cback(tSRVC_CLCB* p_clcb, tGATTC_OPTYPE op,
                              tGATT_STATUS status, tGATT_CL_COMPLETE* p_data);
 
-#ifdef __cplusplus
-}
-#endif
 #endif
index f2b132b..3362748 100644 (file)
 #include "gatt_api.h"
 #include "srvc_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define SRVC_MAX_APPS GATT_CL_MAX_LCB
 
 #define SRVC_ID_NONE 0
@@ -70,7 +66,4 @@ extern void srvc_sr_rsp(uint8_t clcb_idx, tGATT_STATUS st, tGATTS_RSP* p_rsp);
 extern void srvc_sr_notify(BD_ADDR remote_bda, uint16_t handle, uint16_t len,
                            uint8_t* p_value);
 
-#ifdef __cplusplus
-}
-#endif
 #endif
index 5d00f54..9ca1505 100644 (file)
 #ifndef UIPC_H
 #define UIPC_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define UIPC_CH_ID_AV_CTRL 0
 #define UIPC_CH_ID_AV_AUDIO 1
 #define UIPC_CH_NUM 2
@@ -127,8 +123,4 @@ uint32_t UIPC_Read(tUIPC_CH_ID ch_id, uint16_t* p_msg_evt, uint8_t* p_buf,
  ******************************************************************************/
 bool UIPC_Ioctl(tUIPC_CH_ID ch_id, uint32_t request, void* param);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* UIPC_H */
index 98d085c..a205675 100644 (file)
 #ifndef _UIPC_LINUX_H_
 #define _UIPC_LINUX_H_
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 typedef int SOCKET;
 #define INVALID_SOCKET (SOCKET)(-1)
 #define SOCKET_ERROR (-1)
@@ -35,7 +31,4 @@ typedef struct {
 /* Socket configuration for GLGPS interface */
 extern tUIPC_LINUX_CFG_TCP uipc_linux_cfg_glgps;
 
-#ifdef __cplusplus
-}
-#endif
 #endif /* _UIPC_LINUX_H_ */
index b648d65..892855e 100644 (file)
 #ifndef BT_UTILS_H
 #define BT_UTILS_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 static const char BT_UTILS_MODULE[] = "bt_utils_module";
 
 /*******************************************************************************
@@ -42,8 +38,4 @@ typedef enum {
 void raise_priority_a2dp(tHIGH_PRIORITY_TASK high_task);
 void adjust_priority_a2dp(int start);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif /* BT_UTILS_H */
index 5740e89..793e85f 100644 (file)
 #include "bt_types.h"
 #include "btm_api.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /****************************************************************************
  *  Resolvable private address offload VSC specific definitions
  *****************************************************************************/
@@ -35,8 +31,4 @@ enum { BTM_BLE_PRIVACY_ENABLE, BTM_BLE_PRIVACY_DISABLE };
 
 #endif
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif