const gchar *object_path, GVariant *parameters)
{
__WDC_LOG_FUNC_START__;
- char *ifname = NULL;
+ char *get_str = NULL;
+ GError* error = NULL;
+ GVariant *reply = NULL;
const gchar *peer_mac_address = NULL;
const gchar *assigned_ip_address = NULL;
+ int ret = 0;
wifi_direct_client_info_s *client = __wfd_get_control();
if (!parameters) {
return;
}
- ifname = vconf_get_str(VCONFKEY_IFNAME);
- if (!ifname) {
- WDC_LOGD("vconf (%s) value is NULL!!!", VCONFKEY_IFNAME);
+ reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+ "GetInterfaceName",
+ NULL,
+ &error);
+ if (error != NULL) {
+ WDC_LOGE("wifi_direct_dbus_method_call_sync() failed."
+ "error [%d: %s]", error->code, error->message);
+ g_error_free(error);
+ __WDC_LOG_FUNC_END__;
return;
}
- WDC_LOGD("VCONFKEY_IFNAME(%s) : %s", VCONFKEY_IFNAME, ifname);
- client->ip_assigned_cb(peer_mac_address, assigned_ip_address, ifname,
+ g_variant_get(reply, "(i&s)", ret ,&get_str);
+ g_variant_unref(reply);
+
+ WDC_LOGD("Interface Name = [%s]", get_str);
+ WDC_LOGD("%s() return : [%d]", __func__, ret);
+
+ client->ip_assigned_cb(peer_mac_address, assigned_ip_address, get_str,
client->user_data_for_cb_ip_assigned);
- g_free(ifname);
__WDC_LOG_FUNC_END__;
}
g_client_info.user_data_for_cb_service = NULL;
#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
+ g_client_info.is_registered = FALSE;
+
__WDC_LOG_FUNC_END__;
return WIFI_DIRECT_ERROR_NONE;
}
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
}
WDC_LOGD("%s() SUCCESS", __func__);
+ g_variant_get(reply, "(i)", &ret);
g_variant_unref(reply);
+ WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
- return WIFI_DIRECT_ERROR_NONE;
+ return ret;
}
int wifi_direct_set_wps_pin(char *pin)
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
const char *str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
}
g_variant_get(reply, "(i&s)", &ret, &str);
- *pin = g_strdup(str);
+ if(pin != NULL && str != NULL)
+ *pin = g_strdup(str);
g_variant_unref(reply);
WDC_LOGD("%s() return : [%d]", __func__, ret);
GError* error = NULL;
GVariant *reply = NULL;
int mode = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
int wps_mode = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
gboolean result = FALSE;
if (g_client_info.is_registered == false) {
GError* error = NULL;
GVariant *reply = NULL;
int mode = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
const char *str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
const char *str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
wifi_direct_state_e status = 0;
char *get_str = NULL;
- int ret = 0;
+ GError* error = NULL;
+ GVariant *reply = NULL;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
return WIFI_DIRECT_ERROR_NOT_PERMITTED;
}
- get_str = vconf_get_str(VCONFKEY_IFNAME);
- if (!get_str) {
- WDC_LOGD( "vconf (%s) value is NULL!!!\n", VCONFKEY_IFNAME);
+ reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+ "GetInterfaceName",
+ NULL,
+ &error);
+ if (error != NULL) {
+ WDC_LOGE("wifi_direct_dbus_method_call_sync() failed."
+ "error [%d: %s]", error->code, error->message);
+ g_error_free(error);
__WDC_LOG_FUNC_END__;
- return WIFI_DIRECT_ERROR_NOT_PERMITTED;
+ return WIFI_DIRECT_ERROR_OPERATION_FAILED;
}
- WDC_LOGD( "VCONFKEY_IFNAME(%s) : %s\n", VCONFKEY_IFNAME, get_str);
+
+ g_variant_get(reply, "(i&s)", ret ,&get_str);
*name = g_strdup(get_str);
- g_free(get_str);
+ g_variant_unref(reply);
+
+ WDC_LOGD("Interface Name = [%s]", *name);
+ WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
return WIFI_DIRECT_ERROR_NONE;
GError* error = NULL;
GVariant *reply = NULL;
const char *str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
wifi_direct_state_e status = 0;
+ GError* error = NULL;
+ GVariant *reply = NULL;
char *get_str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
return WIFI_DIRECT_ERROR_NOT_PERMITTED;
}
- get_str = vconf_get_str(VCONFKEY_SUBNET_MASK);
- if (!get_str) {
- WDC_LOGD("vconf (%s) value is NULL!!!", VCONFKEY_SUBNET_MASK);
+ reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+ "GetSubnetMask",
+ NULL,
+ &error);
+ if (error != NULL) {
+ WDC_LOGE("wifi_direct_dbus_method_call_sync() failed."
+ "error [%d: %s]", error->code, error->message);
+ g_error_free(error);
__WDC_LOG_FUNC_END__;
- return WIFI_DIRECT_ERROR_NOT_PERMITTED;
+ return WIFI_DIRECT_ERROR_OPERATION_FAILED;
}
- WDC_LOGD("VCONFKEY_SUBNET_MASK(%s) : %s", VCONFKEY_SUBNET_MASK, get_str);
+
+ g_variant_get(reply, "(i&s)", ret ,&get_str);
*subnet_mask = g_strdup(get_str);
- g_free(get_str);
+ g_variant_unref(reply);
+
+ WDC_LOGD("Subnet Mask = [%s]", *subnet_mask);
+ WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
return WIFI_DIRECT_ERROR_NONE;
CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
wifi_direct_state_e status = 0;
+ GError* error = NULL;
+ GVariant *reply = NULL;
char *get_str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
return WIFI_DIRECT_ERROR_NOT_PERMITTED;
}
- get_str = vconf_get_str(VCONFKEY_GATEWAY);
- if (!get_str) {
- WDC_LOGD("vconf (%s) value is NULL!!!", VCONFKEY_GATEWAY);
+ reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+ "GetGateway",
+ NULL,
+ &error);
+ if (error != NULL) {
+ WDC_LOGE("wifi_direct_dbus_method_call_sync() failed."
+ "error [%d: %s]", error->code, error->message);
+ g_error_free(error);
__WDC_LOG_FUNC_END__;
- return WIFI_DIRECT_ERROR_NOT_PERMITTED;
+ return WIFI_DIRECT_ERROR_OPERATION_FAILED;
}
- WDC_LOGD("VCONFKEY_GATEWAY(%s) : %s", VCONFKEY_GATEWAY, get_str);
+
+ g_variant_get(reply, "(i&s)", ret ,&get_str);
*gateway_address = g_strdup(get_str);
- g_free(get_str);
+ g_variant_unref(reply);
+
+ WDC_LOGD("Gateway Address = [%s]", *gateway_address);
+ WDC_LOGD("%s() return : [%d]", __func__, ret);
__WDC_LOG_FUNC_END__;
return WIFI_DIRECT_ERROR_NONE;
GError* error = NULL;
GVariant *reply = NULL;
const char *str = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
bool val = FALSE;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
GVariant *reply = NULL;
GVariant *params = NULL;
char *buf = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
int len = 0;
if (g_client_info.is_registered == false) {
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
int wifi_direct_init_miracast(bool enable)
{
__WDC_LOG_FUNC_START__;
+ int ret = WIFI_DIRECT_ERROR_NONE;
+
+ if(enable)
+ ret = wifi_direct_init_display();
+ else
+ ret = wifi_direct_deinit_display();
+
__WDC_LOG_FUNC_END__;
- return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
+ return ret;
}
int wifi_direct_get_peer_info(char* mac_address, wifi_direct_discovered_peer_info_s** peer_info)
GError* error = NULL;
GVariant *reply = NULL;
const char *val = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
GError* error = NULL;
GVariant *reply = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
GError* error = NULL;
GVariant *reply = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GError* error = NULL;
GVariant *reply = NULL;
GVariant *params = NULL;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered.");
GVariant *reply = NULL;
GVariant *params = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GVariant *reply = NULL;
GVariant *params = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GVariant *reply = NULL;
GVariant *params = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GVariant *reply = NULL;
GVariant *params = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");
GVariant *reply = NULL;
GVariant *params = NULL;
int val = 0;
- int ret = 0;
+ int ret = WIFI_DIRECT_ERROR_NONE;
if (g_client_info.is_registered == false) {
WDC_LOGE("Client is NOT registered");