diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-23 17:34:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-23 17:34:29 +0100 |
commit | fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5 (patch) | |
tree | 04d960417c9c4aef9108b8640ebf4e82fc3f28a1 /src/core/hle/service/pctl/pctl.cpp | |
parent | Merge pull request #13100 from liamwhite/audio-ipc (diff) | |
parent | pctl: rewrite IParentalControlService (diff) | |
download | yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.tar yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.tar.gz yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.tar.bz2 yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.tar.lz yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.tar.xz yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.tar.zst yuzu-fa4dec9fe9ff67b0a4f73953b18f0cd7e1698bd5.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 |