dbus_new_handlers.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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. #ifndef CTRL_IFACE_DBUS_NEW_HANDLERS_H
  10. #define CTRL_IFACE_DBUS_NEW_HANDLERS_H
  11. struct network_handler_args {
  12. struct wpa_supplicant *wpa_s;
  13. struct wpa_ssid *ssid;
  14. };
  15. struct bss_handler_args {
  16. struct wpa_supplicant *wpa_s;
  17. unsigned int id;
  18. };
  19. dbus_bool_t wpas_dbus_simple_property_getter(DBusMessageIter *iter,
  20. const int type,
  21. const void *val,
  22. DBusError *error);
  23. dbus_bool_t wpas_dbus_simple_property_setter(DBusMessageIter *iter,
  24. DBusError *error,
  25. const int type, void *val);
  26. dbus_bool_t wpas_dbus_simple_array_property_getter(DBusMessageIter *iter,
  27. const int type,
  28. const void *array,
  29. size_t array_len,
  30. DBusError *error);
  31. dbus_bool_t wpas_dbus_simple_array_array_property_getter(DBusMessageIter *iter,
  32. const int type,
  33. struct wpabuf **array,
  34. size_t array_len,
  35. DBusError *error);
  36. DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
  37. struct wpa_global *global);
  38. DBusMessage * wpas_dbus_handler_remove_interface(DBusMessage *message,
  39. struct wpa_global *global);
  40. DBusMessage * wpas_dbus_handler_get_interface(DBusMessage *message,
  41. struct wpa_global *global);
  42. DBusMessage * wpas_dbus_handler_expect_disconnect(DBusMessage *message,
  43. struct wpa_global *global);
  44. dbus_bool_t wpas_dbus_getter_debug_level(DBusMessageIter *iter,
  45. DBusError *error,
  46. void *user_data);
  47. dbus_bool_t wpas_dbus_getter_debug_timestamp(DBusMessageIter *iter,
  48. DBusError *error,
  49. void *user_data);
  50. dbus_bool_t wpas_dbus_getter_debug_show_keys(DBusMessageIter *iter,
  51. DBusError *error,
  52. void *user_data);
  53. dbus_bool_t wpas_dbus_setter_debug_level(DBusMessageIter *iter,
  54. DBusError *error, void *user_data);
  55. dbus_bool_t wpas_dbus_setter_debug_timestamp(DBusMessageIter *iter,
  56. DBusError *error,
  57. void *user_data);
  58. dbus_bool_t wpas_dbus_setter_debug_show_keys(DBusMessageIter *iter,
  59. DBusError *error,
  60. void *user_data);
  61. dbus_bool_t wpas_dbus_getter_interfaces(DBusMessageIter *iter,
  62. DBusError *error,
  63. void *user_data);
  64. dbus_bool_t wpas_dbus_getter_eap_methods(DBusMessageIter *iter,
  65. DBusError *error, void *user_data);
  66. dbus_bool_t wpas_dbus_getter_global_capabilities(DBusMessageIter *iter,
  67. DBusError *error,
  68. void *user_data);
  69. DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
  70. struct wpa_supplicant *wpa_s);
  71. DBusMessage * wpas_dbus_handler_signal_poll(DBusMessage *message,
  72. struct wpa_supplicant *wpa_s);
  73. DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message,
  74. struct wpa_supplicant *wpa_s);
  75. dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s,
  76. struct wpa_ssid *ssid,
  77. DBusMessageIter *iter,
  78. DBusError *error);
  79. DBusMessage * wpas_dbus_handler_add_network(DBusMessage *message,
  80. struct wpa_supplicant *wpa_s);
  81. DBusMessage * wpas_dbus_handler_reassociate(DBusMessage *message,
  82. struct wpa_supplicant *wpa_s);
  83. DBusMessage * wpas_dbus_handler_reattach(DBusMessage *message,
  84. struct wpa_supplicant *wpa_s);
  85. DBusMessage * wpas_dbus_handler_reconnect(DBusMessage *message,
  86. struct wpa_supplicant *wpa_s);
  87. DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message,
  88. struct wpa_supplicant *wpa_s);
  89. DBusMessage * wpas_dbus_handler_remove_all_networks(
  90. DBusMessage *message, struct wpa_supplicant *wpa_s);
  91. DBusMessage * wpas_dbus_handler_select_network(DBusMessage *message,
  92. struct wpa_supplicant *wpa_s);
  93. DBusMessage * wpas_dbus_handler_network_reply(DBusMessage *message,
  94. struct wpa_supplicant *wpa_s);
  95. DBusMessage * wpas_dbus_handler_add_blob(DBusMessage *message,
  96. struct wpa_supplicant *wpa_s);
  97. DBusMessage * wpas_dbus_handler_get_blob(DBusMessage *message,
  98. struct wpa_supplicant *wpa_s);
  99. DBusMessage * wpas_dbus_handler_remove_blob(DBusMessage *message,
  100. struct wpa_supplicant *wpa_s);
  101. DBusMessage * wpas_dbus_handler_set_pkcs11_engine_and_module_path(
  102. DBusMessage *message, struct wpa_supplicant *wpa_s);
  103. DBusMessage * wpas_dbus_handler_flush_bss(DBusMessage *message,
  104. struct wpa_supplicant *wpa_s);
  105. DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message,
  106. struct wpa_supplicant *wpa_s);
  107. DBusMessage * wpas_dbus_handler_eap_logoff(DBusMessage *message,
  108. struct wpa_supplicant *wpa_s);
  109. DBusMessage * wpas_dbus_handler_eap_logon(DBusMessage *message,
  110. struct wpa_supplicant *wpa_s);
  111. dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter,
  112. DBusError *error, void *user_data);
  113. dbus_bool_t wpas_dbus_getter_state(DBusMessageIter *iter, DBusError *error,
  114. void *user_data);
  115. dbus_bool_t wpas_dbus_getter_scanning(DBusMessageIter *iter, DBusError *error,
  116. void *user_data);
  117. dbus_bool_t wpas_dbus_getter_ap_scan(DBusMessageIter *iter, DBusError *error,
  118. void *user_data);
  119. dbus_bool_t wpas_dbus_setter_ap_scan(DBusMessageIter *iter, DBusError *error,
  120. void *user_data);
  121. dbus_bool_t wpas_dbus_getter_fast_reauth(DBusMessageIter *iter,
  122. DBusError *error,
  123. void *user_data);
  124. dbus_bool_t wpas_dbus_setter_fast_reauth(DBusMessageIter *iter,
  125. DBusError *error,
  126. void *user_data);
  127. dbus_bool_t wpas_dbus_getter_disconnect_reason(DBusMessageIter *iter,
  128. DBusError *error,
  129. void *user_data);
  130. dbus_bool_t wpas_dbus_getter_bss_expire_age(DBusMessageIter *iter,
  131. DBusError *error, void *user_data);
  132. dbus_bool_t wpas_dbus_setter_bss_expire_age(DBusMessageIter *iter,
  133. DBusError *error,
  134. void *user_data);
  135. dbus_bool_t wpas_dbus_getter_bss_expire_count(DBusMessageIter *iter,
  136. DBusError *error,
  137. void *user_data);
  138. dbus_bool_t wpas_dbus_setter_bss_expire_count(DBusMessageIter *iter,
  139. DBusError *error,
  140. void *user_data);
  141. dbus_bool_t wpas_dbus_getter_country(DBusMessageIter *iter, DBusError *error,
  142. void *user_data);
  143. dbus_bool_t wpas_dbus_setter_country(DBusMessageIter *iter, DBusError *error,
  144. void *user_data);
  145. dbus_bool_t wpas_dbus_getter_scan_interval(DBusMessageIter *iter,
  146. DBusError *error,
  147. void *user_data);
  148. dbus_bool_t wpas_dbus_setter_scan_interval(DBusMessageIter *iter,
  149. DBusError *error,
  150. void *user_data);
  151. dbus_bool_t wpas_dbus_getter_ifname(DBusMessageIter *iter, DBusError *error,
  152. void *user_data);
  153. dbus_bool_t wpas_dbus_getter_driver(DBusMessageIter *iter, DBusError *error,
  154. void *user_data);
  155. dbus_bool_t wpas_dbus_getter_bridge_ifname(DBusMessageIter *iter,
  156. DBusError *error,
  157. void *user_data);
  158. dbus_bool_t wpas_dbus_getter_current_bss(DBusMessageIter *iter,
  159. DBusError *error,
  160. void *user_data);
  161. dbus_bool_t wpas_dbus_getter_current_network(DBusMessageIter *iter,
  162. DBusError *error,
  163. void *user_data);
  164. dbus_bool_t wpas_dbus_getter_current_auth_mode(DBusMessageIter *iter,
  165. DBusError *error,
  166. void *user_data);
  167. dbus_bool_t wpas_dbus_getter_bsss(DBusMessageIter *iter, DBusError *error,
  168. void *user_data);
  169. dbus_bool_t wpas_dbus_getter_networks(DBusMessageIter *iter, DBusError *error,
  170. void *user_data);
  171. dbus_bool_t wpas_dbus_getter_pkcs11_engine_path(DBusMessageIter *iter,
  172. DBusError *error,
  173. void *user_data);
  174. dbus_bool_t wpas_dbus_getter_pkcs11_module_path(DBusMessageIter *iter,
  175. DBusError *error,
  176. void *user_data);
  177. dbus_bool_t wpas_dbus_getter_blobs(DBusMessageIter *iter, DBusError *error,
  178. void *user_data);
  179. dbus_bool_t wpas_dbus_getter_bss_bssid(DBusMessageIter *iter, DBusError *error,
  180. void *user_data);
  181. dbus_bool_t wpas_dbus_getter_bss_ssid(DBusMessageIter *iter, DBusError *error,
  182. void *user_data);
  183. dbus_bool_t wpas_dbus_getter_bss_privacy(DBusMessageIter *iter,
  184. DBusError *error, void *user_data);
  185. dbus_bool_t wpas_dbus_getter_bss_mode(DBusMessageIter *iter, DBusError *error,
  186. void *user_data);
  187. dbus_bool_t wpas_dbus_getter_bss_signal(DBusMessageIter *iter,
  188. DBusError *error, void *user_data);
  189. dbus_bool_t wpas_dbus_getter_bss_frequency(DBusMessageIter *iter,
  190. DBusError *error, void *user_data);
  191. dbus_bool_t wpas_dbus_getter_bss_rates(DBusMessageIter *iter,
  192. DBusError *error, void *user_data);
  193. dbus_bool_t wpas_dbus_getter_bss_wpa(DBusMessageIter *iter, DBusError *error,
  194. void *user_data);
  195. dbus_bool_t wpas_dbus_getter_bss_rsn(DBusMessageIter *iter, DBusError *error,
  196. void *user_data);
  197. dbus_bool_t wpas_dbus_getter_bss_wps(DBusMessageIter *iter, DBusError *error,
  198. void *user_data);
  199. dbus_bool_t wpas_dbus_getter_bss_ies(DBusMessageIter *iter, DBusError *error,
  200. void *user_data);
  201. dbus_bool_t wpas_dbus_getter_bss_age(DBusMessageIter *iter, DBusError *error,
  202. void *user_data);
  203. dbus_bool_t wpas_dbus_getter_enabled(DBusMessageIter *iter, DBusError *error,
  204. void *user_data);
  205. dbus_bool_t wpas_dbus_setter_enabled(DBusMessageIter *iter, DBusError *error,
  206. void *user_data);
  207. dbus_bool_t wpas_dbus_getter_network_properties(DBusMessageIter *iter,
  208. DBusError *error,
  209. void *user_data);
  210. dbus_bool_t wpas_dbus_setter_network_properties(DBusMessageIter *iter,
  211. DBusError *error,
  212. void *user_data);
  213. DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message,
  214. struct wpa_supplicant *wpa_s);
  215. DBusMessage * wpas_dbus_handler_wps_cancel(DBusMessage *message,
  216. struct wpa_supplicant *wpa_s);
  217. dbus_bool_t wpas_dbus_getter_process_credentials(DBusMessageIter *iter,
  218. DBusError *error, void *user_data);
  219. dbus_bool_t wpas_dbus_setter_process_credentials(DBusMessageIter *iter,
  220. DBusError *error,
  221. void *user_data);
  222. dbus_bool_t wpas_dbus_getter_config_methods(DBusMessageIter *iter,
  223. DBusError *error,
  224. void *user_data);
  225. dbus_bool_t wpas_dbus_setter_config_methods(DBusMessageIter *iter,
  226. DBusError *error,
  227. void *user_data);
  228. DBusMessage * wpas_dbus_handler_tdls_discover(DBusMessage *message,
  229. struct wpa_supplicant *wpa_s);
  230. DBusMessage * wpas_dbus_handler_tdls_setup(DBusMessage *message,
  231. struct wpa_supplicant *wpa_s);
  232. DBusMessage * wpas_dbus_handler_tdls_status(DBusMessage *message,
  233. struct wpa_supplicant *wpa_s);
  234. DBusMessage * wpas_dbus_handler_tdls_teardown(DBusMessage *message,
  235. struct wpa_supplicant *wpa_s);
  236. DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message,
  237. const char *arg);
  238. DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message,
  239. const char *arg);
  240. DBusMessage * wpas_dbus_error_no_memory(DBusMessage *message);
  241. DBusMessage * wpas_dbus_handler_subscribe_preq(
  242. DBusMessage *message, struct wpa_supplicant *wpa_s);
  243. DBusMessage * wpas_dbus_handler_unsubscribe_preq(
  244. DBusMessage *message, struct wpa_supplicant *wpa_s);
  245. #endif /* CTRL_IFACE_DBUS_HANDLERS_NEW_H */