2 * wpa_supplicant - Event notifications
3 * Copyright (c) 2009, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
19 #include "wpa_supplicant_i.h"
20 #include "wps_supplicant.h"
21 #include "ctrl_iface_dbus.h"
24 int wpas_notify_supplicant_initialized(struct wpa_global *global)
26 if (global->params.dbus_ctrl_interface) {
27 global->dbus_ctrl_iface =
28 wpa_supplicant_dbus_ctrl_iface_init(global);
29 if (global->dbus_ctrl_iface == NULL)
37 void wpas_notify_supplicant_deinitialized(struct wpa_global *global)
39 if (global->dbus_ctrl_iface)
40 wpa_supplicant_dbus_ctrl_iface_deinit(global->dbus_ctrl_iface);
44 int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
46 if (wpas_dbus_register_iface(wpa_s))
54 void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s)
56 /* unregister interface in old DBus ctrl iface */
57 wpas_dbus_unregister_iface(wpa_s);
61 void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
62 wpa_states new_state, wpa_states old_state)
64 /* notify the old DBus API */
65 wpa_supplicant_dbus_notify_state_change(wpa_s, new_state,
70 void wpas_notify_network_changed(struct wpa_supplicant *wpa_s)
75 void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s)
80 void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s)
85 void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
86 struct wpa_ssid *ssid)
91 void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
92 struct wpa_ssid *ssid)
97 void wpas_notify_scanning(struct wpa_supplicant *wpa_s)
99 /* notify the old DBus API */
100 wpa_supplicant_dbus_notify_scanning(wpa_s);
104 void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success)
109 void wpas_notify_scan_results(struct wpa_supplicant *wpa_s)
111 /* notify the old DBus API */
112 wpa_supplicant_dbus_notify_scan_results(wpa_s);
114 wpas_wps_notify_scan_results(wpa_s);
118 void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
119 const struct wps_credential *cred)
121 /* notify the old DBus API */
122 wpa_supplicant_dbus_notify_wps_cred(wpa_s, cred);
126 void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
127 struct wps_event_m2d *m2d)
132 void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
133 struct wps_event_fail *fail)
138 void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s)
143 void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
144 struct wpa_ssid *ssid)
149 void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
150 struct wpa_ssid *ssid)
155 void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name)
160 void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name)
165 void wpas_notify_debug_params_changed(struct wpa_global *global)