aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Bcat/IServiceCreator.cs
blob: 55583c9408c95e38901eb4c849ce98b1b65a988f (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
32
33
34
35
36
37
38
39
using Ryujinx.HLE.HOS.Ipc;
using System.Collections.Generic;

namespace Ryujinx.HLE.HOS.Services.Bcat
{
    class IServiceCreator : IpcService
    {
        private Dictionary<int, ServiceProcessRequest> m_Commands;

        public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;

        public IServiceCreator()
        {
            m_Commands = new Dictionary<int, ServiceProcessRequest>()
            {
                { 0, CreateBcatService                 },
                { 1, CreateDeliveryCacheStorageService }
            };
        }

        public long CreateBcatService(ServiceCtx Context)
        {
            long Id = Context.RequestData.ReadInt64();

            MakeObject(Context, new IBcatService());

            return 0;
        }

        public long CreateDeliveryCacheStorageService(ServiceCtx Context)
        {
            long Id = Context.RequestData.ReadInt64();

            MakeObject(Context, new IDeliveryCacheStorageService());

            return 0;
        }
    }
}