OSDN Git Service

android: Add bt_adapter_get_address function
authorSzymon Janc <szymon.janc@tieto.com>
Wed, 23 Oct 2013 11:04:39 +0000 (13:04 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Wed, 23 Oct 2013 11:26:40 +0000 (14:26 +0300)
It will be used to obtain adapter address.

android/adapter.c
android/adapter.h

index 059a5be..f9843d1 100644 (file)
@@ -364,6 +364,11 @@ void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
        ipc_send_error(io, HAL_SERVICE_ID_BLUETOOTH, status);
 }
 
+const bdaddr_t *bt_adapter_get_address(void)
+{
+       return &default_adapter->bdaddr;
+}
+
 bool bt_adapter_register(GIOChannel *io)
 {
        DBG("");
index 194950b..b8d0a58 100644 (file)
@@ -38,5 +38,7 @@ bool bt_adapter_init(uint16_t index, struct mgmt *mgmt_if,
 void bt_adapter_handle_cmd(GIOChannel *io, uint8_t opcode, void *buf,
                                                                uint16_t len);
 
+const bdaddr_t *bt_adapter_get_address(void);
+
 bool bt_adapter_register(GIOChannel *io);
 void bt_adapter_unregister(void);