blob: 7afc6efb6f3e96c1fb9b5bf7317181147c12a5b7 [file] [log] [blame]
Dmitry Shmidte4663042016-04-04 10:07:49 -07001/*
2 * binder interface for wpa_supplicant daemon
3 * Copyright (c) 2004-2016, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2004-2016, Roshan Pius <rpius@google.com>
5 *
6 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
8 */
9
Dmitry Shmidt7f2c7532016-08-15 09:48:12 -070010#ifndef WPA_SUPPLICANT_BINDER_BINDER_H
11#define WPA_SUPPLICANT_BINDER_BINDER_H
Dmitry Shmidte4663042016-04-04 10:07:49 -070012
13#ifdef _cplusplus
14extern "C" {
15#endif /* _cplusplus */
16
17/**
18 * This is the binder RPC interface entry point to the wpa_supplicant core.
19 * This initializes the binder driver & BinderManager instance and then forwards
20 * all the notifcations from the supplicant core to the BinderManager.
21 */
22struct wpas_binder_priv;
23struct wpa_global;
24
Dmitry Shmidt7f2c7532016-08-15 09:48:12 -070025struct wpas_binder_priv *wpas_binder_init(struct wpa_global *global);
Dmitry Shmidte4663042016-04-04 10:07:49 -070026void wpas_binder_deinit(struct wpas_binder_priv *priv);
27
28#ifdef CONFIG_CTRL_IFACE_BINDER
29int wpas_binder_register_interface(struct wpa_supplicant *wpa_s);
30int wpas_binder_unregister_interface(struct wpa_supplicant *wpa_s);
Roshan Piusd3854452016-07-07 16:46:41 -070031int wpas_binder_register_network(
32 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
33int wpas_binder_unregister_network(
34 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
Roshan Piuse8d0d162016-08-01 13:09:26 -070035int wpas_binder_notify_state_changed(struct wpa_supplicant *wpa_s);
Dmitry Shmidt7f2c7532016-08-15 09:48:12 -070036#else /* CONFIG_CTRL_IFACE_BINDER */
Dmitry Shmidte4663042016-04-04 10:07:49 -070037static inline int wpas_binder_register_interface(struct wpa_supplicant *wpa_s)
38{
39 return 0;
40}
41static inline int wpas_binder_unregister_interface(struct wpa_supplicant *wpa_s)
42{
43 return 0;
44}
Roshan Piusd3854452016-07-07 16:46:41 -070045static inline int wpas_binder_register_network(
46 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
47{
48 return 0;
49}
50static inline int wpas_binder_unregister_network(
51 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
52{
53 return 0;
54}
Roshan Piuse8d0d162016-08-01 13:09:26 -070055static inline int wpas_binder_notify_state_changed(struct wpa_supplicant *wpa_s)
56{
57 return 0;
58}
Dmitry Shmidte4663042016-04-04 10:07:49 -070059#endif /* CONFIG_CTRL_IFACE_BINDER */
60
61#ifdef _cplusplus
62}
63#endif /* _cplusplus */
64
Dmitry Shmidt7f2c7532016-08-15 09:48:12 -070065#endif /* WPA_SUPPLICANT_BINDER_BINDER_H */