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/parental_control_service_factory.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/parental_control_service_factory.cpp')
-rw-r--r-- | src/core/hle/service/pctl/parental_control_service_factory.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/core/hle/service/pctl/parental_control_service_factory.cpp b/src/core/hle/service/pctl/parental_control_service_factory.cpp new file mode 100644 index 000000000..7d8f361e9 --- /dev/null +++ b/src/core/hle/service/pctl/parental_control_service_factory.cpp @@ -0,0 +1,40 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/cmif_serialization.h" +#include "core/hle/service/pctl/parental_control_service.h" +#include "core/hle/service/pctl/parental_control_service_factory.h" + +namespace Service::PCTL { + +IParentalControlServiceFactory::IParentalControlServiceFactory(Core::System& system_, + const char* name_, + Capability capability_) + : ServiceFramework{system_, name_}, capability{capability_} { + static const FunctionInfo functions[] = { + {0, D<&IParentalControlServiceFactory::CreateService>, "CreateService"}, + {1, D<&IParentalControlServiceFactory::CreateServiceWithoutInitialize>, + "CreateServiceWithoutInitialize"}, + }; + RegisterHandlers(functions); +} + +IParentalControlServiceFactory::~IParentalControlServiceFactory() = default; + +Result IParentalControlServiceFactory::CreateService( + Out<SharedPointer<IParentalControlService>> out_service, ClientProcessId process_id) { + LOG_DEBUG(Service_PCTL, "called"); + // TODO(ogniK): Get application id from process + *out_service = std::make_shared<IParentalControlService>(system, capability); + R_SUCCEED(); +} + +Result IParentalControlServiceFactory::CreateServiceWithoutInitialize( + Out<SharedPointer<IParentalControlService>> out_service, ClientProcessId process_id) { + LOG_DEBUG(Service_PCTL, "called"); + // TODO(ogniK): Get application id from process + *out_service = std::make_shared<IParentalControlService>(system, capability); + R_SUCCEED(); +} + +} // namespace Service::PCTL |