iBeacon: Remove ibeaconReport signal logic. 04/97504/1
authorh.sandeep <h.sandeep@samsung.com>
Mon, 14 Nov 2016 09:05:00 +0000 (14:35 +0530)
committerh.sandeep <h.sandeep@samsung.com>
Mon, 14 Nov 2016 09:56:19 +0000 (15:26 +0530)
This patch removes the ibeacon report filter logic
and removes the signal iBeaconReport.
iBeacon filter logic is handled in CAPI.

Change-Id: Iecc1b82be967e70a5f2a9d497b5f791d5d092edf
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
src/adapter.c
src/device.c
src/device.h

index b3bf564..732506d 100644 (file)
@@ -9909,8 +9909,6 @@ static void update_found_devices(struct btd_adapter *adapter,
        else {
                /* if the application has registered for iBeacon report,
                 * then send ibeacon report along with advertisement report */
-               if (allow_report == IBEACON_REPORT)
-                       device_set_ibeacon_report_info(dev, (void*)data, data_len, adv_type, rssi);
                device_set_adv_report_info(dev, (void*)data, data_len, adv_type, rssi);
        }
 #endif
index e349c47..49de44b 100644 (file)
@@ -3926,17 +3926,6 @@ static const GDBusSignalTable device_signals[] = {
                                { "max_rx_time", "q"})) },
        { GDBUS_SIGNAL("IpspStateChanged",
                        GDBUS_ARGS({"connected","b"},{"if_name","s"}))},
-#ifdef TIZEN_FEATURE_PLATFROM_SCAN_FILTER
-       { GDBUS_SIGNAL("iBeaconReport",
-                       GDBUS_ARGS({"Address","s"},
-                               { "Address Type", "y" },
-                               { "company id", "u"},
-                               { "beacon type", "u"},
-                               { "UUID", "s"},
-                               { "major id", "u"},
-                               { "minor id", "u"},
-                               { "measured power", "y"})) },
-#endif
 };
 #endif
 
@@ -8262,60 +8251,6 @@ void btd_device_disconnect(struct btd_device *device)
        return;
 }
 
-#ifdef TIZEN_FEATURE_PLATFROM_SCAN_FILTER
-void device_set_ibeacon_report_info(struct btd_device *device, void *data, uint8_t data_len,
-                               uint8_t adv_type, int8_t rssi)
-{
-       char peer_addr[18];
-       const char *paddr = peer_addr;
-       const uint8_t *uuid_ptr = data+6;
-       uuid_t service;
-       const char *uuid_str = NULL;
-       dbus_int32_t rssi_val = rssi;
-       dbus_uint32_t company_id = 0;
-       dbus_uint32_t beacon_type = 0;
-       dbus_uint32_t major_id = 0;
-       dbus_uint32_t minor_id = 0;
-       uint8_t measured_power = 0;
-       uint8_t addr_type;
-       int k;
-       if (!device)
-               return;
-
-       ba2str(&device->bdaddr, peer_addr);
-       /* Replace address type for paired RPA device since IDA passed from controller */
-       if(device_get_rpa_exist(device) == true)
-               addr_type = BDADDR_LE_RANDOM;
-       else
-               addr_type = device->bdaddr_type;
-
-       company_id = get_le16(data+2);
-       beacon_type = get_le16(data+4);
-       major_id = get_le16(data+22);
-       minor_id = get_le16(data+24);
-       measured_power = get_u8(data+26);
-       service.type = SDP_UUID128;
-       for (k = 0; k < 16; k++)
-               service.value.uuid128.data[k] = uuid_ptr[16 - k - 1];
-       uuid_str = bt_uuid2string(&service);
-
-       DBG("Company_id: 0x%04x, beacon_type: 0x%04x, UUID: %s",
-                               company_id, beacon_type, uuid_str);
-       DBG(" major_id : 0x%04x, Minor_id: 0x%04x, measured_power: %d",
-                               major_id, minor_id, measured_power);
-       g_dbus_emit_signal(dbus_conn, device->path,
-               DEVICE_INTERFACE, "iBeaconReport",
-               DBUS_TYPE_STRING, &paddr,
-               DBUS_TYPE_BYTE, &addr_type,
-               DBUS_TYPE_UINT32, &company_id,
-               DBUS_TYPE_UINT32, &beacon_type,
-               DBUS_TYPE_STRING, &uuid_str,
-               DBUS_TYPE_UINT32, &major_id,
-               DBUS_TYPE_UINT32, &minor_id,
-               DBUS_TYPE_BYTE, &measured_power,
-               DBUS_TYPE_INVALID);
-}
-#endif /* TIZEN_FEATURE_PLATFROM_SCAN_FILTER */
 #endif
 
 static gboolean notify_attios(gpointer user_data)
index 5fec33e..11e655c 100644 (file)
@@ -186,10 +186,6 @@ void device_le_data_length_changed(struct btd_device *device, uint16_t max_tx_oc
                        uint16_t max_rx_time);
 void device_get_tizen_addr(struct btd_device *device, uint8_t type,
                           struct device_addr_type *addr);
-#ifdef TIZEN_FEATURE_PLATFROM_SCAN_FILTER
-void device_set_ibeacon_report_info(struct btd_device *device, void *data, uint8_t data_len,
-                               uint8_t adv_type, int8_t rssi);
-#endif /* TIZEN_FEATURE_PLATFROM_SCAN_FILTER */
 #endif
 
 struct btd_device *btd_device_ref(struct btd_device *device);