Skip to content

Commit

Permalink
Expose WpaEventHandler from IHostapd interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
abeltrano committed Jul 2, 2024
1 parent d7d3f5c commit 09502dd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/linux/wpa-controller/Hostapd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ Hostapd::GetInterface()
return m_interface;
}

std::shared_ptr<WpaEventHandler>
Hostapd::GetEventHandler() const noexcept
{
return m_eventHandler;
}

void
Hostapd::Ping()
{
Expand Down
8 changes: 8 additions & 0 deletions src/linux/wpa-controller/include/Wpa/Hostapd.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ struct Hostapd :
std::string_view
GetInterface() override;

/**
* @brief Obtain the event handler for the interface.
*
* @return std::shared_ptr<WpaEventHandler>
*/
std::shared_ptr<WpaEventHandler>
GetEventHandler() const noexcept override;

/**
* @brief Get the status for the interface.
*
Expand Down
11 changes: 10 additions & 1 deletion src/linux/wpa-controller/include/Wpa/IHostapd.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <Wpa/ProtocolHostapd.hxx>
#include <Wpa/ProtocolWpa.hxx>
#include <Wpa/WpaEventHandler.hxx>

namespace Wpa
{
Expand Down Expand Up @@ -90,6 +91,14 @@ struct IHostapd
virtual std::string_view
GetInterface() = 0;

/**
* @brief Obtain the event handler for the interface.
*
* @return std::shared_ptr<WpaEventHandler>
*/
virtual std::shared_ptr<WpaEventHandler>
GetEventHandler() const noexcept = 0;

/**
* @brief Get the status for the interface.
*
Expand Down Expand Up @@ -217,7 +226,7 @@ struct IHostapd
* @brief Add RADIUS server endpoints to the interface. This may contain multiple endpoints of various types. The
* first endpoint configuration for each type is used as the primary server, and any following are used as fallbacks
* in case the primary server is unreachable.
*
*
* @param endpointConfigurations The endpoint configurations to add.
* @param enforceConfigurationChange When to enforce the configuration change. A value of 'Now' will trigger a
* configuration reload.
Expand Down

0 comments on commit 09502dd

Please sign in to comment.