diff options
-rw-r--r-- | btif/include/btif_api.h | 12 | ||||
-rwxr-xr-x | btif/src/bluetooth.c | 10 | ||||
-rwxr-xr-x | btif/src/btif_dm.c | 1 |
3 files changed, 22 insertions, 1 deletions
diff --git a/btif/include/btif_api.h b/btif/include/btif_api.h index 087add5..d90ee58 100644 --- a/btif/include/btif_api.h +++ b/btif/include/btif_api.h @@ -365,5 +365,17 @@ bt_status_t btif_dm_get_adapter_property(bt_property_t *prop); bt_status_t btif_dm_get_remote_service_record(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid); + +/******************************************************************************* +** +** Function btif_dm_get_remote_services +** +** Description Start SDP to get remote services +** +** Returns bt_status_t +** +*******************************************************************************/ +bt_status_t btif_dm_get_remote_services(bt_bdaddr_t *remote_addr); + #endif /* BTIF_API_H */ diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c index 5fccd80..5864eac 100755 --- a/btif/src/bluetooth.c +++ b/btif/src/bluetooth.c @@ -241,6 +241,15 @@ int get_remote_service_record(bt_bdaddr_t *remote_addr, bt_uuid_t *uuid) return btif_get_remote_service_record(remote_addr, uuid); } +int get_remote_services(bt_bdaddr_t *remote_addr) +{ + /* sanity check */ + if (interface_ready() == FALSE) + return BT_STATUS_NOT_READY; + + return btif_dm_get_remote_services(remote_addr); +} + static int start_discovery(void) { /* sanity check */ @@ -344,6 +353,7 @@ static const bt_interface_t bluetoothInterface = { get_remote_device_property, set_remote_device_property, get_remote_service_record, + get_remote_services, start_discovery, cancel_discovery, create_bond, diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 17d2488..c215722 100755 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -95,7 +95,6 @@ typedef struct { ** Static functions ******************************************************************************/ static btif_dm_pairing_cb_t pairing_cb; -static bt_status_t btif_dm_get_remote_services(bt_bdaddr_t *remote_addr); static void btif_dm_generic_evt(UINT16 event, char* p_param); static void btif_dm_cb_create_bond(bt_bdaddr_t *bd_addr); static void btif_dm_cb_hid_remote_name(tBTM_REMOTE_DEV_NAME *p_remote_name); |