Add logic for Device Provisioning Protocol(DPP)
[platform/core/connectivity/net-config.git] / src / dbus / netsupplicant.c
index f31e19e..e422128 100755 (executable)
@@ -45,6 +45,27 @@ char *netconfig_wifi_get_supplicant_interface(void)
        return (char *)path;
 }
 
+char *netconfig_wifi_get_supplicant_p2p_interface(void)
+{
+       GVariant *message = NULL;
+       gchar *path = NULL;
+
+       message = netconfig_supplicant_invoke_dbus_method(
+                       SUPPLICANT_SERVICE, SUPPLICANT_PATH,
+                       SUPPLICANT_INTERFACE, "GetP2PInterface", NULL);
+
+       if (message == NULL) {
+               ERR("Failed to get object path");
+               return NULL;
+       }
+
+       g_variant_get(message, "(o)", &path);
+
+       g_variant_unref(message);
+
+       return (char *)path;
+}
+
 GVariant *netconfig_supplicant_invoke_dbus_method(const char *dest, const char *path,
                const char *interface_name, const char *method, GVariant *params)
 {