olsc: rewrite IOlscServiceForApplication

This commit is contained in:
Liam
2024-02-21 16:23:13 -05:00
parent 450171275d
commit 852ff835b5
3 changed files with 29 additions and 28 deletions
+10 -4
View File
@@ -12,10 +12,16 @@ namespace Service::OLSC {
void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
server_manager->RegisterNamedService("olsc:u",
std::make_shared<IOlscServiceForApplication>(system));
server_manager->RegisterNamedService("olsc:s",
std::make_shared<IOlscServiceForSystemService>(system));
const auto OlscFactoryForApplication = [&] {
return std::make_shared<IOlscServiceForApplication>(system);
};
const auto OlscFactoryForSystemService = [&] {
return std::make_shared<IOlscServiceForSystemService>(system);
};
server_manager->RegisterNamedService("olsc:u", OlscFactoryForApplication);
server_manager->RegisterNamedService("olsc:s", OlscFactoryForSystemService);
ServerManager::RunServer(std::move(server_manager));
}