diff options
author | h.sandeep <h.sandeep@samsung.com> | 2016-11-23 11:21:04 +0530 |
---|---|---|
committer | Sandeep Hattiholi <h.sandeep@samsung.com> | 2016-11-23 01:00:30 -0800 |
commit | bb4b63c422aac3f31f2f95811c49b219366fa7ad (patch) | |
tree | be91b502c6a7e81e688d88295d647fa9ca389139 | |
parent | e1b1caba708101cdb1156ace22c40ad3e39696dd (diff) | |
download | bluetooth-bb4b63c422aac3f31f2f95811c49b219366fa7ad.tar.gz bluetooth-bb4b63c422aac3f31f2f95811c49b219366fa7ad.tar.bz2 bluetooth-bb4b63c422aac3f31f2f95811c49b219366fa7ad.zip |
iBeacon: Modify ibeacon scan filter API parameters
Change-Id: I91aff1e6261d8f0c7a7f50632424320f69844019
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
-rw-r--r-- | include/mobile/bluetooth_internal.h | 3 | ||||
-rw-r--r-- | include/tv/bluetooth_internal.h | 3 | ||||
-rw-r--r-- | include/wearable/bluetooth_internal.h | 3 | ||||
-rw-r--r-- | src/bluetooth-adapter.c | 19 | ||||
-rw-r--r-- | test/bt_unit_test.c | 3 |
5 files changed, 7 insertions, 24 deletions
diff --git a/include/mobile/bluetooth_internal.h b/include/mobile/bluetooth_internal.h index 892d33f..563c98a 100644 --- a/include/mobile/bluetooth_internal.h +++ b/include/mobile/bluetooth_internal.h @@ -3193,8 +3193,7 @@ int bt_proximity_get_supported_services(const char *remote_address, int *support * @internal * @brief API to set scan filter for iBeacons reports */ -int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter, - const char *data, unsigned int data_len); +int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter); /** * @internal diff --git a/include/tv/bluetooth_internal.h b/include/tv/bluetooth_internal.h index 892d33f..563c98a 100644 --- a/include/tv/bluetooth_internal.h +++ b/include/tv/bluetooth_internal.h @@ -3193,8 +3193,7 @@ int bt_proximity_get_supported_services(const char *remote_address, int *support * @internal * @brief API to set scan filter for iBeacons reports */ -int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter, - const char *data, unsigned int data_len); +int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter); /** * @internal diff --git a/include/wearable/bluetooth_internal.h b/include/wearable/bluetooth_internal.h index 6950b89..a447146 100644 --- a/include/wearable/bluetooth_internal.h +++ b/include/wearable/bluetooth_internal.h @@ -3341,8 +3341,7 @@ int bt_proximity_get_supported_services(const char *remote_address, int *support * @internal * @brief API to set scan filter for iBeacons reports */ -int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter, - const char *data, unsigned int data_len); +int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter); /** * @internal diff --git a/src/bluetooth-adapter.c b/src/bluetooth-adapter.c index c25eba0..b131508 100644 --- a/src/bluetooth-adapter.c +++ b/src/bluetooth-adapter.c @@ -3876,9 +3876,7 @@ int bt_adapter_unset_authentication_req_cb(void) return BT_ERROR_NONE; } -int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter, - const char *data, - unsigned int data_len) +int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter) { bt_le_scan_filter_s *__filter = (bt_le_scan_filter_s *)scan_filter; int ibeacon_manufacturer_id = COMPANY_ID_APPLE; @@ -3889,23 +3887,12 @@ int bt_adapter_le_scan_filter_set_ibeacon(bt_scan_filter_h scan_filter, BT_INFO(""); - if (data_len > 27) { - BT_ERR("INVALID_PARAMETER(0x%08x)", - BT_ERROR_INVALID_PARAMETER); /* LCOV_EXCL_LINE */ - bt_adapter_le_destroy_scan_filter(scan_filter); - return BT_ERROR_INVALID_PARAMETER; - } g_free(__filter->manufacturer_data); g_free(__filter->manufacturer_data_mask); __filter->manufacturer_id = ibeacon_manufacturer_id; - if (data != NULL) { - __filter->manufacturer_data = g_memdup(data, data_len); - __filter->manufacturer_data_len = data_len; - } else { - __filter->manufacturer_data = NULL; - __filter->manufacturer_data_len = 0; - } + __filter->manufacturer_data = NULL; + __filter->manufacturer_data_len = 0; __filter->manufacturer_data_mask = NULL; return BT_ERROR_NONE; diff --git a/test/bt_unit_test.c b/test/bt_unit_test.c index 3b4fa52..b11dff9 100644 --- a/test/bt_unit_test.c +++ b/test/bt_unit_test.c @@ -5461,13 +5461,12 @@ int test_input_callback(void *data) case BT_UNIT_TEST_FUNCTION_ADAPTER_LE_REGISTER_SCAN_FILTER_IBEACON_DATA: { bt_scan_filter_h scan_filter; - char manufacture_1[] = {0x02, 0x15, 0xD9, 0xB9, 0xEC, 0x1F, 0x39, 0x25, 0x43, 0xD0, 0x80, 0xA9, 0x1E, 0x39, 0xD4, 0xCE, 0xA9, 0x5C, 0x01, 0x00, 0x0A, 0x00, 0x10}; ret = bt_adapter_le_create_scan_filter(&scan_filter); if (ret != BT_ERROR_NONE) TC_PRT("failed with [0x%04x]", ret); - ret = bt_adapter_le_scan_filter_set_ibeacon(scan_filter, manufacture_1, sizeof(manufacture_1)); + ret = bt_adapter_le_scan_filter_set_ibeacon(scan_filter); if (ret != BT_ERROR_NONE) TC_PRT("failed with [0x%04x]", ret); |