X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ap_interface_impl.h;h=849efcf4723287eb18e1a0ca7bed04403ab393fc;hb=0ddca176d29127b0d9fcfd29a8b09dfdb150db74;hp=655bcc72ca3d8a41ec20e62aa857f955534f6773;hpb=be8205ce6b4ff88a043e04d33de3a067219f2729;p=android-x86%2Fsystem-connectivity-wificond.git diff --git a/ap_interface_impl.h b/ap_interface_impl.h index 655bcc7..849efcf 100644 --- a/ap_interface_impl.h +++ b/ap_interface_impl.h @@ -17,12 +17,14 @@ #ifndef WIFICOND_AP_INTERFACE_IMPL_H_ #define WIFICOND_AP_INTERFACE_IMPL_H_ -#include #include #include #include #include +#include + +#include "wificond/net/netlink_manager.h" #include "android/net/wifi/IApInterface.h" @@ -30,6 +32,7 @@ namespace android { namespace wificond { class ApInterfaceBinder; +class NetlinkUtils; // Holds the guts of how we control network interfaces capable of exposing an AP // via hostapd. Because remote processes may hold on to the corresponding @@ -38,7 +41,10 @@ class ApInterfaceBinder; class ApInterfaceImpl { public: ApInterfaceImpl(const std::string& interface_name, - std::unique_ptr hostapd_manager); + uint32_t interface_index, + NetlinkUtils* netlink_utils, + wifi_system::InterfaceTool* if_tool, + wifi_system::HostapdManager* hostapd_manager); ~ApInterfaceImpl(); // Get a pointer to the binder representing this ApInterfaceImpl. @@ -52,12 +58,23 @@ class ApInterfaceImpl { int32_t channel, wifi_system::HostapdManager::EncryptionType encryption_type, const std::vector& passphrase); + std::string GetInterfaceName() { return interface_name_; } + int GetNumberOfAssociatedStations() const; private: const std::string interface_name_; - const std::unique_ptr hostapd_manager_; + const uint32_t interface_index_; + NetlinkUtils* const netlink_utils_; + wifi_system::InterfaceTool* const if_tool_; + wifi_system::HostapdManager* const hostapd_manager_; const android::sp binder_; + // Number of associated stations. + int number_of_associated_stations_; + + void OnStationEvent(StationEvent event, + const std::vector& mac_address); + DISALLOW_COPY_AND_ASSIGN(ApInterfaceImpl); };