Upgrading signal subscription logic.
[platform/core/api/wifi-direct.git] / src / wifi-direct-client-proxy.c
old mode 100755 (executable)
new mode 100644 (file)
index ba5fd12..5cefcec
@@ -21,7 +21,7 @@
 
 
 /*****************************************************************************
- *     Standard headers
+ *  Standard headers
  *****************************************************************************/
 #define _GNU_SOURCE
 #include <stdio.h>
 #include <gio/gio.h>
 
 /*****************************************************************************
- *     System headers
+ *  System headers
  *****************************************************************************/
 #include <vconf.h>
 #include <system_info.h>
 
 /*****************************************************************************
- *     Wi-Fi Direct Service headers
+ *  Wi-Fi Direct Service headers
  *****************************************************************************/
 #include "wifi-direct.h"
 #include "wifi-direct-internal.h"
 #include "wifi-direct-client-proxy.h"
 #include "wifi-direct-ipc.h"
+#include "wifi-direct-log.h"
+#include "wifi-direct-dbus.h"
 
 /*****************************************************************************
- *     Macros and Typedefs
+ *  Macros and Typedefs
  *****************************************************************************/
 
 /*****************************************************************************
- *     Global Variables
+ *  Global Variables
  *****************************************************************************/
-wifi_direct_client_info_s g_client_info = {
-       .is_registered = FALSE,
-       .client_id = -1,
-       .sync_sockfd = -1,
-       .async_sockfd = -1,
-       .activation_cb = NULL,
-       .discover_cb = NULL,
-       .connection_cb = NULL,
-       .ip_assigned_cb = NULL,
-       .peer_found_cb = NULL,
-       .user_data_for_cb_activation = NULL,
-       .user_data_for_cb_discover = NULL,
-       .user_data_for_cb_connection = NULL,
-       .user_data_for_cb_ip_assigned = NULL,
-       .user_data_for_cb_peer_found = NULL,
-       .user_data_for_cb_device_name = NULL,
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       .service_cb = NULL,
-       .user_data_for_cb_service = NULL,
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
 
-       .mutex = PTHREAD_MUTEX_INITIALIZER
-};
+static __thread wifi_direct_client_info_s g_client_info = {0, };
 
 /*****************************************************************************
- *     Local Functions Definition
+ *  Local Functions Definition
  *****************************************************************************/
 
-#ifdef __NR_gettid
-pid_t gettid(void)
+static wifi_direct_client_info_s *__wfd_get_control()
 {
-       return syscall(__NR_gettid);
+       return &g_client_info;
 }
-#else
-#error "__NR_gettid is not defined, please include linux/unistd.h"
-#endif
 
-static wifi_direct_client_info_s *__wfd_get_control()
+static int __net_wifidirect_gerror_to_enum(GError* error)
 {
-       return &g_client_info;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       if (error == NULL) {
+               WDC_LOGI("GError is NULL!!");
+               return ret;
+       }
+
+       WDC_LOGE("wifi_direct_dbus_method_call_sync() failed. error [%d: %s]",
+                       error->code, error->message);
+
+       if (NULL == strstr(error->message, "net.wifidirect.Error")) {
+//LCOV_EXCL_START
+               if (NULL != strstr(error->message, ".AccessDenied")) {
+                       WDC_LOGE("Client doesn't have wifidirect privilege");
+                       ret = WIFI_DIRECT_ERROR_PERMISSION_DENIED;
+               } else {
+                       WDC_LOGE("DBus failure");
+                       ret = WIFI_DIRECT_ERROR_OPERATION_FAILED;
+               }
+//LCOV_EXCL_STOP
+       } else {
+               if (NULL != strstr(error->message, "InvalidParameter"))
+                       ret = WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+               else if (NULL != strstr(error->message, "NotPermitted"))
+                       ret = WIFI_DIRECT_ERROR_NOT_PERMITTED;
+               else if (NULL != strstr(error->message, "OperationFailed"))
+                       ret = WIFI_DIRECT_ERROR_OPERATION_FAILED;
+//LCOV_EXCL_START
+               else if (NULL != strstr(error->message, "TooManyClient"))
+                       ret = WIFI_DIRECT_ERROR_TOO_MANY_CLIENT;
+               else
+                       ret = WIFI_DIRECT_ERROR_OPERATION_FAILED;
+//LCOV_EXCL_STOP
+       }
+       g_error_free(error);
+       return ret;
 }
 
