From 0e74204aadb1753e402b333692d36b1bc7221463 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 21 Feb 2024 21:05:30 -0500 Subject: pctl: move IParentalControlServiceFactory --- .../pctl/parental_control_service_factory.cpp | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/core/hle/service/pctl/parental_control_service_factory.cpp (limited to 'src/core/hle/service/pctl/parental_control_service_factory.cpp') 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..1427f5a96 --- /dev/null +++ b/src/core/hle/service/pctl/parental_control_service_factory.cpp @@ -0,0 +1,35 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/ipc_helpers.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_} {} + +IParentalControlServiceFactory::~IParentalControlServiceFactory() = default; + +void IParentalControlServiceFactory::CreateService(HLERequestContext& ctx) { + LOG_DEBUG(Service_PCTL, "called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + // TODO(ogniK): Get TID from process + + rb.PushIpcInterface(system, capability); +} + +void IParentalControlServiceFactory::CreateServiceWithoutInitialize(HLERequestContext& ctx) { + LOG_DEBUG(Service_PCTL, "called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface(system, capability); +} + +} // namespace Service::PCTL -- cgit v1.2.3