_bt_common_event_cb(BLUETOOTH_EVENT_IPSP_DISCONNECTED,
result, &dev_address,
event_info->cb, event_info->user_data);
+ } else if (strcasecmp(signal_name, BT_IPSP_BT_INTERFACE_INFO) == 0) {
+ const char *address = NULL;
+ const char *if_name = NULL;
+ bt_ipsp_interface_info_t ipsp_iface_info;
+ memset(&ipsp_iface_info, 0, sizeof(ipsp_iface_info));
+
+ BT_DBG("BT_IPSP_BT_INTERFACE_INFO");
+ g_variant_get(parameters, "(i&s&s)", &result, &address, &if_name);
+
+ _bt_convert_addr_string_to_type(ipsp_iface_info.btaddr.addr, address);
+ memcpy(ipsp_iface_info.if_name, if_name, 16);
+
+ _bt_common_event_cb(BLUETOOTH_EVENT_IPSP_BT_INTERFACE_INFO,
+ result, &ipsp_iface_info,
+ event_info->cb, event_info->user_data);
} else if (strcasecmp(signal_name, BT_LE_DATA_LENGTH_CHANGED) == 0) {
const char *address = NULL;
bluetooth_device_address_t dev_address = { {0} };
event,
param);
g_free(address);
+ } else if (strcasecmp(property, "IpspBtInterfaceInfo") == 0) {
+ char *ifname = NULL;
+
+ g_variant_get(val, "s", &ifname);
+
+ address = g_malloc0(BT_ADDRESS_STRING_SIZE);
+
+ _bt_convert_device_path_to_address(path, address);
+
+ BT_DBG("Ipsp BT Interface Name: %s", ifname);
+ BT_DBG("address: %s", address);
+ param = g_variant_new("(iss)", result, address, ifname);
+
+ /* Send event to application */
+ _bt_send_event(BT_DEVICE_EVENT,
+ BLUETOOTH_EVENT_IPSP_BT_INTERFACE_INFO,
+ param);
+ g_free(address);
}
}
BT_DBG("-");
case BLUETOOTH_EVENT_IPSP_DISCONNECTED:
signal = BT_IPSP_DISCONNECTED;
break;
+ case BLUETOOTH_EVENT_IPSP_BT_INTERFACE_INFO:
+ signal = BT_IPSP_BT_INTERFACE_INFO;
+ break;
case BLUETOOTH_EVENT_GATT_CHAR_VAL_CHANGED:
signal = BT_GATT_CHAR_VAL_CHANGED;
break;
BLUETOOTH_EVENT_IPSP_INIT_STATE_CHANGED = BLUETOOTH_EVENT_IPSP_BASE, /**<IPSP init event*/
BLUETOOTH_EVENT_IPSP_CONNECTED, /**< IPSP connected event */
BLUETOOTH_EVENT_IPSP_DISCONNECTED, /**< IPSP Disconnected event */
+ BLUETOOTH_EVENT_IPSP_BT_INTERFACE_INFO, /** IPSP BT Interface Info after connection */
BLUETOOTH_EVENT_LE_DATA_LENGTH_CHANGED, /** LE data length values changed */
} bluetooth_event_type_t;
char uuids[BLUETOOTH_MAX_DPM_LIST][BLUETOOTH_UUID_STRING_MAX];
} bt_dpm_uuids_list_t;
+/**
+ * Structure for IPSP Interface Info
+ */
+typedef struct {
+ bluetooth_device_address_t btaddr;
+ char if_name[16];
+} bt_ipsp_interface_info_t;
+
/**
* Callback pointer type
*/
#define BT_IPSP_INITIALIZED "IpspInitStateChanged"
#define BT_IPSP_CONNECTED "IpspConnected"
#define BT_IPSP_DISCONNECTED "IpspDisconnected"
+#define BT_IPSP_BT_INTERFACE_INFO "IpspBtInterfaceInfo"
#define BT_LE_DATA_LENGTH_CHANGED "LEDataLengthChanged"
#ifdef __cplusplus