aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/OsHle/Services/ServiceFactory.cs
blob: 0720c5d25654accef48ff6223db30ddb30a42809 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
using Ryujinx.HLE.OsHle.Services.Acc;
using Ryujinx.HLE.OsHle.Services.Am;
using Ryujinx.HLE.OsHle.Services.Apm;
using Ryujinx.HLE.OsHle.Services.Aud;
using Ryujinx.HLE.OsHle.Services.Bsd;
using Ryujinx.HLE.OsHle.Services.Caps;
using Ryujinx.HLE.OsHle.Services.Friend;
using Ryujinx.HLE.OsHle.Services.FspSrv;
using Ryujinx.HLE.OsHle.Services.Hid;
using Ryujinx.HLE.OsHle.Services.Lm;
using Ryujinx.HLE.OsHle.Services.Nfp;
using Ryujinx.HLE.OsHle.Services.Ns;
using Ryujinx.HLE.OsHle.Services.Nv;
using Ryujinx.HLE.OsHle.Services.Pctl;
using Ryujinx.HLE.OsHle.Services.Pl;
using Ryujinx.HLE.OsHle.Services.Prepo;
using Ryujinx.HLE.OsHle.Services.Set;
using Ryujinx.HLE.OsHle.Services.Sfdnsres;
using Ryujinx.HLE.OsHle.Services.Sm;
using Ryujinx.HLE.OsHle.Services.Ssl;
using Ryujinx.HLE.OsHle.Services.Vi;
using System;

namespace Ryujinx.HLE.OsHle.Services
{
    static class ServiceFactory
    {
        public static IpcService MakeService(string Name)
        {
            switch (Name)
            {
                case "acc:u0":
                    return new IAccountServiceForApplication();

                case "aoc:u":
                    return new IAddOnContentManager();

                case "apm":
                    return new IManager();

                case "apm:p":
                    return new IManager();

                case "appletAE":
                    return new IAllSystemAppletProxiesService();

                case "appletOE":
                    return new IApplicationProxyService();

                case "audout:u":
                    return new IAudioOutManager();

                case "audren:u":
                    return new IAudioRendererManager();

                case "bsd:s":
                    return new IClient();

                case "bsd:u":
                    return new IClient();

                case "caps:a":
                    return new IAlbumAccessorService();

                case "caps:ss":
                    return new IScreenshotService();

                case "friend:a":
                    return new IServiceCreator();

                case "friend:u":
                    return new IServiceCreator();

                case "fsp-srv":
                    return new IFileSystemProxy();

                case "hid":
                    return new IHidServer();

                case "lm":
                    return new ILogService();

                case "nfp:user":
                    return new IUserManager();

                case "nifm:u":
                    return new Nifm.IStaticService();

                case "ns:ec":
                    return new IServiceGetterInterface();

                case "ns:su":
                    return new ISystemUpdateInterface();

                case "ns:vm":
                    return new IVulnerabilityManagerInterface();

                case "nvdrv":
                    return new INvDrvServices();

                case "nvdrv:a":
                    return new INvDrvServices();

                case "pctl:s":
                    return new IParentalControlServiceFactory();

                case "pctl:r":
                    return new IParentalControlServiceFactory();

                case "pctl:a":
                    return new IParentalControlServiceFactory();

                case "pctl":
                    return new IParentalControlServiceFactory();

                case "pl:u":
                    return new ISharedFontManager();

                case "prepo:a":
                    return new IPrepoService();

                case "prepo:u":
                    return new IPrepoService();

                case "set":
                    return new ISettingsServer();

                case "set:sys":
                    return new ISystemSettingsServer();

                case "sfdnsres":
                    return new IResolver();

                case "sm:":
                    return new IUserInterface();

                case "ssl":
                    return new ISslService();

                case "time:a":
                    return new Time.IStaticService();

                case "time:s":
                    return new Time.IStaticService();

                case "time:u":
                    return new Time.IStaticService();

                case "vi:m":
                    return new IManagerRootService();

                case "vi:s":
                    return new ISystemRootService();

                case "vi:u":
                    return new IApplicationRootService();
            }

            throw new NotImplementedException(Name);
        }
    }
}