0314d571ed418da15ac84a36e4479cf0c926e58c
[libicd-wpa] / supp.h
1 #ifndef _SUPP_H_
2 #define _SUPP_H_
3
4 int supp_enable();
5 void supp_disable();
6
7 #define WPAS_DBUS_OBJECT_PATH_MAX 150
8
9 #define WPAS_DBUS_SERVICE       "fi.epitest.hostap.WPASupplicant"
10 #define WPAS_DBUS_PATH          "/fi/epitest/hostap/WPASupplicant"
11 #define WPAS_DBUS_INTERFACE     "fi.epitest.hostap.WPASupplicant"
12
13 #define WPAS_STATE_CHANGE_SIG   "StateChange"
14
15 #define WPAS_DBUS_PATH_INTERFACES       WPAS_DBUS_PATH "/Interfaces"
16 #define WPAS_DBUS_IFACE_INTERFACE       WPAS_DBUS_INTERFACE ".Interface"
17
18 #define WPAS_DBUS_NETWORKS_PART "Networks"
19 #define WPAS_DBUS_IFACE_NETWORK WPAS_DBUS_INTERFACE ".Network"
20
21 #define WPAS_DBUS_BSSIDS_PART   "BSSIDs"
22 #define WPAS_DBUS_IFACE_BSSID   WPAS_DBUS_INTERFACE ".BSSID"
23
24 #define WPAS_SET_NETWORK_METHOD         "set"
25 #define WPAS_ENABLE_NETWORK_METHOD      "enable"
26
27 enum supp_status {
28         SUPP_STATUS_KILLED = -2,
29         SUPP_STATUS_ERROR = -1,
30         SUPP_STATUS_DISCONNECTED = 0,
31         SUPP_STATUS_CONNECTED
32 };
33
34 typedef void (*supp_cb_fn)(enum supp_status status, const char * data,
35         gpointer user_data);
36
37 void supp_set_callback(supp_cb_fn cb, gpointer user_data);
38 void supp_set_interface(const char * iface);
39 void supp_set_network_id(const char * network_id);
40
41 void supp_unset_interface(void);
42 void supp_unset_network_id(void);
43
44 int supp_is_active(void);
45
46 void supp_handle_signal(gchar* old_state, gchar* new_state);
47 void supp_handle_killed(void);
48
49 #endif