• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 <base/strings/stringprintf.h>
28 #include <memory>
29 #include <string>
30 
31 #include "bt_target.h"  // Must be first to define build configuration
32 
33 #include "bta/include/bta_api.h"
34 #include "bta/include/bta_gatt_api.h"
35 #include "bta/sys/bta_sys.h"
36 #include "main/shim/dumpsys.h"
37 
38 #ifndef CASE_RETURN_TEXT
39 #define CASE_RETURN_TEXT(code) \
40   case code:                   \
41     return #code
42 #endif
43 
44 /*****************************************************************************
45  *  Constants and data types
46  ****************************************************************************/
47 
48 #define BTA_COPY_DEVICE_CLASS(coddst, codsrc)          \
49   {                                                    \
50     ((uint8_t*)(coddst))[0] = ((uint8_t*)(codsrc))[0]; \
51     ((uint8_t*)(coddst))[1] = ((uint8_t*)(codsrc))[1]; \
52     ((uint8_t*)(coddst))[2] = ((uint8_t*)(codsrc))[2]; \
53   }
54 
55 #define BTA_DM_MSG_LEN 50
56 
57 #define BTA_SERVICE_ID_TO_SERVICE_MASK(id) (1 << (id))
58 
59 /* DM search events */
60 enum {
61   /* DM search API events */
62   BTA_DM_API_SEARCH_EVT = BTA_SYS_EVT_START(BTA_ID_DM_SEARCH),
63   BTA_DM_API_DISCOVER_EVT,
64   BTA_DM_INQUIRY_CMPL_EVT,
65   BTA_DM_REMT_NAME_EVT,
66   BTA_DM_SDP_RESULT_EVT,
67   BTA_DM_SEARCH_CMPL_EVT,
68   BTA_DM_DISCOVERY_RESULT_EVT,
69   BTA_DM_DISC_CLOSE_TOUT_EVT,
70   BTA_DM_API_QUEUE_SEARCH_EVT,
71   BTA_DM_API_QUEUE_DISCOVER_EVT
72 };
73 
74 /* data type for BTA_DM_API_SEARCH_EVT and BTA_DM_API_QUEUE_SEARCH_EVT */
75 typedef struct {
76   BT_HDR_RIGID hdr;
77   tBTA_SERVICE_MASK services;
78   tBTA_DM_SEARCH_CBACK* p_cback;
79 } tBTA_DM_API_SEARCH;
80 
81 /* data type for BTA_DM_API_DISCOVER_EVT and BTA_DM_API_QUEUE_DISCOVER_EVT */
82 typedef struct {
83   BT_HDR_RIGID hdr;
84   RawAddress bd_addr;
85   tBTA_DM_SEARCH_CBACK* p_cback;
86   tBT_TRANSPORT transport;
87 } tBTA_DM_API_DISCOVER;
88 
89 typedef struct {
90   RawAddress bd_addr;
91   bool accept;
92   uint8_t pin_len;
93   uint8_t p_pin[PIN_CODE_LEN];
94 } tBTA_DM_API_PIN_REPLY;
95 
96 typedef struct {
97   BT_HDR_RIGID hdr;
98   RawAddress bd_addr;
99   tBTM_IO_CAP io_cap;
100   tBTM_OOB_DATA oob_data;
101   tBTM_AUTH_REQ auth_req;
102 } tBTA_DM_CI_IO_REQ;
103 
104 typedef struct {
105   RawAddress bd_addr;
106   Octet16 c;
107   Octet16 r;
108   bool accept;
109 } tBTA_DM_CI_RMT_OOB;
110 
111 /* data type for BTA_DM_REMT_NAME_EVT */
112 typedef struct {
113   BT_HDR_RIGID hdr;
114   tBTA_DM_SEARCH result;
115 } tBTA_DM_REM_NAME;
116 
117 /* data type for tBTA_DM_DISC_RESULT */
118 typedef struct {
119   BT_HDR_RIGID hdr;
120   tBTA_DM_SEARCH result;
121 } tBTA_DM_DISC_RESULT;
122 
123 /* data type for BTA_DM_INQUIRY_CMPL_EVT */
124 typedef struct {
125   BT_HDR_RIGID hdr;
126   uint8_t num;
127 } tBTA_DM_INQUIRY_CMPL;
128 
129 /* data type for BTA_DM_SDP_RESULT_EVT */
130 typedef struct {
131   BT_HDR_RIGID hdr;
132   uint16_t sdp_result;
133 } tBTA_DM_SDP_RESULT;
134 
135 typedef struct {
136   RawAddress bd_addr;
137   DEV_CLASS dc;
138   LinkKey link_key;
139   uint8_t key_type;
140   bool link_key_known;
141   bool dc_known;
142   BD_NAME bd_name;
143   uint8_t pin_length;
144 } tBTA_DM_API_ADD_DEVICE;
145 
146 typedef struct {
147   BT_HDR_RIGID hdr;
148   bool enable;
149 } tBTA_DM_API_BLE_FEATURE;
150 
151 /* union of all data types */
152 typedef union {
153   /* GKI event buffer header */
154   BT_HDR_RIGID hdr;
155 
156   tBTA_DM_API_SEARCH search;
157 
158   tBTA_DM_API_DISCOVER discover;
159 
160   tBTA_DM_REM_NAME rem_name;
161 
162   tBTA_DM_DISC_RESULT disc_result;
163 
164   tBTA_DM_INQUIRY_CMPL inq_cmpl;
165 
166   tBTA_DM_SDP_RESULT sdp_event;
167 
168 } tBTA_DM_MSG;
169 
170 #define BTA_DM_NUM_PEER_DEVICE 7
171 
172 typedef enum : uint8_t {
173   BTA_DM_NOT_CONNECTED = 0,
174   BTA_DM_CONNECTED = 1,
175   BTA_DM_UNPAIRING = 2,
176 } tBTA_DM_CONN_STATE;
177 
bta_conn_state_text(tBTA_DM_CONN_STATE state)178 inline std::string bta_conn_state_text(tBTA_DM_CONN_STATE state) {
179   switch (state) {
180     CASE_RETURN_TEXT(BTA_DM_NOT_CONNECTED);
181     CASE_RETURN_TEXT(BTA_DM_CONNECTED);
182     CASE_RETURN_TEXT(BTA_DM_UNPAIRING);
183     default:
184       return std::string("UNKNOWN");
185   }
186 }
187 
188 typedef enum : uint8_t {
189   BTA_DM_DI_NONE = 0x00,      /* nothing special */
190   BTA_DM_DI_SET_SNIFF = 0x01, /* set this bit if call BTM_SetPowerMode(sniff) */
191   BTA_DM_DI_INT_SNIFF = 0x02, /* set this bit if call BTM_SetPowerMode(sniff) &
192                                  enter sniff mode */
193   BTA_DM_DI_ACP_SNIFF = 0x04, /* set this bit if peer init sniff */
194   BTA_DM_DI_UNUSED = 0x08,
195   BTA_DM_DI_USE_SSR = 0x10, /* set this bit if ssr is supported for this link */
196   BTA_DM_DI_AV_ACTIVE = 0x20, /* set this bit if AV is active for this link */
197 } tBTA_DM_DEV_INFO_BITMASK;
198 typedef uint8_t tBTA_DM_DEV_INFO;
199 
device_info_text(tBTA_DM_DEV_INFO info)200 inline std::string device_info_text(tBTA_DM_DEV_INFO info) {
201   const char* const device_info_text[] = {
202       ":set_sniff", ":int_sniff", ":acp_sniff",
203       ":unused",    ":use_ssr",   ":av_active",
204   };
205 
206   std::string s = base::StringPrintf("0x%02x", info);
207   if (info == BTA_DM_DI_NONE) return s + std::string(":none");
208   for (size_t i = 0; i < sizeof(device_info_text) / sizeof(device_info_text[0]);
209        i++) {
210     if (info & (1u << i)) s += std::string(device_info_text[i]);
211   }
212   return s;
213 }
214 
215 /* set power mode request type */
216 #define BTA_DM_PM_RESTART 1
217 #define BTA_DM_PM_NEW_REQ 2
218 #define BTA_DM_PM_EXECUTE 3
219 typedef uint8_t tBTA_DM_PM_REQ;
220 
221 struct sBTA_DM_PEER_DEVICE {
222   RawAddress peer_bdaddr;
223   tBTA_DM_CONN_STATE conn_state;
224   tBTA_PREF_ROLES pref_role;
225   bool in_use;
226 
227  private:
228   friend void bta_dm_acl_up(const RawAddress& bd_addr, tBT_TRANSPORT transport);
229   friend void bta_dm_pm_btm_status(const RawAddress& bd_addr,
230                                    tBTM_PM_STATUS status, uint16_t value,
231                                    tHCI_STATUS hci_status);
232   friend void bta_dm_pm_sniff(struct sBTA_DM_PEER_DEVICE* p_peer_dev,
233                               uint8_t index);
234   friend void bta_dm_rm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id,
235                               uint8_t app_id, const RawAddress& peer_addr);
236   friend void handle_remote_features_complete(const RawAddress& bd_addr);
237   tBTA_DM_DEV_INFO info;
238 
239  public:
InfosBTA_DM_PEER_DEVICE240   tBTA_DM_DEV_INFO Info() const { return info; }
241 
242   tBTA_DM_ENCRYPT_CBACK* p_encrypt_cback;
243   tBTM_PM_STATUS prev_low; /* previous low power mode used */
244   tBTA_DM_PM_ACTION pm_mode_attempted;
245   tBTA_DM_PM_ACTION pm_mode_failed;
246   bool remove_dev_pending;
247   tBT_TRANSPORT transport;
248 };
249 typedef struct sBTA_DM_PEER_DEVICE tBTA_DM_PEER_DEVICE;
250 
251 /* structure to store list of
252   active connections */
253 typedef struct {
254   tBTA_DM_PEER_DEVICE peer_device[BTA_DM_NUM_PEER_DEVICE];
255   uint8_t count;
256   uint8_t le_count;
257 } tBTA_DM_ACTIVE_LINK;
258 
259 typedef struct {
260   RawAddress peer_bdaddr;
261   tBTA_SYS_ID id;
262   uint8_t app_id;
263   tBTA_SYS_CONN_STATUS state;
264   bool new_request;
265 
ToString__anon392ff82c1108266   std::string ToString() const {
267     return base::StringPrintf(
268         "peer:%s sys_name:%s app_id:%hhu state:%s new:request:%s",
269         PRIVATE_ADDRESS(peer_bdaddr), BtaIdSysText(id).c_str(), app_id,
270         bta_sys_conn_status_text(state).c_str(), logbool(new_request).c_str());
271   }
272 
273 } tBTA_DM_SRVCS;
274 
275 #ifndef BTA_DM_NUM_CONN_SRVS
276 #define BTA_DM_NUM_CONN_SRVS 30
277 #endif
278 
279 typedef struct {
280   uint8_t count;
281   tBTA_DM_SRVCS conn_srvc[BTA_DM_NUM_CONN_SRVS];
282 
283 } tBTA_DM_CONNECTED_SRVCS;
284 
285 typedef struct {
286 #define BTA_DM_PM_SNIFF_TIMER_IDX 0
287 #define BTA_DM_PM_PARK_TIMER_IDX 1
288 #define BTA_DM_PM_SUSPEND_TIMER_IDX 2
289 #define BTA_DM_PM_MODE_TIMER_MAX 3
290   /*
291    * Keep three different timers for PARK, SNIFF and SUSPEND if TBFC is
292    * supported.
293    */
294   alarm_t* timer[BTA_DM_PM_MODE_TIMER_MAX];
295 
296   uint8_t srvc_id[BTA_DM_PM_MODE_TIMER_MAX];
297   uint8_t pm_action[BTA_DM_PM_MODE_TIMER_MAX];
298   uint8_t active; /* number of active timer */
299 
300   RawAddress peer_bdaddr;
301   bool in_use;
302 } tBTA_PM_TIMER;
303 
304 extern tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs;
305 
306 #define BTA_DM_NUM_PM_TIMER 7
307 
308 /* DM control block */
309 typedef struct {
310   bool is_bta_dm_active;
311   tBTA_DM_ACTIVE_LINK device_list;
312   tBTA_DM_SEC_CBACK* p_sec_cback;
313   tBTA_BLE_ENERGY_INFO_CBACK* p_energy_info_cback;
314   uint16_t state;
315   bool disabling;
316   alarm_t* disable_timer;
317   uint32_t wbt_sdp_handle; /* WIDCOMM Extensions SDP record handle */
318   uint8_t wbt_scn;         /* WIDCOMM Extensions SCN */
319   uint8_t num_central_only;
320   uint8_t pm_id;
321   tBTA_PM_TIMER pm_timer[BTA_DM_NUM_PM_TIMER];
322   uint8_t cur_av_count;   /* current AV connecions */
323   bool disable_pair_mode; /* disable pair mode or not */
324   bool conn_paired_only;  /* allow connectable to paired device only or not */
325   tBTA_DM_API_SEARCH search_msg;
326 
327   /* Storage for pin code request parameters */
328   RawAddress pin_bd_addr;
329   DEV_CLASS pin_dev_class;
330   tBTA_DM_SEC_EVT pin_evt;
331   tBTM_IO_CAP loc_io_caps;    /* IO Capabilities of local device */
332   tBTM_IO_CAP rmt_io_caps;    /* IO Capabilities of remote device */
333   tBTM_AUTH_REQ loc_auth_req; /* Authentication required for local device */
334   tBTM_AUTH_REQ rmt_auth_req;
335   uint32_t num_val; /* the numeric value for comparison. If just_works, do not
336                        show this number to UI */
337   bool just_works;  /* true, if "Just Works" association model */
338 #if (BTA_EIR_CANNED_UUID_LIST != TRUE)
339   /* store UUID list for EIR */
340   uint32_t eir_uuid[BTM_EIR_SERVICE_ARRAY_SIZE];
341 #if (BTA_EIR_SERVER_NUM_CUSTOM_UUID > 0)
342   tBTA_CUSTOM_UUID bta_custom_uuid[BTA_EIR_SERVER_NUM_CUSTOM_UUID];
343 #endif
344 
345 #endif
346 
347   tBTA_DM_ENCRYPT_CBACK* p_encrypt_cback;
348   alarm_t* switch_delay_timer;
349 
350 } tBTA_DM_CB;
351 
352 /* DM search control block */
353 typedef struct {
354   tBTA_DM_SEARCH_CBACK* p_search_cback;
355   tBTM_INQ_INFO* p_btm_inq_info;
356   tBTA_SERVICE_MASK services;
357   tBTA_SERVICE_MASK services_to_search;
358   tBTA_SERVICE_MASK services_found;
359   tSDP_DISCOVERY_DB* p_sdp_db;
360   uint16_t state;
361   RawAddress peer_bdaddr;
362   bool name_discover_done;
363   BD_NAME peer_name;
364   alarm_t* search_timer;
365   uint8_t service_index;
366   tBTA_DM_MSG* p_pending_search;
367   fixed_queue_t* pending_discovery_queue;
368   bool wait_disc;
369   bool sdp_results;
370   bluetooth::Uuid uuid;
371   uint8_t peer_scn;
372   tBT_TRANSPORT transport;
373   tBTA_DM_SEARCH_CBACK* p_scan_cback;
374   tGATT_IF client_if;
375   uint8_t uuid_to_search;
376   bool gatt_disc_active;
377   uint16_t conn_id;
378   alarm_t* gatt_close_timer; /* GATT channel close delay timer */
379   RawAddress pending_close_bda; /* pending GATT channel remote device address */
380 
381 } tBTA_DM_SEARCH_CB;
382 
383 /* DI control block */
384 typedef struct {
385   uint8_t di_num;                     /* total local DI record number */
386   uint32_t di_handle[BTA_DI_NUM_MAX]; /* local DI record handle, the first one
387                                          is primary record */
388 } tBTA_DM_DI_CB;
389 
390 /* DM search state */
391 enum {
392 
393   BTA_DM_SEARCH_IDLE,
394   BTA_DM_SEARCH_ACTIVE,
395   BTA_DM_SEARCH_CANCELLING,
396   BTA_DM_DISCOVER_ACTIVE
397 
398 };
399 
400 typedef struct {
401   DEV_CLASS dev_class; /* local device class */
402   uint16_t page_timeout; /* timeout for page in slots */
403   bool avoid_scatter; /* true to avoid scatternet when av is streaming (be the
404                          central) */
405 
406 } tBTA_DM_CFG;
407 
408 extern const uint32_t bta_service_id_to_btm_srv_id_lkup_tbl[];
409 
410 typedef struct {
411   uint8_t id;
412   uint8_t app_id;
413   uint8_t cfg;
414 
415 } tBTA_DM_RM;
416 
417 extern const tBTA_DM_CFG* p_bta_dm_cfg;
418 extern const tBTA_DM_RM* p_bta_dm_rm_cfg;
419 
420 typedef struct {
421   uint8_t id;
422   uint8_t app_id;
423   uint8_t spec_idx; /* index of spec table to use */
424 
425 } tBTA_DM_PM_CFG;
426 
427 typedef struct {
428   tBTA_DM_PM_ACTION power_mode;
429   uint16_t timeout;
430 
431 } tBTA_DM_PM_ACTN;
432 
433 typedef struct {
434   uint8_t allow_mask; /* mask of sniff/hold/park modes to allow */
435   uint8_t ssr; /* set SSR on conn open/unpark */
436   tBTA_DM_PM_ACTN actn_tbl[BTA_DM_PM_NUM_EVTS][2];
437 
438 } tBTA_DM_PM_SPEC;
439 
440 typedef struct {
441   uint16_t max_lat;
442   uint16_t min_rmt_to;
443   uint16_t min_loc_to;
444   const char* name{nullptr};
445 } tBTA_DM_SSR_SPEC;
446 
447 typedef struct {
448   uint16_t manufacturer;
449   uint16_t lmp_sub_version;
450   uint8_t lmp_version;
451 } tBTA_DM_LMP_VER_INFO;
452 
453 extern const uint16_t bta_service_id_to_uuid_lkup_tbl[];
454 
455 extern const tBTA_DM_PM_CFG* p_bta_dm_pm_cfg;
456 extern const tBTA_DM_PM_SPEC* p_bta_dm_pm_spec;
457 extern const tBTM_PM_PWR_MD* p_bta_dm_pm_md;
458 extern tBTA_DM_SSR_SPEC* p_bta_dm_ssr_spec;
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_RIGID* 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_deinit_cb(void);
480 extern void bta_dm_set_dev_name(const std::vector<uint8_t>&);
481 extern void bta_dm_set_visibility(tBTA_DM_DISC, tBTA_DM_CONN);
482 extern void bta_dm_set_scan_config(tBTA_DM_MSG* p_data);
483 extern void bta_dm_vendor_spec_command(tBTA_DM_MSG* p_data);
484 extern void bta_dm_bond(const RawAddress&, tBLE_ADDR_TYPE, tBT_TRANSPORT, int);
485 extern void bta_dm_bond_cancel(const RawAddress&);
486 extern void bta_dm_pin_reply(std::unique_ptr<tBTA_DM_API_PIN_REPLY> msg);
487 extern void bta_dm_add_device(std::unique_ptr<tBTA_DM_API_ADD_DEVICE> msg);
488 extern void bta_dm_remove_device(const RawAddress& bd_addr);
489 extern void bta_dm_close_acl(const RawAddress&, bool, tBT_TRANSPORT);
490 
491 extern void bta_dm_pm_btm_status(const RawAddress&, tBTM_PM_STATUS, uint16_t,
492                                  tHCI_STATUS);
493 extern void bta_dm_pm_timer(const RawAddress&, tBTA_DM_PM_ACTION);
494 extern void bta_dm_add_ampkey(tBTA_DM_MSG* p_data);
495 
496 extern void bta_dm_add_blekey(const RawAddress& bd_addr,
497                               tBTA_LE_KEY_VALUE blekey,
498                               tBTM_LE_KEY_TYPE key_type);
499 extern void bta_dm_add_ble_device(const RawAddress& bd_addr,
500                                   tBLE_ADDR_TYPE addr_type,
501                                   tBT_DEVICE_TYPE dev_type);
502 extern void bta_dm_ble_passkey_reply(const RawAddress& bd_addr, bool accept,
503                                      uint32_t passkey);
504 extern void bta_dm_ble_confirm_reply(const RawAddress&, bool);
505 extern void bta_dm_ble_set_conn_params(const RawAddress&, uint16_t, uint16_t,
506                                        uint16_t, uint16_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 
514 extern void bta_dm_ble_set_data_length(const RawAddress& bd_addr);
515 
516 extern void bta_dm_ble_get_energy_info(tBTA_BLE_ENERGY_INFO_CBACK*);
517 
518 extern void bta_dm_set_encryption(const RawAddress&, tBT_TRANSPORT,
519                                   tBTA_DM_ENCRYPT_CBACK*, tBTM_BLE_SEC_ACT);
520 extern void bta_dm_confirm(const RawAddress&, bool);
521 
522 extern void bta_dm_ci_rmt_oob_act(std::unique_ptr<tBTA_DM_CI_RMT_OOB> msg);
523 
524 extern void bta_dm_init_pm(void);
525 extern void bta_dm_disable_pm(void);
526 
527 extern uint8_t bta_dm_get_av_count(void);
528 extern void bta_dm_search_start(tBTA_DM_MSG* p_data);
529 extern void bta_dm_search_cancel();
530 extern void bta_dm_discover(tBTA_DM_MSG* p_data);
531 extern void bta_dm_inq_cmpl(uint8_t num);
532 extern void bta_dm_rmt_name(tBTA_DM_MSG* p_data);
533 extern void bta_dm_sdp_result(tBTA_DM_MSG* p_data);
534 extern void bta_dm_search_cmpl();
535 extern void bta_dm_free_sdp_db();
536 extern void bta_dm_disc_result(tBTA_DM_MSG* p_data);
537 extern void bta_dm_search_result(tBTA_DM_MSG* p_data);
538 extern void bta_dm_discovery_cmpl(tBTA_DM_MSG* p_data);
539 extern void bta_dm_queue_search(tBTA_DM_MSG* p_data);
540 extern void bta_dm_queue_disc(tBTA_DM_MSG* p_data);
541 extern void bta_dm_execute_queued_request();
542 extern bool bta_dm_is_search_request_queued();
543 extern void bta_dm_search_clear_queue();
544 extern void bta_dm_search_cancel_cmpl();
545 extern void bta_dm_search_cancel_notify();
546 extern void bta_dm_disc_rmt_name(tBTA_DM_MSG* p_data);
547 extern tBTA_DM_PEER_DEVICE* bta_dm_find_peer_device(
548     const RawAddress& peer_addr);
549 
550 uint8_t bta_dm_search_get_state();
551 void bta_dm_search_set_state(uint8_t state);
552 
553 void bta_dm_eir_update_uuid(uint16_t uuid16, bool adding);
554 void bta_dm_eir_update_cust_uuid(const tBTA_CUSTOM_UUID &curr, bool adding);
555 
556 #undef CASE_RETURN_TEXT
557 #endif /* BTA_DM_INT_H */
558