Add API to set detection window 92/260592/2
authorAbhay Agarwal <ay.agarwal@samsung.com>
Tue, 12 Jan 2021 05:55:26 +0000 (11:25 +0530)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Thu, 1 Jul 2021 07:44:58 +0000 (13:14 +0530)
Change-Id: I5eccfb05c4d72bc0d25456cb71b954ed6207153e
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
src/wifi-location-plugin.c

index 5e9193a..15823c4 100755 (executable)
@@ -249,6 +249,18 @@ done:
        return ret;
 }
 
+static int set_detection_window(unsigned int detection_window)
+{
+       FUNC_ENTER;
+
+       retv_if(NULL == uas_cbs, UAS_STATUS_NOT_READY);
+
+       wifi_location_detection_window = detection_window;
+
+       FUNC_EXIT;
+       return UAS_STATUS_SUCCESS;
+}
+
 static uas_api_t wifi_location_api = {
        .init = init,
        .deinit = deinit,
@@ -260,7 +272,7 @@ static uas_api_t wifi_location_api = {
        .start_detection = start_detection,
        .stop_detection = stop_detection,
        .set_low_power_mode = NULL,
-       .set_detection_window = NULL,
+       .set_detection_window = set_detection_window,
        .set_detection_threshold = NULL,
        .scan_active_devices = NULL,
        .cancel_active_device_scan = NULL,