aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Pctl/IParentalControlServiceFactory.cs
blob: 678279f9342afb74738b67728e74e28cc58f9536 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory;

namespace Ryujinx.HLE.HOS.Services.Pctl
{
    [Service("pctl")]
    [Service("pctl:a")]
    [Service("pctl:r")]
    [Service("pctl:s")]
    class IParentalControlServiceFactory : IpcService
    {
        public IParentalControlServiceFactory(ServiceCtx context) { }

        [Command(0)]
        // CreateService(u64, pid) -> object<nn::pctl::detail::ipc::IParentalControlService>
        public ResultCode CreateService(ServiceCtx context)
        {
            MakeObject(context, new IParentalControlService());

            return ResultCode.Success;
        }

        [Command(1)] // 4.0.0+
        // CreateServiceWithoutInitialize(u64, pid) -> object<nn::pctl::detail::ipc::IParentalControlService>
        public ResultCode CreateServiceWithoutInitialize(ServiceCtx context)
        {
            MakeObject(context, new IParentalControlService(false));

            return ResultCode.Success;
        }
    }
}