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 dbus_bool_t wpas_dbus_getter_global_capabilities(DBusMessageIter *iter, 84 DBusError *error, 85 void *user_data); 86 87 DBusMessage * wpas_dbus_handler_scan(DBusMessage *message, 88 struct wpa_supplicant *wpa_s); 89 90 DBusMessage * wpas_dbus_handler_signal_poll(DBusMessage *message, 91 struct wpa_supplicant *wpa_s); 92 93 DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message, 94 struct wpa_supplicant *wpa_s); 95 96 dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s, 97 struct wpa_ssid *ssid, 98 DBusMessageIter *iter, 99 DBusError *error); 100 101 DBusMessage * wpas_dbus_handler_add_network(DBusMessage *message, 102 struct wpa_supplicant *wpa_s); 103 104 DBusMessage * wpas_dbus_handler_reassociate(DBusMessage *message, 105 struct wpa_supplicant *wpa_s); 106 107 DBusMessage * wpas_dbus_handler_reattach(DBusMessage *message, 108 struct wpa_supplicant *wpa_s); 109 110 DBusMessage * wpas_dbus_handler_reconnect(DBusMessage *message, 111 struct wpa_supplicant *wpa_s); 112 113 DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message, 114 struct wpa_supplicant *wpa_s); 115 116 DBusMessage * wpas_dbus_handler_remove_all_networks( 117 DBusMessage *message, struct wpa_supplicant *wpa_s); 118 119 DBusMessage * wpas_dbus_handler_select_network(DBusMessage *message, 120 struct wpa_supplicant *wpa_s); 121 122 DBusMessage * wpas_dbus_handler_network_reply(DBusMessage *message, 123 struct wpa_supplicant *wpa_s); 124 125 DBusMessage * wpas_dbus_handler_add_blob(DBusMessage *message, 126 struct wpa_supplicant *wpa_s); 127 128 DBusMessage * wpas_dbus_handler_get_blob(DBusMessage *message, 129 struct wpa_supplicant *wpa_s); 130 131 DBusMessage * wpas_dbus_handler_remove_blob(DBusMessage *message, 132 struct wpa_supplicant *wpa_s); 133 134 DBusMessage * wpas_dbus_handler_set_pkcs11_engine_and_module_path( 135 DBusMessage *message, struct wpa_supplicant *wpa_s); 136 137 DBusMessage * wpas_dbus_handler_flush_bss(DBusMessage *message, 138 struct wpa_supplicant *wpa_s); 139 140 DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message, 141 struct wpa_supplicant *wpa_s); 142 143 DBusMessage * wpas_dbus_handler_eap_logoff(DBusMessage *message, 144 struct wpa_supplicant *wpa_s); 145 146 DBusMessage * wpas_dbus_handler_eap_logon(DBusMessage *message, 147 struct wpa_supplicant *wpa_s); 148 149 dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter, 150 DBusError *error, void *user_data); 151 152 dbus_bool_t wpas_dbus_getter_state(DBusMessageIter *iter, DBusError *error, 153 void *user_data); 154 155 dbus_bool_t wpas_dbus_getter_scanning(DBusMessageIter *iter, DBusError *error, 156 void *user_data); 157 158 dbus_bool_t wpas_dbus_getter_ap_scan(DBusMessageIter *iter, DBusError *error, 159 void *user_data); 160 161 dbus_bool_t wpas_dbus_setter_ap_scan(DBusMessageIter *iter, DBusError *error, 162 void *user_data); 163 164 dbus_bool_t wpas_dbus_getter_fast_reauth(DBusMessageIter *iter, 165 DBusError *error, 166 void *user_data); 167 168 dbus_bool_t wpas_dbus_setter_fast_reauth(DBusMessageIter *iter, 169 DBusError *error, 170 void *user_data); 171 172 dbus_bool_t wpas_dbus_getter_disconnect_reason(DBusMessageIter *iter, 173 DBusError *error, 174 void *user_data); 175 176 dbus_bool_t wpas_dbus_getter_bss_expire_age(DBusMessageIter *iter, 177 DBusError *error, void *user_data); 178 179 dbus_bool_t wpas_dbus_setter_bss_expire_age(DBusMessageIter *iter, 180 DBusError *error, 181 void *user_data); 182 183 dbus_bool_t wpas_dbus_getter_bss_expire_count(DBusMessageIter *iter, 184 DBusError *error, 185 void *user_data); 186 187 dbus_bool_t wpas_dbus_setter_bss_expire_count(DBusMessageIter *iter, 188 DBusError *error, 189 void *user_data); 190 191 dbus_bool_t wpas_dbus_getter_country(DBusMessageIter *iter, DBusError *error, 192 void *user_data); 193 194 dbus_bool_t wpas_dbus_setter_country(DBusMessageIter *iter, DBusError *error, 195 void *user_data); 196 197 dbus_bool_t wpas_dbus_getter_scan_interval(DBusMessageIter *iter, 198 DBusError *error, 199 void *user_data); 200 201 dbus_bool_t wpas_dbus_setter_scan_interval(DBusMessageIter *iter, 202 DBusError *error, 203 void *user_data); 204 205 dbus_bool_t wpas_dbus_getter_ifname(DBusMessageIter *iter, DBusError *error, 206 void *user_data); 207 208 dbus_bool_t wpas_dbus_getter_driver(DBusMessageIter *iter, DBusError *error, 209 void *user_data); 210 211 dbus_bool_t wpas_dbus_getter_bridge_ifname(DBusMessageIter *iter, 212 DBusError *error, 213 void *user_data); 214 215 dbus_bool_t wpas_dbus_getter_current_bss(DBusMessageIter *iter, 216 DBusError *error, 217 void *user_data); 218 219 dbus_bool_t wpas_dbus_getter_current_network(DBusMessageIter *iter, 220 DBusError *error, 221 void *user_data); 222 223 dbus_bool_t wpas_dbus_getter_current_auth_mode(DBusMessageIter *iter, 224 DBusError *error, 225 void *user_data); 226 227 dbus_bool_t wpas_dbus_getter_bsss(DBusMessageIter *iter, DBusError *error, 228 void *user_data); 229 230 dbus_bool_t wpas_dbus_getter_networks(DBusMessageIter *iter, DBusError *error, 231 void *user_data); 232 233 dbus_bool_t wpas_dbus_getter_pkcs11_engine_path(DBusMessageIter *iter, 234 DBusError *error, 235 void *user_data); 236 237 dbus_bool_t wpas_dbus_getter_pkcs11_module_path(DBusMessageIter *iter, 238 DBusError *error, 239 void *user_data); 240 241 dbus_bool_t wpas_dbus_getter_blobs(DBusMessageIter *iter, DBusError *error, 242 void *user_data); 243 244 dbus_bool_t wpas_dbus_getter_bss_bssid(DBusMessageIter *iter, DBusError *error, 245 void *user_data); 246 247 dbus_bool_t wpas_dbus_getter_bss_ssid(DBusMessageIter *iter, DBusError *error, 248 void *user_data); 249 250 dbus_bool_t wpas_dbus_getter_bss_privacy(DBusMessageIter *iter, 251 DBusError *error, void *user_data); 252 253 dbus_bool_t wpas_dbus_getter_bss_mode(DBusMessageIter *iter, DBusError *error, 254 void *user_data); 255 256 dbus_bool_t wpas_dbus_getter_bss_signal(DBusMessageIter *iter, 257 DBusError *error, void *user_data); 258 259 dbus_bool_t wpas_dbus_getter_bss_frequency(DBusMessageIter *iter, 260 DBusError *error, void *user_data); 261 262 dbus_bool_t wpas_dbus_getter_bss_rates(DBusMessageIter *iter, 263 DBusError *error, void *user_data); 264 265 dbus_bool_t wpas_dbus_getter_bss_wpa(DBusMessageIter *iter, DBusError *error, 266 void *user_data); 267 268 dbus_bool_t wpas_dbus_getter_bss_rsn(DBusMessageIter *iter, DBusError *error, 269 void *user_data); 270 271 dbus_bool_t wpas_dbus_getter_bss_wps(DBusMessageIter *iter, DBusError *error, 272 void *user_data); 273 274 dbus_bool_t wpas_dbus_getter_bss_ies(DBusMessageIter *iter, DBusError *error, 275 void *user_data); 276 277 dbus_bool_t wpas_dbus_getter_bss_age(DBusMessageIter *iter, DBusError *error, 278 void *user_data); 279 280 dbus_bool_t wpas_dbus_getter_enabled(DBusMessageIter *iter, DBusError *error, 281 void *user_data); 282 283 dbus_bool_t wpas_dbus_setter_enabled(DBusMessageIter *iter, DBusError *error, 284 void *user_data); 285 286 dbus_bool_t wpas_dbus_getter_network_properties(DBusMessageIter *iter, 287 DBusError *error, 288 void *user_data); 289 290 dbus_bool_t wpas_dbus_setter_network_properties(DBusMessageIter *iter, 291 DBusError *error, 292 void *user_data); 293 294 DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message, 295 struct wpa_supplicant *wpa_s); 296 297 DBusMessage * wpas_dbus_handler_wps_cancel(DBusMessage *message, 298 struct wpa_supplicant *wpa_s); 299 300 dbus_bool_t wpas_dbus_getter_process_credentials(DBusMessageIter *iter, 301 DBusError *error, void *user_data); 302 303 dbus_bool_t wpas_dbus_setter_process_credentials(DBusMessageIter *iter, 304 DBusError *error, 305 void *user_data); 306 307 dbus_bool_t wpas_dbus_getter_config_methods(DBusMessageIter *iter, 308 DBusError *error, 309 void *user_data); 310 311 dbus_bool_t wpas_dbus_setter_config_methods(DBusMessageIter *iter, 312 DBusError *error, 313 void *user_data); 314 315 DBusMessage * wpas_dbus_handler_tdls_discover(DBusMessage *message, 316 struct wpa_supplicant *wpa_s); 317 DBusMessage * wpas_dbus_handler_tdls_setup(DBusMessage *message, 318 struct wpa_supplicant *wpa_s); 319 DBusMessage * wpas_dbus_handler_tdls_status(DBusMessage *message, 320 struct wpa_supplicant *wpa_s); 321 DBusMessage * wpas_dbus_handler_tdls_teardown(DBusMessage *message, 322 struct wpa_supplicant *wpa_s); 323 324 DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message, 325 const char *arg); 326 DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message, 327 const char *arg); 328 DBusMessage * wpas_dbus_error_no_memory(DBusMessage *message); 329 330 DBusMessage * wpas_dbus_handler_subscribe_preq( 331 DBusMessage *message, struct wpa_supplicant *wpa_s); 332 DBusMessage * wpas_dbus_handler_unsubscribe_preq( 333 DBusMessage *message, struct wpa_supplicant *wpa_s); 334 335 #endif /* CTRL_IFACE_DBUS_HANDLERS_NEW_H */ 336