Home | History | Annotate | Download | only in dm
      1 /******************************************************************************
      2  *
      3  *  Copyright 2003-2012 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 /******************************************************************************
     20  *
     21  *  This is the private interface file for the BTA device manager.
     22  *
     23  ******************************************************************************/
     24 #ifndef BTA_DM_INT_H
     25 #define BTA_DM_INT_H
     26 
     27 #include <memory>
     28 #include "bt_target.h"
     29 #include "bta_sys.h"
     30 
     31 #include "bta_gatt_api.h"
     32 
     33 /*****************************************************************************
     34  *  Constants and data types
     35  ****************************************************************************/
     36 
     37 #define BTA_COPY_DEVICE_CLASS(coddst, codsrc)          \
     38   {                                                    \
     39     ((uint8_t*)(coddst))[0] = ((uint8_t*)(codsrc))[0]; \
     40     ((uint8_t*)(coddst))[1] = ((uint8_t*)(codsrc))[1]; \
     41     ((uint8_t*)(coddst))[2] = ((uint8_t*)(codsrc))[2]; \
     42   }
     43 
     44 #define BTA_DM_MSG_LEN 50
     45 
     46 #define BTA_SERVICE_ID_TO_SERVICE_MASK(id) (1 << (id))
     47 
     48 /* DM search events */
     49 enum {
     50   /* DM search API events */
     51   BTA_DM_API_SEARCH_EVT = BTA_SYS_EVT_START(BTA_ID_DM_SEARCH),
     52   BTA_DM_API_SEARCH_CANCEL_EVT,
     53   BTA_DM_API_DISCOVER_EVT,
     54   BTA_DM_INQUIRY_CMPL_EVT,
     55   BTA_DM_REMT_NAME_EVT,
     56   BTA_DM_SDP_RESULT_EVT,
     57   BTA_DM_SEARCH_CMPL_EVT,
     58   BTA_DM_DISCOVERY_RESULT_EVT,
     59   BTA_DM_API_DI_DISCOVER_EVT,
     60   BTA_DM_DISC_CLOSE_TOUT_EVT
     61 
     62 };
     63 
     64 enum {
     65   BTA_DM_RS_NONE, /* straight API call */
     66   BTA_DM_RS_OK,   /* the role switch result - successful */
     67   BTA_DM_RS_FAIL  /* the role switch result - failed */
     68 };
     69 typedef uint8_t tBTA_DM_RS_RES;
     70 
     71 /* data type for BTA_DM_API_SEARCH_EVT */
     72 typedef struct {
     73   BT_HDR hdr;
     74   tBTA_DM_INQ inq_params;
     75   tBTA_SERVICE_MASK services;
     76   tBTA_DM_SEARCH_CBACK* p_cback;
     77   tBTA_DM_RS_RES rs_res;
     78   uint8_t num_uuid;
     79   bluetooth::Uuid* p_uuid;
     80 } tBTA_DM_API_SEARCH;
     81 
     82 /* data type for BTA_DM_API_DISCOVER_EVT */
     83 typedef struct {
     84   BT_HDR hdr;
     85   RawAddress bd_addr;
     86   tBTA_SERVICE_MASK services;
     87   tBTA_DM_SEARCH_CBACK* p_cback;
     88   bool sdp_search;
     89   tBTA_TRANSPORT transport;
     90   uint8_t num_uuid;
     91   bluetooth::Uuid* p_uuid;
     92   bluetooth::Uuid uuid;
     93 } tBTA_DM_API_DISCOVER;
     94 
     95 /* data type for BTA_DM_API_DI_DISC_EVT */
     96 typedef struct {
     97   BT_HDR hdr;
     98   RawAddress bd_addr;
     99   tBTA_DISCOVERY_DB* p_sdp_db;
    100   uint32_t len;
    101   tBTA_DM_SEARCH_CBACK* p_cback;
    102 } tBTA_DM_API_DI_DISC;
    103 
    104 typedef struct {
    105   RawAddress bd_addr;
    106   bool accept;
    107   uint8_t pin_len;
    108   uint8_t p_pin[PIN_CODE_LEN];
    109 } tBTA_DM_API_PIN_REPLY;
    110 
    111 typedef struct {
    112   BT_HDR hdr;
    113   RawAddress bd_addr;
    114   tBTA_IO_CAP io_cap;
    115   tBTA_OOB_DATA oob_data;
    116   tBTA_AUTH_REQ auth_req;
    117 } tBTA_DM_CI_IO_REQ;
    118 
    119 typedef struct {
    120   RawAddress bd_addr;
    121   BT_OCTET16 c;
    122   BT_OCTET16 r;
    123   bool accept;
    124 } tBTA_DM_CI_RMT_OOB;
    125 
    126 /* data type for BTA_DM_REMT_NAME_EVT */
    127 typedef struct {
    128   BT_HDR hdr;
    129   tBTA_DM_SEARCH result;
    130 } tBTA_DM_REM_NAME;
    131 
    132 /* data type for tBTA_DM_DISC_RESULT */
    133 typedef struct {
    134   BT_HDR hdr;
    135   tBTA_DM_SEARCH result;
    136 } tBTA_DM_DISC_RESULT;
    137 
    138 /* data type for BTA_DM_INQUIRY_CMPL_EVT */
    139 typedef struct {
    140   BT_HDR hdr;
    141   uint8_t num;
    142 } tBTA_DM_INQUIRY_CMPL;
    143 
    144 /* data type for BTA_DM_SDP_RESULT_EVT */
    145 typedef struct {
    146   BT_HDR hdr;
    147   uint16_t sdp_result;
    148 } tBTA_DM_SDP_RESULT;
    149 
    150 typedef struct {
    151   RawAddress bd_addr;
    152   DEV_CLASS dc;
    153   LINK_KEY link_key;
    154   tBTA_SERVICE_MASK tm;
    155   bool is_trusted;
    156   uint8_t key_type;
    157   tBTA_IO_CAP io_cap;
    158   bool link_key_known;
    159   bool dc_known;
    160   BD_NAME bd_name;
    161   uint8_t
    162       features[BTA_FEATURE_BYTES_PER_PAGE * (BTA_EXT_FEATURES_PAGE_MAX + 1)];
    163   uint8_t pin_length;
    164 } tBTA_DM_API_ADD_DEVICE;
    165 
    166 typedef struct {
    167   BT_HDR hdr;
    168   bool enable;
    169 } tBTA_DM_API_BLE_FEATURE;
    170 
    171 /* union of all data types */
    172 typedef union {
    173   /* GKI event buffer header */
    174   BT_HDR hdr;
    175 
    176   tBTA_DM_API_SEARCH search;
    177 
    178   tBTA_DM_API_DISCOVER discover;
    179 
    180   tBTA_DM_REM_NAME rem_name;
    181 
    182   tBTA_DM_DISC_RESULT disc_result;
    183 
    184   tBTA_DM_INQUIRY_CMPL inq_cmpl;
    185 
    186   tBTA_DM_SDP_RESULT sdp_event;
    187 
    188   tBTA_DM_API_DI_DISC di_disc;
    189 
    190 } tBTA_DM_MSG;
    191 
    192 #define BTA_DM_NUM_PEER_DEVICE 7
    193 
    194 #define BTA_DM_NOT_CONNECTED 0
    195 #define BTA_DM_CONNECTED 1
    196 #define BTA_DM_UNPAIRING 2
    197 typedef uint8_t tBTA_DM_CONN_STATE;
    198 
    199 #define BTA_DM_DI_NONE 0x00 /* nothing special */
    200 #define BTA_DM_DI_USE_SSR \
    201   0x10 /* set this bit if ssr is supported for this link */
    202 #define BTA_DM_DI_AV_ACTIVE \
    203   0x20 /* set this bit if AV is active for this link */
    204 #define BTA_DM_DI_SET_SNIFF \
    205   0x01 /* set this bit if call BTM_SetPowerMode(sniff) */
    206 #define BTA_DM_DI_INT_SNIFF \
    207   0x02 /* set this bit if call BTM_SetPowerMode(sniff) & enter sniff mode */
    208 #define BTA_DM_DI_ACP_SNIFF 0x04 /* set this bit if peer init sniff */
    209 typedef uint8_t tBTA_DM_DEV_INFO;
    210 
    211 /* set power mode request type */
    212 #define BTA_DM_PM_RESTART 1
    213 #define BTA_DM_PM_NEW_REQ 2
    214 #define BTA_DM_PM_EXECUTE 3
    215 typedef uint8_t tBTA_DM_PM_REQ;
    216 
    217 typedef struct {
    218   RawAddress peer_bdaddr;
    219   uint16_t link_policy;
    220   tBTA_DM_CONN_STATE conn_state;
    221   tBTA_PREF_ROLES pref_role;
    222   bool in_use;
    223   tBTA_DM_DEV_INFO info;
    224   tBTA_DM_ENCRYPT_CBACK* p_encrypt_cback;
    225 #if (BTM_SSR_INCLUDED == TRUE)
    226   tBTM_PM_STATUS prev_low; /* previous low power mode used */
    227 #endif
    228   tBTA_DM_PM_ACTION pm_mode_attempted;
    229   tBTA_DM_PM_ACTION pm_mode_failed;
    230   bool remove_dev_pending;
    231   uint16_t conn_handle;
    232   tBT_TRANSPORT transport;
    233 } tBTA_DM_PEER_DEVICE;
    234 
    235 /* structure to store list of
    236   active connections */
    237 typedef struct {
    238   tBTA_DM_PEER_DEVICE peer_device[BTA_DM_NUM_PEER_DEVICE];
    239   uint8_t count;
    240   uint8_t le_count;
    241 } tBTA_DM_ACTIVE_LINK;
    242 
    243 typedef struct {
    244   RawAddress peer_bdaddr;
    245   tBTA_SYS_ID id;
    246   uint8_t app_id;
    247   tBTA_SYS_CONN_STATUS state;
    248   bool new_request;
    249 
    250 } tBTA_DM_SRVCS;
    251 
    252 #ifndef BTA_DM_NUM_CONN_SRVS
    253 #define BTA_DM_NUM_CONN_SRVS 10
    254 #endif
    255 
    256 typedef struct {
    257   uint8_t count;
    258   tBTA_DM_SRVCS conn_srvc[BTA_DM_NUM_CONN_SRVS];
    259 
    260 } tBTA_DM_CONNECTED_SRVCS;
    261 
    262 typedef struct {
    263 #define BTA_DM_PM_SNIFF_TIMER_IDX 0
    264 #define BTA_DM_PM_PARK_TIMER_IDX 1
    265 #define BTA_DM_PM_SUSPEND_TIMER_IDX 2
    266 #define BTA_DM_PM_MODE_TIMER_MAX 3
    267   /*
    268    * Keep three different timers for PARK, SNIFF and SUSPEND if TBFC is
    269    * supported.
    270    */
    271   alarm_t* timer[BTA_DM_PM_MODE_TIMER_MAX];
    272 
    273   uint8_t srvc_id[BTA_DM_PM_MODE_TIMER_MAX];
    274   uint8_t pm_action[BTA_DM_PM_MODE_TIMER_MAX];
    275   uint8_t active; /* number of active timer */
    276 
    277   RawAddress peer_bdaddr;
    278   bool in_use;
    279 } tBTA_PM_TIMER;
    280 
    281 extern tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs;
    282 
    283 #define BTA_DM_NUM_PM_TIMER 7
    284 
    285 /* DM control block */
    286 typedef struct {
    287   bool is_bta_dm_active;
    288   tBTA_DM_ACTIVE_LINK device_list;
    289   tBTA_DM_SEC_CBACK* p_sec_cback;
    290   tBTA_BLE_ENERGY_INFO_CBACK* p_energy_info_cback;
    291   uint16_t state;
    292   bool disabling;
    293   alarm_t* disable_timer;
    294   uint32_t wbt_sdp_handle; /* WIDCOMM Extensions SDP record handle */
    295   uint8_t wbt_scn;         /* WIDCOMM Extensions SCN */
    296   uint8_t num_master_only;
    297   uint8_t pm_id;
    298   tBTA_PM_TIMER pm_timer[BTA_DM_NUM_PM_TIMER];
    299   uint32_t
    300       role_policy_mask;   /* the bits set indicates the modules that wants to
    301                              remove role switch from the default link policy */
    302   uint16_t cur_policy;    /* current default link policy */
    303   uint16_t rs_event;      /* the event waiting for role switch */
    304   uint8_t cur_av_count;   /* current AV connecions */
    305   bool disable_pair_mode; /* disable pair mode or not */
    306   bool conn_paired_only;  /* allow connectable to paired device only or not */
    307   tBTA_DM_API_SEARCH search_msg;
    308   uint16_t page_scan_interval;
    309   uint16_t page_scan_window;
    310   uint16_t inquiry_scan_interval;
    311   uint16_t inquiry_scan_window;
    312 
    313   /* Storage for pin code request parameters */
    314   RawAddress pin_bd_addr;
    315   DEV_CLASS pin_dev_class;
    316   tBTA_DM_SEC_EVT pin_evt;
    317   tBTA_IO_CAP loc_io_caps;    /* IO Capabilities of local device */
    318   tBTA_IO_CAP rmt_io_caps;    /* IO Capabilities of remote device */
    319   tBTA_AUTH_REQ loc_auth_req; /* Authentication required for local device */
    320   tBTA_AUTH_REQ rmt_auth_req;
    321   uint32_t num_val; /* the numeric value for comparison. If just_works, do not
    322                        show this number to UI */
    323   bool just_works;  /* true, if "Just Works" association model */
    324 #if (BTA_EIR_CANNED_UUID_LIST != TRUE)
    325   /* store UUID list for EIR */
    326   uint32_t eir_uuid[BTM_EIR_SERVICE_ARRAY_SIZE];
    327 #if (BTA_EIR_SERVER_NUM_CUSTOM_UUID > 0)
    328   bluetooth::Uuid custom_uuid[BTA_EIR_SERVER_NUM_CUSTOM_UUID];
    329 #endif
    330 
    331 #endif
    332 
    333   tBTA_DM_ENCRYPT_CBACK* p_encrypt_cback;
    334   alarm_t* switch_delay_timer;
    335 
    336 } tBTA_DM_CB;
    337 
    338 /* DM search control block */
    339 typedef struct {
    340   tBTA_DM_SEARCH_CBACK* p_search_cback;
    341   tBTM_INQ_INFO* p_btm_inq_info;
    342   tBTA_SERVICE_MASK services;
    343   tBTA_SERVICE_MASK services_to_search;
    344   tBTA_SERVICE_MASK services_found;
    345   tSDP_DISCOVERY_DB* p_sdp_db;
    346   uint16_t state;
    347   RawAddress peer_bdaddr;
    348   bool name_discover_done;
    349   BD_NAME peer_name;
    350   alarm_t* search_timer;
    351   uint8_t service_index;
    352   tBTA_DM_MSG* p_search_queue; /* search or discover commands during search
    353                                   cancel stored here */
    354   bool wait_disc;
    355   bool sdp_results;
    356   bluetooth::Uuid uuid;
    357   uint8_t peer_scn;
    358   bool sdp_search;
    359   bool cancel_pending; /* inquiry cancel is pending */
    360   tBTA_TRANSPORT transport;
    361   tBTA_DM_SEARCH_CBACK* p_scan_cback;
    362   tGATT_IF client_if;
    363   uint8_t num_uuid;
    364   bluetooth::Uuid* p_srvc_uuid;
    365   uint8_t uuid_to_search;
    366   bool gatt_disc_active;
    367   uint16_t conn_id;
    368   uint8_t* p_ble_rawdata;
    369   uint32_t ble_raw_size;
    370   uint32_t ble_raw_used;
    371   alarm_t* gatt_close_timer; /* GATT channel close delay timer */
    372   RawAddress pending_close_bda; /* pending GATT channel remote device address */
    373 
    374 } tBTA_DM_SEARCH_CB;
    375 
    376 /* DI control block */
    377 typedef struct {
    378   tSDP_DISCOVERY_DB* p_di_db;         /* pointer to the DI discovery database */
    379   uint8_t di_num;                     /* total local DI record number */
    380   uint32_t di_handle[BTA_DI_NUM_MAX]; /* local DI record handle, the first one
    381                                          is primary record */
    382 } tBTA_DM_DI_CB;
    383 
    384 /* DM search state */
    385 enum {
    386 
    387   BTA_DM_SEARCH_IDLE,
    388   BTA_DM_SEARCH_ACTIVE,
    389   BTA_DM_SEARCH_CANCELLING,
    390   BTA_DM_DISCOVER_ACTIVE
    391 
    392 };
    393 
    394 typedef struct {
    395   DEV_CLASS dev_class; /* local device class */
    396   uint16_t
    397       policy_settings;   /* link policy setting hold, sniff, park, MS switch */
    398   uint16_t page_timeout; /* timeout for page in slots */
    399   uint16_t link_timeout; /* link supervision timeout in slots */
    400   bool avoid_scatter; /* true to avoid scatternet when av is streaming (be the
    401                          master) */
    402 
    403 } tBTA_DM_CFG;
    404 
    405 extern const uint32_t bta_service_id_to_btm_srv_id_lkup_tbl[];
    406 
    407 typedef struct {
    408   uint8_t id;
    409   uint8_t app_id;
    410   uint8_t cfg;
    411 
    412 } tBTA_DM_RM;
    413 
    414 extern const tBTA_DM_CFG* p_bta_dm_cfg;
    415 extern const tBTA_DM_RM* p_bta_dm_rm_cfg;
    416 
    417 typedef struct {
    418   uint8_t id;
    419   uint8_t app_id;
    420   uint8_t spec_idx; /* index of spec table to use */
    421 
    422 } tBTA_DM_PM_CFG;
    423 
    424 typedef struct {
    425   tBTA_DM_PM_ACTION power_mode;
    426   uint16_t timeout;
    427 
    428 } tBTA_DM_PM_ACTN;
    429 
    430 typedef struct {
    431   uint8_t allow_mask; /* mask of sniff/hold/park modes to allow */
    432 #if (BTM_SSR_INCLUDED == TRUE)
    433   uint8_t ssr; /* set SSR on conn open/unpark */
    434 #endif
    435   tBTA_DM_PM_ACTN actn_tbl[BTA_DM_PM_NUM_EVTS][2];
    436 
    437 } tBTA_DM_PM_SPEC;
    438 
    439 typedef struct {
    440   uint16_t max_lat;
    441   uint16_t min_rmt_to;
    442   uint16_t min_loc_to;
    443 } tBTA_DM_SSR_SPEC;
    444 
    445 typedef struct {
    446   uint16_t manufacturer;
    447   uint16_t lmp_sub_version;
    448   uint8_t lmp_version;
    449 } tBTA_DM_LMP_VER_INFO;
    450 
    451 extern const uint16_t bta_service_id_to_uuid_lkup_tbl[];
    452 
    453 extern const tBTA_DM_PM_CFG* p_bta_dm_pm_cfg;
    454 extern const tBTA_DM_PM_SPEC* p_bta_dm_pm_spec;
    455 extern const tBTM_PM_PWR_MD* p_bta_dm_pm_md;
    456 #if (BTM_SSR_INCLUDED == TRUE)
    457 extern tBTA_DM_SSR_SPEC* p_bta_dm_ssr_spec;
    458 #endif
    459 
    460 /* update dynamic BRCM Aware EIR data */
    461 extern const tBTA_DM_EIR_CONF bta_dm_eir_cfg;
    462 extern const tBTA_DM_EIR_CONF* p_bta_dm_eir_cfg;
    463 
    464 /* DM control block */
    465 extern tBTA_DM_CB bta_dm_cb;
    466 
    467 /* DM search control block */
    468 extern tBTA_DM_SEARCH_CB bta_dm_search_cb;
    469 
    470 /* DI control block */
    471 extern tBTA_DM_DI_CB bta_dm_di_cb;
    472 
    473 extern bool bta_dm_search_sm_execute(BT_HDR* p_msg);
    474 extern void bta_dm_search_sm_disable(void);
    475 
    476 extern void bta_dm_enable(tBTA_DM_SEC_CBACK*);
    477 extern void bta_dm_disable();
    478 extern void bta_dm_init_cb(void);
    479 extern void bta_dm_set_dev_name(const std::vector<uint8_t>&);
    480 extern void bta_dm_set_visibility(tBTA_DM_DISC, tBTA_DM_CONN, uint8_t, uint8_t);
    481 extern void bta_dm_set_scan_config(tBTA_DM_MSG* p_data);
    482 extern void bta_dm_vendor_spec_command(tBTA_DM_MSG* p_data);
    483 extern void bta_dm_bond(const RawAddress&, tBTA_TRANSPORT);
    484 extern void bta_dm_bond_cancel(const RawAddress&);
    485 extern void bta_dm_pin_reply(std::unique_ptr<tBTA_DM_API_PIN_REPLY> msg);
    486 extern void bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg);
    487 extern void bta_dm_remove_device(const RawAddress& bd_addr);
    488 extern void bta_dm_close_acl(const RawAddress&, bool, tBTA_TRANSPORT);
    489 
    490 extern void bta_dm_pm_btm_status(const RawAddress&, tBTM_PM_STATUS, uint16_t,
    491                                  uint8_t);
    492 extern void bta_dm_pm_timer(const RawAddress&, tBTA_DM_PM_ACTION);
    493 extern void bta_dm_add_ampkey(tBTA_DM_MSG* p_data);
    494 
    495 extern void bta_dm_add_blekey(const RawAddress& bd_addr,
    496                               tBTA_LE_KEY_VALUE blekey,
    497                               tBTA_LE_KEY_TYPE key_type);
    498 extern void bta_dm_add_ble_device(const RawAddress& bd_addr,
    499                                   tBLE_ADDR_TYPE addr_type,
    500                                   tBT_DEVICE_TYPE dev_type);
    501 extern void bta_dm_ble_passkey_reply(const RawAddress& bd_addr, bool accept,
    502                                      uint32_t passkey);
    503 extern void bta_dm_ble_confirm_reply(const RawAddress&, bool);
    504 extern void bta_dm_ble_set_conn_params(const RawAddress&, uint16_t, uint16_t,
    505                                        uint16_t, uint16_t);
    506 extern void bta_dm_ble_set_conn_scan_params(uint32_t, uint32_t);
    507 extern void bta_dm_close_gatt_conn(tBTA_DM_MSG* p_data);
    508 extern void bta_dm_ble_observe(bool, uint8_t, tBTA_DM_SEARCH_CBACK*);
    509 extern void bta_dm_ble_update_conn_params(const RawAddress&, uint16_t, uint16_t,
    510                                           uint16_t, uint16_t, uint16_t,
    511                                           uint16_t);
    512 extern void bta_dm_ble_config_local_privacy(bool);
    513 extern void bta_dm_ble_set_adv_params(uint16_t adv_int_min,
    514                                       uint16_t adv_int_max,
    515                                       tBLE_BD_ADDR* p_dir_bda);
    516 
    517 extern void bta_dm_ble_set_data_length(const RawAddress&, uint16_t);
    518 
    519 extern void bta_dm_ble_get_energy_info(tBTA_BLE_ENERGY_INFO_CBACK*);
    520 
    521 extern void bta_dm_set_encryption(const RawAddress&, tBTA_TRANSPORT,
    522                                   tBTA_DM_ENCRYPT_CBACK*, tBTA_DM_BLE_SEC_ACT);
    523 extern void bta_dm_confirm(const RawAddress&, bool);
    524 extern void bta_dm_ci_io_req_act(const RawAddress& bd_addr, tBTA_IO_CAP io_cap,
    525                                  tBTA_OOB_DATA oob_data,
    526                                  tBTA_AUTH_REQ auth_req);
    527 extern void bta_dm_ci_rmt_oob_act(std::unique_ptr<tBTA_DM_CI_RMT_OOB> msg);
    528 
    529 extern void bta_dm_init_pm(void);
    530 extern void bta_dm_disable_pm(void);
    531 
    532 extern uint8_t bta_dm_get_av_count(void);
    533 extern void bta_dm_search_start(tBTA_DM_MSG* p_data);
    534 extern void bta_dm_search_cancel(tBTA_DM_MSG* p_data);
    535 extern void bta_dm_discover(tBTA_DM_MSG* p_data);
    536 extern void bta_dm_di_disc(tBTA_DM_MSG* p_data);
    537 extern void bta_dm_inq_cmpl(tBTA_DM_MSG* p_data);
    538 extern void bta_dm_rmt_name(tBTA_DM_MSG* p_data);
    539 extern void bta_dm_sdp_result(tBTA_DM_MSG* p_data);
    540 extern void bta_dm_search_cmpl(tBTA_DM_MSG* p_data);
    541 extern void bta_dm_free_sdp_db(tBTA_DM_MSG* p_data);
    542 extern void bta_dm_disc_result(tBTA_DM_MSG* p_data);
    543 extern void bta_dm_search_result(tBTA_DM_MSG* p_data);
    544 extern void bta_dm_discovery_cmpl(tBTA_DM_MSG* p_data);
    545 extern void bta_dm_queue_search(tBTA_DM_MSG* p_data);
    546 extern void bta_dm_queue_disc(tBTA_DM_MSG* p_data);
    547 extern void bta_dm_search_clear_queue(tBTA_DM_MSG* p_data);
    548 extern void bta_dm_search_cancel_cmpl(tBTA_DM_MSG* p_data);
    549 extern void bta_dm_search_cancel_notify(tBTA_DM_MSG* p_data);
    550 extern void bta_dm_search_cancel_transac_cmpl(tBTA_DM_MSG* p_data);
    551 extern void bta_dm_disc_rmt_name(tBTA_DM_MSG* p_data);
    552 extern tBTA_DM_PEER_DEVICE* bta_dm_find_peer_device(
    553     const RawAddress& peer_addr);
    554 
    555 void bta_dm_eir_update_uuid(uint16_t uuid16, bool adding);
    556 
    557 extern void bta_dm_remove_all_acl(const tBTA_DM_LINK_TYPE);
    558 #endif /* BTA_DM_INT_H */
    559