File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ AccessPoint::GetInterfaceName() const noexcept
19
19
std::unique_ptr<IAccessPointController>
20
20
AccessPoint::CreateController ()
21
21
{
22
- return m_accessPointControllerFactory->Create (m_interfaceName);
22
+ return (m_accessPointControllerFactory != nullptr )
23
+ ? m_accessPointControllerFactory->Create (m_interfaceName)
24
+ : nullptr ;
23
25
}
24
26
25
27
AccessPointFactory::AccessPointFactory (std::shared_ptr<IAccessPointControllerFactory> accessPointControllerFactory) :
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ target_sources(${PROJECT_NAME}-server-windows
9
9
target_link_libraries (${PROJECT_NAME} -server-windows
10
10
PRIVATE
11
11
${PROJECT_NAME} -server
12
+ wifi-apmanager
12
13
)
13
14
14
15
set_target_properties (${PROJECT_NAME} -server-windows
Original file line number Diff line number Diff line change 1
1
2
2
#include < format>
3
3
#include < iostream>
4
+ #include < memory>
4
5
5
6
#include < microsoft/net/remote/NetRemoteServer.hxx>
6
7
#include < microsoft/net/remote/NetRemoteServerConfiguration.hxx>
8
+ #include < microsoft/net/wifi/AccessPoint.hxx>
9
+ #include < microsoft/net/wifi/AccessPointManager.hxx>
7
10
8
11
using namespace Microsoft ::Net::Remote;
12
+ using namespace Microsoft ::Net::Wifi;
9
13
10
14
int
11
15
main (int argc, char * argv[])
12
16
{
13
- const auto configuration = NetRemoteServerConfiguration::FromCommandLineArguments (argc, argv);
17
+ auto configuration = NetRemoteServerConfiguration::FromCommandLineArguments (argc, argv);
18
+ {
19
+ auto accessPointFactory = std::make_unique<AccessPointFactory>(nullptr );
20
+ auto accessPointManager = AccessPointManager::Create (std::move (accessPointFactory));
21
+ configuration.AccessPointManager = accessPointManager;
22
+ }
14
23
15
- NetRemoteServer server{ configuration. ServerAddress };
24
+ NetRemoteServer server{ std::move ( configuration) };
16
25
server.Run ();
17
26
server.GetGrpcServer ()->Wait ();
18
27
You can’t perform that action at this time.
0 commit comments