diff options
author | Liam <byteslice@airmail.cc> | 2024-02-22 03:05:30 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-22 05:00:01 +0100 |
commit | 0e74204aadb1753e402b333692d36b1bc7221463 (patch) | |
tree | ea3791615ffedad6d6c9d52f6519309a04b575d9 /src/core/hle/service/pctl/pctl.cpp | |
parent | pctl: move IParentalControlService (diff) | |
download | yuzu-0e74204aadb1753e402b333692d36b1bc7221463.tar yuzu-0e74204aadb1753e402b333692d36b1bc7221463.tar.gz yuzu-0e74204aadb1753e402b333692d36b1bc7221463.tar.bz2 yuzu-0e74204aadb1753e402b333692d36b1bc7221463.tar.lz yuzu-0e74204aadb1753e402b333692d36b1bc7221463.tar.xz yuzu-0e74204aadb1753e402b333692d36b1bc7221463.tar.zst yuzu-0e74204aadb1753e402b333692d36b1bc7221463.zip |
Diffstat (limited to 'src/core/hle/service/pctl/pctl.cpp')
-rw-r--r-- | src/core/hle/service/pctl/pctl.cpp | 27 |
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 |