blob: 4ca2c86f7bf04e0a71cdbc0187a0742d348f6ef1 [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);
Dmitry Shmidt7f2c7532016-08-15 09:48:12 -070035#else /* CONFIG_CTRL_IFACE_BINDER */
Dmitry Shmidte4663042016-04-04 10:07:49 -070036static inline int wpas_binder_register_interface(struct wpa_supplicant *wpa_s)
37{
38 return 0;
39}
40static inline int wpas_binder_unregister_interface(struct wpa_supplicant *wpa_s)
41{
42 return 0;
43}
Roshan Piusd3854452016-07-07 16:46:41 -070044static inline int wpas_binder_register_network(
45 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
46{
47 return 0;
48}
49static inline int wpas_binder_unregister_network(
50 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
51{
52 return 0;
53}
Dmitry Shmidte4663042016-04-04 10:07:49 -070054#endif /* CONFIG_CTRL_IFACE_BINDER */
55
56#ifdef _cplusplus
57}
58#endif /* _cplusplus */
59
Dmitry Shmidt7f2c7532016-08-15 09:48:12 -070060#endif /* WPA_SUPPLICANT_BINDER_BINDER_H */