#include <dns-sd.h>
#include <dns-sd-internal.h>
-#include <wifi.h>
+#include <wifi-manager.h>
/*****************************************************************************
* Application Service Platform Daemon headers
gint32 mac_addr_len;
gint32 port = 1234; /* TODO */
gchar *if_name;
+ wifi_manager_h wifi_handle;
ASP_LOGD("Infrastructure advertise service. replace: %d", 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;
}
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;
}