Add some patches 03/250903/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211028.101115 accepted/tizen/unified/20210201.055424 accepted/tizen/unified/20210203.145521 submit/tizen/20210112.005356 submit/tizen/20210131.225751 submit/tizen/20210203.045513 submit/tizen_6.5/20211028.162201 tizen_6.5.m2_release
authorhyunuk.tak <hyunuk.tak@samsung.com>
Tue, 5 Jan 2021 09:19:38 +0000 (18:19 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Tue, 5 Jan 2021 09:19:58 +0000 (18:19 +0900)
Change the install path for plugin so to RO area
Add scan_mode functionality in detection
Send plugin id in callback to ua-manager

Change-Id: I71452a975f44772fe32bb0837abbedeef59208b0
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
include/wifi-plugin.h
packaging/ua-plugin-wifi-dummy.spec
src/wifi-plugin.c

index 9bb893d43808afee9c299c920b40140d970e7530..a09508fcf04444e7a58fa097df280a9a91118801 100644 (file)
@@ -26,6 +26,7 @@
 extern "C" {
 #endif
 
+#define PLUGIN_ID UAS_PLUGIN_ID_WIFI
 #define UAS_DEVICE_ID_MAX_LEN 50 /** Max device ID length */
 #define MAC_ADDRESS_STRING_SIZE 18 /**< Max MAC address string length */
 #define IP_ADDRESS_STRING_SIZE 16 /* Max IPv4 address string length */
index fd877dd7d6a630dba876e00c4782a4bcc025f051..d0195147fb5014b9a677399eb3a9981d26b28d14 100644 (file)
@@ -40,7 +40,7 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 export LDFLAGS+=" -lgcov"
 %endif
 
-%define NETWORK_FW_DATADIR %{TZ_SYS_GLOBALUSER_DATA}/network
+%define NETWORK_FW_DATADIR %{TZ_SYS_RO_SHARE}/network
 %define DBDIR %{TZ_SYS_GLOBALUSER_DATA}/
 
 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
@@ -56,8 +56,8 @@ make %{?jobs:-j%jobs}
 %cmake
 
 %install
-mkdir -p %{buildroot}/opt/usr/data/network/ua/lib/sensor
-cp -af *.so %{buildroot}/opt/usr/data/network/ua/lib/sensor
+mkdir -p %{buildroot}/usr/share/network/ua/lib/sensor
+cp -af *.so %{buildroot}/usr/share/network/ua/lib/sensor
 %make_install
 
 %post -p /sbin/ldconfig
index e5e3ef5ed384d147f4a476024989de700c5cb787..7a5377c52e8f4f2d062cc8e2acfdf4cb30e44ad0 100644 (file)
@@ -182,7 +182,7 @@ static gboolean __start_wifi_scan(gpointer user_data)
 
        /* Send detection started */
        if (uas_cbs && uas_cbs->detection_state_cb)
-               uas_cbs->detection_state_cb(1);
+               uas_cbs->detection_state_cb(PLUGIN_ID, 1);
 
        FUNC_EXIT;
        return TRUE;
@@ -218,8 +218,8 @@ void __check_device_found(char* sbuf, char* ip_sbuf)
                        /* Save current time */
                        dev_info->last_seen = _wifi_plugin_util_get_curr_time();
 
-                       uas_cbs->device_detected_cb(UAS_PRESENCE, dev_info);
-                       UA_WIFI_INFO("Called uas_cbs->device_detected_cb(UAS_PRESENCE)");
+                       uas_cbs->device_detected_cb(PLUGIN_ID, UAS_PRESENCE, dev_info);
+                       UA_WIFI_INFO("Called uas_cbs->device_detected_cb(PLUGIN_ID, UAS_PRESENCE)");
                        _wifi_plugin_util_uas_device_info_free(dev_info);
                        break;
                }
@@ -267,8 +267,8 @@ void __check_mobile_list_finish(bool is_check)
                                        break;
                                }
 
-                               uas_cbs->device_detected_cb(UAS_ABSENCE, dev_info);
-                               UA_WIFI_INFO("Called uas_cbs->device_detected_cb(UAS_ABSENCE)");
+                               uas_cbs->device_detected_cb(PLUGIN_ID, UAS_ABSENCE, dev_info);
+                               UA_WIFI_INFO("Called uas_cbs->device_detected_cb(PLUGIN_ID, UAS_ABSENCE)");
                                _wifi_plugin_util_uas_device_info_free(dev_info);
                        }
 
@@ -277,7 +277,7 @@ void __check_mobile_list_finish(bool is_check)
 
                /* Send detection stopped */
                if (uas_cbs && uas_cbs->detection_state_cb)
-                       uas_cbs->detection_state_cb(0);
+                       uas_cbs->detection_state_cb(PLUGIN_ID, 0);
 
                /* Reset detection flags */
                wifi_detection_type = 0;
@@ -296,7 +296,7 @@ static gboolean __add_device_send(gpointer data)
        GSList *l;
        uas_device_info_t *dev_info = NULL;
 
-       initial_bursts = true;
+  initial_bursts = true;
 
        for (l = dev_list; NULL != l; l = g_slist_next(l)) {
                uas_wifi_info_t *wifi_info = l->data;
@@ -320,7 +320,7 @@ static gboolean __add_device_send(gpointer data)
                        }
                        /* Save current time */
                        dev_info->last_seen = _wifi_plugin_util_get_curr_time();
-                       uas_cbs->device_added_cb(UAS_STATUS_SUCCESS, dev_info);
+                       uas_cbs->device_added_cb(PLUGIN_ID, UAS_STATUS_SUCCESS, dev_info);
                        _wifi_plugin_util_uas_device_info_free(dev_info);
                        break;
                }
@@ -404,13 +404,13 @@ static int set_registered_devices(int num_devices, uas_device_info_t *devices)
                switch (curr_state) {
                case UAS_STATE_NOT_READY:
                        if (dev_list) {
-                               uas_cbs->state_changed_cb(UAS_STATE_READY);
+                               uas_cbs->state_changed_cb(PLUGIN_ID, UAS_STATE_READY);
                                curr_state = UAS_STATE_READY;
                        }
                        break;
                case UAS_STATE_READY:
                        if (!dev_list) {
-                               uas_cbs->state_changed_cb(UAS_STATE_NOT_READY);
+                               uas_cbs->state_changed_cb(PLUGIN_ID, UAS_STATE_NOT_READY);
                                curr_state = UAS_STATE_NOT_READY;
                        }
                        break;
@@ -443,7 +443,7 @@ static int remove_device(uas_device_info_t *device)
        return UAS_STATUS_ALREADY_DONE;;
 }
 
-static int start_detection(unsigned int detection_type)
+static int start_detection(unsigned int detection_type, int scan_mode)
 {
        FUNC_ENTER;
 
@@ -537,7 +537,7 @@ static gboolean stop_active_scan(gpointer user_data)
        if (!uas_cbs || !uas_cbs->device_active_scan_cb)
                return G_SOURCE_REMOVE;
 
-       uas_cbs->device_active_scan_cb(UAS_ACTIVE_SCAN_COMPLETED, NULL);
+       uas_cbs->device_active_scan_cb(PLUGIN_ID, UAS_ACTIVE_SCAN_COMPLETED, NULL);
        FUNC_EXIT;
        return G_SOURCE_REMOVE;
 }