dbus_new_handlers.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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 program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * Alternatively, this software may be distributed under the terms of BSD
  11. * license.
  12. *
  13. * See README and COPYING for more details.
  14. */
  15. #ifndef CTRL_IFACE_DBUS_NEW_HANDLERS_H
  16. #define CTRL_IFACE_DBUS_NEW_HANDLERS_H
  17. struct network_handler_args {
  18. struct wpa_supplicant *wpa_s;
  19. struct wpa_ssid *ssid;
  20. };
  21. struct bss_handler_args {
  22. struct wpa_supplicant *wpa_s;
  23. unsigned int id;
  24. };
  25. dbus_bool_t wpas_dbus_simple_property_getter(DBusMessageIter *iter,
  26. const int type,
  27. const void *val,
  28. DBusError *error);
  29. dbus_bool_t wpas_dbus_simple_property_setter(DBusMessageIter *iter,
  30. DBusError *error,
  31. const int type, void *val);
  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. dbus_bool_t wpas_dbus_simple_array_array_property_getter(DBusMessageIter *iter,
  38. const int type,
  39. struct wpabuf **array,
  40. size_t array_len,
  41. DBusError *error);
  42. DBusMessage * wpas_dbus_handler_create_interface(DBusMessage *message,
  43. struct wpa_global *global);
  44. DBusMessage * wpas_dbus_handler_remove_interface(DBusMessage *message,
  45. struct wpa_global *global);
  46. DBusMessage * wpas_dbus_handler_get_interface(DBusMessage *message,
  47. struct wpa_global *global);
  48. dbus_bool_t wpas_dbus_getter_debug_level(DBusMessageIter *iter,
  49. DBusError *error,
  50. void *user_data);
  51. dbus_bool_t wpas_dbus_getter_debug_timestamp(DBusMessageIter *iter,
  52. DBusError *error,
  53. void *user_data);
  54. dbus_bool_t wpas_dbus_getter_debug_show_keys(DBusMessageIter *iter,
  55. DBusError *error,
  56. void *user_data);
  57. dbus_bool_t wpas_dbus_setter_debug_level(DBusMessageIter *iter,
  58. DBusError *error, void *user_data);
  59. dbus_bool_t wpas_dbus_setter_debug_timestamp(DBusMessageIter *iter,
  60. DBusError *error,
  61. void *user_data);
  62. dbus_bool_t wpas_dbus_setter_debug_show_keys(DBusMessageIter *iter,
  63. DBusError *error,
  64. void *user_data);
  65. dbus_bool_t wpas_dbus_getter_interfaces(DBusMessageIter *iter,
  66. DBusError *error,
  67. void *user_data);
  68. dbus_bool_t wpas_dbus_getter_eap_methods(DBusMessageIter *iter,
  69. DBusError *error, void *user_data);
  70. DBusMessage * wpas_dbus_handler_scan(DBusMessage *message,
  71. struct wpa_supplicant *wpa_s);
  72. DBusMessage * wpas_dbus_handler_disconnect(DBusMessage *message,
  73. struct wpa_supplicant *wpa_s);
  74. dbus_bool_t set_network_properties(struct wpa_supplicant *wpa_s,
  75. struct wpa_ssid *ssid,
  76. DBusMessageIter *iter,
  77. DBusError *error);
  78. DBusMessage * wpas_dbus_handler_add_network(DBusMessage *message,
  79. struct wpa_supplicant *wpa_s);
  80. DBusMessage * wpas_dbus_handler_remove_network(DBusMessage *message,
  81. struct wpa_supplicant *wpa_s);
  82. DBusMessage * wpas_dbus_handler_remove_all_networks(
  83. DBusMessage *message, struct wpa_supplicant *wpa_s);
  84. DBusMessage * wpas_dbus_handler_select_network(DBusMessage *message,
  85. struct wpa_supplicant *wpa_s);
  86. DBusMessage * wpas_dbus_handler_network_reply(DBusMessage *message,
  87. struct wpa_supplicant *wpa_s);
  88. DBusMessage * wpas_dbus_handler_add_blob(DBusMessage *message,
  89. struct wpa_supplicant *wpa_s);
  90. DBusMessage * wpas_dbus_handler_get_blob(DBusMessage *message,
  91. struct wpa_supplicant *wpa_s);
  92. DBusMessage * wpas_dbus_handler_remove_blob(DBusMessage *message,
  93. struct wpa_supplicant *wpa_s);
  94. DBusMessage * wpas_dbus_handler_flush_bss(DBusMessage *message,
  95. struct wpa_supplicant *wpa_s);
  96. DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message,
  97. struct wpa_supplicant *wpa_s);
  98. dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter,
  99. DBusError *error, void *user_data);
  100. dbus_bool_t wpas_dbus_getter_state(DBusMessageIter *iter, DBusError *error,
  101. void *user_data);
  102. dbus_bool_t wpas_dbus_getter_scanning(DBusMessageIter *iter, DBusError *error,
  103. void *user_data);
  104. dbus_bool_t wpas_dbus_getter_ap_scan(DBusMessageIter *iter, DBusError *error,
  105. void *user_data);
  106. dbus_bool_t wpas_dbus_setter_ap_scan(DBusMessageIter *iter, DBusError *error,
  107. void *user_data);
  108. dbus_bool_t wpas_dbus_getter_fast_reauth(DBusMessageIter *iter,
  109. DBusError *error,
  110. void *user_data);
  111. dbus_bool_t wpas_dbus_setter_fast_reauth(DBusMessageIter *iter,
  112. DBusError *error,
  113. void *user_data);
  114. dbus_bool_t wpas_dbus_getter_bss_expire_age(DBusMessageIter *iter,
  115. DBusError *error, void *user_data);
  116. dbus_bool_t wpas_dbus_setter_bss_expire_age(DBusMessageIter *iter,
  117. DBusError *error,
  118. void *user_data);
  119. dbus_bool_t wpas_dbus_getter_bss_expire_count(DBusMessageIter *iter,
  120. DBusError *error,
  121. void *user_data);
  122. dbus_bool_t wpas_dbus_setter_bss_expire_count(DBusMessageIter *iter,
  123. DBusError *error,
  124. void *user_data);
  125. dbus_bool_t wpas_dbus_getter_country(DBusMessageIter *iter, DBusError *error,
  126. void *user_data);
  127. dbus_bool_t wpas_dbus_setter_country(DBusMessageIter *iter, DBusError *error,
  128. void *user_data);
  129. dbus_bool_t wpas_dbus_getter_scan_interval(DBusMessageIter *iter,
  130. DBusError *error,
  131. void *user_data);
  132. dbus_bool_t wpas_dbus_setter_scan_interval(DBusMessageIter *iter,
  133. DBusError *error,
  134. void *user_data);
  135. dbus_bool_t wpas_dbus_getter_ifname(DBusMessageIter *iter, DBusError *error,
  136. void *user_data);
  137. dbus_bool_t wpas_dbus_getter_driver(DBusMessageIter *iter, DBusError *error,
  138. void *user_data);
  139. dbus_bool_t wpas_dbus_getter_bridge_ifname(DBusMessageIter *iter,
  140. DBusError *error,
  141. void *user_data);
  142. dbus_bool_t wpas_dbus_getter_current_bss(DBusMessageIter *iter,
  143. DBusError *error,
  144. void *user_data);
  145. dbus_bool_t wpas_dbus_getter_current_network(DBusMessageIter *iter,
  146. DBusError *error,
  147. void *user_data);
  148. dbus_bool_t wpas_dbus_getter_current_auth_mode(DBusMessageIter *iter,
  149. DBusError *error,
  150. void *user_data);
  151. dbus_bool_t wpas_dbus_getter_bsss(DBusMessageIter *iter, DBusError *error,
  152. void *user_data);
  153. dbus_bool_t wpas_dbus_getter_networks(DBusMessageIter *iter, DBusError *error,
  154. void *user_data);
  155. dbus_bool_t wpas_dbus_getter_blobs(DBusMessageIter *iter, DBusError *error,
  156. void *user_data);
  157. dbus_bool_t wpas_dbus_getter_bss_bssid(DBusMessageIter *iter, DBusError *error,
  158. void *user_data);
  159. dbus_bool_t wpas_dbus_getter_bss_ssid(DBusMessageIter *iter, DBusError *error,
  160. void *user_data);
  161. dbus_bool_t wpas_dbus_getter_bss_privacy(DBusMessageIter *iter,
  162. DBusError *error, void *user_data);
  163. dbus_bool_t wpas_dbus_getter_bss_mode(DBusMessageIter *iter, DBusError *error,
  164. void *user_data);
  165. dbus_bool_t wpas_dbus_getter_bss_signal(DBusMessageIter *iter,
  166. DBusError *error, void *user_data);
  167. dbus_bool_t wpas_dbus_getter_bss_frequency(DBusMessageIter *iter,
  168. DBusError *error, void *user_data);
  169. dbus_bool_t wpas_dbus_getter_bss_rates(DBusMessageIter *iter,
  170. DBusError *error, void *user_data);
  171. dbus_bool_t wpas_dbus_getter_bss_wpa(DBusMessageIter *iter, DBusError *error,
  172. void *user_data);
  173. dbus_bool_t wpas_dbus_getter_bss_rsn(DBusMessageIter *iter, DBusError *error,
  174. void *user_data);
  175. dbus_bool_t wpas_dbus_getter_bss_ies(DBusMessageIter *iter, DBusError *error,
  176. void *user_data);
  177. dbus_bool_t wpas_dbus_getter_enabled(DBusMessageIter *iter, DBusError *error,
  178. void *user_data);
  179. dbus_bool_t wpas_dbus_setter_enabled(DBusMessageIter *iter, DBusError *error,
  180. void *user_data);
  181. dbus_bool_t wpas_dbus_getter_network_properties(DBusMessageIter *iter,
  182. DBusError *error,
  183. void *user_data);
  184. dbus_bool_t wpas_dbus_setter_network_properties(DBusMessageIter *iter,
  185. DBusError *error,
  186. void *user_data);
  187. DBusMessage * wpas_dbus_handler_wps_start(DBusMessage *message,
  188. struct wpa_supplicant *wpa_s);
  189. dbus_bool_t wpas_dbus_getter_process_credentials(DBusMessageIter *iter,
  190. DBusError *error, void *user_data);
  191. dbus_bool_t wpas_dbus_setter_process_credentials(DBusMessageIter *iter,
  192. DBusError *error,
  193. void *user_data);
  194. DBusMessage * wpas_dbus_error_invalid_args(DBusMessage *message,
  195. const char *arg);
  196. DBusMessage * wpas_dbus_error_unknown_error(DBusMessage *message,
  197. const char *arg);
  198. DBusMessage * wpas_dbus_handler_subscribe_preq(
  199. DBusMessage *message, struct wpa_supplicant *wpa_s);
  200. DBusMessage * wpas_dbus_handler_unsubscribe_preq(
  201. DBusMessage *message, struct wpa_supplicant *wpa_s);
  202. #endif /* CTRL_IFACE_DBUS_HANDLERS_NEW_H */