From ee5f2e57166ac8c22da809eefb0946daeb098760 Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Mon, 22 Jan 2024 21:34:27 +0000 Subject: [PATCH 1/3] Rename AccessPointControllerHostapd->AccessPointControllerLinux --- src/linux/server/Main.cxx | 2 +- src/linux/tools/apmonitor/Main.cxx | 2 +- ...ntControllerHostapd.cxx => AccessPointControllerLinux.cxx} | 2 +- src/linux/wifi/core/AccessPointLinux.cxx | 2 +- src/linux/wifi/core/CMakeLists.txt | 4 ++-- ...ntControllerHostapd.hxx => AccessPointControllerLinux.hxx} | 0 6 files changed, 6 insertions(+), 6 deletions(-) rename src/linux/wifi/core/{AccessPointControllerHostapd.cxx => AccessPointControllerLinux.cxx} (94%) rename src/linux/wifi/core/include/microsoft/net/wifi/{AccessPointControllerHostapd.hxx => AccessPointControllerLinux.hxx} (100%) diff --git a/src/linux/server/Main.cxx b/src/linux/server/Main.cxx index f86ef395..03049c61 100644 --- a/src/linux/server/Main.cxx +++ b/src/linux/server/Main.cxx @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/linux/tools/apmonitor/Main.cxx b/src/linux/tools/apmonitor/Main.cxx index 231a7f02..23034ad5 100644 --- a/src/linux/tools/apmonitor/Main.cxx +++ b/src/linux/tools/apmonitor/Main.cxx @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/linux/wifi/core/AccessPointControllerHostapd.cxx b/src/linux/wifi/core/AccessPointControllerLinux.cxx similarity index 94% rename from src/linux/wifi/core/AccessPointControllerHostapd.cxx rename to src/linux/wifi/core/AccessPointControllerLinux.cxx index 1b49d784..78c721c8 100644 --- a/src/linux/wifi/core/AccessPointControllerHostapd.cxx +++ b/src/linux/wifi/core/AccessPointControllerLinux.cxx @@ -1,7 +1,7 @@ #include -#include +#include #include #include #include diff --git a/src/linux/wifi/core/AccessPointLinux.cxx b/src/linux/wifi/core/AccessPointLinux.cxx index 4f59c608..689968da 100644 --- a/src/linux/wifi/core/AccessPointLinux.cxx +++ b/src/linux/wifi/core/AccessPointLinux.cxx @@ -1,5 +1,5 @@ -#include +#include #include using namespace Microsoft::Net::Wifi; diff --git a/src/linux/wifi/core/CMakeLists.txt b/src/linux/wifi/core/CMakeLists.txt index ac5a7732..e18791ca 100644 --- a/src/linux/wifi/core/CMakeLists.txt +++ b/src/linux/wifi/core/CMakeLists.txt @@ -7,13 +7,13 @@ set(WIFI_CORE_LINUX_PUBLIC_INCLUDE_PREFIX ${WIFI_CORE_LINUX_PUBLIC_INCLUDE}/${WI target_sources(wifi-core-linux PRIVATE - AccessPointControllerHostapd.cxx + AccessPointControllerLinux.cxx AccessPointLinux.cxx PUBLIC FILE_SET HEADERS BASE_DIRS ${WIFI_CORE_LINUX_PUBLIC_INCLUDE} FILES - ${WIFI_CORE_LINUX_PUBLIC_INCLUDE_PREFIX}/AccessPointControllerHostapd.hxx + ${WIFI_CORE_LINUX_PUBLIC_INCLUDE_PREFIX}/AccessPointControllerLinux.hxx ${WIFI_CORE_LINUX_PUBLIC_INCLUDE_PREFIX}/AccessPointLinux.hxx ) diff --git a/src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerHostapd.hxx b/src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerLinux.hxx similarity index 100% rename from src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerHostapd.hxx rename to src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerLinux.hxx From 599db04e8c1924ff7f0f6d336b657bffd97f8132 Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Mon, 22 Jan 2024 21:34:40 +0000 Subject: [PATCH 2/3] Ignore vscode launch/debug settings. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 471c60f4..15de8754 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # VS and VSCode .vs +.vscode/launch.json .vscode/settings.json bin/ obj/ From e580ffb258acf7365eb6c3e3595548f6c2a6989d Mon Sep 17 00:00:00 2001 From: Andrew Beltrano Date: Mon, 22 Jan 2024 21:35:59 +0000 Subject: [PATCH 3/3] Rename classes. --- src/linux/server/Main.cxx | 2 +- src/linux/tools/apmonitor/Main.cxx | 2 +- .../wifi/core/AccessPointControllerLinux.cxx | 10 ++++----- src/linux/wifi/core/AccessPointLinux.cxx | 2 +- .../net/wifi/AccessPointControllerLinux.hxx | 22 +++++++++---------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/linux/server/Main.cxx b/src/linux/server/Main.cxx index 03049c61..cefd44aa 100644 --- a/src/linux/server/Main.cxx +++ b/src/linux/server/Main.cxx @@ -50,7 +50,7 @@ main(int argc, char *argv[]) { configuration.AccessPointManager = AccessPointManager::Create(); - auto accessPointControllerFactory = std::make_unique(); + auto accessPointControllerFactory = std::make_unique(); auto accessPointFactory = std::make_shared(std::move(accessPointControllerFactory)); auto accessPointDiscoveryAgentOperationsNetlink = std::make_unique(accessPointFactory); auto accessPointDiscoveryAgent = AccessPointDiscoveryAgent::Create(std::move(accessPointDiscoveryAgentOperationsNetlink)); diff --git a/src/linux/tools/apmonitor/Main.cxx b/src/linux/tools/apmonitor/Main.cxx index 23034ad5..b4e0a98b 100644 --- a/src/linux/tools/apmonitor/Main.cxx +++ b/src/linux/tools/apmonitor/Main.cxx @@ -23,7 +23,7 @@ main([[maybe_unused]] int argc, [[maybe_unused]] char* argv[]) plog::init(plog::verbose, &colorConsoleAppender); // Configure monitoring with the netlink protocol. - auto accessPointControllerFactory = std::make_unique(); + auto accessPointControllerFactory = std::make_unique(); auto accessPointFactory = std::make_shared(std::move(accessPointControllerFactory)); auto accessPointDiscoveryAgentOperationsNetlink{ std::make_unique(accessPointFactory) }; auto accessPointDiscoveryAgent{ AccessPointDiscoveryAgent::Create(std::move(accessPointDiscoveryAgentOperationsNetlink)) }; diff --git a/src/linux/wifi/core/AccessPointControllerLinux.cxx b/src/linux/wifi/core/AccessPointControllerLinux.cxx index 78c721c8..dbdd37cd 100644 --- a/src/linux/wifi/core/AccessPointControllerLinux.cxx +++ b/src/linux/wifi/core/AccessPointControllerLinux.cxx @@ -10,21 +10,21 @@ using namespace Microsoft::Net::Wifi; -AccessPointControllerHostapd::AccessPointControllerHostapd(std::string_view interfaceName) : +AccessPointControllerLinux::AccessPointControllerLinux(std::string_view interfaceName) : AccessPointController(interfaceName), m_hostapd(interfaceName) { } Ieee80211AccessPointCapabilities -AccessPointControllerHostapd::GetCapabilities() +AccessPointControllerLinux::GetCapabilities() { // TODO: Implement this method. return {}; } bool -AccessPointControllerHostapd::GetIsEnabled() +AccessPointControllerLinux::GetIsEnabled() { bool isEnabled{ false }; @@ -39,7 +39,7 @@ AccessPointControllerHostapd::GetIsEnabled() } std::unique_ptr -AccessPointControllerHostapdFactory::Create(std::string_view interfaceName) +AccessPointControllerLinuxFactory::Create(std::string_view interfaceName) { - return std::make_unique(interfaceName); + return std::make_unique(interfaceName); } diff --git a/src/linux/wifi/core/AccessPointLinux.cxx b/src/linux/wifi/core/AccessPointLinux.cxx index 689968da..4b1a5dad 100644 --- a/src/linux/wifi/core/AccessPointLinux.cxx +++ b/src/linux/wifi/core/AccessPointLinux.cxx @@ -7,7 +7,7 @@ using namespace Microsoft::Net::Wifi; std::unique_ptr AccessPointLinux::CreateController() { - return std::make_unique(GetInterfaceName()); + return std::make_unique(GetInterfaceName()); } std::shared_ptr diff --git a/src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerLinux.hxx b/src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerLinux.hxx index c3371e75..b62264a5 100644 --- a/src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerLinux.hxx +++ b/src/linux/wifi/core/include/microsoft/net/wifi/AccessPointControllerLinux.hxx @@ -1,6 +1,6 @@ -#ifndef ACCESS_POINT_CONTROLLER_HOSTAPD_HXX -#define ACCESS_POINT_CONTROLLER_HOSTAPD_HXX +#ifndef ACCESS_POINT_CONTROLLER_LINUX_HXX +#define ACCESS_POINT_CONTROLLER_LINUX_HXX #include @@ -12,19 +12,19 @@ namespace Microsoft::Net::Wifi /** * @brief Implementation of IAccessPointController which uses the hostapd daemon to control the access point. */ -struct AccessPointControllerHostapd : +struct AccessPointControllerLinux : public AccessPointController { - virtual ~AccessPointControllerHostapd() = default; + virtual ~AccessPointControllerLinux() = default; - AccessPointControllerHostapd() = delete; + AccessPointControllerLinux() = delete; /** - * @brief Construct a new AccessPointControllerHostapd object for the specified interface. + * @brief Construct a new AccessPointControllerLinux object for the specified interface. * * @param interfaceName The name of the interface to control. */ - AccessPointControllerHostapd(std::string_view interfaceName); + AccessPointControllerLinux(std::string_view interfaceName); /** * @brief Get whether the access point is enabled. @@ -48,12 +48,12 @@ private: }; /** - * @brief Factory to create AccessPointControllerHostapd objects. + * @brief Factory to create AccessPointControllerLinux objects. */ -struct AccessPointControllerHostapdFactory : +struct AccessPointControllerLinuxFactory : public IAccessPointControllerFactory { - virtual ~AccessPointControllerHostapdFactory() = default; + virtual ~AccessPointControllerLinuxFactory() = default; /** * @brief Create a new IAccessPointController object. @@ -65,4 +65,4 @@ struct AccessPointControllerHostapdFactory : }; } // namespace Microsoft::Net::Wifi -#endif // ACCESS_POINT_CONTROLLER_HOSTAPD_HXX +#endif // ACCESS_POINT_CONTROLLER_LINUX_HXX