summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/pctl/pctl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/pctl/pctl.cpp')
-rw-r--r--src/core/hle/service/pctl/pctl.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/core/hle/service/pctl/pctl.cpp b/src/core/hle/service/pctl/pctl.cpp
index 3f47bf094..d92dbe216 100644
--- a/src/core/hle/service/pctl/pctl.cpp
+++ b/src/core/hle/service/pctl/pctl.cpp
@@ -1,19 +1,28 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "core/hle/service/pctl/parental_control_service_factory.h"
#include "core/hle/service/pctl/pctl.h"
+#include "core/hle/service/server_manager.h"
namespace Service::PCTL {
-PCTL::PCTL(Core::System& system_, std::shared_ptr<Module> module_, const char* name,
- Capability capability_)
- : Interface{system_, std::move(module_), name, capability_} {
- static const FunctionInfo functions[] = {
- {0, &PCTL::CreateService, "CreateService"},
- {1, &PCTL::CreateServiceWithoutInitialize, "CreateServiceWithoutInitialize"},
- };
- RegisterHandlers(functions);
+void LoopProcess(Core::System& system) {
+ auto server_manager = std::make_unique<ServerManager>(system);
+
+ server_manager->RegisterNamedService("pctl",
+ std::make_shared<IParentalControlServiceFactory>(
+ system, "pctl",
+ Capability::Application | Capability::SnsPost |
+ Capability::Status | Capability::StereoVision));
+ // TODO(ogniK): Implement remaining capabilities
+ server_manager->RegisterNamedService("pctl:a", std::make_shared<IParentalControlServiceFactory>(
+ system, "pctl:a", Capability::None));
+ server_manager->RegisterNamedService("pctl:r", std::make_shared<IParentalControlServiceFactory>(
+ system, "pctl:r", Capability::None));
+ server_manager->RegisterNamedService("pctl:s", std::make_shared<IParentalControlServiceFactory>(
+ system, "pctl:s", Capability::None));
+ ServerManager::RunServer(std::move(server_manager));
}
-PCTL::~PCTL() = default;
} // namespace Service::PCTL