dbus_old.h
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant / dbus-based control interface
00003  * Copyright (c) 2006, Dan Williams <dcbw@redhat.com> and Red Hat, Inc.
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef CTRL_IFACE_DBUS_H
00016 #define CTRL_IFACE_DBUS_H
00017 
00018 struct wps_credential;
00019 
00020 #ifdef CONFIG_CTRL_IFACE_DBUS
00021 
00022 #define WPAS_DBUS_OBJECT_PATH_MAX 150
00023 
00024 #define WPAS_DBUS_SERVICE       "fi.epitest.hostap.WPASupplicant"
00025 #define WPAS_DBUS_PATH          "/fi/epitest/hostap/WPASupplicant"
00026 #define WPAS_DBUS_INTERFACE     "fi.epitest.hostap.WPASupplicant"
00027 
00028 #define WPAS_DBUS_PATH_INTERFACES       WPAS_DBUS_PATH "/Interfaces"
00029 #define WPAS_DBUS_IFACE_INTERFACE       WPAS_DBUS_INTERFACE ".Interface"
00030 
00031 #define WPAS_DBUS_NETWORKS_PART "Networks"
00032 #define WPAS_DBUS_IFACE_NETWORK WPAS_DBUS_INTERFACE ".Network"
00033 
00034 #define WPAS_DBUS_BSSIDS_PART   "BSSIDs"
00035 #define WPAS_DBUS_IFACE_BSSID   WPAS_DBUS_INTERFACE ".BSSID"
00036 
00037 
00038 /* Errors */
00039 #define WPAS_ERROR_INVALID_NETWORK \
00040         WPAS_DBUS_IFACE_INTERFACE ".InvalidNetwork"
00041 #define WPAS_ERROR_INVALID_BSSID \
00042         WPAS_DBUS_IFACE_INTERFACE ".InvalidBSSID"
00043 
00044 #define WPAS_ERROR_INVALID_OPTS \
00045         WPAS_DBUS_INTERFACE ".InvalidOptions"
00046 #define WPAS_ERROR_INVALID_IFACE \
00047         WPAS_DBUS_INTERFACE ".InvalidInterface"
00048 
00049 #define WPAS_ERROR_ADD_ERROR \
00050         WPAS_DBUS_INTERFACE ".AddError"
00051 #define WPAS_ERROR_EXISTS_ERROR \
00052         WPAS_DBUS_INTERFACE ".ExistsError"
00053 #define WPAS_ERROR_REMOVE_ERROR \
00054         WPAS_DBUS_INTERFACE ".RemoveError"
00055 
00056 #define WPAS_ERROR_SCAN_ERROR \
00057         WPAS_DBUS_IFACE_INTERFACE ".ScanError"
00058 #define WPAS_ERROR_ADD_NETWORK_ERROR \
00059         WPAS_DBUS_IFACE_INTERFACE ".AddNetworkError"
00060 #define WPAS_ERROR_INTERNAL_ERROR \
00061         WPAS_DBUS_IFACE_INTERFACE ".InternalError"
00062 #define WPAS_ERROR_REMOVE_NETWORK_ERROR \
00063         WPAS_DBUS_IFACE_INTERFACE ".RemoveNetworkError"
00064 
00065 #define WPAS_ERROR_WPS_PBC_ERROR \
00066         WPAS_DBUS_IFACE_INTERFACE ".WpsPbcError"
00067 #define WPAS_ERROR_WPS_PIN_ERROR \
00068         WPAS_DBUS_IFACE_INTERFACE ".WpsPinError"
00069 #define WPAS_ERROR_WPS_REG_ERROR \
00070         WPAS_DBUS_IFACE_INTERFACE ".WpsRegError"
00071 
00072 #define WPAS_DBUS_BSSID_FORMAT "%02x%02x%02x%02x%02x%02x"
00073 
00074 struct wpa_global;
00075 struct wpa_supplicant;
00076 
00077 int wpa_supplicant_dbus_ctrl_iface_init(struct wpas_dbus_priv *iface);
00078 void wpa_supplicant_dbus_notify_scan_results(struct wpa_supplicant *wpa_s);
00079 void wpa_supplicant_dbus_notify_scanning(struct wpa_supplicant *wpa_s);
00080 void wpa_supplicant_dbus_notify_state_change(struct wpa_supplicant *wpa_s,
00081                                              enum wpa_states new_state,
00082                                              enum wpa_states old_state);
00083 void wpa_supplicant_dbus_notify_wps_cred(struct wpa_supplicant *wpa_s,
00084                                          const struct wps_credential *cred);
00085 
00086 char * wpas_dbus_decompose_object_path(const char *path, char **network,
00087                                        char **bssid);
00088 
00089 int wpas_dbus_register_iface(struct wpa_supplicant *wpa_s);
00090 int wpas_dbus_unregister_iface(struct wpa_supplicant *wpa_s);
00091 
00092 
00093 /* Methods internal to the dbus control interface */
00094 struct wpa_supplicant * wpa_supplicant_get_iface_by_dbus_path(
00095         struct wpa_global *global, const char *path);
00096 
00097 #else /* CONFIG_CTRL_IFACE_DBUS */
00098 
00099 static inline void
00100 wpa_supplicant_dbus_notify_scan_results(struct wpa_supplicant *wpa_s)
00101 {
00102 }
00103 
00104 static inline void
00105 wpa_supplicant_dbus_notify_scanning(struct wpa_supplicant *wpa_s)
00106 {
00107 }
00108 
00109 #define wpa_supplicant_dbus_notify_state_change(w,n,o) do { } while (0)
00110 
00111 static inline void
00112 wpa_supplicant_dbus_notify_wps_cred(struct wpa_supplicant *wpa_s,
00113                                     const struct wps_credential *cred)
00114 {
00115 }
00116 
00117 static inline int
00118 wpas_dbus_register_iface(struct wpa_supplicant *wpa_s)
00119 {
00120         return 0;
00121 }
00122 
00123 static inline int
00124 wpas_dbus_unregister_iface(struct wpa_supplicant *wpa_s)
00125 {
00126         return 0;
00127 }
00128 
00129 #endif /* CONFIG_CTRL_IFACE_DBUS */
00130 
00131 #endif /* CTRL_IFACE_DBUS_H */


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:19