-static void __wfd_reset_control()
+//LCOV_EXCL_START
+void __wfd_vconf_state_changed_cb(keynode_t *key, void *data)
 {
+       __WDC_LOG_FUNC_START__;
+       int state = 0;
+       int res = 0;
 
-       if (g_client_info.g_source_id > 0)
-               g_source_remove(g_client_info.g_source_id);
-       g_client_info.g_source_id = -1;
+       if (!g_client_info.state_cb) {
+               WDC_LOGI("g_state_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return; //LCOV_EXCL_LINE
+       }
 
-       // Protect standard input / output / error
-       if (g_client_info.sync_sockfd > 0)
-               close(g_client_info.sync_sockfd);
-       g_client_info.sync_sockfd = -1;
+       res = vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &state);
+       if (res < 0) {
+               WDC_LOGE("Failed to get vconf value [%s]\n",
+                        VCONFKEY_WIFI_DIRECT_STATE);
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
+
+       if (state == VCONFKEY_WIFI_DIRECT_ACTIVATED) {
+               state = WIFI_DIRECT_STATE_ACTIVATED;
+       } else if (state == VCONFKEY_WIFI_DIRECT_DEACTIVATED) {
+               state = WIFI_DIRECT_STATE_DEACTIVATED;
+       } else if (state == VCONFKEY_WIFI_DIRECT_CONNECTED) {
+               state = WIFI_DIRECT_STATE_CONNECTED;
+       } else if (state == VCONFKEY_WIFI_DIRECT_GROUP_OWNER) {
+               state = WIFI_DIRECT_STATE_CONNECTED;
+       } else if (state == VCONFKEY_WIFI_DIRECT_DISCOVERING) {
+               state = WIFI_DIRECT_STATE_DISCOVERING;
+       } else {
+               WDC_LOGE("This state cannot be set as wifi_direct vconf state[%d]", state);
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
 
-       if (g_client_info.async_sockfd > 0)
-               close(g_client_info.async_sockfd);
-       g_client_info.async_sockfd = -1;
+       g_client_info.state_cb(state, g_client_info.user_data_for_cb_state);
 
-       g_client_info.is_registered = FALSE;
+       __WDC_LOG_FUNC_END__;
+       return;
+}
+//LCOV_EXCL_STOP
+
+/* Manage */
+void wifi_direct_process_manage_activation(GDBusConnection *connection,
+                                          const gchar *sender,
+                                          const gchar *object_path,
+                                          const gchar *interface,
+                                          const gchar *signal,
+                                          GVariant *parameters,
+                                          gpointer user_data)
+{
+       __WDC_LOG_FUNC_START__;
+       int error_code;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       // Initialize callbacks
-       g_client_info.activation_cb = NULL;
-       g_client_info.discover_cb = NULL;
-       g_client_info.connection_cb = NULL;
-       g_client_info.ip_assigned_cb = NULL;
-       g_client_info.peer_found_cb = NULL;
-       g_client_info.user_data_for_cb_activation = NULL;
-       g_client_info.user_data_for_cb_discover = NULL;
-       g_client_info.user_data_for_cb_connection = NULL;
-       g_client_info.user_data_for_cb_ip_assigned = NULL;
-       g_client_info.user_data_for_cb_peer_found = NULL;
-       g_client_info.user_data_for_cb_device_name = NULL;
+       if (!client->activation_cb) {
+               WDC_LOGI("activation_cb is NULL!!");
+               return; //LCOV_EXCL_LINE
+       }
 
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       g_client_info.service_cb = NULL;
-       g_client_info.user_data_for_cb_service= NULL;
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
+       if (!parameters) {
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
+
+       g_variant_get(parameters, "(i)", &error_code);
 
+       client->activation_cb(error_code,
+                             WIFI_DIRECT_DEVICE_STATE_ACTIVATED,
+                             client->user_data_for_cb_activation);
 
-       pthread_mutex_destroy(&g_client_info.mutex);
+       __WDC_LOG_FUNC_END__;
 }
 
-static int macaddr_atoe(char *p, unsigned char mac[])
+void wifi_direct_process_manage_deactivation(GDBusConnection *connection,
+                                            const gchar *sender,
+                                            const gchar *object_path,
+                                            const gchar *interface,
+                                            const gchar *signal,
+                                            GVariant *parameters,
+                                            gpointer user_data)
 {
-       int i = 0;
+       __WDC_LOG_FUNC_START__;
+       int error_code;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       for (;;) {
-               mac[i++] = (char) strtoul(p, &p, 16);
-               if (!*p++ || i == 6)
-                       break;
+       if (!parameters) {
+               __WDC_LOG_FUNC_END__;
+               return; //LCOV_EXCL_LINE
+       }
+
+       if (!client->activation_cb) {
+               WDC_LOGI("activation_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return;
        }
 
-       return (i == 6);
+       g_variant_get(parameters, "(i)", &error_code);
+
+       client->activation_cb(error_code,
+                             WIFI_DIRECT_DEVICE_STATE_DEACTIVATED,
+                             client->user_data_for_cb_activation);
+
+       __WDC_LOG_FUNC_END__;
 }
 
-static char *__wfd_print_event(wfd_client_event_e event)
+//LCOV_EXCL_START
+void wifi_direct_process_manage_connection(GDBusConnection *connection,
+                                          const gchar *sender,
+                                          const gchar *object_path,
+                                          const gchar *interface,
+                                          const gchar *signal,
+                                          GVariant *parameters,
+                                          gpointer user_data)
 {
-       switch (event)
-       {
-       case WIFI_DIRECT_CLI_EVENT_INVALID:
-               return "WIFI_DIRECT_CLI_EVENT_INVALID";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_ACTIVATION:
-               return "ACTIVATION";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DEACTIVATION:
-               return "DEACTIVATION";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START:
-               return "WIFI_DIRECT_CLI_EVENT_DISCOVER_START";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START_LISTEN_ONLY:
-               return "WIFI_DIRECT_CLI_EVENT_DISCOVER_START_LISTEN_ONLY";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START_SEARCH_LISTEN:
-               return "WIFI_DIRECT_CLI_EVENT_DISCOVER_START_SEARCH_LISTEN";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_END:
-               return "WIFI_DIRECT_CLI_EVENT_DISCOVER_END";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_FOUND_PEERS:
-               return "WIFI_DIRECT_CLI_EVENT_DISCOVER_FOUND_PEERS";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_START:
-               return "WIFI_DIRECT_CLI_EVENT_CONNECTION_START";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_REQ:
-               return "WIFI_DIRECT_CLI_EVENT_CONNECTION_REQ";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_RSP:
-               return "WIFI_DIRECT_CLI_EVENT_CONNECTION_RSP";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_WPS_REQ:
-               return "WIFI_DIRECT_CLI_EVENT_CONNECTION_WPS_REQ";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCONNECTION_RSP:
-               return "WIFI_DIRECT_CLI_EVENT_DISCONNECTION_RSP";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCONNECTION_IND:
-               return "WIFI_DIRECT_CLI_EVENT_DISCONNECTION_IND";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISASSOCIATION_IND:
-               return "WIFI_DIRECT_CLI_EVENT_DISASSOCIATION_IND";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_GROUP_CREATE_RSP:
-               return "WIFI_DIRECT_CLI_EVENT_GROUP_CREATE_RSP";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP:
-               return "WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_IP_LEASED_IND:
-               return "WIFI_DIRECT_CLI_EVENT_IP_LEASED_IND";
-               break;
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FOUND:
-               return "WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FOUND";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_STARTED:
-               return "WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_STARTED";
-               break;
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FINISHED:
-               return "WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FINSIHED";
-               break;
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
+       __WDC_LOG_FUNC_START__;
+       int error_code;
+       wifi_direct_connection_state_e connection_state;
+       const gchar *peer_mac_address = NULL;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       default:
-               return "WIFI_DIRECT_CLI_EVENT_unknown";
-               break;
+       if (!parameters) {
+               __WDC_LOG_FUNC_END__;
+               return;
        }
-}
 
-static char *__wfd_print_error(wifi_direct_error_e error)
-{
-       switch (error)
-       {
-       case WIFI_DIRECT_ERROR_NONE:
-               return "WIFI_DIRECT_ERROR_NONE";
-       case WIFI_DIRECT_ERROR_NOT_PERMITTED:
-               return "WIFI_DIRECT_ERROR_NOT_PERMITTED";
-       case WIFI_DIRECT_ERROR_OUT_OF_MEMORY:
-               return "WIFI_DIRECT_ERROR_OUT_OF_MEMORY";
-       case WIFI_DIRECT_ERROR_PERMISSION_DENIED:
-               return "WIFI_DIRECT_ERROR_PERMISSION_DENIED";
-       case WIFI_DIRECT_ERROR_RESOURCE_BUSY:
-               return "WIFI_DIRECT_ERROR_RESOURCE_BUSY";
-       case WIFI_DIRECT_ERROR_INVALID_PARAMETER:
-               return "WIFI_DIRECT_ERROR_INVALID_PARAMETER";
-       case WIFI_DIRECT_ERROR_NOT_INITIALIZED:
-               return "WIFI_DIRECT_ERROR_NOT_INITIALIZED";
-       case WIFI_DIRECT_ERROR_COMMUNICATION_FAILED:
-               return "WIFI_DIRECT_ERROR_COMMUNICATION_FAILED";
-       case WIFI_DIRECT_ERROR_WIFI_USED:
-               return "WIFI_DIRECT_ERROR_WIFI_USED";
-       case WIFI_DIRECT_ERROR_MOBILE_AP_USED:
-               return "WIFI_DIRECT_ERROR_MOBILE_AP_USED";
-       case WIFI_DIRECT_ERROR_CONNECTION_FAILED:
-               return "WIFI_DIRECT_ERROR_CONNECTION_FAILED";
-       case WIFI_DIRECT_ERROR_AUTH_FAILED:
-               return "WIFI_DIRECT_ERROR_AUTH_FAILED";
-       case WIFI_DIRECT_ERROR_OPERATION_FAILED:
-               return "WIFI_DIRECT_ERROR_OPERATION_FAILED";
-       case WIFI_DIRECT_ERROR_TOO_MANY_CLIENT:
-               return "WIFI_DIRECT_ERROR_TOO_MANY_CLIENT";
-       case WIFI_DIRECT_ERROR_ALREADY_INITIALIZED:
-               return "WIFI_DIRECT_ERROR_ALREADY_INITIALIZED";
-       default:
-               WDC_LOGE("Invalid error value: [%d]", error);
-               return "Invalid error";
+       if (!client->connection_cb) {
+               WDC_LOGI("connection_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return;
        }
+
+       g_variant_get(parameters, "(ii&s)",
+                       &error_code, &connection_state, &peer_mac_address);
+
+       client->connection_cb(error_code,
+                             connection_state,
+                             peer_mac_address,
+                             client->user_data_for_cb_connection);
+
+       __WDC_LOG_FUNC_END__;
 }
 
-static int __wfd_convert_client_event(wfd_client_event_e event)
+void wifi_direct_process_manage_disconnection(GDBusConnection *connection,
+                                             const gchar *sender,
+                                             const gchar *object_path,
+                                             const gchar *interface,
+                                             const gchar *signal,
+                                             GVariant *parameters,
+                                             gpointer user_data)
 {
        __WDC_LOG_FUNC_START__;
+       int error_code;
+       wifi_direct_connection_state_e connection_state;
+       const gchar *peer_mac_address = NULL;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       switch (event)
-       {
-       case WIFI_DIRECT_CLI_EVENT_ACTIVATION:
-               return WIFI_DIRECT_DEVICE_STATE_ACTIVATED;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DEACTIVATION:
-               return WIFI_DIRECT_DEVICE_STATE_DEACTIVATED;
-               break;
-
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START_LISTEN_ONLY:
-               return WIFI_DIRECT_ONLY_LISTEN_STARTED;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START:
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START_SEARCH_LISTEN:
-               return WIFI_DIRECT_DISCOVERY_STARTED;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_FOUND_PEERS:
-               return WIFI_DIRECT_DISCOVERY_FOUND;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_END:
-               return WIFI_DIRECT_DISCOVERY_FINISHED;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_REQ:
-               return WIFI_DIRECT_CONNECTION_REQ;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_WPS_REQ:
-               return WIFI_DIRECT_CONNECTION_WPS_REQ;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_START:
-               return WIFI_DIRECT_CONNECTION_IN_PROGRESS;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_RSP:
-               return WIFI_DIRECT_CONNECTION_RSP;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCONNECTION_RSP:
-               return WIFI_DIRECT_DISCONNECTION_RSP;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCONNECTION_IND:
-               return WIFI_DIRECT_DISCONNECTION_IND;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISASSOCIATION_IND:
-               return WIFI_DIRECT_DISASSOCIATION_IND;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_GROUP_CREATE_RSP:
-               return WIFI_DIRECT_GROUP_CREATED;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP:
-               return WIFI_DIRECT_GROUP_DESTROYED;
-               break;
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FOUND:
-               return WIFI_DIRECT_SERVICE_DISCOVERY_FOUND;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_STARTED:
-               return WIFI_DIRECT_SERVICE_DISCOVERY_STARTED;
-               break;
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FINISHED:
-               return WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED;
-               break;
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
-       default:
-               WDC_LOGE("Invalid event : [%d]", event);
-               break;
+       if (!parameters) {
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
+
+       if (!client->connection_cb) {
+               WDC_LOGI("connection_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return;
        }
 
+       g_variant_get(parameters, "(ii&s)",
+                       &error_code, &connection_state, &peer_mac_address);
+
+       client->connection_cb(error_code,
+                             connection_state,
+                             peer_mac_address,
+                             client->user_data_for_cb_connection);
+
        __WDC_LOG_FUNC_END__;
-       return -1;
 }
 
-char *__wfd_client_print_cmd(wifi_direct_cmd_e cmd)
+void wifi_direct_process_manage_peer_ip_assigned(GDBusConnection *connection,
+                                                const gchar *sender,
+                                                const gchar *object_path,
+                                                const gchar *interface,
+                                                const gchar *signal,
+                                                GVariant *parameters,
+                                                gpointer user_data)
 {
-       switch (cmd)
-       {
-       case WIFI_DIRECT_CMD_REGISTER:
-               return "WIFI_DIRECT_CMD_REGISTER";
-       case WIFI_DIRECT_CMD_INIT_ASYNC_SOCKET:
-               return "WIFI_DIRECT_CMD_INIT_ASYNC_SOCKET";
-       case WIFI_DIRECT_CMD_DEREGISTER:
-               return "WIFI_DIRECT_CMD_DEREGISTER";
-       case WIFI_DIRECT_CMD_ACTIVATE:
-               return "WIFI_DIRECT_CMD_ACTIVATE";
-       case WIFI_DIRECT_CMD_DEACTIVATE:
-               return "WIFI_DIRECT_CMD_DEACTIVATE";
-       case WIFI_DIRECT_CMD_START_DISCOVERY:
-               return "WIFI_DIRECT_CMD_START_DISCOVERY";
-       case WIFI_DIRECT_CMD_START_DISCOVERY_SPECIFIC_CHANNEL:
-               return "WIFI_DIRECT_CMD_START_DISCOVERY_SPECIFIC_CHANNEL";
-       case WIFI_DIRECT_CMD_CANCEL_DISCOVERY:
-               return "WIFI_DIRECT_CMD_CANCEL_DISCOVERY";
-       case WIFI_DIRECT_CMD_GET_DISCOVERY_RESULT:
-               return "WIFI_DIRECT_CMD_GET_DISCOVERY_RESULT";
-       case WIFI_DIRECT_CMD_GET_LINK_STATUS:
-               return "WIFI_DIRECT_CMD_GET_LINK_STATUS";
-       case WIFI_DIRECT_CMD_CONNECT:
-               return "WIFI_DIRECT_CMD_CONNECT";
-       case WIFI_DIRECT_CMD_CANCEL_CONNECT:
-               return "WIFI_DIRECT_CMD_CANCEL_CONNECT";
-       case WIFI_DIRECT_CMD_CANCEL_CONNECTION:
-               return "WIFI_DIRECT_CMD_CANCEL_CONNECTION";
-       case WIFI_DIRECT_CMD_REJECT_CONNECTION:
-               return "WIFI_DIRECT_CMD_REJECT_CONNECTION";
-       case WIFI_DIRECT_CMD_DISCONNECT_ALL:
-               return "WIFI_DIRECT_CMD_DISCONNECT_ALL";
-       case WIFI_DIRECT_CMD_CREATE_GROUP:
-               return "WIFI_DIRECT_CMD_CREATE_GROUP";
-       case WIFI_DIRECT_CMD_IS_GROUPOWNER:
-               return "WIFI_DIRECT_CMD_IS_GROUPOWNER";
-       case WIFI_DIRECT_CMD_GET_SSID:
-               return "WIFI_DIRECT_CMD_GET_SSID";
-       case WIFI_DIRECT_CMD_SET_SSID:
-               return "WIFI_DIRECT_CMD_SET_SSID";
-       case WIFI_DIRECT_CMD_GET_IP_ADDR:
-               return "WIFI_DIRECT_CMD_GET_IP_ADDR";
-       case WIFI_DIRECT_CMD_GET_CONFIG:
-               return "WIFI_DIRECT_CMD_GET_CONFIG";
-       case WIFI_DIRECT_CMD_SET_CONFIG:
-               return "WIFI_DIRECT_CMD_SET_CONFIG";
-       case WIFI_DIRECT_CMD_SEND_CONNECT_REQ:
-               return "WIFI_DIRECT_CMD_SEND_CONNECT_REQ";
-       case WIFI_DIRECT_CMD_ACTIVATE_PUSHBUTTON:
-               return "WIFI_DIRECT_CMD_ACTIVATE_PUSHBUTTON";
-       case WIFI_DIRECT_CMD_SET_WPS_PIN:
-               return "WIFI_DIRECT_CMD_SET_WPS_PIN";
-       case WIFI_DIRECT_CMD_GET_WPS_PIN:
-               return "WIFI_DIRECT_CMD_GET_WPS_PIN";
-       case WIFI_DIRECT_CMD_GENERATE_WPS_PIN:
-               return "WIFI_DIRECT_CMD_GENERATE_WPS_PIN";
-       case WIFI_DIRECT_CMD_SET_WPA:
-               return "WIFI_DIRECT_CMD_SET_WPA";
-       case WIFI_DIRECT_CMD_GET_SUPPORTED_WPS_MODE:
-               return "WIFI_DIRECT_CMD_GET_SUPPORTED_WPS_MODE";
-       case WIFI_DIRECT_CMD_GET_LOCAL_WPS_MODE:
-               return "WIFI_DIRECT_CMD_GET_LOCAL_WPS_MODE";
-       case WIFI_DIRECT_CMD_SET_REQ_WPS_MODE:
-               return "WIFI_DIRECT_CMD_SET_REQ_WPS_MODE";
-       case WIFI_DIRECT_CMD_GET_REQ_WPS_MODE:
-               return "WIFI_DIRECT_CMD_GET_REQ_WPS_MODE";
-       case WIFI_DIRECT_CMD_GET_CONNECTED_PEERS_INFO:
-               return "WIFI_DIRECT_CMD_GET_CONNECTED_PEERS_INFO";
-       case WIFI_DIRECT_CMD_DESTROY_GROUP:
-               return "WIFI_DIRECT_CMD_DESTROY_GROUP";
-       case WIFI_DIRECT_CMD_DISCONNECT:
-               return "WIFI_DIRECT_CMD_DISCONNECT";
-       case WIFI_DIRECT_CMD_SET_GO_INTENT:
-               return "WIFI_DIRECT_CMD_SET_GO_INTENT";
-       case WIFI_DIRECT_CMD_GET_GO_INTENT:
-               return "WIFI_DIRECT_CMD_GET_GO_INTENT";
-       case WIFI_DIRECT_CMD_GET_MAC_ADDR:
-               return "WIFI_DIRECT_CMD_GET_MAC_ADDR";
-       case WIFI_DIRECT_CMD_IS_AUTONOMOUS_GROUP:
-               return "WIFI_DIRECT_CMD_IS_AUTONOMOUS_GROUP";
-       case WIFI_DIRECT_CMD_SET_MAX_CLIENT:
-               return "WIFI_DIRECT_CMD_SET_MAX_CLIENT";
-       case WIFI_DIRECT_CMD_GET_MAX_CLIENT:
-               return "WIFI_DIRECT_CMD_GET_MAX_CLIENT";
-       case WIFI_DIRECT_CMD_SET_AUTOCONNECTION_MODE:
-               return "WIFI_DIRECT_CMD_SET_AUTOCONNECTION_MODE";
-       case WIFI_DIRECT_CMD_IS_AUTOCONNECTION_MODE:
-               return "WIFI_DIRECT_CMD_IS_AUTOCONNECTION_MODE";
-       case WIFI_DIRECT_CMD_IS_DISCOVERABLE:
-               return "WIFI_DIRECT_CMD_IS_DISCOVERABLE";
-       case WIFI_DIRECT_CMD_IS_LISTENING_ONLY:
-               return "WIFI_DIRECT_CMD_IS_LISTENING_ONLY";
-       case WIFI_DIRECT_CMD_GET_OPERATING_CHANNEL:
-               return "WIFI_DIRECT_CMD_GET_OPERATING_CHANNEL";
-       case WIFI_DIRECT_CMD_ACTIVATE_PERSISTENT_GROUP:
-               return "WIFI_DIRECT_CMD_ACTIVATE_PERSISTENT_GROUP";
-       case WIFI_DIRECT_CMD_DEACTIVATE_PERSISTENT_GROUP:
-               return "WIFI_DIRECT_CMD_DEACTIVATE_PERSISTENT_GROUP";
-       case WIFI_DIRECT_CMD_IS_PERSISTENT_GROUP:
-               return "WIFI_DIRECT_CMD_IS_PERSISTENT_GROUP";
-       case WIFI_DIRECT_CMD_GET_PERSISTENT_GROUP_INFO:
-               return "WIFI_DIRECT_CMD_GET_PERSISTENT_GROUP_INFO";
-       case WIFI_DIRECT_CMD_REMOVE_PERSISTENT_GROUP:
-               return "WIFI_DIRECT_CMD_REMOVE_PERSISTENT_GROUP";
-       case WIFI_DIRECT_CMD_GET_DEVICE_NAME:
-               return "WIFI_DIRECT_CMD_GET_DEVICE_NAME";
-       case WIFI_DIRECT_CMD_SET_DEVICE_NAME:
-               return "WIFI_DIRECT_CMD_SET_DEVICE_NAME";
-       case WIFI_DIRECT_CMD_SET_OEM_LOGLEVEL:
-               return "WIFI_DIRECT_CMD_SET_OEM_LOGLEVEL";
-       case WIFI_DIRECT_CMD_GET_PEER_INFO:
-               return "WIFI_DIRECT_CMD_GET_PEER_INFO";
-
-       case WIFI_DIRECT_CMD_SET_PASSPHRASE:
-               return "WIFI_DIRECT_CMD_SET_PASSPHRASE";
-       case WIFI_DIRECT_CMD_GET_PASSPHRASE:
-               return "WIFI_DIRECT_CMD_GET_PASSPHRASE";
-       case WIFI_DIRECT_CMD_SET_AUTOCONNECTION_PEER:
-               return "WIFI_DIRECT_CMD_SET_AUTOCONNECTION_PEER";
+       __WDC_LOG_FUNC_START__;
+       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();
 
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       case WIFI_DIRECT_CMD_REGISTER_LOCAL_SERVICE:
-               return "WIFI_DIRECT_CMD_REGISTER_LOCAL_SERVICE";
-       case WIFI_DIRECT_CMD_DEREGISTER_LOCAL_SERVICE:
-               return "WIFI_DIRECT_CMD_DEREGISTER_LOCAL_SERVICE";
-       case WIFI_DIRECT_CMD_START_SERVICE_DISCOVERY:
-               return "WIFI_DIRECT_CMD_START_SERVICE_DISCOVERY";
-       case WIFI_DIRECT_CMD_CANCEL_SERVICE_DISCOVERY:
-               return "WIFI_DIRECT_CMD_CANCEL_SERVICE_DISCOVERY";
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
+       if (!parameters) {
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
 
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
-       case WIFI_DIRECT_CMD_INIT_MIRACAST:
-               return "WIFI_DIRECT_CMD_INIT_MIRACAST";
-       case WIFI_DIRECT_CMD_INIT_DISPLAY:
-               return "WIFI_DIRECT_CMD_INIT_DISPLAY";
-       case WIFI_DIRECT_CMD_DEINIT_DISPLAY:
-               return "WIFI_DIRECT_CMD_DEINIT_DISPLAY";
-       case WIFI_DIRECT_CMD_SET_DISPLAY:
-               return "WIFI_DIRECT_CMD_SET_DISPLAY";
-       case WIFI_DIRECT_CMD_SET_DISPLAY_AVAILABILITY:
-               return "WIFI_DIRECT_CMD_SET_DISPLAY_AVAILABILITY";
-       case WIFI_DIRECT_CMD_GET_PEER_DISPLAY_TYPE:
-               return "WIFI_DIRECT_CMD_GET_PEER_DISPLAY_TYPE";
-       case WIFI_DIRECT_CMD_GET_PEER_DISPLAY_AVAILABILITY:
-               return "WIFI_DIRECT_CMD_GET_PEER_DISPLAY_AVAILABILITY";
-       case WIFI_DIRECT_CMD_GET_PEER_DISPLAY_HDCP:
-               return "WIFI_DIRECT_CMD_GET_PEER_DISPLAY_HDCP";
-       case WIFI_DIRECT_CMD_GET_PEER_DISPLAY_PORT:
-               return "WIFI_DIRECT_CMD_GET_PEER_DISPLAY_PORT";
-       case WIFI_DIRECT_CMD_GET_PEER_DISPLAY_THROUGHPUT:
-               return "WIFI_DIRECT_CMD_GET_PEER_DISPLAY_THROUGHPUT";
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
-       default:
-               return "WIFI_DIRECT_CMD_INVALID";
+       g_variant_get(parameters, "(&s&s)",
+                       &peer_mac_address, &assigned_ip_address);
 
+       if (!client->ip_assigned_cb) {
+               WDC_LOGI("ip_assigned_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
+
+       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;
        }
+
+       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);
+
+       __WDC_LOG_FUNC_END__;
 }
 
-static int __wfd_client_check_socket(int sock, int timeout)
+void wifi_direct_process_manage_listen_started(GDBusConnection *connection,
+                                              const gchar *sender,
+                                              const gchar *object_path,
+                                              const gchar *interface,
+                                              const gchar *signal,
+                                              GVariant *parameters,
+                                              gpointer user_data)
 {
-       struct pollfd p_fd;
-       int res = 0;
+       __WDC_LOG_FUNC_START__;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       if (sock < 0 || timeout < 0) {
-               WDC_LOGE("Invalid parameter");
-               return -1;
+       if (!client->discover_cb) {
+               WDC_LOGI("discover_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return;
        }
 
-       p_fd.fd = sock;
-       p_fd.events = POLLIN | POLLERR | POLLHUP | POLLNVAL;
-       res = poll((struct pollfd *) &p_fd, 1, timeout);
+       client->discover_cb(WIFI_DIRECT_ERROR_NONE,
+                           WIFI_DIRECT_ONLY_LISTEN_STARTED,
+                           client->user_data_for_cb_discover);
 
-       if (res < 0) {
-               WDC_LOGE("Polling error from socket[%d]. [%s]", sock, strerror(errno));
-               return -1;
-       } else if (res == 0) {
-               WDC_LOGD( "poll timeout. socket is busy");
-               return 1;
-       } else {
-               if (p_fd.revents & POLLERR) {
-                       WDC_LOGE("Error! POLLERR from socket[%d]", sock);
-                       return -1;
-               } else if (p_fd.revents & POLLHUP) {
-                       WDC_LOGE("Error! POLLHUP from socket[%d]", sock);
-                       return -1;
-               } else if (p_fd.revents & POLLNVAL) {
-                       WDC_LOGE("Error! POLLNVAL from socket[%d]", sock);
-                       return -1;
-               } else if (p_fd.revents & POLLIN) {
-                       WDC_LOGD("POLLIN from socket [%d]", sock);
-                       return 0;
-               }
-       }
-
-       WDC_LOGD("Unknown poll event [%d]", p_fd.revents);
-       return -1;
+       __WDC_LOG_FUNC_END__;
 }
 
-static int __wfd_client_write_socket(int sockfd, void *data, int data_len)
+void wifi_direct_process_manage_discovery_started(GDBusConnection *connection,
+                                                 const gchar *sender,
+                                                 const gchar *object_path,
+                                                 const gchar *interface,
+                                                 const gchar *signal,
+                                                 GVariant *parameters,
+                                                 gpointer user_data)
 {
        __WDC_LOG_FUNC_START__;
-       int wbytes = 0;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       if (sockfd < 0 || !data || data_len <= 0) {
-               WDC_LOGE("Invalid parameter");
+       if (!client->discover_cb) {
+               WDC_LOGI("discover_cb is NULL!!");
                __WDC_LOG_FUNC_END__;
-               return -1;
+               return;
        }
 
-       WDC_LOGD("Write [%d] bytes to socket [%d].", data_len, sockfd);
-       wbytes = write(sockfd, (char*) data, data_len);
-       if (wbytes <= 0) {
-               WDC_LOGE("Error!!! writing to the socket. Error = %s", strerror(errno));
+       client->discover_cb(WIFI_DIRECT_ERROR_NONE,
+                           WIFI_DIRECT_DISCOVERY_STARTED,
+                           client->user_data_for_cb_discover);
+
+       __WDC_LOG_FUNC_END__;
+}
+
+void wifi_direct_process_manage_discovery_finished(GDBusConnection *connection,
+                                                  const gchar *sender,
+                                                  const gchar *object_path,
+                                                  const gchar *interface,
+                                                  const gchar *signal,
+                                                  GVariant *parameters,
+                                                  gpointer user_data)
+{
+       __WDC_LOG_FUNC_START__;
+       wifi_direct_client_info_s *client = __wfd_get_control();
+
+       if (!client->discover_cb) {
+               WDC_LOGI("discover_cb is NULL!!");
                __WDC_LOG_FUNC_END__;
-               return -1;
+               return;
        }
 
+       client->discover_cb(WIFI_DIRECT_ERROR_NONE,
+                           WIFI_DIRECT_DISCOVERY_FINISHED,
+                           client->user_data_for_cb_discover);
+
        __WDC_LOG_FUNC_END__;
-       return 0;
 }
 
-static int __wfd_client_read_socket(int sockfd, char *data, int data_len)
+void wifi_direct_process_manage_peer_found(GDBusConnection *connection,
+                                          const gchar *sender,
+                                          const gchar *object_path,
+                                          const gchar *interface,
+                                          const gchar *signal,
+                                          GVariant *parameters,
+                                          gpointer user_data)
 {
        __WDC_LOG_FUNC_START__;
-       int rbytes = 0;
-       int total_rbytes = 0;
-       int res = 0;
+       const gchar *peer_mac_address = NULL;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       if (sockfd < 0) {
-               WDC_LOGE("Error!!! Invalid socket FD [%d]", sockfd);
+       if (!parameters) {
                __WDC_LOG_FUNC_END__;
-               return -1;
+               return;
        }
 
-       if (!data || data_len <= 0) {
-               WDC_LOGE("Error!!! Invalid parameter");
-               __WDC_LOG_FUNC_END__;
-               return -1;
+       g_variant_get(parameters, "(&s)", &peer_mac_address);
+
+       if (client->peer_found_cb) {
+               client->peer_found_cb(WIFI_DIRECT_ERROR_NONE,
+                                     WIFI_DIRECT_DISCOVERY_FOUND,
+                                     peer_mac_address,
+                                     client->user_data_for_cb_discover);
+       } else {
+               WDC_LOGI("peer_found_cb is NULL!!");
        }
 
-       res = __wfd_client_check_socket(sockfd, 10000);
-       if (res < 0) {
-               WDC_LOGE("Socket error");
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       } else if (res > 0) {
-               WDC_LOGE("Socket is busy");
-               return WIFI_DIRECT_ERROR_RESOURCE_BUSY;
-       }
-
-       while(data_len) {
-               rbytes = read(sockfd, data, data_len);
-               if (rbytes <= 0) {
-                       WDC_LOGE("Failed to read socket[%d] [%s]", sockfd, strerror(errno));
-                       return -1;
-               }
-               total_rbytes += rbytes;
-               data += rbytes;
-               data_len -= rbytes;
+       if (!client->discover_cb) {
+               WDC_LOGI("discover_cb is NULL!!");
+               __WDC_LOG_FUNC_END__;
+               return;
        }
 
+       client->discover_cb(WIFI_DIRECT_ERROR_NONE,
+                           WIFI_DIRECT_DISCOVERY_FOUND,
+                           client->user_data_for_cb_discover);
+
        __WDC_LOG_FUNC_END__;
-       return total_rbytes;
 }
 
-static int __wfd_client_send_request(int sockfd, wifi_direct_client_request_s *req,
-                                                               wifi_direct_client_response_s *rsp)
+void wifi_direct_process_manage_peer_lost(GDBusConnection *connection,
+                                         const gchar *sender,
+                                         const gchar *object_path,
+                                         const gchar *interface,
+                                         const gchar *signal,
+                                         GVariant *parameters,
+                                         gpointer user_data)
 {
        __WDC_LOG_FUNC_START__;
-       int res = 0;
+       const gchar *peer_mac_address = NULL;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-       if (!req || !rsp || sockfd < 0) {
-               WDC_LOGE("Invalid parameter");
+       if (!parameters) {
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+               return;
        }
 
-       pthread_mutex_lock(&g_client_info.mutex);
-       res = __wfd_client_write_socket(sockfd, req, sizeof(wifi_direct_client_request_s));
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Failed to write into socket [%s]", __wfd_print_error(res));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+       g_variant_get(parameters, "(&s)", &peer_mac_address);
+
+       if (client->peer_found_cb) {
+               client->peer_found_cb(WIFI_DIRECT_ERROR_NONE,
+                                     WIFI_DIRECT_DISCOVERY_LOST,
+                                     peer_mac_address,
+                                     client->user_data_for_cb_discover);
+       } else {
+               WDC_LOGI("peer_found_cb is NULL!!");
        }
-       WDC_LOGD("Succeeded to send request [%d: %s]", req->cmd, __wfd_client_print_cmd(req->cmd));
 
-       res = __wfd_client_read_socket(sockfd, (char*) rsp, sizeof(wifi_direct_client_response_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-       if (res <= 0) {
-               WDC_LOGE("Failed to read socket [%d]", res);
-               __wfd_reset_control();
+       if (!client->discover_cb) {
+               WDC_LOGI("discover_cb is NULL!!");
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return;
        }
 
-       if (rsp->cmd != req->cmd) {
-               WDC_LOGE("Invalid resp [%d], Original request [%d]", rsp->cmd, req->cmd);
+       client->discover_cb(WIFI_DIRECT_ERROR_NONE,
+                           WIFI_DIRECT_DISCOVERY_LOST,
+                           client->user_data_for_cb_discover);
+
+       __WDC_LOG_FUNC_END__;
+}
+
+/* Group */
+void wifi_direct_process_group_created(GDBusConnection *connection,
+                                      const gchar *sender,
+                                      const gchar *object_path,
+                                      const gchar *interface,
+                                      const gchar *signal,
+                                      GVariant *parameters,
+                                      gpointer user_data)
+{
+       __WDC_LOG_FUNC_START__;
+       wifi_direct_client_info_s *client = __wfd_get_control();
+
+       if (!client->connection_cb) {
+               WDC_LOGI("connection_cb is NULL!!");
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return;
        }
 
-       if (rsp->result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Result received [%s]", __wfd_print_error(rsp->result));
+       client->connection_cb(WIFI_DIRECT_ERROR_NONE,
+                             WIFI_DIRECT_GROUP_CREATED,
+                             "",
+                             client->user_data_for_cb_connection);
+
+       __WDC_LOG_FUNC_END__;
+}
+
+void wifi_direct_process_group_destroyed(GDBusConnection *connection,
+                                        const gchar *sender,
+                                        const gchar *object_path,
+                                        const gchar *interface,
+                                        const gchar *signal,
+                                        GVariant *parameters,
+                                        gpointer user_data)
+{
+       __WDC_LOG_FUNC_START__;
+       wifi_direct_client_info_s *client = __wfd_get_control();
+
+       if (!client->connection_cb) {
+               WDC_LOGI("connection_cb is NULL!!");
                __WDC_LOG_FUNC_END__;
-               return rsp->result;
+               return;
        }
 
+       client->connection_cb(WIFI_DIRECT_ERROR_NONE,
+                             WIFI_DIRECT_GROUP_DESTROYED,
+                             "",
+                             client->user_data_for_cb_connection);
+
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
 }
 
-static gboolean __wfd_client_process_event(GIOChannel *source,
-                                                                                  GIOCondition condition,
-                                                                                  gpointer data)
+#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
+/* Service */
+void wifi_direct_process_service_discovery_started(GDBusConnection *connection,
+                                                  const gchar *sender,
+                                                  const gchar *object_path,
+                                                  const gchar *interface,
+                                                  const gchar *signal,
+                                                  GVariant *parameters,
+                                                  gpointer user_data)
 {
-       wfd_client_event_e event = WIFI_DIRECT_CLI_EVENT_INVALID;
+       __WDC_LOG_FUNC_START__;
        wifi_direct_client_info_s *client = __wfd_get_control();
-       int sockfd = client->async_sockfd;
-       wifi_direct_client_noti_s client_noti;
-       wifi_direct_error_e error = WIFI_DIRECT_ERROR_NONE;
-       char param1[64] = { 0, };
-       char param2[256] = { 0, };
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       int service_type;
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
-       int res = 0;
 
-       memset(&client_noti, 0, sizeof(wifi_direct_client_noti_s));
-
-       // 1.Read socket
-       res = __wfd_client_read_socket(sockfd, (char*) &client_noti,
-                                                               sizeof(wifi_direct_client_noti_s));
-       if (res <= 0) {
-               WDC_LOGE("Error!!! Reading Async Event[%d]", sockfd);
-               __wfd_reset_control();
+       if (!client->service_cb) {
+               WDC_LOGI("service_cb is NULL!!\n");
                __WDC_LOG_FUNC_END__;
-               return false;
+               return;
        }
-       WDC_LOGD( "Received Event is [%d,%s], error[%d]", client_noti.event,
-                                       __wfd_print_event(client_noti.event), client_noti.error);
 
-       event = client_noti.event;
-       error = client_noti.error;
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       service_type = client_noti.type;
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
-       memcpy(param1, client_noti.param1, sizeof(client_noti.param1));
-       memcpy(param2, client_noti.param2, sizeof(client_noti.param2));
+       client->service_cb(WIFI_DIRECT_ERROR_NONE,
+                          WIFI_DIRECT_SERVICE_DISCOVERY_STARTED,
+                          WIFI_DIRECT_SERVICE_TYPE_ALL,
+                          "",
+                          "",
+                          client->user_data_for_cb_service);
 
+       __WDC_LOG_FUNC_END__;
+}
 
-       // 2. dispatch event
-       switch (event) {
-       case WIFI_DIRECT_CLI_EVENT_ACTIVATION:
-       case WIFI_DIRECT_CLI_EVENT_DEACTIVATION:
-               if (!client->activation_cb) {
-                       WDC_LOGE("activation_cb is NULL!!");
-                       break;
-               }
-               client->activation_cb(error,
-                                       (wifi_direct_device_state_e) __wfd_convert_client_event(event),
-                                       client->user_data_for_cb_activation);
-               break;
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_FOUND_PEERS:
-               if (client->peer_found_cb) {
-                       client->peer_found_cb(error,
-                                       (wifi_direct_discovery_state_e) __wfd_convert_client_event(event),
-                                       param1, client->user_data_for_cb_discover);
-               }
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START:
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START_LISTEN_ONLY:
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_START_SEARCH_LISTEN:
-       case WIFI_DIRECT_CLI_EVENT_DISCOVER_END:
-               if (!client->discover_cb) {
-                       WDC_LOGE("discover_cb is NULL!!");
-                       break;
-               }
-               client->discover_cb(error,
-                                       (wifi_direct_discovery_state_e) __wfd_convert_client_event(event),
-                                       client->user_data_for_cb_discover);
-               break;
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_START:
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_REQ:
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_RSP:
-       case WIFI_DIRECT_CLI_EVENT_DISCONNECTION_RSP:
-       case WIFI_DIRECT_CLI_EVENT_CONNECTION_WPS_REQ:
-       case WIFI_DIRECT_CLI_EVENT_DISCONNECTION_IND:
-       case WIFI_DIRECT_CLI_EVENT_DISASSOCIATION_IND:
-       case WIFI_DIRECT_CLI_EVENT_GROUP_CREATE_RSP:
-       case WIFI_DIRECT_CLI_EVENT_GROUP_DESTROY_RSP:
-               if (!client->connection_cb) {
-                       WDC_LOGE("connection_cb is NULL!!");
-                       break;
-               }
-               client->connection_cb(error,
-                                       (wifi_direct_connection_state_e) __wfd_convert_client_event(event),
-                                       param1, client->user_data_for_cb_connection);
-               break;
-
-       // ToDo:  Handling IP lease event...
-       case WIFI_DIRECT_CLI_EVENT_IP_LEASED_IND:
-               if (!client->ip_assigned_cb) {
-                       WDC_LOGE("ip_assigned_cb is NULL!!");
-                       break;
-               }
-               char *ifname = NULL;
-               ifname = vconf_get_str(VCONFKEY_IFNAME);
-               if (!ifname) {
-                       WDC_LOGD("vconf (%s) value is NULL!!!", VCONFKEY_IFNAME);
-                       break;
-               }
-               WDC_LOGD("VCONFKEY_IFNAME(%s) : %s", VCONFKEY_IFNAME, ifname);
-               client->ip_assigned_cb(param1, param2, ifname,
-                                       client->user_data_for_cb_ip_assigned);
-               free(ifname);
-               break;
+void wifi_direct_process_service_discovery_found(GDBusConnection *connection,
+                                                const gchar *sender,
+                                                const gchar *object_path,
+                                                const gchar *interface,
+                                                const gchar *signal,
+                                                GVariant *parameters,
+                                                gpointer user_data)
+{
+       __WDC_LOG_FUNC_START__;
+       wifi_direct_service_type_e service_type;
+       const gchar* response_data = NULL;
+       const gchar* peer_mac_address = NULL;
+       wifi_direct_client_info_s *client = __wfd_get_control();
 
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_STARTED:
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FOUND:
-       case WIFI_DIRECT_CLI_EVENT_SERVICE_DISCOVERY_FINISHED:
-               if (!client->service_cb) {
-                       WDC_LOGE("service_cb is NULL!!\n");
-                       break;
-               }
-               client->service_cb(error,
-                                       (wifi_direct_service_discovery_state_e) __wfd_convert_client_event(event),
-                                       (wifi_direct_service_type_e) service_type, param2, param1, client->user_data_for_cb_service);
-               break;
-#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
+       if (!parameters) {
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
 
-       default:
-               break;
+       g_variant_get(parameters, "(i&s&s)",
+                       &service_type, &response_data, &peer_mac_address);
+
+       if (!client->service_cb) {
+               WDC_LOGI("service_cb is NULL!!\n");
+               __WDC_LOG_FUNC_END__;
+               return;
        }
 
+       client->service_cb(WIFI_DIRECT_ERROR_NONE,
+                          WIFI_DIRECT_SERVICE_DISCOVERY_FOUND,
+                          service_type,
+                          (void *) response_data,
+                          peer_mac_address,
+                          client->user_data_for_cb_service);
+
        __WDC_LOG_FUNC_END__;
+}
+
+void wifi_direct_process_service_discovery_finished(GDBusConnection *connection,
+                                                   const gchar *sender,
+                                                   const gchar *object_path,
+                                                   const gchar *interface,
+                                                   const gchar *signal,
+                                                   GVariant *parameters,
+                                                   gpointer user_data)
+{
+       __WDC_LOG_FUNC_START__;
+       wifi_direct_client_info_s *client = __wfd_get_control();
+
+       if (!client->service_cb) {
+               WDC_LOGI("service_cb is NULL!!\n");
+               __WDC_LOG_FUNC_END__;
+               return;
+       }
 
-       return TRUE;
+       client->service_cb(WIFI_DIRECT_ERROR_NONE,
+                          WIFI_DIRECT_SERVICE_DISCOVERY_FINISHED,
+                          WIFI_DIRECT_SERVICE_TYPE_ALL,
+                          "",
+                          "",
+                          client->user_data_for_cb_service);
+
+       __WDC_LOG_FUNC_END__;
 }
+#endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
 
 void __wfd_client_print_entry_list(wfd_discovery_entry_s *list, int num)
 {
        int i = 0;
 
        WDC_LOGD("------------------------------------------");
-       for (i = 0; i < num; i++)
-       {
+       for (i = 0; i < num; i++)       {
                WDC_LOGD("== Peer index : %d ==", i);
                WDC_LOGD("is Group Owner ? %s", list[i].is_group_owner ? "YES" : "NO");
                WDC_LOGD("device_name : %s", list[i].device_name);
@@ -838,98 +699,7 @@ void __wfd_client_print_persistent_group_info(wfd_persistent_group_info_s *list,
        }
        WDC_LOGD("------------------------------------------\n");
 }
-
-static int __wfd_client_async_event_init(int clientid)
-{
-       __WDC_LOG_FUNC_START__;
-       int sockfd = 0;
-       struct sockaddr_un saddr;
-       wifi_direct_client_request_s req;
-       int res = 0;
-
-       sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
-       if (sockfd < 0) {
-               WDC_LOGE("Failed to async socket[%s]", strerror(errno));
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("Succeeded to create async socket[%d]", sockfd);
-
-       memset(&saddr, 0, sizeof(saddr));
-       saddr.sun_family = AF_UNIX;
-       g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), WFD_SOCK_FILE_PATH);
-
-       WDC_LOGD("Connecting to server socket to register async socket [%d]", sockfd);
-       res = connect(sockfd, (struct sockaddr *) &saddr, sizeof(saddr));
-       if (res < 0) {
-               WDC_LOGE("Error!!! connecting to server socket. Error = [%s].", strerror(errno));
-               close(sockfd);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-
-       req.cmd = WIFI_DIRECT_CMD_INIT_ASYNC_SOCKET;
-       req.client_id = clientid;
-
-       res = __wfd_client_write_socket(sockfd, &req, sizeof(wifi_direct_client_request_s));
-       if (res < WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Failed to write to socket[%s]", strerror(errno));
-               WDC_LOGE("Error!!! [%s]", __wfd_print_error(res));
-               close(sockfd);
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       g_client_info.async_sockfd = sockfd;
-
-       WDC_LOGE("Async socket is created= %d", sockfd);
-
-       return sockfd;
-}
-
-static int __wfd_client_launch_server_dbus(void)
-{
-       GDBusConnection *netconfig_bus = NULL;
-       GError *g_error = NULL;
-
-#if !GLIB_CHECK_VERSION(2,36,0)
-       g_type_init();
-#endif
-       netconfig_bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &g_error);
-       if (netconfig_bus == NULL) {
-               if(g_error != NULL) {
-                       WDC_LOGE("Couldn't connect to system bus "
-                                       "error [%d: %s]", g_error->code, g_error->message);
-                       g_error_free(g_error);
-               }
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-
-       g_dbus_connection_call_sync(netconfig_bus,
-                       NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE,
-                       NETCONFIG_WIFI_LAUNCHDIRECT,
-                       NULL,
-                       NULL,
-                       G_DBUS_CALL_FLAGS_NONE,
-                       DBUS_REPLY_TIMEOUT,
-                       NULL,
-                       &g_error);
-
-       if(g_error !=NULL) {
-               WDC_LOGE("g_dbus_connection_call_sync() failed"
-                               "error [%d: %s]", g_error->code, g_error->message);
-               g_error_free(g_error);
-               return WIFI_DIRECT_ERROR_PERMISSION_DENIED;
-       }
-
-       g_object_unref(netconfig_bus);
-
-       WDC_LOGD("Successfully launched wfd-manager");
-       return WIFI_DIRECT_ERROR_NONE;
-}
+//LCOV_EXCL_STOP
 
 int wifi_direct_initialize(void)
 {
@@ -937,12 +707,10 @@ int wifi_direct_initialize(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       struct sockaddr_un saddr;
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s resp;
-       int retry_count = 10;
-       int sockfd = 0;
+       GError* error = NULL;
+       GVariant *reply = NULL;
        bool wifi_direct_enable;
+       bool val;
        int res = 0;
 
        if (g_client_info.is_registered == TRUE) {
@@ -951,109 +719,55 @@ int wifi_direct_initialize(void)
                return WIFI_DIRECT_ERROR_ALREADY_INITIALIZED;
        }
 
-/*TEMP: Hawk-P Tizen TV Platform does not support security check*/
-#if !defined TIZEN_TV
        res = system_info_get_platform_bool("tizen.org/feature/network.wifi.direct", &wifi_direct_enable);
        if (res < 0) {
                WDC_LOGE("Failed to get sys info");
                __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       if(!wifi_direct_enable) {
-               WDC_LOGE("Wi-Fi Direct not supported");
-               return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
+               return res; //LCOV_EXCL_LINE
        }
 
-#endif
-       sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
-       if (sockfd < 0) {
-               WDC_LOGE("Error!!! creating sync socket[%s]", strerror(errno));
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("Created sync socket [%d]", sockfd);
-
-       memset(&saddr, 0, sizeof(saddr));
-       saddr.sun_family = AF_UNIX;
-       g_snprintf(saddr.sun_path, sizeof(saddr.sun_path), WFD_SOCK_FILE_PATH);
-
-       WDC_LOGD("Connecting to server socket to register sync socket [%d]", sockfd);
-       while (retry_count > 0) {
-               res = connect(sockfd, (struct sockaddr*) &saddr, sizeof(saddr));
-               if (!res){
-                       WDC_LOGD("Succeeded to connect to server socket[%s]", strerror(errno));
-                       break;
-               }
-
-               WDC_LOGD("Launching wfd-server..\n");
-               res = __wfd_client_launch_server_dbus();
-               if (res != WIFI_DIRECT_ERROR_NONE)
-                       WDC_LOGE("Failed to send dbus msg[%s]", strerror(errno));
-               retry_count--;
-
-               /* wait a little before retrying the next socket connection */
-               usleep(150000);
+       if (!wifi_direct_enable) {
+               WDC_LOGE("Wi-Fi Direct not supported");
+               return WIFI_DIRECT_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE
        }
 
-       if (res < 0) {
-               WDC_LOGE("Failed to connect to wfd-manager socket[%s]", strerror(errno));
-               close(sockfd);
+       if (wifi_direct_dbus_init() == FALSE) {
+               WDC_LOGW("Failed to initialize dbus");
                __WDC_LOG_FUNC_END__;
-               return res;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&resp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                                 "IsGroupOwner", NULL, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_REGISTER;
-       req.client_id = gettid();
-       WDC_LOGD("Client ID = %d", req.client_id);
-
-       res = __wfd_client_send_request(sockfd, &req, &resp);
-       if (res < 0) {
-               WDC_LOGE("Failed to register client");
-               close(sockfd);
-               __WDC_LOG_FUNC_END__;
+       res = __net_wifidirect_gerror_to_enum(error);
+       if (res != WIFI_DIRECT_ERROR_NONE)
                return res;
-       }
-       g_client_info.sync_sockfd = sockfd;
-       g_client_info.client_id = resp.client_id;
-       g_client_info.is_registered = TRUE;
 
-       int async_sockfd = -1;
-       async_sockfd = __wfd_client_async_event_init(g_client_info.client_id);
-       if (async_sockfd < 0) {
-               WDC_LOGE("Failed to create async socket \n");
-               close(sockfd);
-               __wfd_reset_control();
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       g_client_info.async_sockfd = async_sockfd;
+       g_variant_get(reply, "(b)", &val);
+       WDC_LOGD("is group owner [%s]", val ? "YES" : "NO");
 
-       GIOChannel *gio = g_io_channel_unix_new(g_client_info.async_sockfd);
-       int g_source_id = g_io_add_watch(gio, G_IO_IN | G_IO_ERR | G_IO_HUP,
-                                                       (GIOFunc) __wfd_client_process_event, NULL);
-       g_io_channel_unref(gio);
-
-       g_client_info.g_source_id = g_source_id;
+       g_client_info.is_registered = TRUE;
 
-       // Initialize callbacks
+       /* Initialize callbacks */
        g_client_info.activation_cb = NULL;
+       g_client_info.user_data_for_cb_activation = NULL;
+
        g_client_info.discover_cb = NULL;
+       g_client_info.user_data_for_cb_discover = NULL;
+
        g_client_info.connection_cb = NULL;
+       g_client_info.user_data_for_cb_connection = NULL;
+
        g_client_info.ip_assigned_cb = NULL;
+       g_client_info.user_data_for_cb_ip_assigned = NULL;
 
        g_client_info.peer_found_cb = NULL;
-       g_client_info.user_data_for_cb_activation = NULL;
-       g_client_info.user_data_for_cb_discover = NULL;
-       g_client_info.user_data_for_cb_connection = NULL;
-       g_client_info.user_data_for_cb_ip_assigned = NULL;
        g_client_info.user_data_for_cb_peer_found = NULL;
-       g_client_info.user_data_for_cb_device_name = NULL;
 
 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
        g_client_info.service_cb = NULL;
-       g_client_info.user_data_for_cb_service= NULL;
+       g_client_info.user_data_for_cb_service = NULL;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
 
        __WDC_LOG_FUNC_END__;
@@ -1072,15 +786,21 @@ int wifi_direct_deinitialize(void)
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
+       wifi_direct_dbus_deinit();
+
        g_client_info.activation_cb = NULL;
-       g_client_info.discover_cb = NULL;
-       g_client_info.connection_cb = NULL;
-       g_client_info.ip_assigned_cb = NULL;
-       g_client_info.peer_found_cb = NULL;
        g_client_info.user_data_for_cb_activation = NULL;
+
+       g_client_info.discover_cb = NULL;
        g_client_info.user_data_for_cb_discover = NULL;
+
+       g_client_info.connection_cb = NULL;
        g_client_info.user_data_for_cb_connection = NULL;
+
+       g_client_info.ip_assigned_cb = NULL;
        g_client_info.user_data_for_cb_ip_assigned = NULL;
+
+       g_client_info.peer_found_cb = NULL;
        g_client_info.user_data_for_cb_peer_found = NULL;
 
 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
@@ -1088,30 +808,15 @@ int wifi_direct_deinitialize(void)
        g_client_info.user_data_for_cb_service = NULL;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_DEREGISTER;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res < 0)
-               WDC_LOGD("Failed to deinitialize. But continue deinitialization");
-       else
-               WDC_LOGD("Deinit Successfull");
+       g_client_info.is_registered = FALSE;
 
-       __wfd_reset_control();
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
 
 
 int wifi_direct_set_device_state_changed_cb(wifi_direct_device_state_changed_cb cb,
-                                                                                               void *user_data)
+                                           void *user_data)
 {
        __WDC_LOG_FUNC_START__;
 
@@ -1159,7 +864,7 @@ int wifi_direct_unset_device_state_changed_cb(void)
 
 int
 wifi_direct_set_discovery_state_changed_cb(wifi_direct_discovery_state_chagned_cb cb,
-                                                                                               void *user_data)
+                                          void *user_data)
 {
        __WDC_LOG_FUNC_START__;
 
@@ -1204,9 +909,8 @@ int wifi_direct_unset_discovery_state_changed_cb(void)
        return WIFI_DIRECT_ERROR_NONE;
 }
 
-int
-wifi_direct_set_peer_found_cb(wifi_direct_peer_found_cb cb,
-                                                                                               void *user_data)
+int wifi_direct_set_peer_found_cb(wifi_direct_peer_found_cb cb,
+                                 void *user_data)
 {
        __WDC_LOG_FUNC_START__;
 
@@ -1251,14 +955,15 @@ int wifi_direct_unset_peer_found_cb(void)
        return WIFI_DIRECT_ERROR_NONE;
 }
 
-int wifi_direct_set_service_state_changed_cb
-(wifi_direct_service_state_changed_cb cb, void *user_data)
+int wifi_direct_set_service_state_changed_cb(wifi_direct_service_state_changed_cb cb,
+                                            void *user_data)
 {
 #ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_SERVICE_DISCOVERY_FEATURE);
 
+//LCOV_EXCL_START
        if (!cb) {
                WDC_LOGE("Callback is NULL.");
                __WDC_LOG_FUNC_END__;
@@ -1276,6 +981,7 @@ int wifi_direct_set_service_state_changed_cb
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
+//LCOV_EXCL_STOP
 #else /* TIZEN_FEATURE_SERVICE_DISCOVERY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
@@ -1289,6 +995,7 @@ int wifi_direct_unset_service_state_changed_cb(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_SERVICE_DISCOVERY_FEATURE);
 
+//LCOV_EXCL_START
        if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is not initialized.");
                __WDC_LOG_FUNC_END__;
@@ -1300,13 +1007,14 @@ int wifi_direct_unset_service_state_changed_cb(void)
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
+//LCOV_EXCL_STOP
 #else /* TIZEN_FEATURE_SERVICE_DISCOVERY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
 }
 
 int wifi_direct_set_connection_state_changed_cb(wifi_direct_connection_state_changed_cb cb,
-                                                                                               void *user_data)
+                                               void *user_data)
 {
        __WDC_LOG_FUNC_START__;
 
@@ -1353,7 +1061,7 @@ int wifi_direct_unset_connection_state_changed_cb(void)
 
 
 int wifi_direct_set_client_ip_address_assigned_cb(wifi_direct_client_ip_address_assigned_cb cb,
-                                                                                               void* user_data)
+                                                 void* user_data)
 {
        __WDC_LOG_FUNC_START__;
 
@@ -1397,196 +1105,235 @@ int wifi_direct_unset_client_ip_address_assigned_cb(void)
        return WIFI_DIRECT_ERROR_NONE;
 }
 
-int wifi_direct_activate(void)
+int wifi_direct_set_state_changed_cb(wifi_direct_state_changed_cb cb, void *user_data)
 {
        __WDC_LOG_FUNC_START__;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       if (!cb) {
+               WDC_LOGE("Callback is NULL");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+       }
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered");
+       ret = vconf_notify_key_changed(VCONFKEY_WIFI_DIRECT_STATE,
+                       __wfd_vconf_state_changed_cb, NULL);
+       if (ret) {
+               WDC_LOGE("Failed to set vconf notification callback");
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       g_client_info.state_cb = cb;
+       g_client_info.user_data_for_cb_state = user_data;
+
+       __WDC_LOG_FUNC_END__;
+       return WIFI_DIRECT_ERROR_NONE;
+}
+
+int wifi_direct_unset_state_changed_cb(void)
+{
+       __WDC_LOG_FUNC_START__;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       req.cmd = WIFI_DIRECT_CMD_ACTIVATE;
-       req.client_id = g_client_info.client_id;
+       CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       ret = vconf_ignore_key_changed(VCONFKEY_WIFI_DIRECT_STATE,
+                       __wfd_vconf_state_changed_cb);
+       if (ret) {
+               WDC_LOGE("Failed to ignore vconf notification callback");
                __WDC_LOG_FUNC_END__;
-               return res;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
-       WDC_LOGD("wifi_direct_activate() SUCCESS");
+
+       g_client_info.state_cb = NULL;
+       g_client_info.user_data_for_cb_state = NULL;
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
 
-int wifi_direct_deactivate(void)
+int wifi_direct_activate(void)
 {
        __WDC_LOG_FUNC_START__;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                   "Activate", NULL, &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
+       }
+
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
+       __WDC_LOG_FUNC_END__;
+       return ret;
+}
+
+int wifi_direct_deactivate(void)
+{
+       __WDC_LOG_FUNC_START__;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       req.cmd = WIFI_DIRECT_CMD_DEACTIVATE;
-       req.client_id = g_client_info.client_id;
+       CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
-               return res;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
-       WDC_LOGD("wifi_direct_deactivate() SUCCESS");
 
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "Deactivate", NULL, &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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_start_discovery(bool listen_only, int timeout)
 {
        __WDC_LOG_FUNC_START__;
+       GVariantBuilder *builder = NULL;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (timeout < 0) {
-               WDC_LOGE("Nagative value. Param [timeout]!");
+               WDC_LOGE("Negative value. Param [timeout]!");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
+       g_variant_builder_add(builder, "{sv}", "Mode", g_variant_new("b", listen_only));
+       g_variant_builder_add(builder, "{sv}", "Timeout", g_variant_new("i", timeout));
+       params = g_variant_new("(a{sv})", builder);
+       g_variant_builder_unref(builder);
+       WDC_LOGI("listen only (%d) timeout (%d)", listen_only, timeout);
 
-       req.cmd = WIFI_DIRECT_CMD_START_DISCOVERY;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = listen_only;
-       req.data.int2 = timeout;
-       WDC_LOGE("listen only (%d) timeout (%d)", listen_only, timeout);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "StartDiscovery", params, &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_start_discovery() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
-int wifi_direct_start_discovery_specific_channel(bool listen_only, int timeout, wifi_direct_discovery_channel_e channel)
+int wifi_direct_start_discovery_specific_channel(bool listen_only,
+                                                int timeout,
+                                                wifi_direct_discovery_channel_e channel)
 {
        __WDC_LOG_FUNC_START__;
+       GVariantBuilder *builder = NULL;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (timeout < 0) {
-               WDC_LOGE("Nagative value. Param [timeout]!");
+               WDC_LOGE("Negative value. Param [timeout]!");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_START_DISCOVERY_SPECIFIC_CHANNEL;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = timeout;
-       req.data.int2 = channel;
+       builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
+       g_variant_builder_add(builder, "{sv}", "Mode", g_variant_new("b", listen_only));
+       g_variant_builder_add(builder, "{sv}", "Timeout", g_variant_new("i", timeout));
+       g_variant_builder_add(builder, "{sv}", "Channel", g_variant_new("i", channel));
+       params = g_variant_new("(a{sv})", builder);
+       g_variant_builder_unref(builder);
+       WDC_LOGI("listen only (%d) timeout (%d)", listen_only, timeout);
 
-       WDC_LOGD("timeout (%d) channel (%d)", timeout, channel);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "StartDiscovery", params, &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_start_discovery_specific_channel() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_cancel_discovery(void)
 {
        __WDC_LOG_FUNC_START__;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_CANCEL_DISCOVERY;
-       req.client_id = g_client_info.client_id;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "StopDiscovery", NULL, &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_cancel_discovery() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
-#ifdef TIZEN_FEATURE_SERVICE_DISCOVERY
+#if 0
 static char **get_service_list(char *services, unsigned int *count)
 {
        __WDC_LOG_FUNC_START__;
@@ -1596,6 +1343,7 @@ static char **get_service_list(char *services, unsigned int *count)
        unsigned int cnt = 0;
        unsigned int i = 0;
        unsigned int j = 0;
+       char *saveptr = NULL;
 
        if (!count || !services || (services && strlen(services) <= 0)) {
                WDC_LOGE("Invalid parameters.");
@@ -1606,10 +1354,10 @@ static char **get_service_list(char *services, unsigned int *count)
        pos1 = services;
        pos2 = g_strdup(services);
 
-       pos1 = strtok (pos1,",\n");
+       pos1 = strtok_r(pos1, ",\n", &saveptr);
        while (pos1) {
                cnt++;
-               pos1 = strtok (NULL, ",\n");
+               pos1 = strtok_r(NULL, ",\n", &saveptr);
        }
        WDC_LOGD("Total Service Count = %d", cnt);
 
@@ -1620,13 +1368,13 @@ static char **get_service_list(char *services, unsigned int *count)
                        g_free(pos2);
                        return NULL;
                }
-               pos2 = strtok (pos2,",\n");
+               pos2 = strtok_r(pos2, ",\n", &saveptr);
                while (pos2 != NULL) {
                        char *s = strchr(pos2, ' ');
                        if (s) {
                                *s = '\0';
                                result[i++] = strdup(pos2);
-                               pos2 = strtok (NULL, ",\n");
+                               pos2 = strtok_r(NULL, ",\n", &saveptr);
                        }
                }
        }
@@ -1640,7 +1388,7 @@ static char **get_service_list(char *services, unsigned int *count)
        } else {
                *count = 0;
                if (result) {
-                       for (j=0; j<i && result[j] != NULL; j++)
+                       for (j = 0; j < i && result[j] != NULL; j++)
                                free(result[j]);
                        free(result);
                }
@@ -1650,19 +1398,22 @@ static char **get_service_list(char *services, unsigned int *count)
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
 
 int wifi_direct_foreach_discovered_peers(wifi_direct_discovered_peer_cb cb,
-                                                                                               void *user_data)
+                                        void *user_data)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-       int i;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       GVariantIter *iter_peers = NULL;
+       GVariantIter *iter_peer = NULL;
+       GVariant *var = NULL;
+       gchar *key = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -1674,119 +1425,89 @@ int wifi_direct_foreach_discovered_peers(wifi_direct_discovered_peer_cb cb,
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "GetDiscoveredPeers", params, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_DISCOVERY_RESULT;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       pthread_mutex_lock(&g_client_info.mutex);
-       res = __wfd_client_write_socket(g_client_info.sync_sockfd, &req, sizeof(wifi_direct_client_request_s));
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Failed to write into socket [%s]", __wfd_print_error(res));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
+       g_variant_get(reply, "(iaa{sv})", &ret, &iter_peers);
+       if (ret != WIFI_DIRECT_ERROR_NONE) {
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
-       WDC_LOGD("Succeeded to send request [%d: %s]", req.cmd, __wfd_client_print_cmd(req.cmd));
 
-       res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                               sizeof(wifi_direct_client_response_s));
-       if (res <= 0) {
-               WDC_LOGE("Failed to read socket [%d]", res);
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       WDC_LOGD("wifi_direct_foreach_discovered_peers() SUCCESS");
+//LCOV_EXCL_START
+       while (g_variant_iter_loop(iter_peers, "a{sv}", &iter_peer)) {
+               wifi_direct_discovered_peer_info_s *peer_list = NULL;
 
-       if (rsp.cmd != req.cmd) {
-               WDC_LOGE("Invalid resp [%d]", rsp.cmd);
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+               peer_list = (wifi_direct_discovered_peer_info_s *) g_try_malloc0(sizeof(wifi_direct_discovered_peer_info_s));
+               if (!peer_list) {
+                       WDC_LOGE("Failed to allocate memory");
+                       continue;
+               }
 
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Result received [%s]", __wfd_print_error(rsp.result));
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return rsp.result;
-       }
+               while (g_variant_iter_loop(iter_peer, "{sv}", &key, &var)) {
+                       if (!g_strcmp0(key, "DeviceName")) {
+                               const char *device_name = NULL;
 
-       short num = rsp.param1;
-       short num_tmp = 0;
-       wfd_discovery_entry_s *buff = NULL;
-       wfd_discovery_entry_s *buff_tmp = NULL;
+                               g_variant_get(var, "&s", &device_name);
+                               peer_list->device_name = g_strndup(device_name, WIFI_DIRECT_MAX_DEVICE_NAME_LEN+1);
 
-       WDC_LOGD("Num of found peers = %d", num);
+                       } else if (!g_strcmp0(key, "DeviceAddress")) {
+                               unsigned char mac_address[MACADDR_LEN] = {0, };
 
-       if (num > 1023) {
-               WDC_LOGE("Discovered peer number restricted by 255(real number:%d)", num);
-               num_tmp = num -1023;
-               num = 1023;
-       }
+                               wifi_direct_dbus_unpack_ay(mac_address, var, MACADDR_LEN);
+                               peer_list->mac_address = (char*) g_try_malloc0(MACSTR_LEN);
+                               if (peer_list->mac_address)
+                                       g_snprintf(peer_list->mac_address, MACSTR_LEN, MACSTR, MAC2STR(mac_address));
 
-       if (num > 0) {
-               buff = (wfd_discovery_entry_s*) g_try_malloc0_n(num, sizeof (wfd_discovery_entry_s));
-               if (!buff) {
-                       WDC_LOGE("Failed to alloc memory");
-                       pthread_mutex_unlock(&g_client_info.mutex);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+                       } else if (!g_strcmp0(key, "InterfaceAddress")) {
+                               unsigned char intf_address[MACADDR_LEN] = {0, };
 
-               res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff,
-                                                                       num * sizeof(wfd_discovery_entry_s));
-               if (num_tmp) {
-                       WDC_LOGD("Rest data should be read out");
-                       buff_tmp = (wfd_discovery_entry_s*) g_try_malloc0_n(num_tmp, sizeof (wfd_discovery_entry_s));
-                       if (buff_tmp) {
-                               __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff_tmp,
-                                                                               num_tmp * sizeof(wfd_discovery_entry_s));
-                               g_free(buff_tmp);
-                       }
-               }
-               pthread_mutex_unlock(&g_client_info.mutex);
-               if (res <= 0) {
-                       free(buff);
-                       WDC_LOGE("Failed to read socket");
-                       __wfd_reset_control();
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+                               wifi_direct_dbus_unpack_ay(intf_address, var, MACADDR_LEN);
+                               peer_list->interface_address = (char*) g_try_malloc0(MACSTR_LEN);
+                               if (peer_list->interface_address)
+                                       g_snprintf(peer_list->interface_address, MACSTR_LEN, MACSTR, MAC2STR(intf_address));
+
+                       } else if (!g_strcmp0(key, "Channel")) {
+                               peer_list->channel = g_variant_get_uint16(var);
+
+                       } else if (!g_strcmp0(key, "IsGroupOwner")) {
+                               peer_list->is_group_owner = g_variant_get_boolean(var);
+
+                       } else if (!g_strcmp0(key, "IsPersistentGO")) {
+                               peer_list->is_persistent_group_owner = g_variant_get_boolean(var);
+
+                       } else if (!g_strcmp0(key, "IsConnected")) {
+                               peer_list->is_connected = g_variant_get_boolean(var);
+
+                       } else if (!g_strcmp0(key, "Category")) {
+                               peer_list->primary_device_type = g_variant_get_uint16(var);
+
+                       } else if (!g_strcmp0(key, "SubCategory")) {
+                               peer_list->secondary_device_type = g_variant_get_uint16(var);
 
-               __wfd_client_print_entry_list(buff, num);
-               WDC_LOGD("wifi_direct_foreach_discovered_peers() SUCCESS");
-
-               wifi_direct_discovered_peer_info_s *peer_list;
-
-               for (i = 0; i < num; i++) {
-                       peer_list = (wifi_direct_discovered_peer_info_s *) g_try_malloc0(sizeof(wifi_direct_discovered_peer_info_s));
-                       peer_list->device_name = g_strndup(buff[i].device_name, WIFI_DIRECT_MAX_DEVICE_NAME_LEN+1);
-                       peer_list->mac_address = (char*) g_try_malloc0(MACSTR_LEN);
-                       g_snprintf(peer_list->mac_address, MACSTR_LEN, MACSTR, MAC2STR(buff[i].mac_address));
-                       peer_list->interface_address = (char*) g_try_malloc0(MACSTR_LEN);
-                       g_snprintf(peer_list->interface_address, MACSTR_LEN, MACSTR, MAC2STR(buff[i].intf_address));
-                       peer_list->channel = buff[i].channel;
-                       peer_list->is_connected = buff[i].is_connected;
-                       peer_list->is_group_owner = buff[i].is_group_owner;
-                       peer_list->is_persistent_group_owner = buff[i].is_persistent_go;
-                       peer_list->primary_device_type = buff[i].category;
-                       peer_list->secondary_device_type = buff[i].subcategory;
-                       peer_list->supported_wps_types= buff[i].wps_cfg_methods;
+                       } else if (!g_strcmp0(key, "IsWfdDevice")) {
 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
-                       peer_list->is_miracast_device = buff[i].is_wfd_device;
+                               peer_list->is_miracast_device = g_variant_get_boolean(var);
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
-
-                       if (!cb(peer_list, user_data))
-                               break;
+                       } else {
+                               ;/* Do Nothing */
+                       }
                }
 
-               g_free(buff);
-       } else {
-               pthread_mutex_unlock(&g_client_info.mutex);
+               /* __wfd_client_print_entry_list(peer_list, 1); */
+               if (!cb(peer_list, user_data)) {
+                       g_variant_iter_free(iter_peer);
+                       break;
+               }
        }
-
+//LCOV_EXCL_STOP
+       g_variant_iter_free(iter_peers);
+       g_variant_unref(reply);
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
@@ -1797,13 +1518,12 @@ int wifi_direct_connect(char *mac_address)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -1815,39 +1535,35 @@ int wifi_direct_connect(char *mac_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "Connect", params, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_CONNECT;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, MACADDR_LEN);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_connect() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
+//LCOV_EXCL_START
 int wifi_direct_cancel_connection(char *mac_address)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false)
-               || (g_client_info.client_id == WFD_INVALID_ID))
-       {
-               WDC_LOGE("Client is NOT registered.");
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
@@ -1858,22 +1574,19 @@ int wifi_direct_cancel_connection(char *mac_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_CANCEL_CONNECTION;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, req.data.mac_addr);
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "CancelConnection", params, &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_cancel_connect() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 
@@ -1883,12 +1596,12 @@ int wifi_direct_reject_connection(char *mac_address)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -1900,24 +1613,21 @@ int wifi_direct_reject_connection(char *mac_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "RejectConnection", params, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_REJECT_CONNECTION;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, req.data.mac_addr);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGE("wifi_direct_reject_connection() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
-
+//LCOV_EXCL_STOP
 
 int wifi_direct_disconnect_all(void)
 {
@@ -1925,77 +1635,67 @@ int wifi_direct_disconnect_all(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "DisconnectAll", NULL, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_DISCONNECT_ALL;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGE("wifi_direct_disconnect_all() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
-
+//LCOV_EXCL_START
 int wifi_direct_disconnect(char *mac_address)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (!mac_address) {
-               WDC_LOGE("mac_address is NULL");
+               WDC_LOGE("mac_addr is NULL");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_DISCONNECT;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "Disconnect", params, &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGE("wifi_direct_disconnect() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
-
+       return ret;
 }
 
 int wifi_direct_accept_connection(char *mac_address)
@@ -2004,13 +1704,12 @@ int wifi_direct_accept_connection(char *mac_address)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2022,40 +1721,39 @@ int wifi_direct_accept_connection(char *mac_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "AcceptConnection", params, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_SEND_CONNECT_REQ;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGE("wifi_direct_connect() SUCCESS \n");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
-
+//LCOV_EXCL_STOP
 
 int wifi_direct_foreach_connected_peers(wifi_direct_connected_peer_cb cb,
-                                                                                               void *user_data)
+                                       void *user_data)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-       int i;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       GVariantIter *iter_peers = NULL;
+       GVariantIter *iter_peer = NULL;
+       GVariant *var = NULL;
+       gchar *key = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2067,116 +1765,93 @@ int wifi_direct_foreach_connected_peers(wifi_direct_connected_peer_cb cb,
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+//LCOV_EXCL_START
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "GetConnectedPeers", params, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_CONNECTED_PEERS_INFO;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       pthread_mutex_lock(&g_client_info.mutex);
-       res = __wfd_client_write_socket(g_client_info.sync_sockfd, &req,
-                                                                       sizeof(wifi_direct_client_request_s));
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Failed to write into socket [%s]", __wfd_print_error(res));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
+       g_variant_get(reply, "(iaa{sv})", &ret, &iter_peers);
+       if (ret != WIFI_DIRECT_ERROR_NONE) {
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
-       WDC_LOGD("Succeeded to send request [%d: %s]", req.cmd, __wfd_client_print_cmd(req.cmd));
 
-       res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                               sizeof(wifi_direct_client_response_s));
-       if (res <= 0) {
-               WDC_LOGE("Failed to read socket [%d]", res);
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       WDC_LOGD("wifi_direct_foreach_connected_peers() SUCCESS");
 
-       if (rsp.cmd != req.cmd) {
-               WDC_LOGE("Invalid resp [%d]", rsp.cmd);
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       while (g_variant_iter_loop(iter_peers, "a{sv}", &iter_peer)) {
+               wifi_direct_connected_peer_info_s *peer_list = NULL;
 
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Result received [%s]", __wfd_print_error(rsp.result));
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return rsp.result;
-       }
+               peer_list = (wifi_direct_connected_peer_info_s *) g_try_malloc0(sizeof(wifi_direct_connected_peer_info_s));
+               if (!peer_list) {
+                       WDC_LOGE("Failed to allocate memory");
+                       continue;
+               }
 
-       short num = rsp.param1;
-       wfd_connected_peer_info_s *buff = NULL;
+               while (g_variant_iter_loop(iter_peer, "{sv}", &key, &var)) {
+                       if (!g_strcmp0(key, "DeviceName")) {
+                               const char *device_name = NULL;
 
-       WDC_LOGD("Num of connected peers = %d", (int) rsp.param1);
+                               g_variant_get(var, "&s", &device_name);
+                               peer_list->device_name = g_strndup(device_name, WIFI_DIRECT_MAX_DEVICE_NAME_LEN+1);
 
-       if (num > 8 || num < 1) {
-               WDC_LOGE("Invalid number of connected peer(%d)", num);
-               buff = (wfd_connected_peer_info_s*) g_try_malloc0_n(num, sizeof(wfd_connected_peer_info_s));
-               if (!buff) {
-                       WDC_LOGE("malloc() failed!!!");
-                       pthread_mutex_unlock(&g_client_info.mutex);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+                       } else if (!g_strcmp0(key, "DeviceAddress")) {
+                               unsigned char mac_address[MACADDR_LEN] = {0, };
 
-               res= __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff,
-                                                               num * sizeof(wfd_connected_peer_info_s));
-               pthread_mutex_unlock(&g_client_info.mutex);
-       } else if (num < 1) {
-               WDC_LOGE("Invalid number of connected peer(%d)", num);
-               pthread_mutex_unlock(&g_client_info.mutex);
-       } else {
-               buff = (wfd_connected_peer_info_s*) g_try_malloc0_n(num, sizeof(wfd_connected_peer_info_s));
-               if (!buff) {
-                       WDC_LOGE("malloc() failed!!!");
-                       pthread_mutex_unlock(&g_client_info.mutex);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+                               wifi_direct_dbus_unpack_ay(mac_address, var, MACADDR_LEN);
+                               peer_list->mac_address = (char*) g_try_malloc0(MACSTR_LEN);
+                               if (peer_list->mac_address)
+                                       g_snprintf(peer_list->mac_address, MACSTR_LEN, MACSTR, MAC2STR(mac_address));
 
-               res= __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff,
-                                                               num * sizeof(wfd_connected_peer_info_s));
-               pthread_mutex_unlock(&g_client_info.mutex);
-               if (res <= 0) {
-                       free(buff);
-                       WDC_LOGE("socket read error");
-                       __wfd_reset_control();
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+                       } else if (!g_strcmp0(key, "InterfaceAddress")) {
+                               unsigned char intf_address[MACADDR_LEN] = {0, };
 
-               __wfd_client_print_connected_peer_info(buff, num);
-               WDC_LOGD("wifi_direct_foreach_connected_peers() SUCCESS");
+                               wifi_direct_dbus_unpack_ay(intf_address, var, MACADDR_LEN);
+                               peer_list->interface_address = (char*) g_try_malloc0(MACSTR_LEN);
+                               if (peer_list->interface_address)
+                                       g_snprintf(peer_list->interface_address, MACSTR_LEN, MACSTR, MAC2STR(intf_address));
 
-               wifi_direct_connected_peer_info_s *peer_list = NULL;
+                       } else if (!g_strcmp0(key, "IPAddress")) {
+                               unsigned char ip_address[IPADDR_LEN] = {0, };
+
+                               wifi_direct_dbus_unpack_ay(ip_address, var, IPADDR_LEN);
+                               peer_list->ip_address = (char*) g_try_malloc0(IPSTR_LEN);
+                               if (peer_list->ip_address)
+                                       g_snprintf(peer_list->ip_address, IPSTR_LEN, IPSTR, IP2STR(ip_address));
+
+                       } else if (!g_strcmp0(key, "Channel")) {
+                               peer_list->channel = g_variant_get_uint16(var);
+
+                       } else if (!g_strcmp0(key, "Category")) {
+                               peer_list->primary_device_type = g_variant_get_uint16(var);
 
-               for (i = 0; i < num; i++) {
-                       peer_list = (wifi_direct_connected_peer_info_s *) g_try_malloc0(sizeof(wifi_direct_connected_peer_info_s));
-                       peer_list->device_name = g_strdup(buff[i].device_name);
-                       peer_list->ip_address= (char*) g_try_malloc0(IPSTR_LEN);
-                       g_snprintf(peer_list->ip_address, IPSTR_LEN, IPSTR, IP2STR(buff[i].ip_address));
-                       peer_list->mac_address = (char*) calloc(1, MACSTR_LEN);
-                       g_snprintf(peer_list->mac_address, MACSTR_LEN, MACSTR, MAC2STR(buff[i].mac_address));
-                       peer_list->interface_address = (char*) g_try_malloc0( MACSTR_LEN);
-                       g_snprintf(peer_list->interface_address, MACSTR_LEN, MACSTR, MAC2STR(buff[i].intf_address));
-                       peer_list->p2p_supported = buff[i].is_p2p;
-                       peer_list->primary_device_type = buff[i].category;
-                       peer_list->secondary_device_type = buff[i].subcategory;
-                       peer_list->channel = buff[i].channel;
+                       } else if (!g_strcmp0(key, "SubCategory")) {
+                               peer_list->secondary_device_type = g_variant_get_uint16(var);
+
+                       } else if (!g_strcmp0(key, "IsWfdDevice")) {
 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
-                       peer_list->is_miracast_device = buff[i].is_wfd_device;
+                               peer_list->is_miracast_device = g_variant_get_boolean(var);
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+                       } else if (!g_strcmp0(key, "IsP2P")) {
+                               peer_list->p2p_supported = g_variant_get_boolean(var);
 
-                       if (!cb(peer_list, user_data))
-                               break;
+                       } else {
+                               ;/* Do Nothing */
+                       }
+               }
+
+               /* __wfd_client_print_connected_peer_info(peer_list, 1); */
+               if (!cb(peer_list, user_data)) {
+                       g_variant_iter_free(iter_peer);
+                       break;
                }
-               g_free(buff);
-               buff = NULL;
        }
-       g_free(buff);
 
+       g_variant_iter_free(iter_peers);
+       g_variant_unref(reply);
+//LCOV_EXCL_STOP
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
@@ -2188,32 +1863,28 @@ int wifi_direct_create_group(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_CREATE_GROUP;
-       req.client_id = g_client_info.client_id;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                                 "CreateGroup", NULL, &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGE("wifi_direct_create_group() SUCCESS \n");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 
@@ -2223,32 +1894,28 @@ int wifi_direct_destroy_group(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                                 "DestroyGroup", NULL, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_DESTROY_GROUP;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGE("wifi_direct_destroy_group() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 
@@ -2258,12 +1925,12 @@ int wifi_direct_is_group_owner(bool *owner)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       bool val;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2275,19 +1942,19 @@ int wifi_direct_is_group_owner(bool *owner)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "IsGroupOwner",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_IS_GROUPOWNER;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_is_group_owner() SUCCESS");
-       *owner = (bool) rsp.param1;
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_get(reply, "(b)", &val);
+       *owner = val;
+       g_variant_unref(reply);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
@@ -2299,12 +1966,12 @@ int wifi_direct_is_autonomous_group(bool *autonomous_group)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       bool val;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2316,19 +1983,19 @@ int wifi_direct_is_autonomous_group(bool *autonomous_group)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "IsAutoGroup",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_IS_AUTONOMOUS_GROUP;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_is_autonomous_group() SUCCESS");
-       *autonomous_group = (bool) rsp.param1;
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_get(reply, "(b)", &val);
+       *autonomous_group = val;
+       g_variant_unref(reply);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
@@ -2341,12 +2008,12 @@ int wifi_direct_set_group_owner_intent(int intent)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2358,22 +2025,21 @@ int wifi_direct_set_group_owner_intent(int intent)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_GO_INTENT;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = intent;
+       params = g_variant_new("(i)", intent);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetGoIntent",
+                                         params,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_set_group_owner_intent() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_get_group_owner_intent(int *intent)
@@ -2382,12 +2048,12 @@ int wifi_direct_get_group_owner_intent(int *intent)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2399,22 +2065,23 @@ int wifi_direct_get_group_owner_intent(int *intent)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetGoIntent",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_GO_INTENT;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("int wifi_direct_get_group_owner_intent() intent[%d] SUCCESS", rsp.param1);
-       *intent = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *intent = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("Intent = [%d]", *intent);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_set_max_clients(int max)
@@ -2423,34 +2090,33 @@ int wifi_direct_set_max_clients(int max)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
        WDC_LOGD("max client [%d]\n", max);
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_MAX_CLIENT;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = max;
+       params = g_variant_new("(i)", max);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetMaxClient",
+                                         params,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("int wifi_direct_set_max_clients() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_get_max_clients(int *max)
@@ -2459,12 +2125,12 @@ int wifi_direct_get_max_clients(int *max)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2476,20 +2142,21 @@ int wifi_direct_get_max_clients(int *max)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetMaxClient",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_MAX_CLIENT;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("int wifi_direct_get_max_clients() max_client[%d] SUCCESS", rsp.param1);
-       *max = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *max = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("max_client = [%d]", *max);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
@@ -2500,12 +2167,12 @@ int wifi_direct_get_operating_channel(int *channel)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2517,24 +2184,23 @@ int wifi_direct_get_operating_channel(int *channel)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetOperatingChannel",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_OPERATING_CHANNEL;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("channel = [%d]", (int) rsp.param1);
-       *channel = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *channel = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("channel = [%d]", *channel);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-
        return WIFI_DIRECT_ERROR_NONE;
-
 }
 
 int wifi_direct_activate_pushbutton(void)
@@ -2543,32 +2209,30 @@ int wifi_direct_activate_pushbutton(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_ACTIVATE_PUSHBUTTON;
-       req.client_id = g_client_info.client_id;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "ActivatePushButton",
+                                         NULL,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_activate_pushbutton() SUCCESS");
 
+       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)
@@ -2577,77 +2241,39 @@ int wifi_direct_set_wps_pin(char *pin)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int status = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
-       }
-
-       if (!pin) {
-               WDC_LOGE("NULL Param [pin]!");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
-       }
-       WDC_LOGE("pin = [%s]\n", pin);
-
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_WPS_PIN;
-       req.client_id = g_client_info.client_id;
-       req.cmd_data_len = WIFI_DIRECT_WPS_PIN_LEN+1;
-
-       pthread_mutex_lock(&g_client_info.mutex);
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, &req,
-                                                                 sizeof(wifi_direct_client_request_s));
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("writing msg hdr is success!\n");
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, pin,
-                                                                 WIFI_DIRECT_WPS_PIN_LEN);
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       status = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                                 sizeof(wifi_direct_client_response_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-       if (status <= 0) {
-               WDC_LOGE("Error!!! reading socket, status = %d", status);
-               __wfd_reset_control();
+       if (!pin) {
+               WDC_LOGE("NULL Param [pin]!");
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
+       WDC_LOGE("pin = [%s]\n", pin);
 
-       if (rsp.cmd != req.cmd) {
-               WDC_LOGE("Error!!! Invalid resp cmd = %d", rsp.cmd);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-       }
+       params = g_variant_new("(s)", pin);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetWpsPin",
+                                         params,
+                                         &error);
 
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGD("Error!!! Result received = %d", rsp.result);
-               __WDC_LOG_FUNC_END__;
-               return rsp.result;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
 }
 
 
@@ -2657,35 +2283,40 @@ int wifi_direct_get_wps_pin(char **pin)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       char la_pin[WIFI_DIRECT_WPS_PIN_LEN + 1] = { 0, };
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       const char *str = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_WPS_PIN;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       if (!pin) {
+               WDC_LOGE("NULL Param [pin]!");
                __WDC_LOG_FUNC_END__;
-               return res;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
-       WDC_LOGD("wifi_direct_get_wps_pin() SUCCESS");
-       g_strlcpy(la_pin, rsp.param2, WIFI_DIRECT_WPS_PIN_LEN +1);
-       *pin = g_strdup(la_pin);
 
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetWpsPin",
+                                         NULL,
+                                         &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       g_variant_get(reply, "(i&s)", &ret, &str);
+       if (pin != NULL && str != NULL)
+               *pin = g_strdup(str);
+       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_get_supported_wps_mode(int *wps_mode)
@@ -2694,12 +2325,12 @@ int wifi_direct_get_supported_wps_mode(int *wps_mode)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int mode = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2711,22 +2342,22 @@ int wifi_direct_get_supported_wps_mode(int *wps_mode)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetSupportedWpsMode",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_SUPPORTED_WPS_MODE;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("Supported wps config = [%d]", (int) rsp.param1);
-       *wps_mode = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, &mode);
+       *wps_mode = mode;
+       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_foreach_supported_wps_types(wifi_direct_supported_wps_type_cb cb, void* user_data)
@@ -2735,12 +2366,13 @@ int wifi_direct_foreach_supported_wps_types(wifi_direct_supported_wps_type_cb cb
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int wps_mode = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       gboolean result = FALSE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2752,32 +2384,28 @@ int wifi_direct_foreach_supported_wps_types(wifi_direct_supported_wps_type_cb cb
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_SUPPORTED_WPS_MODE;
-       req.client_id = g_client_info.client_id;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetSupportedWpsMode",
+                                         NULL,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("Supported wps config = [%d]", (int) rsp.param1);
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       int wps_mode;
-       bool result = TRUE;
+       g_variant_get(reply, "(ii)", &ret, &wps_mode);
+       g_variant_unref(reply);
 
-       wps_mode = rsp.param1;
        if (wps_mode & WIFI_DIRECT_WPS_TYPE_PBC)
                result = cb(WIFI_DIRECT_WPS_TYPE_PBC, user_data);
-       if ((result == true) && (wps_mode & WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY))
+       if ((result == TRUE) && (wps_mode & WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY))
                result = cb(WIFI_DIRECT_WPS_TYPE_PIN_DISPLAY, user_data);
-       if ((result == true) && (wps_mode & WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD))
+       if ((result == TRUE) && (wps_mode & WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD))
                result = cb(WIFI_DIRECT_WPS_TYPE_PIN_KEYPAD, user_data);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_get_local_wps_type(wifi_direct_wps_type_e *type)
@@ -2786,12 +2414,12 @@ int wifi_direct_get_local_wps_type(wifi_direct_wps_type_e *type)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int mode = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2803,22 +2431,22 @@ int wifi_direct_get_local_wps_type(wifi_direct_wps_type_e *type)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetLocalWpsMode",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_LOCAL_WPS_MODE;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_wps_type() SUCCESS");
-       *type = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, &mode);
+       *type = mode;
+       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_req_wps_type(wifi_direct_wps_type_e type)
@@ -2827,12 +2455,12 @@ int wifi_direct_set_req_wps_type(wifi_direct_wps_type_e type)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -2848,22 +2476,21 @@ int wifi_direct_set_req_wps_type(wifi_direct_wps_type_e type)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(i)", type);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetReqWpsMode",
+                                         params,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_SET_REQ_WPS_MODE;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = type;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_set_req_wps_type() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_get_req_wps_type(wifi_direct_wps_type_e *type)
@@ -2872,39 +2499,39 @@ int wifi_direct_get_req_wps_type(wifi_direct_wps_type_e *type)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int mode = 0;
+       int ret = 0;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       if (type == NULL) {
+       if (!type) {
                WDC_LOGE("NULL Param [type]!\n");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetReqWpsMode",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_REQ_WPS_MODE;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_req_wps_type() SUCCESS");
-       *type = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, &mode);
+       *type = mode;
+       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_get_ssid(char **ssid)
@@ -2913,41 +2540,39 @@ int wifi_direct_get_ssid(char **ssid)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       char la_ssid[WIFI_DIRECT_MAX_SSID_LEN + 1] = { 0, };
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       const char *str = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (!ssid) {
-               WDC_LOGE("NULL Param [ssid]!");
+               WDC_LOGE("Invalid Parameter");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetDeviceName",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_SSID;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_ssid() %s SUCCESS", rsp.param2);
-       g_strlcpy(la_ssid, rsp.param2, WIFI_DIRECT_MAX_SSID_LEN + 1);
-       *ssid = g_strdup(la_ssid);
+       g_variant_get(reply, "(i&s)", &ret, &str);
+       *ssid = g_strdup(str);
+       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_get_device_name(char **device_name)
@@ -2956,41 +2581,39 @@ int wifi_direct_get_device_name(char **device_name)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       char la_device_name[WIFI_DIRECT_MAX_DEVICE_NAME_LEN + 1] = { 0, };
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       const char *str = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (!device_name) {
-               WDC_LOGE("NULL Param [device_name]!");
+               WDC_LOGE("Invalid Parameter");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetDeviceName",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_DEVICE_NAME;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_device_name() %s SUCCESS \n", rsp.param2);
-       g_strlcpy(la_device_name, rsp.param2, WIFI_DIRECT_MAX_DEVICE_NAME_LEN + 1);
-       *device_name = g_strdup(la_device_name);
+       g_variant_get(reply, "(i&s)", &ret, &str);
+       *device_name = g_strdup(str);
+       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_device_name(const char *device_name)
@@ -2999,12 +2622,12 @@ int wifi_direct_set_device_name(const char *device_name)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int status = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3017,60 +2640,24 @@ int wifi_direct_set_device_name(const char *device_name)
        }
        WDC_LOGE("device_name = [%s]", device_name);
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_DEVICE_NAME;
-       req.client_id = g_client_info.client_id;
-
-       pthread_mutex_lock(&g_client_info.mutex);
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, &req,
-                                                                 sizeof(wifi_direct_client_request_s));
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD( "writing msg hdr is success!\n");
-
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, (void*) device_name,
-                                                                 WIFI_DIRECT_MAX_DEVICE_NAME_LEN);
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       params = g_variant_new("(s)", device_name);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetDeviceName",
+                                         params,
+                                         &error);
 
-       status = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                                 sizeof(wifi_direct_client_response_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-       if (status <= 0) {
-               WDC_LOGE("Error!!! reading socket, status = %d", status);
-               __wfd_reset_control();
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       } else {
-               if (rsp.cmd == WIFI_DIRECT_CMD_SET_DEVICE_NAME) {
-                       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-                               WDC_LOGE("Error!!! Result received = %d", rsp.result);
-                               WDC_LOGE("Error!!! [%s]", __wfd_print_error(rsp.result));
-                               __WDC_LOG_FUNC_END__;
-                               return rsp.result;
-                       }
-               } else {
-                       WDC_LOGE("Error!!! Invalid resp cmd = %d", rsp.cmd);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
 }
 
+//LCOV_EXCL_START
 int wifi_direct_get_network_interface_name(char **name)
 {
        __WDC_LOG_FUNC_START__;
@@ -3079,10 +2666,11 @@ int wifi_direct_get_network_interface_name(char **name)
 
        wifi_direct_state_e status = 0;
        char *get_str = NULL;
-       int result;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3094,8 +2682,8 @@ int wifi_direct_get_network_interface_name(char **name)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       result = wifi_direct_get_state(&status);
-       WDC_LOGD("wifi_direct_get_state() state=[%d], result=[%d]\n", status, result);
+       ret = wifi_direct_get_state(&status);
+       WDC_LOGD("wifi_direct_get_state() state=[%d], ret=[%d]\n", status, ret);
 
        if (status < WIFI_DIRECT_STATE_CONNECTED) {
                WDC_LOGE("Device is not connected!\n");
@@ -3103,15 +2691,21 @@ int wifi_direct_get_network_interface_name(char **name)
                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);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_PERMITTED;
-       }
-       WDC_LOGD( "VCONFKEY_IFNAME(%s) : %s\n", VCONFKEY_IFNAME, get_str);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                                 "GetInterfaceName",
+                                                 NULL,
+                                                 &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       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;
@@ -3123,12 +2717,12 @@ int wifi_direct_get_ip_address(char **ip_address)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = 0;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       const char *str = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3140,22 +2734,23 @@ int wifi_direct_get_ip_address(char **ip_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                                 "GetIPAddress",
+                                                 NULL,
+                                                 &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_IP_ADDR;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       *ip_address = g_strdup(rsp.param2);
-       WDC_LOGD("IP address = [%s]", *ip_address);
+       g_variant_get(reply, "(i&s)", ret, &str);
+       *ip_address = g_strdup(str);
+       g_variant_unref(reply);
 
+       WDC_LOGD("IP address = [%s]", *ip_address);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_get_subnet_mask(char **subnet_mask)
@@ -3165,11 +2760,12 @@ int wifi_direct_get_subnet_mask(char **subnet_mask)
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
        wifi_direct_state_e status = 0;
+       GError* error = NULL;
+       GVariant *reply = NULL;
        char *get_str = NULL;
-       int result;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3181,23 +2777,29 @@ int wifi_direct_get_subnet_mask(char **subnet_mask)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       result = wifi_direct_get_state(&status);
-       WDC_LOGD("wifi_direct_get_state() state=[%d], result=[%d]", status, result);
-       ifstatus < WIFI_DIRECT_STATE_CONNECTED) {
+       ret = wifi_direct_get_state(&status);
+       WDC_LOGD("wifi_direct_get_state() state=[%d], ret=[%d]", status, ret);
+       if (status < WIFI_DIRECT_STATE_CONNECTED) {
                WDC_LOGE("Device is not connected!");
                __WDC_LOG_FUNC_END__;
                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);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_PERMITTED;
-       }
-       WDC_LOGD("VCONFKEY_SUBNET_MASK(%s) : %s", VCONFKEY_SUBNET_MASK, get_str);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                                 "GetSubnetMask",
+                                                 NULL,
+                                                 &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       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;
@@ -3210,11 +2812,12 @@ int wifi_direct_get_gateway_address(char **gateway_address)
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
        wifi_direct_state_e status = 0;
+       GError* error = NULL;
+       GVariant *reply = NULL;
        char *get_str = NULL;
-       int result;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3226,27 +2829,34 @@ int wifi_direct_get_gateway_address(char **gateway_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       result = wifi_direct_get_state(&status);
-       WDC_LOGD("wifi_direct_get_state() state=[%d], result=[%d]", status, result);
-       if(status < WIFI_DIRECT_STATE_CONNECTED) {
+       ret = wifi_direct_get_state(&status);
+       WDC_LOGD("wifi_direct_get_state() state=[%d], ret=[%d]", status, ret);
+       if (status < WIFI_DIRECT_STATE_CONNECTED) {
                WDC_LOGE("Device is not connected!");
                __WDC_LOG_FUNC_END__;
                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);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_PERMITTED;
-       }
-       WDC_LOGD("VCONFKEY_GATEWAY(%s) : %s", VCONFKEY_GATEWAY, get_str);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                                 "GetGateway",
+                                                 NULL,
+                                                 &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       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;
 }
+//LCOV_EXCL_STOP
 
 int wifi_direct_get_mac_address(char **mac_address)
 {
@@ -3254,12 +2864,12 @@ int wifi_direct_get_mac_address(char **mac_address)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       const char *str = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3271,107 +2881,102 @@ int wifi_direct_get_mac_address(char **mac_address)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetMacAddress",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_MAC_ADDR;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       *mac_address = g_strdup(rsp.param2);
-       WDC_SECLOGD("MAC address = [%s]", *mac_address);
+       g_variant_get(reply, "(i&s)", &ret, &str);
+       *mac_address = g_strdup(str);
+       g_variant_unref(reply);
 
+       WDC_SECLOGD("MAC address = [%s]", *mac_address);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
-
 int wifi_direct_get_state(wifi_direct_state_e *state)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
        if (!state) {
-               WDC_LOGE("NULL Param [state]!");
+               WDC_LOGE("Invalid Parameter");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
-       }
-
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_LINK_STATUS;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       ret = vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &val);
+       if (ret < 0) {
+               WDC_LOGE("Failed to get vconf value [%s]\n", VCONFKEY_WIFI_DIRECT_STATE);
                __WDC_LOG_FUNC_END__;
-               return res;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
-       WDC_LOGD("Link Status = %d", (int) rsp.param1);
-       *state = (wifi_direct_state_e) rsp.param1;
 
-       /* for CAPI : there is no WIFI_DIRECT_STATE_GROUP_OWNER type in CAPI */
-       if(*state == WIFI_DIRECT_STATE_GROUP_OWNER)
+       if (val == VCONFKEY_WIFI_DIRECT_ACTIVATED) {
+               *state = WIFI_DIRECT_STATE_ACTIVATED;
+       } else if (val == VCONFKEY_WIFI_DIRECT_DEACTIVATED) {
+               *state = WIFI_DIRECT_STATE_DEACTIVATED;
+       } else if (val == VCONFKEY_WIFI_DIRECT_CONNECTED) {
+               *state = WIFI_DIRECT_STATE_CONNECTED;
+       } else if (val == VCONFKEY_WIFI_DIRECT_GROUP_OWNER) {
                *state = WIFI_DIRECT_STATE_CONNECTED;
+       } else if (val == VCONFKEY_WIFI_DIRECT_DISCOVERING) {
+               *state = WIFI_DIRECT_STATE_DISCOVERING;
+       } else {
+               WDC_LOGE("This state cannot be set as wifi_direct vconf state[%d]", val);
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
+       }
 
+       WDC_LOGD("State = [%d]", *state);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
-
 int wifi_direct_is_discoverable(bool* discoverable)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (!discoverable) {
-               WDC_LOGE("NULL Param [discoverable]!");
+               WDC_LOGE("Invalid Parameter");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "IsDiscoverable", NULL, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_IS_DISCOVERABLE;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_is_discoverable() SUCCESS");
-       *discoverable = (bool) rsp.param1;
+       g_variant_get(reply, "(b)", discoverable);
+       WDC_LOGD("Discoverable = [%s]", *discoverable ? "Yes" : "No");
+
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_unref(reply);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
@@ -3383,36 +2988,34 @@ int wifi_direct_is_listening_only(bool* listen_only)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (!listen_only) {
-               WDC_LOGE("NULL Param [listen_only]!");
+               WDC_LOGE("Invalid Parameter");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "IsListeningOnly", NULL, &error);
 
-       req.cmd = WIFI_DIRECT_CMD_IS_LISTENING_ONLY;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_is_listening_only() SUCCESS");
-       *listen_only = (bool) rsp.param1;
+       g_variant_get(reply, "(b)", listen_only);
+
+       WDC_LOGD("Is listen only = [%s]", *listen_only ? "Yes" : "No");
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_unref(reply);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
@@ -3425,24 +3028,38 @@ int wifi_direct_get_primary_device_type(wifi_direct_primary_device_type_e* type)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       if (!type) {
-               WDC_LOGE("NULL Param [type]!");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
-       }
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       int primary_device_type = 0;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       WDC_LOGD("Current primary_dev_type [%d]", WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE);
-       *type = WIFI_DIRECT_PRIMARY_DEVICE_TYPE_TELEPHONE;
+       if (type == NULL) {
+               WDC_LOGE("NULL Param [type]!");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+       }
+
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                                 "GetPrimaryDevType",
+                                                 NULL, &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_get(reply, "(ii)", &ret, &primary_device_type);
+       g_variant_unref(reply);
+       *type = primary_device_type;
 
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_get_secondary_device_type(wifi_direct_secondary_device_type_e* type)
@@ -3451,24 +3068,38 @@ int wifi_direct_get_secondary_device_type(wifi_direct_secondary_device_type_e* t
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       int secondary_device_type = 0;
+
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       if (NULL == type) {
+       if (type == NULL) {
                WDC_LOGE("NULL Param [type]!");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       WDC_LOGD("Current second_dev_type [%d]", WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_SMARTPHONE_DUAL);
-       *type = WIFI_DIRECT_SECONDARY_DEVICE_TYPE_TELEPHONE_SMARTPHONE_DUAL;    // smart phone dual mode (wifi and cellular)
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                                 "GetSecondaryDevType",
+                                                 NULL, &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_get(reply, "(ii)", &ret, &secondary_device_type);
+       g_variant_unref(reply);
+       *type = secondary_device_type;
 
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_set_autoconnection_mode(bool mode)
@@ -3477,32 +3108,32 @@ int wifi_direct_set_autoconnection_mode(bool mode)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_AUTOCONNECTION_MODE;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = mode;
+       params = g_variant_new("(b)", mode);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetAutoConnectionMode",
+                                         params,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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_is_autoconnection_mode(bool *mode)
@@ -3511,12 +3142,12 @@ int wifi_direct_is_autoconnection_mode(bool *mode)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       bool val = FALSE;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3528,23 +3159,22 @@ int wifi_direct_is_autoconnection_mode(bool *mode)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "IsAutoConnectionMode",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_IS_AUTOCONNECTION_MODE;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_is_autoconnection_mode() SUCCESS");
-       *mode = (bool) rsp.param1;
+       g_variant_get(reply, "(ib)", &ret, &val);
+       *mode = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
-
+       return ret;
 }
 
 
@@ -3554,32 +3184,30 @@ int wifi_direct_set_persistent_group_enabled(bool enabled)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(b)", enabled);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "SetPersistentGroupEnabled",
+                                         params,
+                                         &error);
 
-       if (enabled == true)
-               req.cmd = WIFI_DIRECT_CMD_ACTIVATE_PERSISTENT_GROUP;
-       else
-               req.cmd = WIFI_DIRECT_CMD_DEACTIVATE_PERSISTENT_GROUP;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_set_persistent_group_enabled() SUCCESS");
+
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
@@ -3592,12 +3220,12 @@ int wifi_direct_is_persistent_group_enabled(bool *enabled)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+       bool val;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3609,38 +3237,41 @@ int wifi_direct_is_persistent_group_enabled(bool *enabled)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "IsPersistentGroupEnabled",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_IS_PERSISTENT_GROUP;
-       req.client_id = g_client_info.client_id;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_is_persistent_group_enabled() SUCCESS");
-       *enabled = (bool) rsp.param1;
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_get(reply, "(b)", &val);
+       *enabled = val;
+       g_variant_unref(reply);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
 
 int wifi_direct_foreach_persistent_groups(wifi_direct_persistent_group_cb cb,
-                                                                                               void* user_data)
+                                       void* user_data)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-       int i;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       GVariantIter *iter_groups = NULL;
+       GVariantIter *iter_group = NULL;
+       GVariant *var = NULL;
+       gchar *key = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3652,139 +3283,69 @@ int wifi_direct_foreach_persistent_groups(wifi_direct_persistent_group_cb cb,
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_PERSISTENT_GROUP_INFO;
-       req.client_id = g_client_info.client_id;
-
-       pthread_mutex_lock(&g_client_info.mutex);
-       res = __wfd_client_write_socket(g_client_info.sync_sockfd, &req, sizeof(wifi_direct_client_request_s));
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Failed to write into socket [%s]", __wfd_print_error(res));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("Succeeded to send request [%d: %s]", req.cmd, __wfd_client_print_cmd(req.cmd));
-
-       res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                       sizeof(wifi_direct_client_response_s));
-       if (res <= 0) {
-               WDC_LOGE("Failed to read socket [%d]", res);
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                                 "GetPersistentGroups", params, &error);
 
-       if (rsp.cmd != req.cmd) {
-               WDC_LOGE("Invalid resp [%d]", rsp.cmd);
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Result received [%s]", __wfd_print_error(rsp.result));
-               pthread_mutex_unlock(&g_client_info.mutex);
+       g_variant_get(reply, "(iaa{sv})", &ret, &iter_groups);
+       if (ret != WIFI_DIRECT_ERROR_NONE) {
                __WDC_LOG_FUNC_END__;
-               return rsp.result;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
 
-       short num = rsp.param1;
-       short num_tmp = 0;
-       wfd_persistent_group_info_s *buff = NULL;
-       wfd_persistent_group_info_s *buff_tmp = NULL;
+       WDC_LOGD("wifi_direct_foreach_persistent_groups() SUCCESS");
+//LCOV_EXCL_START
+       while (g_variant_iter_loop(iter_groups, "a{sv}", &iter_group)) {
+               const char *ssid = NULL;
+               char *go_mac_address = NULL;
 
-       WDC_LOGD("Num of persistent groups = %d", (int) rsp.param1);
+               while (g_variant_iter_loop(iter_group, "{sv}", &key, &var)) {
+                       if (!g_strcmp0(key, "SSID")) {
+                               g_variant_get(var, "&s", &ssid);
 
-       if (num > 1023) {
-               WDC_LOGE("Discovered peer number restricted by 255(real number:%d)", num);
-               num_tmp = num -1023;
-               num = 1023;
-       }
+                       } else if (!g_strcmp0(key, "GOMacAddress")) {
+                               unsigned char mac_address[MACADDR_LEN] = {0, };
 
-       if (num > 0) {
-               buff = (wfd_persistent_group_info_s *) g_try_malloc0_n(num, sizeof(wfd_persistent_group_info_s));
-               if (!buff) {
-                       WDC_LOGE("malloc() failed!!!.");
-                       pthread_mutex_unlock(&g_client_info.mutex);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
+                               wifi_direct_dbus_unpack_ay(mac_address, var, MACADDR_LEN);
+                               go_mac_address = (char*) g_try_malloc0(MACSTR_LEN);
+                               if (go_mac_address)
+                                       g_snprintf(go_mac_address, MACSTR_LEN, MACSTR, MAC2STR(mac_address));
 
-               res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff,
-                                                                       num * sizeof(wfd_persistent_group_info_s));
-               if (num_tmp) {
-                       WDC_LOGD("Rest data should be read out");
-                       buff_tmp = (wfd_persistent_group_info_s*) calloc(num_tmp, sizeof (wfd_persistent_group_info_s));
-                       if (buff_tmp) {
-                               __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff_tmp,
-                                                                       num_tmp * sizeof(wfd_persistent_group_info_s));
-                               g_free(buff_tmp);
+                       } else {
+                               ;/* Do Nothing */
                        }
                }
-               pthread_mutex_unlock(&g_client_info.mutex);
-               if (res <= 0){
-                       free(buff);
-                       WDC_LOGE("socket read error.");
-                       __wfd_reset_control();
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
-
-               __wfd_client_print_persistent_group_info(buff, num);
-               WDC_LOGD("wifi_direct_foreach_persistent_groups() SUCCESS");
 
-               char *ssid;
-               char *go_mac_address;
-
-               for (i = 0; i < num; i++) {
-                       ssid = g_strndup(buff[i].ssid, WIFI_DIRECT_MAX_SSID_LEN+1);
-                       if (!ssid) {
-                               WDC_LOGD("Failed to copy ssid");
-                               break;
-                       }
-                       go_mac_address = (char*) g_try_malloc0(MACSTR_LEN);
-                       if (!go_mac_address) {
-                               WDC_LOGD("Failed to allocate memory for GO MAC address");
-                               g_free(ssid);
-                               g_free(buff);
-                               return WIFI_DIRECT_ERROR_OUT_OF_MEMORY;
-                       }
-                       g_snprintf(go_mac_address, MACSTR_LEN, MACSTR, MAC2STR(buff[i].go_mac_address));
-
-                       res = cb(go_mac_address, ssid, user_data);
-                       g_free(ssid);
-                       ssid = NULL;
-                       g_free(go_mac_address);
-                       go_mac_address = NULL;
-                       if (!res)
-                               break;
+               ret = cb(go_mac_address, ssid, user_data);
+               g_free(go_mac_address);
+               go_mac_address = NULL;
+               if (!ret) {
+                       g_variant_iter_free(iter_group);
+                       break;
                }
-               g_free(buff);
-
-       } else {
-               pthread_mutex_unlock(&g_client_info.mutex);
        }
-
+//LCOV_EXCL_STOP
+       g_variant_iter_free(iter_groups);
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
 
+//LCOV_EXCL_START
 int wifi_direct_remove_persistent_group(char *mac_address, const char *ssid)
 {
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       wfd_persistent_group_info_s persistent_group_info;
-       int status = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3796,95 +3357,24 @@ int wifi_direct_remove_persistent_group(char *mac_address, const char *ssid)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_REMOVE_PERSISTENT_GROUP;
-       req.client_id = g_client_info.client_id;
-
-       pthread_mutex_lock(&g_client_info.mutex);
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, &req,
-                                                                 sizeof(wifi_direct_client_request_s));
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("writing msg hdr is success!");
-
-       g_strlcpy(persistent_group_info.ssid, ssid, WIFI_DIRECT_MAX_SSID_LEN + 1);
-       macaddr_atoe(mac_address, persistent_group_info.go_mac_address);
-
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, &persistent_group_info,
-                                                                 sizeof(wfd_persistent_group_info_s));
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-
-       status = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                                 sizeof(wifi_direct_client_response_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-       if (status <= 0) {
-               WDC_LOGE("Error!!! reading socket, status = %d", status);
-               __wfd_reset_control();
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-
-       if (rsp.cmd !=req.cmd) {
-               WDC_LOGE("Error!!! Invalid resp cmd = %d", rsp.cmd);
-               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-       }
-
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGD("Error!!! Result received = %d", rsp.result);
-               __WDC_LOG_FUNC_END__;
-               return rsp.result;
-       }
-
-       __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
-}
-
-int wifi_direct_set_p2poem_loglevel(int increase_log_level)
-{
-       __WDC_LOG_FUNC_START__;
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       params = g_variant_new("(ss)", mac_address, ssid);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "RemovePersistentGroup",
+                                         params,
+                                         &error);
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_OEM_LOGLEVEL;
-       req.client_id = g_client_info.client_id;
-       if (increase_log_level == 0)
-               req.data.int1 = false;
-       else
-               req.data.int1 = true;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
+//LCOV_EXCL_STOP
 
 int wifi_direct_start_service_discovery(char *mac_address,
                wifi_direct_service_type_e type)
@@ -3894,13 +3384,14 @@ int wifi_direct_start_service_discovery(char *mac_address,
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_SERVICE_DISCOVERY_FEATURE);
 
-       unsigned char la_mac_addr[MACADDR_LEN] = {0, };
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+//LCOV_EXCL_START
+
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3915,24 +3406,26 @@ int wifi_direct_start_service_discovery(char *mac_address,
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_START_SERVICE_DISCOVERY;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = type;
        if (mac_address)
-               macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, MACADDR_LEN);
+               params = g_variant_new("(is)", type, mac_address);
+       else
+               params = g_variant_new("(is)", type, "00:00:00:00:00:00");
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_SERVICE_INTERFACE,
+                                                   "StartDiscovery",
+                                                   params,
+                                                   &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
+//LCOV_EXCL_STOP
 #else /* TIZEN_FEATURE_SERVICE_DISCOVERY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
@@ -3946,14 +3439,13 @@ int wifi_direct_cancel_service_discovery(char *mac_address,
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_SERVICE_DISCOVERY_FEATURE);
+//LCOV_EXCL_START
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       unsigned char la_mac_addr[MACADDR_LEN] = {0, };
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -3968,24 +3460,26 @@ int wifi_direct_cancel_service_discovery(char *mac_address,
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_CANCEL_SERVICE_DISCOVERY;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = type;
        if (mac_address)
-               macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, MACADDR_LEN);
+               params = g_variant_new("(is)", type, mac_address);
+       else
+               params = g_variant_new("(is)", type, "00:00:00:00:00:00");
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_SERVICE_INTERFACE,
+                                                   "StopDiscovery",
+                                                   params,
+                                                   &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
+//LCOV_EXCL_STOP
 #else /* TIZEN_FEATURE_SERVICE_DISCOVERY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
@@ -3997,22 +3491,22 @@ int wifi_direct_register_service(wifi_direct_service_type_e type, char *info1, c
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_SERVICE_DISCOVERY_FEATURE);
-
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
+//LCOV_EXCL_START
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
        char *buf = NULL;
-       int status = WIFI_DIRECT_ERROR_NONE;
+       int ret = WIFI_DIRECT_ERROR_NONE;
        int len = 0;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       if (!info1) {
-               WDC_LOGE("data is NULL");
+       if (!info1 || !info2) {
+               WDC_LOGE("info1 or info2 is NULL");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
@@ -4023,66 +3517,46 @@ int wifi_direct_register_service(wifi_direct_service_type_e type, char *info1, c
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
-       WDC_LOGD("Service type [%d]", type);
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       if (!service_id) {
+               WDC_LOGE("Invalid Param [service_id]!");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+       }
+
+       WDC_LOGD("Service type [%d]", type);
 
        len = strlen(info1) + strlen(info2) + 2;
        WDC_LOGD("info [%s|%s], len [%d]", info1, info2, len);
-       buf= g_try_malloc0(sizeof(wifi_direct_client_request_s) + len);
+
+       buf = g_try_malloc0(len);
        if (NULL == buf) {
                WDC_LOGE("Failed to allocate memory for buf");
                return WIFI_DIRECT_ERROR_OUT_OF_MEMORY;
        }
 
-       req.cmd = WIFI_DIRECT_CMD_REGISTER_SERVICE;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = type;
-       req.cmd_data_len = len;
-
-       memcpy(buf, &req, sizeof(wifi_direct_client_request_s));
-       g_snprintf(buf + sizeof(wifi_direct_client_request_s), len, "%s|%s", info1, info2);
-
-       pthread_mutex_lock(&g_client_info.mutex);
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, buf,
-                                                                       sizeof(wifi_direct_client_request_s) + len);
-       g_free(buf);
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket, Errno = %s", strerror(errno));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("Success writing data to the socket!");
-
-       status = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                               sizeof(wifi_direct_client_response_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-       if (status <= 0) {
-               WDC_LOGE("Error!!! reading socket, status = %d errno = %s", status, strerror(errno));
-               __wfd_reset_control();
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       g_snprintf(buf, len, "%s|%s", info1, info2);
 
-       if (rsp.cmd != req.cmd) {
-               WDC_LOGE("Error!!! Invalid resp cmd = %d", rsp.cmd);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-       }
+       params = g_variant_new("(is)", type, buf);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_SERVICE_INTERFACE,
+                                                   "Register",
+                                                   params,
+                                                   &error);
 
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! Result received = %d", rsp.result);
-               __WDC_LOG_FUNC_END__;
-               return rsp.result;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE) {
+               g_free(buf);
+               return ret;
        }
 
-       *service_id = rsp.param1;
+       g_variant_get(reply, "(ii)", &ret, service_id);
+       g_variant_unref(reply);
+       g_free(buf);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
+//LCOV_EXCL_STOP
 #else /* TIZEN_FEATURE_SERVICE_DISCOVERY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
@@ -4094,33 +3568,34 @@ int wifi_direct_deregister_service(unsigned int service_id)
        __WDC_LOG_FUNC_START__;
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_SERVICE_DISCOVERY_FEATURE);
+//LCOV_EXCL_START
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = 0;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_DEREGISTER_SERVICE;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = service_id;
+       params = g_variant_new("(i)", service_id);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_SERVICE_INTERFACE,
+                                                   "Deregister",
+                                                   params,
+                                                   &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
+//LCOV_EXCL_STOP
 #else /* TIZEN_FEATURE_SERVICE_DISCOVERY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_SERVICE_DISCOVERY */
@@ -4128,40 +3603,16 @@ int wifi_direct_deregister_service(unsigned int service_id)
 
 int wifi_direct_init_miracast(bool enable)
 {
-#ifdef TIZEN_FEATURE_WIFI_DISPLAY
        __WDC_LOG_FUNC_START__;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
-
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
-
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered.");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
-       }
-
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_INIT_MIRACAST;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = enable;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
+       if (enable)
+               ret = wifi_direct_init_display();
+       else
+               ret = wifi_direct_deinit_display();
 
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
-       return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+       return ret;
 }
 
 int wifi_direct_get_peer_info(char* mac_address, wifi_direct_discovered_peer_info_s** peer_info)
@@ -4170,13 +3621,16 @@ int wifi_direct_get_peer_info(char* mac_address, wifi_direct_discovered_peer_inf
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GVariant *params = NULL;
+       GError *error = NULL;
+       GVariant *reply = NULL;
+       GVariantIter *iter_peer = NULL;
+       GVariant *var = NULL;
+       gchar *key = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered.");
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
@@ -4187,98 +3641,91 @@ int wifi_direct_get_peer_info(char* mac_address, wifi_direct_discovered_peer_inf
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_PEER_INFO;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, req.data.mac_addr);
-
-       pthread_mutex_lock(&g_client_info.mutex);
-       res = __wfd_client_write_socket(g_client_info.sync_sockfd, &req,
-                                                               sizeof(wifi_direct_client_request_s));
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Failed to write into socket [%s]", __wfd_print_error(res));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD("Succeeded to send request [%d: %s]", req.cmd, __wfd_client_print_cmd(req.cmd));
-
-       res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                               sizeof(wifi_direct_client_response_s));
-       if (res <= 0) {
-               WDC_LOGE("Failed to read socket [%d]", res);
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
+       if (!peer_info) {
+               WDC_LOGE("peer_info is NULL");
                __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
+//LCOV_EXCL_START
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_MANAGE_INTERFACE,
+                                                 "GetPeerInfo", params, &error);
 
-       if (rsp.cmd != req.cmd) {
-               WDC_LOGE("Invalid resp [%d]", rsp.cmd);
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Result received [%s]", __wfd_print_error(rsp.result));
-               pthread_mutex_unlock(&g_client_info.mutex);
+       g_variant_get(reply, "(ia{sv})", &ret, &iter_peer);
+       if (ret != WIFI_DIRECT_ERROR_NONE) {
                __WDC_LOG_FUNC_END__;
-               return rsp.result;
-       }
-
-       wfd_discovery_entry_s *buff = NULL;
-
-       buff = (wfd_discovery_entry_s*) g_try_malloc0(sizeof (wfd_discovery_entry_s));
-       if (!buff) {
-               WDC_LOGE("Failed to alloc memory");
-               pthread_mutex_unlock(&g_client_info.mutex);
                return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
 
-       res = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) buff,
-                                                                       sizeof(wfd_discovery_entry_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-       if (res <= 0) {
-               free(buff);
-               WDC_LOGE("Failed to read socket");
-               __wfd_reset_control();
-               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-       }
-       __wfd_client_print_entry_list(buff, 1);
        WDC_LOGD("wifi_direct_get_peer() SUCCESS");
 
        wifi_direct_discovered_peer_info_s *peer = NULL;
 
        peer = (wifi_direct_discovered_peer_info_s *) g_try_malloc0(sizeof(wifi_direct_discovered_peer_info_s));
        if (!peer) {
-                       WDC_LOGE("Failed to alloc memory");
-                       pthread_mutex_unlock(&g_client_info.mutex);
-                       g_free(buff);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
-       peer->device_name = g_strdup(buff->device_name);
-       peer->mac_address = (char*) g_try_malloc0(MACSTR_LEN);
-       g_snprintf(peer->mac_address, MACSTR_LEN, MACSTR, MAC2STR(buff->mac_address));
-       peer->interface_address = (char*) g_try_malloc0(MACSTR_LEN);
-       g_snprintf(peer->interface_address, MACSTR_LEN, MACSTR, MAC2STR(buff->intf_address));
-       peer->channel = buff->channel;
-       peer->is_connected = buff->is_connected;
-       peer->is_group_owner = buff->is_group_owner;
-       peer->is_persistent_group_owner = buff->is_persistent_go;
-       peer->primary_device_type = buff->category;
-       peer->secondary_device_type = buff->subcategory;
-       peer->supported_wps_types= buff->wps_cfg_methods;
+               WDC_LOGE("Failed to allocate memory");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_OPERATION_FAILED;
+       }
+
+       while (g_variant_iter_loop(iter_peer, "{sv}", &key, &var)) {
+               if (!g_strcmp0(key, "DeviceName")) {
+                       const char *device_name = NULL;
+
+                       g_variant_get(var, "&s", &device_name);
+                       peer->device_name = g_strndup(device_name, WIFI_DIRECT_MAX_DEVICE_NAME_LEN+1);
+
+               } else if (!g_strcmp0(key, "DeviceAddress")) {
+                       unsigned char l_mac_address[MACADDR_LEN] = {0, };
+
+                       wifi_direct_dbus_unpack_ay(l_mac_address, var, MACADDR_LEN);
+                       peer->mac_address = (char*) g_try_malloc0(MACSTR_LEN);
+                       if (peer->mac_address)
+                               g_snprintf(peer->mac_address, MACSTR_LEN, MACSTR, MAC2STR(l_mac_address));
+
+               } else if (!g_strcmp0(key, "InterfaceAddress")) {
+                       unsigned char intf_address[MACADDR_LEN] = {0, };
+
+                       wifi_direct_dbus_unpack_ay(intf_address, var, MACADDR_LEN);
+                       peer->interface_address = (char*) g_try_malloc0(MACSTR_LEN);
+                       if (peer->interface_address)
+                               g_snprintf(peer->interface_address, MACSTR_LEN, MACSTR, MAC2STR(intf_address));
+
+               } else if (!g_strcmp0(key, "Channel")) {
+                       peer->channel = g_variant_get_uint16(var);
+
+               } else if (!g_strcmp0(key, "IsGroupOwner")) {
+                       peer->is_group_owner = g_variant_get_boolean(var);
+
+               } else if (!g_strcmp0(key, "IsPersistentGO")) {
+                       peer->is_persistent_group_owner = g_variant_get_boolean(var);
+
+               } else if (!g_strcmp0(key, "IsConnected")) {
+                       peer->is_connected = g_variant_get_boolean(var);
+
+               } else if (!g_strcmp0(key, "Category")) {
+                       peer->primary_device_type = g_variant_get_uint16(var);
+
+               } else if (!g_strcmp0(key, "SubCategory")) {
+                       peer->secondary_device_type = g_variant_get_uint16(var);
+
+               } else if (!g_strcmp0(key, "IsWfdDevice")) {
 #ifdef TIZEN_FEATURE_WIFI_DISPLAY
-       peer->is_miracast_device = buff->is_wfd_device;
+                       peer->is_miracast_device = g_variant_get_boolean(var);
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+               } else {
+                       ;/* Do Nothing */
+               }
+       }
 
-       g_free(buff);
        *peer_info = peer;
 
+       g_variant_unref(reply);
+//LCOV_EXCL_STOP
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 }
@@ -4289,12 +3736,12 @@ int wifi_direct_set_passphrase(const char *passphrase)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int status = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -4307,57 +3754,19 @@ int wifi_direct_set_passphrase(const char *passphrase)
        }
        WDC_LOGD("passphrase = [%s]", passphrase);
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_PASSPHRASE;
-       req.client_id = g_client_info.client_id;
-       req.cmd_data_len = 64;
+       params = g_variant_new("(s)", passphrase);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "SetPassphrase",
+                                         params,
+                                         &error);
 
-       pthread_mutex_lock(&g_client_info.mutex);
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, &req,
-                                                                 sizeof(wifi_direct_client_request_s));
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-       WDC_LOGD( "writing msg hdr is success!\n");
-
-       status = __wfd_client_write_socket(g_client_info.sync_sockfd, (void*) passphrase,
-                                                                                               req.cmd_data_len);
-       if (status != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! writing to socket[%s]", __wfd_print_error(status));
-               __wfd_reset_control();
-               pthread_mutex_unlock(&g_client_info.mutex);
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
 
-       status = __wfd_client_read_socket(g_client_info.sync_sockfd, (char*) &rsp,
-                                                                 sizeof(wifi_direct_client_response_s));
-       pthread_mutex_unlock(&g_client_info.mutex);
-
-       if (status <= 0) {
-               WDC_LOGE("Error!!! reading socket, status = %d", status);
-               __wfd_reset_control();
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       } else {
-               if (rsp.cmd == WIFI_DIRECT_CMD_SET_PASSPHRASE) {
-                       if (rsp.result != WIFI_DIRECT_ERROR_NONE) {
-                               WDC_LOGE("Error!!! Result received = %d", rsp.result);
-                               WDC_LOGE("Error!!! [%s]", __wfd_print_error(rsp.result));
-                               __WDC_LOG_FUNC_END__;
-                               return rsp.result;
-                       }
-               } else {
-                       WDC_LOGE("Error!!! Invalid resp cmd = %d", rsp.cmd);
-                       return WIFI_DIRECT_ERROR_OPERATION_FAILED;
-               }
-       }
+       WDC_LOGD("%s() SUCCESS", __func__);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
@@ -4369,43 +3778,40 @@ int wifi_direct_get_passphrase(char** passphrase)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       char la_passphrase[WIFI_DIRECT_WPA_LEN+1] = {0,};
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       const char *val = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       if(!passphrase){
+       if (!passphrase) {
                WDC_LOGE("NULL Param [passphrase]!");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_PASSPHRASE;
-       req.client_id = g_client_info.client_id;
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE,
+                                         "GetPassphrase",
+                                         NULL,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! Invalid resp = %d", res);
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       WDC_LOGD("wifi_direct_get_wpa_passphrase() SUCCESS");
-       g_strlcpy(la_passphrase, rsp.param2, WIFI_DIRECT_WPA_LEN + 1);
-       *passphrase = g_strdup(la_passphrase);
+       WDC_LOGD("%s() SUCCESS", __func__);
+       g_variant_get(reply, "(i&s)", &ret, &val);
+       *passphrase = g_strdup(val);
+       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_autoconnection_peer(char *mac_address)
@@ -4414,41 +3820,38 @@ int wifi_direct_set_autoconnection_peer(char *mac_address)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
-               WDC_LOGE("Client is NOT registered");
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
        if (!mac_address) {
-               WDC_LOGE("mac_addr is NULL");
+               WDC_LOGE("NULL Param!");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_SET_AUTOCONNECTION_PEER;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, MACADDR_LEN);
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetAutoConnectionPeer",
+                                         params,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_set_autoconnection_peer() SUCCESS");
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 }
 
 int wifi_direct_init_display(void)
@@ -4458,31 +3861,30 @@ int wifi_direct_init_display(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "Init",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_INIT_DISPLAY;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4495,33 +3897,30 @@ int wifi_direct_deinit_display(void)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       wifi_direct_client_info_s *client_info = __wfd_get_control();
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((client_info->is_registered == false) ||
-               (client_info->client_id == WFD_INVALID_ID)) {
-                       WDC_LOGE("Client is NOT registered");
-                       __WDC_LOG_FUNC_END__;
-                       return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "Deinit",
+                                         NULL,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_DEINIT_DISPLAY;
-       req.client_id = g_client_info.client_id;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! Invalid resp = %d", res);
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4534,42 +3933,40 @@ int wifi_direct_set_display(wifi_direct_display_type_e type, int port, int hdcp)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       wifi_direct_client_info_s *client_info = __wfd_get_control();
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((client_info->is_registered == false) ||
-               (client_info->client_id == WFD_INVALID_ID)) {
-                       WDC_LOGE("Client is NOT registered");
-                       __WDC_LOG_FUNC_END__;
-                       return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       if (type < WIFI_DIRECT_DISPLAY_TYPE_SOURCE || type > WIFI_DIRECT_DISPLAY_TYPE_DUAL || port < 0 || hdcp < 0) {
+       if (type < WIFI_DIRECT_DISPLAY_TYPE_SOURCE ||
+                       type > WIFI_DIRECT_DISPLAY_TYPE_DUAL || port < 0 ||
+                       hdcp < 0) {
                WDC_LOGE("Invalid paramaeters passed type[%d], port[%d], hdcp[%d]!");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(iii)", type, port, hdcp);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "SetConfig",
+                                         params,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_SET_DISPLAY;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = type;
-       req.data.int2 = port;
-       req.data.int3 = hdcp;
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! Invalid resp = %d", res);
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4582,43 +3979,39 @@ int wifi_direct_set_display_availability(bool availability)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
        }
 
-       if (availability < 0) {
-               WDC_LOGE("Invalid parameter");
-               __WDC_LOG_FUNC_END__;
-               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
-       }
-
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
 
-       req.cmd = WIFI_DIRECT_CMD_SET_DISPLAY_AVAILABILITY;
-       req.client_id = g_client_info.client_id;
-       req.data.int1 = availability;
+       params = g_variant_new("(i)", availability);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "SetAvailiability",
+                                         params,
+                                         &error);
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               WDC_LOGE("Error!!! Invalid resp = %d", res);
-               __WDC_LOG_FUNC_END__;
-               return res;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               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;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
 }
 
+//LCOV_EXCL_START
 int wifi_direct_get_peer_display_type(char *mac_address, wifi_direct_display_type_e *type)
 {
        __WDC_LOG_FUNC_START__;
@@ -4626,13 +4019,13 @@ int wifi_direct_get_peer_display_type(char *mac_address, wifi_direct_display_typ
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -4644,28 +4037,23 @@ int wifi_direct_get_peer_display_type(char *mac_address, wifi_direct_display_typ
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_PEER_DISPLAY_TYPE;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_peer_display_type() SUCCESS");
-       *type = rsp.param1;
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "GetPeerType",
+                                         params,
+                                         &error);
 
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *type = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4678,13 +4066,13 @@ int wifi_direct_get_peer_display_availability(char *mac_address, bool *availabil
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -4696,28 +4084,23 @@ int wifi_direct_get_peer_display_availability(char *mac_address, bool *availabil
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "GetPeerAvailability",
+                                         params,
+                                         &error);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_PEER_DISPLAY_AVAILABILITY;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_peer_display_availability() SUCCESS");
-       *availability = rsp.param1;
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *availability = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
-
-       __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4730,13 +4113,13 @@ int wifi_direct_get_peer_display_hdcp(char *mac_address, int *hdcp)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -4748,28 +4131,23 @@ int wifi_direct_get_peer_display_hdcp(char *mac_address, int *hdcp)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_PEER_DISPLAY_HDCP;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_peer_display_hdcp() SUCCESS");
-       *hdcp = rsp.param1;
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "GetPeerHdcp",
+                                         params,
+                                         &error);
 
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *hdcp = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4782,13 +4160,13 @@ int wifi_direct_get_peer_display_port(char *mac_address, int *port)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -4800,28 +4178,23 @@ int wifi_direct_get_peer_display_port(char *mac_address, int *port)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
-
-       req.cmd = WIFI_DIRECT_CMD_GET_PEER_DISPLAY_PORT;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
-
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
-               __WDC_LOG_FUNC_END__;
-               return res;
-       }
-       WDC_LOGD("wifi_direct_get_peer_display_port() SUCCESS");
-       *port = rsp.param1;
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "GetPeerPort",
+                                         params,
+                                         &error);
 
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
 
-       __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *port = val;
+       g_variant_unref(reply);
 
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
+       return ret;
 #else /* TIZEN_FEATURE_WIFI_DISPLAY */
        return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
 #endif /* TIZEN_FEATURE_WIFI_DISPLAY */
@@ -4834,13 +4207,13 @@ int wifi_direct_get_peer_display_throughput(char *mac_address, int *throughput)
 
        CHECK_FEATURE_SUPPORTED(WIFIDIRECT_DISPLAY_FEATURE);
 
-       unsigned char la_mac_addr[6];
-       wifi_direct_client_request_s req;
-       wifi_direct_client_response_s rsp;
-       int res = WIFI_DIRECT_ERROR_NONE;
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       if ((g_client_info.is_registered == false) ||
-                       (g_client_info.client_id == WFD_INVALID_ID)) {
+       if (g_client_info.is_registered == false) {
                WDC_LOGE("Client is NOT registered");
                __WDC_LOG_FUNC_END__;
                return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
@@ -4852,29 +4225,145 @@ int wifi_direct_get_peer_display_throughput(char *mac_address, int *throughput)
                return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
        }
 
-       memset(&req, 0, sizeof(wifi_direct_client_request_s));
-       memset(&rsp, 0, sizeof(wifi_direct_client_response_s));
+       params = g_variant_new("(s)", mac_address);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_DISPLAY_INTERFACE,
+                                         "GetPeerThroughput",
+                                         params,
+                                         &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *throughput = val;
+       g_variant_unref(reply);
+
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
+       __WDC_LOG_FUNC_END__;
+       return ret;
+#else /* TIZEN_FEATURE_WIFI_DISPLAY */
+       return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
+#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+}
+
+int wifi_direct_set_session_timer(int seconds)
+{
+       __WDC_LOG_FUNC_START__;
+
+       CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
 
-       req.cmd = WIFI_DIRECT_CMD_GET_PEER_DISPLAY_THROUGHPUT;
-       req.client_id = g_client_info.client_id;
-       macaddr_atoe(mac_address, la_mac_addr);
-       memcpy(req.data.mac_addr, la_mac_addr, 6);
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
 
-       res = __wfd_client_send_request(g_client_info.sync_sockfd, &req, &rsp);
-       if (res != WIFI_DIRECT_ERROR_NONE) {
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered.");
                __WDC_LOG_FUNC_END__;
-               return res;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+       }
+       if (seconds < 0) {
+               WDC_LOGE("Negative Timer Value");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+       }
+
+       WDC_LOGD("seconds = [%d]", seconds);
+
+       params = g_variant_new("(i)", seconds);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetSessionTimer",
+                                         params,
+                                         &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
        }
-       WDC_LOGD("wifi_direct_get_peer_display_throughput() SUCCESS");
-       *throughput = rsp.param1;
 
+       WDC_LOGD("%s() SUCCESS", __func__);
 
        __WDC_LOG_FUNC_END__;
        return WIFI_DIRECT_ERROR_NONE;
 
+}
+
+int wifi_direct_get_session_timer(int *seconds)
+{
+       __WDC_LOG_FUNC_START__;
+
+       CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
+
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       int val = 0;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+       }
+
+       if (!seconds) {
+               WDC_LOGE("Invalid Parameter");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_INVALID_PARAMETER;
+       }
+
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "GetSessionTimer",
+                                         NULL,
+                                         &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret != WIFI_DIRECT_ERROR_NONE)
+               return ret;
+
+       g_variant_get(reply, "(ii)", &ret, &val);
+       *seconds = val;
+       g_variant_unref(reply);
+
+       WDC_LOGD("Session Timer = [%d] Seconds", *seconds);
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
+
        __WDC_LOG_FUNC_END__;
-       return WIFI_DIRECT_ERROR_NONE;
-#else /* TIZEN_FEATURE_WIFI_DISPLAY */
-       return WIFI_DIRECT_ERROR_NOT_SUPPORTED;
-#endif /* TIZEN_FEATURE_WIFI_DISPLAY */
+       return ret;
+}
+
+int wifi_direct_set_auto_group_removal(bool enable)
+{
+       __WDC_LOG_FUNC_START__;
+
+       CHECK_FEATURE_SUPPORTED(WIFIDIRECT_FEATURE);
+
+       GError* error = NULL;
+       GVariant *reply = NULL;
+       GVariant *params = NULL;
+       int ret = WIFI_DIRECT_ERROR_NONE;
+
+       if (g_client_info.is_registered == false) {
+               WDC_LOGE("Client is NOT registered");
+               __WDC_LOG_FUNC_END__;
+               return WIFI_DIRECT_ERROR_NOT_INITIALIZED;
+       }
+
+       params = g_variant_new("(b)", enable);
+       reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_CONFIG_INTERFACE,
+                                         "SetAutoGroupRemoval",
+                                         params,
+                                         &error);
+
+       ret = __net_wifidirect_gerror_to_enum(error);
+       if (ret == WIFI_DIRECT_ERROR_NONE) {
+               g_variant_get(reply, "(i)", &ret);
+               g_variant_unref(reply);
+       }
+
+       WDC_LOGD("%s() return : [%d]", __func__, ret);
+       __WDC_LOG_FUNC_END__;
+       return ret;
 }
+//LCOV_EXCL_STOP