change the dependency of wifi to wifi-manager 55/142255/1
authorchleun.moon <chleun.moon@samsung.com>
Thu, 3 Aug 2017 07:14:28 +0000 (16:14 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Thu, 3 Aug 2017 07:14:47 +0000 (16:14 +0900)
Change-Id: I4780fd3fc2941768688f661c549a004b8bb6fa79
Signed-off-by: cheoleun <chleun.moon@samsung.com>
packaging/asp-manager.spec
src/CMakeLists.txt
src/tech/asp-tech-infra.c

index 731e887..d536347 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       asp-manager
 Summary:    ASP(application service platform) manager
-Version:    0.0.17
+Version:    0.0.18
 Release:    2
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
@@ -16,7 +16,7 @@ BuildRequires:  pkgconfig(gio-unix-2.0)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires: pkgconfig(nsd-dns-sd)
-BuildRequires: pkgconfig(capi-network-wifi)
+BuildRequires: pkgconfig(capi-network-wifi-manager)
 BuildRequires: pkgconfig(vconf)
 
 BuildRequires:  python
index 95ba1f0..11e88c0 100755 (executable)
@@ -27,7 +27,7 @@ PKG_CHECK_MODULES(asp_pkgs REQUIRED
        gio-unix-2.0
        dlog
        nsd-dns-sd
-       capi-network-wifi
+       capi-network-wifi-manager
        vconf
        )
 
index 6dd5fff..d0b4ff2 100644 (file)
@@ -36,7 +36,7 @@
 #include <dns-sd.h>
 #include <dns-sd-internal.h>
 
-#include <wifi.h>
+#include <wifi-manager.h>
 
 /*****************************************************************************
  * Application Service Platform Daemon headers
@@ -325,6 +325,7 @@ gint32 asp_tech_infra_advertise(asp_service_advertise_s *service, gint32 replace
        gint32 mac_addr_len;
        gint32 port = 1234; /* TODO */
        gchar *if_name;
+       wifi_manager_h wifi_handle;
 
        ASP_LOGD("Infrastructure advertise service. replace: %d", replace);
 
@@ -356,20 +357,20 @@ gint32 asp_tech_infra_advertise(asp_service_advertise_s *service, gint32 replace
        }
        ASP_LOGD("Success to set port %d", port);
 
-       result = wifi_initialize();
-       if (result != WIFI_ERROR_NONE) {
-               ASP_LOGD("Failed to initialize wifi");
+       result = wifi_manager_initialize(&wifi_handle);
+       if (result != WIFI_MANAGER_ERROR_NONE) {
+               ASP_LOGD("Failed to initialize wifi-manager");
                return ASP_ERROR_OPERATION_FAILED;
        }
-       result = wifi_get_network_interface_name(&if_name);
-       if (result != WIFI_ERROR_NONE) {
+       result = wifi_manager_get_network_interface_name(wifi_handle, &if_name);
+       if (result != WIFI_MANAGER_ERROR_NONE) {
                ASP_LOGD("Failed to get interface name");
                return ASP_ERROR_OPERATION_FAILED;
        }
        ASP_LOGD("Success to get wifi interface name %s", if_name);
-       result = wifi_deinitialize();
-       if (result != WIFI_ERROR_NONE) {
-               ASP_LOGD("Failed to deinitialize wifi");
+       result = wifi_manager_deinitialize(wifi_handle);
+       if (result != WIFI_MANAGER_ERROR_NONE) {
+               ASP_LOGD("Failed to deinitialize wifi_manager");
                free(if_name);
                return ASP_ERROR_OPERATION_FAILED;
        }
@@ -480,21 +481,22 @@ gint32 asp_tech_infra_seek(asp_service_seek_s *service)
        gint32 result = 0;
        dnssd_service_h browser_handle;
        gchar *if_name;
+       wifi_manager_h wifi_handle;
 
-       result = wifi_initialize();
-       if (result != WIFI_ERROR_NONE) {
-               ASP_LOGD("Failed to initialize wifi");
+       result = wifi_manager_initialize(&wifi_handle);
+       if (result != WIFI_MANAGER_ERROR_NONE) {
+               ASP_LOGD("Failed to initialize wifi-manager");
                return ASP_ERROR_OPERATION_FAILED;
        }
-       result = wifi_get_network_interface_name(&if_name);
-       if (result != WIFI_ERROR_NONE) {
+       result = wifi_manager_get_network_interface_name(wifi_handle, &if_name);
+       if (result != WIFI_MANAGER_ERROR_NONE) {
                ASP_LOGD("Failed to get interface name");
                return ASP_ERROR_OPERATION_FAILED;
        }
        ASP_LOGD("Success to get wifi interface name %s", if_name);
-       result = wifi_deinitialize();
-       if (result != WIFI_ERROR_NONE) {
-               ASP_LOGD("Failed to deinitialize wifi");
+       result = wifi_manager_deinitialize(wifi_handle);
+       if (result != WIFI_MANAGER_ERROR_NONE) {
+               ASP_LOGD("Failed to deinitialize wifi-manager");
                free(if_name);
                return ASP_ERROR_OPERATION_FAILED;
        }