02b59188a9e0bbd91d23f1560f1a668178a9b458
[mech_eap.git] / wpa_supplicant / binder / supplicant.h
1 /*
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
10 #ifndef SUPPLICANT_H
11 #define SUPPLICANT_H
12
13 #include "fi/w1/wpa_supplicant/BnSupplicant.h"
14 #include "fi/w1/wpa_supplicant/ISupplicantCallbacks.h"
15
16 extern "C" {
17 #include "utils/includes.h"
18 #include "utils/common.h"
19 #include "../wpa_supplicant_i.h"
20 }
21
22 namespace wpa_supplicant_binder {
23
24 /**
25  * Implementation of the supplicant binder object. This binder
26  * object is used core for global control operations on
27  * wpa_supplicant.
28  */
29 class Supplicant : public fi::w1::wpa_supplicant::BnSupplicant
30 {
31 public:
32         Supplicant(struct wpa_global *global);
33         virtual ~Supplicant() = default;
34
35 private:
36         /* Raw pointer to the global structure maintained by the core. */
37         struct wpa_global *wpa_global_;
38         /* All the callback objects registered by the clients. */
39         std::vector<android::sp<fi::w1::wpa_supplicant::ISupplicantCallbacks>>
40                 callbacks_;
41 };
42
43 } /* namespace wpa_supplicant_binder */
44
45 #endif /* SUPPLICANT_H */