gsupplicant: WPS credentials signal support
[platform/upstream/connman.git] / gsupplicant / gsupplicant.h
index 481d0a3..4f507e3 100644 (file)
@@ -102,18 +102,25 @@ struct _GSupplicantSSID {
        unsigned int ssid_len;
        GSupplicantMode mode;
        GSupplicantSecurity security;
-       unsigned int eap_method;
-       char *passphrase;
-       char *identity;
-       char *ca_cert_path;
-       char *client_cert_path;
-       char *private_key_path;
-       char *private_key_passphrase;
-       char *phase2_auth;
+       const char *eap;
+       const char *passphrase;
+       const char *identity;
+       const char *ca_cert_path;
+       const char *client_cert_path;
+       const char *private_key_path;
+       const char *private_key_passphrase;
+       const char *phase2_auth;
 };
 
 typedef struct _GSupplicantSSID GSupplicantSSID;
 
+/* global API */
+typedef void (*GSupplicantCountryCallback) (void *user_data);
+
+int g_supplicant_set_country(const char *alpha2,
+                               GSupplicantCountryCallback callback,
+                                               const void *user_data);
+
 /* Interface API */
 struct _GSupplicantInterface;
 
@@ -144,10 +151,13 @@ int g_supplicant_interface_disconnect(GSupplicantInterface *interface,
 
 void g_supplicant_interface_set_data(GSupplicantInterface *interface,
                                                                void *data);
-const void *g_supplicant_interface_get_data(GSupplicantInterface *interface);
+void *g_supplicant_interface_get_data(GSupplicantInterface *interface);
 const char *g_supplicant_interface_get_ifname(GSupplicantInterface *interface);
 const char *g_supplicant_interface_get_driver(GSupplicantInterface *interface);
 GSupplicantState g_supplicant_interface_get_state(GSupplicantInterface *interface);
+const char *g_supplicant_interface_get_wps_key(GSupplicantInterface *interface);
+const void *g_supplicant_interface_get_wps_ssid(GSupplicantInterface *interface,
+                                                       unsigned int *ssid_len);
 
 /* Network API */
 struct _GSupplicantNetwork;
@@ -163,6 +173,7 @@ const void *g_supplicant_network_get_ssid(GSupplicantNetwork *network,
 const char *g_supplicant_network_get_mode(GSupplicantNetwork *network);
 const char *g_supplicant_network_get_security(GSupplicantNetwork *network);
 dbus_int16_t g_supplicant_network_get_signal(GSupplicantNetwork *network);
+dbus_bool_t g_supplicant_network_get_wps(GSupplicantNetwork *network);
 
 struct _GSupplicantCallbacks {
        void (*system_ready) (void);
@@ -174,6 +185,7 @@ struct _GSupplicantCallbacks {
        void (*scan_finished) (GSupplicantInterface *interface);
        void (*network_added) (GSupplicantNetwork *network);
        void (*network_removed) (GSupplicantNetwork *network);
+       void (*debug) (const char *str);
 };
 
 typedef struct _GSupplicantCallbacks GSupplicantCallbacks;