Removed WFD_DBUS_LAUNCH because now wifi-direct library takes care of wfd-manager...
[apps/native/ug-wifi-direct.git] / ug-wifidirect / src / wfd_client.c
index 4676e01..ce64950 100644 (file)
@@ -1387,81 +1387,6 @@ int init_wfd_client(void* data)
        return 0;
 }
 
-#ifdef WFD_DBUS_LAUNCH
-void wfd_gdbus_callback(GObject *source_object, GAsyncResult *result, gpointer user_data)
-{
-       __FUNC_ENTER__;
-       struct ug_data *ugd = (struct ug_data *)user_data;
-       WFD_RET_IF(ugd == NULL, "Incorrect parameter(NULL)\n");
-       int res = -1;
-
-       GError *error = NULL;
-       GVariant *return_data;
-
-       g_object_unref(ugd->dbus_cancellable);
-       ugd->dbus_cancellable = NULL;
-       ugd->conn = G_DBUS_CONNECTION(source_object);
-       return_data = g_dbus_connection_call_finish(ugd->conn, result, &error);
-
-       if (error != NULL) {
-               DBG(LOG_ERROR, "DBus action failed. Error Msg [%s]\n", error->message);
-               g_clear_error(&error);
-       } else {
-               DBG(LOG_INFO, "error msg is NULL\n");
-       }
-
-       if (return_data)
-               g_variant_unref(return_data);
-
-       if (ugd->conn) {
-               g_object_unref(ugd->conn);
-               ugd->conn = NULL;
-       }
-
-       res = init_wfd_client(ugd);
-       WFD_RET_IF(res != 0, "Failed to initialize WFD client library\n");
-
-       /* Activate WiFi Direct */
-       DBG(LOG_INFO, "Activating WiFi Direct...");
-       if (ugd->wfd_status <= WIFI_DIRECT_STATE_DEACTIVATING) {
-               res = wfd_client_switch_on(ugd);
-               WFD_RET_IF(res != 0, "Failed to activate WFD\n");
-       }
-
-       __FUNC_EXIT__;
-}
-
-int launch_wifi_direct_manager(void *data)
-{
-       __FUNC_ENTER__;
-
-       gchar *addr = NULL;
-       GError *error = NULL;
-
-       struct ug_data *ugd = (struct ug_data *)data;
-       WFD_RETV_IF(ugd == NULL, -1, "Incorrect parameter(NULL)\n");
-
-       ugd->dbus_cancellable = g_cancellable_new();
-
-       addr  = g_dbus_address_get_for_bus_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
-       WFD_RETV_IF(addr == NULL, -1, "Fail to get dbus addr.\n");
-
-       ugd->conn = g_dbus_connection_new_for_address_sync(addr, G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT |
-                       G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION, NULL, NULL, NULL);
-
-       if (ugd->conn == NULL) {
-               DBG(LOG_ERROR, "g_dbus_conn is NULL\n");
-               return -1;
-       } else {
-               g_dbus_connection_call(ugd->conn, "net.netconfig", "/net/netconfig/wifi", "net.netconfig.wifi",
-               "LaunchDirect", NULL, NULL, G_DBUS_CALL_FLAGS_NONE, -1, ugd->dbus_cancellable, wfd_gdbus_callback, data);
-       }
-
-       __FUNC_EXIT__;
-       return 0;
-}
-#endif
-
 void wfd_client_destroy_tethering(struct ug_data *ugd)
 {
        __FUNC_ENTER__;