gsupplicant: WPS event signal support
[platform/upstream/connman.git] / gsupplicant / gsupplicant.h
index 481d0a3..05f5c35 100644 (file)
@@ -97,23 +97,36 @@ typedef enum {
        G_SUPPLICANT_STATE_COMPLETED,
 } GSupplicantState;
 
+typedef enum {
+       G_SUPPLICANT_WPS_STATE_UNKNOWN,
+       G_SUPPLICANT_WPS_STATE_SUCCESS,
+       G_SUPPLICANT_WPS_STATE_FAIL,
+} GSupplicantWpsState;
+
 struct _GSupplicantSSID {
        const void *ssid;
        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 +157,14 @@ 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);
+GSupplicantWpsState g_supplicant_interface_get_wps_state(GSupplicantInterface *interface);
 
 /* Network API */
 struct _GSupplicantNetwork;
@@ -163,6 +180,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 +192,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;