Skip to content

Commit

Permalink
Rename classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
abeltrano committed Jan 22, 2024
1 parent 599db04 commit e580ffb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/linux/server/Main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ main(int argc, char *argv[])
{
configuration.AccessPointManager = AccessPointManager::Create();

auto accessPointControllerFactory = std::make_unique<AccessPointControllerHostapdFactory>();
auto accessPointControllerFactory = std::make_unique<AccessPointControllerLinuxFactory>();
auto accessPointFactory = std::make_shared<AccessPointFactoryLinux>(std::move(accessPointControllerFactory));
auto accessPointDiscoveryAgentOperationsNetlink = std::make_unique<AccessPointDiscoveryAgentOperationsNetlink>(accessPointFactory);
auto accessPointDiscoveryAgent = AccessPointDiscoveryAgent::Create(std::move(accessPointDiscoveryAgentOperationsNetlink));
Expand Down
2 changes: 1 addition & 1 deletion src/linux/tools/apmonitor/Main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<AccessPointControllerHostapdFactory>();
auto accessPointControllerFactory = std::make_unique<AccessPointControllerLinuxFactory>();
auto accessPointFactory = std::make_shared<AccessPointFactoryLinux>(std::move(accessPointControllerFactory));
auto accessPointDiscoveryAgentOperationsNetlink{ std::make_unique<AccessPointDiscoveryAgentOperationsNetlink>(accessPointFactory) };
auto accessPointDiscoveryAgent{ AccessPointDiscoveryAgent::Create(std::move(accessPointDiscoveryAgentOperationsNetlink)) };
Expand Down
10 changes: 5 additions & 5 deletions src/linux/wifi/core/AccessPointControllerLinux.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };

Expand All @@ -39,7 +39,7 @@ AccessPointControllerHostapd::GetIsEnabled()
}

std::unique_ptr<IAccessPointController>
AccessPointControllerHostapdFactory::Create(std::string_view interfaceName)
AccessPointControllerLinuxFactory::Create(std::string_view interfaceName)
{
return std::make_unique<AccessPointControllerHostapd>(interfaceName);
return std::make_unique<AccessPointControllerLinux>(interfaceName);
}
2 changes: 1 addition & 1 deletion src/linux/wifi/core/AccessPointLinux.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using namespace Microsoft::Net::Wifi;
std::unique_ptr<IAccessPointController>
AccessPointLinux::CreateController()
{
return std::make_unique<AccessPointControllerHostapd>(GetInterfaceName());
return std::make_unique<AccessPointControllerLinux>(GetInterfaceName());
}

std::shared_ptr<IAccessPoint>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <string_view>

Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -65,4 +65,4 @@ struct AccessPointControllerHostapdFactory :
};
} // namespace Microsoft::Net::Wifi

#endif // ACCESS_POINT_CONTROLLER_HOSTAPD_HXX
#endif // ACCESS_POINT_CONTROLLER_LINUX_HXX

0 comments on commit e580ffb

Please sign in to comment.