blob: 594098dd585f24013e52858b3ff62752eb553d7d [file] [log] [blame]
Roshan Pius57ffbcf2016-09-27 09:12:46 -07001/*
2 * hidl 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
10#ifndef WPA_SUPPLICANT_HIDL_HIDL_H
11#define WPA_SUPPLICANT_HIDL_HIDL_H
12
13#ifdef _cplusplus
14extern "C" {
15#endif /* _cplusplus */
16
17/**
18 * This is the hidl RPC interface entry point to the wpa_supplicant core.
19 * This initializes the hidl driver & HidlManager instance and then forwards
20 * all the notifcations from the supplicant core to the HidlManager.
21 */
22struct wpas_hidl_priv;
23struct wpa_global;
24
25struct wpas_hidl_priv *wpas_hidl_init(struct wpa_global *global);
26void wpas_hidl_deinit(struct wpas_hidl_priv *priv);
27
28#ifdef CONFIG_CTRL_IFACE_HIDL
29int wpas_hidl_register_interface(struct wpa_supplicant *wpa_s);
30int wpas_hidl_unregister_interface(struct wpa_supplicant *wpa_s);
31int wpas_hidl_register_network(
32 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
33int wpas_hidl_unregister_network(
34 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
35int wpas_hidl_notify_state_changed(struct wpa_supplicant *wpa_s);
36int wpas_hidl_notify_network_request(
37 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
38 enum wpa_ctrl_req_type rtype, const char *default_txt);
39#else /* CONFIG_CTRL_IFACE_HIDL */
40static inline int wpas_hidl_register_interface(struct wpa_supplicant *wpa_s)
41{
42 return 0;
43}
44static inline int wpas_hidl_unregister_interface(struct wpa_supplicant *wpa_s)
45{
46 return 0;
47}
48static inline int wpas_hidl_register_network(
49 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
50{
51 return 0;
52}
53static inline int wpas_hidl_unregister_network(
54 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
55{
56 return 0;
57}
58static inline int wpas_hidl_notify_state_changed(struct wpa_supplicant *wpa_s)
59{
60 return 0;
61}
62static inline int wpas_hidl_notify_network_request(
63 struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
64 enum wpa_ctrl_req_type rtype, const char *default_txt)
65{
66 return 0;
67}
68#endif /* CONFIG_CTRL_IFACE_HIDL */
69
70#ifdef _cplusplus
71}
72#endif /* _cplusplus */
73
74#endif /* WPA_SUPPLICANT_HIDL_HIDL_H */