1 /* 2 * WPA Supplicant - Mainline supplicant AIDL implementation 3 * Copyright (c) 2024, Google Inc. All rights reserved. 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef MAINLINE_SUPPLICANT_IMPL_H 10 #define MAINLINE_SUPPLICANT_IMPL_H 11 12 #include <set> 13 14 #include <aidl/android/system/wifi/mainline_supplicant/BnMainlineSupplicant.h> 15 #include <aidl/android/system/wifi/mainline_supplicant/SupplicantStatusCode.h> 16 17 extern "C" 18 { 19 #include "utils/common.h" 20 #include "utils/includes.h" 21 #include "utils/wpa_debug.h" 22 #include "wpa_supplicant_i.h" 23 #include "scan.h" 24 } 25 26 using ::aidl::android::system::wifi::mainline_supplicant::BnMainlineSupplicant; 27 using ::aidl::android::system::wifi::mainline_supplicant::SupplicantStatusCode; 28 29 class MainlineSupplicant : public BnMainlineSupplicant { 30 public: 31 MainlineSupplicant(struct wpa_global* global); 32 ndk::ScopedAStatus addUsdInterface(const std::string& ifaceName); 33 ndk::ScopedAStatus removeUsdInterface(const std::string& ifaceName); 34 ndk::ScopedAStatus terminate(); 35 36 private: 37 // Raw pointer to the global structure maintained by the core 38 struct wpa_global* wpa_global_; 39 // Names of all active USD interfaces 40 std::set<std::string> active_usd_ifaces_; 41 }; 42 43 #endif // MAINLINE_SUPPLICANT_IMPL_H 44