Remove DA extension package 58/287258/2 accepted/tizen/7.0/unified/20230126.170237
authorJaehyun Kim <jeik01.kim@samsung.com>
Thu, 26 Jan 2023 02:39:15 +0000 (11:39 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Thu, 26 Jan 2023 02:40:14 +0000 (11:40 +0900)
DA package has a potential dependency problem with other packages,
so a separate DA package will not be created.
And the patches that existed only in the DA package were
reviewed and merged in the common package.

Change-Id: I4b30870fd0dc901df0e68eeb3d95ae1f0acf8e9f
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
CMakeLists.txt
packaging/capi-network-wifi-manager.spec
src/network_dbus.c
src/network_interface.c
src/network_signal.c
src/network_signal.h
src/wifi_internal.c

index 9e6d6d9..f4fe1b6 100644 (file)
@@ -12,10 +12,6 @@ pkg_check_modules(pkgs REQUIRED dlog vconf capi-base-common capi-system-info gli
 INCLUDE_DIRECTORIES(${pkgs_INCLUDE_DIRS})
 LINK_DIRECTORIES(${pkgs_LIBRARY_DIRS})
 
-IF(TIZEN_DA)
-       ADD_DEFINITIONS("-DTIZEN_DA")
-ENDIF(TIZEN_DA)
-
 FILE(GLOB SRCS src/*.c)
 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LIBRARIES})
index 3737a3a..57998a7 100644 (file)
@@ -22,14 +22,6 @@ Requires(postun): /sbin/ldconfig
 %description
 Network Wi-Fi Manager library in Tizen C API
 
-%package extension-da
-Summary: Network Wi-Fi Manager library in Tizen C API for Appliance devices
-Group: Network & Connectivity/Development
-Requires: %{name} = %{version}-%{release}
-
-%description extension-da
-Network Wi-Fi Manager library in Tizen C API for Appliance devices
-
 %package devel
 Summary: Network Wi-Fi Manager library in Tizen C API (Development)
 Group: Network & Connectivity/Development
@@ -46,14 +38,6 @@ Requires: %{name} = %{version}
 %description tool
 Test Application for Wi-Fi Manager
 
-%package extension-da-tool
-Summary: Test Application for Wi-Fi Manager (for Appliance devices)
-Group: Network & Connectivity/Utilities
-Requires: %{name} = %{version}
-
-%description extension-da-tool
-Test Application for Wi-Fi Manager (for Appliance devices)
-
 %if 0%{?gcov:1}
 %package gcov
 Summary: Coverage Data of %{name}
@@ -86,22 +70,9 @@ export FFLAGS+=" -fprofile-arcs -ftest-coverage"
 
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 
-# Build for appliance
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
-       -DCMAKE_VERBOSE_MAKEFILE=OFF \
-       -DTIZEN_DA=1 \
-       -DBIN_INSTALL_DIR:PATH=%{_bindir}
-
-%make_install
-mv %{buildroot}%{_libdir}/lib%{name}.so.%{version} %{_builddir}/%{name}-%{version}/lib%{name}.so.%{version}.da
-mv %{buildroot}%{_bindir}/wifi_manager_test %{_builddir}/%{name}-%{version}/wifi_manager_test.da
-
-make %{?_smp_mflags}
-
 # Build for common
 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
        -DCMAKE_VERBOSE_MAKEFILE=OFF \
-       -DTIZEN_DA=0 \
        -DBIN_INSTALL_DIR:PATH=%{_bindir}
 
 make %{?_smp_mflags}
@@ -154,9 +125,6 @@ lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
 genhtml %{name}.info -o out --legend --show-details
 %endif
 
-mv %{_builddir}/%{name}-%{version}/lib%{name}.so.%{version}.da %{buildroot}%{_libdir}
-mv %{_builddir}/%{name}-%{version}/wifi_manager_test.da %{buildroot}%{_bindir}
-
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
@@ -164,7 +132,6 @@ mv %{_builddir}/%{name}-%{version}/wifi_manager_test.da %{buildroot}%{_bindir}
 %files
 %manifest %{name}.manifest
 %{_libdir}/lib%{name}.so.*
-%exclude %{_libdir}/lib%{name}.so.%{version}.da
 %license LICENSE.APLv2
 
 %files devel
@@ -174,7 +141,6 @@ mv %{_builddir}/%{name}-%{version}/wifi_manager_test.da %{buildroot}%{_bindir}
 
 %files tool
 %manifest %{name}.manifest
-%exclude %{_bindir}/wifi_manager_test.da
 %{_bindir}/wifi_manager_test
 %{_bindir}/wifi_mgr_tool
 %{_bindir}/wifi_connect_tool
@@ -187,22 +153,4 @@ mv %{_builddir}/%{name}-%{version}/wifi_manager_test.da %{buildroot}%{_bindir}
 
 %files unittests
 %{_bindir}/gtest-wifi-manager
-%{_bindir}/tizen-unittests/%{name}/run-unittest.sh
-
-%files extension-da
-%{_libdir}/lib%{name}.so.%{version}.da
-
-%preun extension-da
-rm %{_libdir}/lib%{name}.so.%{version}
-
-%post extension-da
-mv %{_libdir}/lib%{name}.so.%{version}.da %{_libdir}/lib%{name}.so.%{version}
-
-%files extension-da-tool
-%{_bindir}/wifi_manager_test.da
-
-%preun extension-da-tool
-rm %{_bindir}/wifi_manager_test
-
-%post extension-da-tool
-mv %{_bindir}/wifi_manager_test.da %{_bindir}/wifi_manager_test
+%{_bindir}/tizen-unittests/%{name}/run-unittest.sh
\ No newline at end of file
index 77e7f65..42b96ba 100644 (file)
@@ -32,7 +32,6 @@
 #define WIFI_SECURITY_OWE                      "owe"
 #define WIFI_SECURITY_DPP                      "dpp"
 
-#if defined TIZEN_DA
 #include "network_signal.h"
 
 __thread guint connection_cb_timer = 0;
@@ -41,7 +40,6 @@ __thread guint full_scan_cb_timer = 0;
 __thread guint specific_scan_cb_timer = 0;
 __thread guint multi_scan_cb_timer = 0;
 __thread guint bssid_scan_cb_timer = 0;
-#endif /* TIZEN_DA */
 
 //LCOV_EXCL_START
 static int __net_error_string_to_enum(const char *error)
@@ -267,9 +265,7 @@ static net_wifi_eap_auth_type_e __net_wifi_eap_auth_type_to_int(const gchar *typ
        return ret;
 }
 
-#if defined TIZEN_DA
 static gboolean __check_connection_callback(gpointer data);
-#endif /* TIZEN_DA */
 
 static void __net_open_connection_reply(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
@@ -307,13 +303,12 @@ static void __net_open_connection_reply(GObject *source_object, GAsyncResult *re
                g_variant_unref(reply);
 
        if (Error == NET_ERR_NONE) {
-#if defined TIZEN_DA
                if (connection_cb_timer > 0) {
                        g_source_remove(connection_cb_timer);
                        connection_cb_timer = 0;
                }
                connection_cb_timer = g_timeout_add_seconds(50, __check_connection_callback, (void *)network_info);
-#endif /* TIZEN_DA */
+
                __NETWORK_FUNC_EXIT__;
                return;
        }
@@ -340,12 +335,12 @@ static void __net_open_connection_reply(GObject *source_object, GAsyncResult *re
        if (open_info->flag == TRUE) {
                g_strlcpy(event_data->ProfileName, open_info->ProfileName,
                                NET_PROFILE_NAME_LEN_MAX + 1);
-#if defined TIZEN_DA
+
                if (connection_cb_timer > 0) {
                        g_source_remove(connection_cb_timer);
                        connection_cb_timer = 0;
                }
-#endif /* TIZEN_DA */
+
                memset(open_info, 0, sizeof(network_request_table_s));
 
                event_data->Error = Error;
@@ -414,7 +409,6 @@ static void __net_open_connection_reply(GObject *source_object, GAsyncResult *re
        __NETWORK_FUNC_EXIT__;
 }
 
-#if defined TIZEN_DA
 static gboolean __check_connection_callback(gpointer data)
 {
        net_event_info_s *event_data = NULL;
@@ -597,7 +591,6 @@ static gboolean __check_bssid_scan_callback(gpointer data)
 
        return FALSE;
 }
-#endif /* TIZEN_DA */
 
 static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer user_data)
 {
@@ -640,7 +633,6 @@ static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer
        if (reply)
                g_variant_unref(reply);
 
-#if defined TIZEN_DA
        if (full_scan_cb_timer > 0) {
                g_source_remove(full_scan_cb_timer);
                full_scan_cb_timer = 0;
@@ -650,7 +642,6 @@ static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer
                g_source_remove(bssid_scan_cb_timer);
                bssid_scan_cb_timer = 0;
        }
-#endif /* TIZEN_DA */
 
        request_table = network_info->request_table;
        bssid_scan_info = &request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN];
@@ -680,18 +671,15 @@ static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer
                if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
                        WIFI_LOG(WIFI_INFO, "Full channel Scan pending");
                        network_info->scan_pending = TRUE;
-#if defined TIZEN_DA
+
                        full_scan_cb_timer = g_timeout_add_seconds(10, __check_full_scan_callback, (void *)network_info);
-#endif /* TIZEN_DA */
                } else if (bssid_scan_info->flag == TRUE) {
                        WIFI_LOG(WIFI_INFO, "BSSID Scan pending");
                        network_info->scan_pending = TRUE;
-#if defined TIZEN_DA
+
                        bssid_scan_cb_timer = g_timeout_add_seconds(10, __check_bssid_scan_callback, (void *)network_info);
-#endif /* TIZEN_DA */
                }
 
-#if defined TIZEN_DA
                wifi_manager_scan_state_e scan_state = WIFI_MANAGER_SCAN_STATE_SCANNING;
                event_data->Event = NET_EVENT_WIFI_SCAN_CHANGED;
                event_data->Data = &scan_state;
@@ -705,7 +693,6 @@ static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer
 
                __NETWORK_FUNC_EXIT__;
                return;
-#endif /* TIZEN_DA */
        } else if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%d]", Error);
 
@@ -2423,12 +2410,10 @@ static void __net_specific_scan_request_reply(GObject *source_object, GAsyncResu
        if (reply)
                g_variant_unref(reply);
 
-#if defined TIZEN_DA
        if (specific_scan_cb_timer > 0) {
                g_source_remove(specific_scan_cb_timer);
                specific_scan_cb_timer = 0;
        }
-#endif /* TIZEN_DA */
 
        request_table = network_info->request_table;
 
@@ -2437,9 +2422,8 @@ static void __net_specific_scan_request_reply(GObject *source_object, GAsyncResu
                if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
                        WIFI_LOG(WIFI_INFO, "Specific Scan pending");
                        network_info->scan_pending = TRUE;
-#if defined TIZEN_DA
+
                        specific_scan_cb_timer = g_timeout_add_seconds(10, __check_specific_scan_callback, (void *)network_info);
-#endif /* TIZEN_DA */
                }
        } else if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Specific Scan failed. Error [%d]", Error);
@@ -4398,12 +4382,10 @@ static void __net_multi_scan_request_reply(GObject *source_object, GAsyncResult
        if (reply)
                g_variant_unref(reply);
 
-#if defined TIZEN_DA
        if (multi_scan_cb_timer > 0) {
                g_source_remove(multi_scan_cb_timer);
                multi_scan_cb_timer = 0;
        }
-#endif /* TIZEN_DA */
 
        request_table = network_info->request_table;
 
@@ -4412,9 +4394,8 @@ static void __net_multi_scan_request_reply(GObject *source_object, GAsyncResult
                if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
                        WIFI_LOG(WIFI_INFO, "Multi Scan pending");
                        network_info->scan_pending = TRUE;
-#if defined TIZEN_DA
+
                        multi_scan_cb_timer = g_timeout_add_seconds(10, __check_multi_scan_callback, (void *)network_info);
-#endif /* TIZEN_DA */
                }
        } else if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Multi Scan failed. Error [%d]", Error);
index f96235b..af602dd 100644 (file)
 
 #define DBUS_OBJECT_PATH_MAX   150
 
-#if defined TIZEN_DA
-
 extern __thread guint connection_cb_timer;
 
 extern __thread guint full_scan_cb_timer;
 extern __thread guint specific_scan_cb_timer;
 extern __thread guint multi_scan_cb_timer;
 extern __thread guint bssid_scan_cb_timer;
-#endif /* TIZEN_DA */
 
 //LCOV_EXCL_START
 static int __net_check_get_privilege(network_info_s *network_info)
@@ -2205,7 +2202,6 @@ int net_wifi_power_off(network_info_s *network_info)
                return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-#if defined TIZEN_DA
        if (connection_cb_timer > 0) {
                g_source_remove(connection_cb_timer);
                connection_cb_timer = 0;
@@ -2227,7 +2223,6 @@ int net_wifi_power_off(network_info_s *network_info)
                g_source_remove(bssid_scan_cb_timer);
                bssid_scan_cb_timer = 0;
        }
-#endif /* TIZEN_DA */
 
        if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
                memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SCAN]),
index ead76a9..a3e5c4b 100644 (file)
 #define NET_WPS_EI_OPERATION_FAILED 1
 #define NET_WPS_EI_SECURITY_WEP_PROHIBITED 2
 
-#if defined TIZEN_DA
-
 extern __thread guint connection_cb_timer;
 
 extern __thread guint full_scan_cb_timer;
 extern __thread guint specific_scan_cb_timer;
 extern __thread guint multi_scan_cb_timer;
 extern __thread guint bssid_scan_cb_timer;
-#endif /* TIZEN_DA */
 
 struct cs_tid_info {
        int tid;
@@ -49,9 +46,6 @@ struct cs_tid_info {
 
 static GSList *cs_tid_list = NULL;
 
-#if !defined TIZEN_DA
-static int __net_dbus_get_bssid_list();
-#endif /* !TIZEN_DA */
 static int __net_dbus_get_technology_states(network_info_s *network_info);
 
 //LCOV_EXCL_START
@@ -644,12 +638,12 @@ static void __net_handle_failure_ind(network_info_s *network_info,
 
        if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                        strstr(profile_info->ProfileName, svc_name1) != NULL) {
-#if defined TIZEN_DA
+
                if (connection_cb_timer > 0) {
                        g_source_remove(connection_cb_timer);
                        connection_cb_timer = 0;
                }
-#endif /* TIZEN_DA */
+
                memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
                                sizeof(network_request_table_s));
 
@@ -727,12 +721,12 @@ static void __net_handle_disconnect_ind(network_info_s *network_info,
 
        if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                        strstr(profile_info->ProfileName, svc_name2) != NULL) {
-#if defined TIZEN_DA
+
                if (connection_cb_timer > 0) {
                        g_source_remove(connection_cb_timer);
                        connection_cb_timer = 0;
                }
-#endif /* TIZEN_DA */
+
                memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
                                sizeof(network_request_table_s));
 
@@ -835,7 +829,6 @@ static int __net_handle_service_state_changed(network_info_s *network_info,
        if (old_state == new_state)
                return Error;
 
-#if defined TIZEN_DA
        /*
         * Send connection state callback to upper layer.
         * This problem is that the target does not send the connection state callback to upper layer if its usb module is reattaced.
@@ -844,7 +837,6 @@ static int __net_handle_service_state_changed(network_info_s *network_info,
        if ((old_state == NET_STATE_TYPE_READY || old_state == NET_STATE_TYPE_ONLINE)
                 && new_state == NET_STATE_TYPE_CONFIGURATION)
                return Error;
-#endif /* TIZEN_DA */
 
        network_info->service_state = new_state;
 
@@ -877,12 +869,12 @@ static int __net_handle_service_state_changed(network_info_s *network_info,
 
                        if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                                        strstr(sig_path, svc_name1) != NULL) {
-#if defined TIZEN_DA
+
                                if (connection_cb_timer > 0) {
                                        g_source_remove(connection_cb_timer);
                                        connection_cb_timer = 0;
                                }
-#endif /* TIZEN_DA */
+
                                memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
                                                sizeof(network_request_table_s));
 
@@ -1032,7 +1024,7 @@ static int __net_handle_scan_done(network_info_s *network_info, GVariant *param)
        if (network_info->scan_pending == TRUE) {
                net_err_e Error = NET_ERR_NONE;
                network_info->scan_pending = FALSE;
-#if defined TIZEN_DA
+
                if (full_scan_cb_timer > 0) {
                        g_source_remove(full_scan_cb_timer);
                        full_scan_cb_timer = 0;
@@ -1049,7 +1041,6 @@ static int __net_handle_scan_done(network_info_s *network_info, GVariant *param)
                        g_source_remove(bssid_scan_cb_timer);
                        bssid_scan_cb_timer = 0;
                }
-#endif /* TIZEN_DA */
 
                int current_scan_type = -1;
                if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
@@ -1462,12 +1453,11 @@ static int __net_handle_wifi_connect_fail_event(network_info_s *network_info,
        WIFI_LOG(WIFI_ERROR, "Failed to connect WiFi");
 
        if (open_info->flag == TRUE) {
-#if defined TIZEN_DA
                if (connection_cb_timer > 0) {
                        g_source_remove(connection_cb_timer);
                        connection_cb_timer = 0;
                }
-#endif /* TIZEN_DA */
+
                memset(open_info, 0, sizeof(network_request_table_s));
                event_data->Error = NET_ERR_INVALID_OPERATION;
                event_data->Event = NET_EVENT_OPEN_RSP;
@@ -2163,11 +2153,7 @@ static int __net_get_tech_states(network_info_s *network_info, GVariant *message
        return Error;
 }
 
-#if defined TIZEN_DA
 int __net_dbus_get_bssid_list(network_info_s *network_info)
-#else
-static int __net_dbus_get_bssid_list(network_info_s *network_info)
-#endif /* !TIZEN_DA */
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2450,10 +2436,8 @@ void _net_deregister_signal(network_info_s *network_info)
                                        network_info->subscribe_id_connman_roaming);
                g_dbus_connection_signal_unsubscribe(network_info->connection,
                                        network_info->subscribe_id_netconfig_wifi);
-#if defined TIZEN_DA
                g_dbus_connection_signal_unsubscribe(network_info->connection,
                                        network_info->subscribe_id_connman_dhcp);
-#endif /* TIZEN_DA */
        }
 
        __NETWORK_FUNC_EXIT__;
index 2a49513..57fad1e 100644 (file)
@@ -31,9 +31,7 @@ int _net_init_service_state(network_info_s *network_info);
 void _net_set_cs_tid(network_info_s *network_info, int tid);
 void _net_unset_cs_tid(int tid);
 
-#if defined TIZEN_DA
 int __net_dbus_get_bssid_list(network_info_s *network_info);
-#endif /* TIZEN_DA */
 
 #ifdef __cplusplus
 }
index 0696213..0858865 100644 (file)
@@ -674,7 +674,6 @@ static void __state_changed_cb(wifi_manager_handle_s *wifi_handle, char *profile
                last_prof_info.bssid_list = NULL;
        }
 
-#if defined TIZEN_DA
        /*
         * Fix connection callback issue.
         * It ignore configuration state after disconnection state in connection_state_changed_cb.
@@ -687,7 +686,6 @@ static void __state_changed_cb(wifi_manager_handle_s *wifi_handle, char *profile
        }
 
        last_state = state;
-#endif /* TIZEN_DA */
 
        WIFI_LOG(WIFI_INFO, "%s state changed : %s", profile_name, __convert_ap_state_to_string(state));
 
@@ -1331,7 +1329,6 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                if ((_wifi_check_profile_name_validity(event_cb->ProfileName) !=
                        true) && (event_cb->Error !=
                                NET_ERR_CONNECTION_CONNECT_FAILED) &&
-#if defined TIZEN_DA
                                /*
                                 * Send the connection callback to upper layer when specific failure case.
                                 * It has the problem that does not connection callback to wifi-manager
@@ -1339,7 +1336,6 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                                 */
                                (event_cb->Error !=
                                 NET_ERR_INVALID_OPERATION) &&
-#endif /* TIZEN_DA */
                                (event_cb->Error !=
                                 NET_ERR_CONNECTION_WPS_TIMEOUT) &&
                                (event_cb->Error !=
@@ -1583,14 +1579,12 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
        case NET_EVENT_WIFI_ROAM_STATE_IND:
                __roaming_state_changed_cb(wifi_handle, (net_roam_event_info_s *)event_cb->Data);
                break;
-#if defined TIZEN_DA
        case NET_EVENT_WIFI_TIMEOUT_RSP:
                result = __convert_to_ap_error_type(event_cb->Error);
                WIFI_LOG(WIFI_ERROR, "Connection close error %s", __convert_ap_error_type_to_string(result));
 
                __connected_cb(wifi_handle, result);
                break;
-#endif /* TIZEN_DA */
        case NET_EVENT_WIFI_DHCP_STATE_IND:
                {
                        net_event_e err = event_cb->Error;