1 /* 2 * WPA Supplicant / dbus-based control interface 3 * Copyright (c) 2006, Dan Williams <dcbw@redhat.com> and Red Hat, Inc. 4 * Copyright (c) 2009-2010, Witold Sowa <witold.sowa@gmail.com> 5 * 6 * This software may be distributed under the terms of the BSD license. 7 * See README for more details. 8 */ 9 10 #ifndef CTRL_IFACE_DBUS_NEW_HANDLERS_H 11 #define CTRL_IFACE_DBUS_NEW_HANDLERS_H 12 13 struct network_handler_args { 14 struct wpa_supplicant *wpa_s; 15 struct wpa_ssid *ssid; 16 }; 17 18 struct bss_handler_args { 19 struct wpa_supplicant *wpa_s; 20 unsigned int id; 21 }; 22 23 dbus_bool_t wpas_dbus_simple_property_getter(DBusMessageIter *iter, 24 const int type, 25 const void *val, 26 DBusError *error); 27 28 dbus_bool_t wpas_dbus_simple_property_setter(DBusMessageIter *iter, 29 DBusError *error, 30 const int type, void *val); 31 32 dbus_bool_t wpas_dbus_simple_array_property_getter(DBusMessageIter *iter, 33 const int type, 34 const void *array, 35 size_t array_len, 36 DBusError *error); 37 38 dbus_bool_t wpas_dbus_simple_array_array_property_getter(DBusMessageIter *iter, 39 const int type, 40 struct wpabuf **array, 41 size_t array_len, 42 DBusError *error); 43 44 DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message, 45 struct wpa_global *global); 46 47 DBusMessage * wpas_dbus_handler_remove_interface(DBusMessage *message, 48 struct wpa_global *global); 49 50 DBusMessage * wpas_dbus_handler_get_interface(DBusMessage *message, 51 struct wpa_global *global); 52 53 dbus_bool_t wpas_dbus_getter_debug_level(DBusMessageIter *iter, 54 DBusError *error, 55 void *user_data); 56 57 dbus_bool_t wpas_dbus_getter_debug_timestamp(DBusMessageIter *iter, 58 DBusError *error, 59 void *user_data); 60 61 dbus_bool_t wpas_dbus_getter_debug_show_keys(DBusMessageIter *iter, 62 DBusError *error, 63 void *user_data); 64 65 dbus_bool_t wpas_dbus_setter_debug_level(DBusMessageIter *iter, 66 DBusError *error, void *user_data); 67 68 dbus_bool_t wpas_dbus_setter_debug_timestamp(DBusMessageIter *iter, 69 DBusError *error, 70 void *user_data); 71 72 dbus_bool_t wpas_dbus_setter_debug_show_keys(DBusMessageIter *iter, 73 DBusError *error, 74 void *user_data); 75 76 dbus_bool_t wpas_dbus_getter_interfaces(DBusMessageIter *iter, 77 DBusError *error, 78 void *user_data); 79 80 dbus_bool_t wpas_dbus_getter_eap_methods(DBusMessageIter *iter, 81 DBusError *error, void *user_data); 82 83 DBusMessage * wpas_dbus_handler_scan(DBusMessage *message, 84 struct wpa_supplicant *wpa_s); 85 86 DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message, 87 struct wpa_supplicant *wpa_s); 88 89 dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s, 90 struct wpa_ssid *ssid, 91 DBusMessageIter *iter, 92 DBusError *error); 93 94 DBusMessage * wpas_dbus_handler_add_network(DBusMessage *message, 95 struct wpa_supplicant *wpa_s); 96 97 DBusMessage * wpas_dbus_handler_reassociate(DBusMessage *message, 98 struct wpa_supplicant *wpa_s); 99 100 DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message, 101 struct wpa_supplicant *wpa_s); 102 103 DBusMessage * wpas_dbus_handler_remove_all_networks( 104 DBusMessage *message, struct wpa_supplicant *wpa_s); 105 106 DBusMessage * wpas_dbus_handler_select_network(DBusMessage *message, 107 struct wpa_supplicant *wpa_s); 108 109 DBusMessage * wpas_dbus_handler_network_reply(DBusMessage *message, 110 struct wpa_supplicant *wpa_s); 111 112 DBusMessage * wpas_dbus_handler_add_blob(DBusMessage *message, 113 struct wpa_supplicant *wpa_s); 114 115 DBusMessage * wpas_dbus_handler_get_blob(DBusMessage *message, 116 struct wpa_supplicant *wpa_s); 117 118 DBusMessage * wpas_dbus_handler_remove_blob(DBusMessage *message, 119 struct wpa_supplicant *wpa_s); 120 121 DBusMessage * wpas_dbus_handler_flush_bss(DBusMessage *message, 122 struct wpa_supplicant *wpa_s); 123 124 DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message, 125 struct wpa_supplicant *wpa_s); 126 127 dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter, 128 DBusError *error, void *user_data); 129 130 dbus_bool_t wpas_dbus_getter_state(DBusMessageIter *iter, DBusError *error, 131 void *user_data); 132 133 dbus_bool_t wpas_dbus_getter_scanning(DBusMessageIter *iter, DBusError *error, 134 void *user_data); 135 136 dbus_bool_t wpas_dbus_getter_ap_scan(DBusMessageIter *iter, DBusError *error, 137 void *user_data); 138 139 dbus_bool_t wpas_dbus_setter_ap_scan(DBusMessageIter *iter, DBusError *error, 140 void *user_data); 141 142 dbus_bool_t wpas_dbus_getter_fast_reauth(DBusMessageIter *iter, 143 DBusError *error, 144 void *user_data); 145 146 dbus_bool_t wpas_dbus_setter_fast_reauth(DBusMessageIter *iter, 147 DBusError *error, 148 void *user_data); 149 150 dbus_bool_t wpas_dbus_getter_disconnect_reason(DBusMessageIter *iter, 151 DBusError *error, 152 void *user_data); 153 154 dbus_bool_t wpas_dbus_getter_bss_expire_age(DBusMessageIter *iter, 155 DBusError *error, void *user_data); 156 157 dbus_bool_t wpas_dbus_setter_bss_expire_age(DBusMessageIter *iter, 158 DBusError *error, 159 void *user_data); 160 161 dbus_bool_t wpas_dbus_getter_bss_expire_count(DBusMessageIter *iter, 162 DBusError *error, 163 void *user_data); 164 165 dbus_bool_t wpas_dbus_setter_bss_expire_count(DBusMessageIter *iter, 166 DBusError *error, 167 void *user_data); 168 169 dbus_bool_t wpas_dbus_getter_country(DBusMessageIter *iter, DBusError *error, 170 void *user_data); 171 172 dbus_bool_t wpas_dbus_setter_country(DBusMessageIter *iter, DBusError *error, 173 void *user_data); 174 175 dbus_bool_t wpas_dbus_getter_scan_interval(DBusMessageIter *iter, 176 DBusError *error, 177 void *user_data); 178 179 dbus_bool_t wpas_dbus_setter_scan_interval(DBusMessageIter *iter, 180 DBusError *error, 181 void *user_data); 182 183 dbus_bool_t wpas_dbus_getter_ifname(DBusMessageIter *iter, DBusError *error, 184 void *user_data); 185 186 dbus_bool_t wpas_dbus_getter_driver(DBusMessageIter *iter, DBusError *error, 187 void *user_data); 188 189 dbus_bool_t wpas_dbus_getter_bridge_ifname(DBusMessageIter *iter, 190 DBusError *error, 191 void *user_data); 192 193 dbus_bool_t wpas_dbus_getter_current_bss(DBusMessageIter *iter, 194 DBusError *error, 195 void *user_data); 196 197 dbus_bool_t wpas_dbus_getter_current_network(DBusMessageIter *iter, 198 DBusError *error, 199 void *user_data); 200 201 dbus_bool_t wpas_dbus_getter_current_auth_mode(DBusMessageIter *iter, 202 DBusError *error, 203 void *user_data); 204 205 dbus_bool_t wpas_dbus_getter_bsss(DBusMessageIter *iter, DBusError *error, 206 void *user_data); 207 208 dbus_bool_t wpas_dbus_getter_networks(DBusMessageIter *iter, DBusError *error, 209 void *user_data); 210 211 dbus_bool_t wpas_dbus_getter_blobs(DBusMessageIter *iter, DBusError *error, 212 void *user_data); 213 214 dbus_bool_t wpas_dbus_getter_bss_bssid(DBusMessageIter *iter, DBusError *error, 215 void *user_data); 216 217 dbus_bool_t wpas_dbus_getter_bss_ssid(DBusMessageIter *iter, DBusError *error, 218 void *user_data); 219 220 dbus_bool_t wpas_dbus_getter_bss_privacy(DBusMessageIter *iter, 221 DBusError *error, void *user_data); 222 223 dbus_bool_t wpas_dbus_getter_bss_mode(DBusMessageIter *iter, DBusError *error, 224 void *user_data); 225 226 dbus_bool_t wpas_dbus_getter_bss_signal(DBusMessageIter *iter, 227 DBusError *error, void *user_data); 228 229 dbus_bool_t wpas_dbus_getter_bss_frequency(DBusMessageIter *iter, 230 DBusError *error, void *user_data); 231 232 dbus_bool_t wpas_dbus_getter_bss_rates(DBusMessageIter *iter, 233 DBusError *error, void *user_data); 234 235 dbus_bool_t wpas_dbus_getter_bss_wpa(DBusMessageIter *iter, DBusError *error, 236 void *user_data); 237 238 dbus_bool_t wpas_dbus_getter_bss_rsn(DBusMessageIter *iter, DBusError *error, 239 void *user_data); 240 241 dbus_bool_t wpas_dbus_getter_bss_ies(DBusMessageIter *iter, DBusError *error, 242 void *user_data); 243 244 dbus_bool_t wpas_dbus_getter_enabled(DBusMessageIter *iter, DBusError *error, 245 void *user_data); 246 247 dbus_bool_t wpas_dbus_setter_enabled(DBusMessageIter *iter, DBusError *error, 248 void *user_data); 249 250 dbus_bool_t wpas_dbus_getter_network_properties(DBusMessageIter *iter, 251 DBusError *error, 252 void *user_data); 253 254 dbus_bool_t wpas_dbus_setter_network_properties(DBusMessageIter *iter, 255 DBusError *error, 256 void *user_data); 257 258 DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message, 259 struct wpa_supplicant *wpa_s); 260 261 dbus_bool_t wpas_dbus_getter_process_credentials(DBusMessageIter *iter, 262 DBusError *error, void *user_data); 263 264 dbus_bool_t wpas_dbus_setter_process_credentials(DBusMessageIter *iter, 265 DBusError *error, 266 void *user_data); 267 268 DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message, 269 const char *arg); 270 DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message, 271 const char *arg); 272 273 DBusMessage * wpas_dbus_handler_subscribe_preq( 274 DBusMessage *message, struct wpa_supplicant *wpa_s); 275 DBusMessage * wpas_dbus_handler_unsubscribe_preq( 276 DBusMessage *message, struct wpa_supplicant *wpa_s); 277 278 #endif /* CTRL_IFACE_DBUS_HANDLERS_NEW_H */ 279