summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/nim/nim.cpp124
-rw-r--r--src/core/hle/service/nim/nim.h15
-rw-r--r--src/core/hle/service/service.cpp2
4 files changed, 143 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 2e2de59b1..4c0b6dbc0 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -170,6 +170,8 @@ add_library(core STATIC
170 hle/service/nfp/nfp_user.h 170 hle/service/nfp/nfp_user.h
171 hle/service/nifm/nifm.cpp 171 hle/service/nifm/nifm.cpp
172 hle/service/nifm/nifm.h 172 hle/service/nifm/nifm.h
173 hle/service/nim/nim.cpp
174 hle/service/nim/nim.h
173 hle/service/ns/ns.cpp 175 hle/service/ns/ns.cpp
174 hle/service/ns/ns.h 176 hle/service/ns/ns.h
175 hle/service/ns/pl_u.cpp 177 hle/service/ns/pl_u.cpp
diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp
new file mode 100644
index 000000000..bd05b0a70
--- /dev/null
+++ b/src/core/hle/service/nim/nim.cpp
@@ -0,0 +1,124 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/nim/nim.h"
6#include "core/hle/service/service.h"
7#include "core/hle/service/sm/sm.h"
8
9namespace Service::NIM {
10
11class NIM final : public ServiceFramework<NIM> {
12public:
13 explicit NIM() : ServiceFramework{"nim"} {
14 // clang-format off
15 static const FunctionInfo functions[] = {
16 {0, nullptr, "CreateSystemUpdateTask"},
17 {1, nullptr, "DestroySystemUpdateTask"},
18 {2, nullptr, "ListSystemUpdateTask"},
19 {3, nullptr, "RequestSystemUpdateTaskRun"},
20 {4, nullptr, "GetSystemUpdateTaskInfo"},
21 {5, nullptr, "CommitSystemUpdateTask"},
22 {6, nullptr, "CreateNetworkInstallTask"},
23 {7, nullptr, "DestroyNetworkInstallTask"},
24 {8, nullptr, "ListNetworkInstallTask"},
25 {9, nullptr, "RequestNetworkInstallTaskRun"},
26 {10, nullptr, "GetNetworkInstallTaskInfo"},
27 {11, nullptr, "CommitNetworkInstallTask"},
28 {12, nullptr, "RequestLatestSystemUpdateMeta"},
29 {14, nullptr, "ListApplicationNetworkInstallTask"},
30 {15, nullptr, "ListNetworkInstallTaskContentMeta"},
31 {16, nullptr, "RequestLatestVersion"},
32 {17, nullptr, "SetNetworkInstallTaskAttribute"},
33 {18, nullptr, "AddNetworkInstallTaskContentMeta"},
34 {19, nullptr, "GetDownloadedSystemDataPath"},
35 {20, nullptr, "CalculateNetworkInstallTaskRequiredSize"},
36 {21, nullptr, "IsExFatDriverIncluded"},
37 {22, nullptr, "GetBackgroundDownloadStressTaskInfo"},
38 {23, nullptr, "RequestDeviceAuthenticationToken"},
39 {24, nullptr, "RequestGameCardRegistrationStatus"},
40 {25, nullptr, "RequestRegisterGameCard"},
41 {26, nullptr, "RequestRegisterNotificationToken"},
42 {27, nullptr, "RequestDownloadTaskList"},
43 {28, nullptr, "RequestApplicationControl"},
44 {29, nullptr, "RequestLatestApplicationControl"},
45 {30, nullptr, "RequestVersionList"},
46 {31, nullptr, "CreateApplyDeltaTask"},
47 {32, nullptr, "DestroyApplyDeltaTask"},
48 {33, nullptr, "ListApplicationApplyDeltaTask"},
49 {34, nullptr, "RequestApplyDeltaTaskRun"},
50 {35, nullptr, "GetApplyDeltaTaskInfo"},
51 {36, nullptr, "ListApplyDeltaTask"},
52 {37, nullptr, "CommitApplyDeltaTask"},
53 {38, nullptr, "CalculateApplyDeltaTaskRequiredSize"},
54 {39, nullptr, "PrepareShutdown"},
55 {40, nullptr, "ListApplyDeltaTask"},
56 {41, nullptr, "ClearNotEnoughSpaceStateOfApplyDeltaTask"},
57 {42, nullptr, "Unknown1"},
58 {43, nullptr, "Unknown2"},
59 {44, nullptr, "Unknown3"},
60 {45, nullptr, "Unknown4"},
61 {46, nullptr, "Unknown5"},
62 };
63 // clang-format on
64
65 RegisterHandlers(functions);
66 }
67};
68
69class NIM_SHP final : public ServiceFramework<NIM_SHP> {
70public:
71 explicit NIM_SHP() : ServiceFramework{"nim:shp"} {
72 // clang-format off
73 static const FunctionInfo functions[] = {
74 {0, nullptr, "RequestDeviceAuthenticationToken"},
75 {1, nullptr, "RequestCachedDeviceAuthenticationToken"},
76 {100, nullptr, "RequestRegisterDeviceAccount"},
77 {101, nullptr, "RequestUnregisterDeviceAccount"},
78 {102, nullptr, "RequestDeviceAccountStatus"},
79 {103, nullptr, "GetDeviceAccountInfo"},
80 {104, nullptr, "RequestDeviceRegistrationInfo"},
81 {105, nullptr, "RequestTransferDeviceAccount"},
82 {106, nullptr, "RequestSyncRegistration"},
83 {107, nullptr, "IsOwnDeviceId"},
84 {200, nullptr, "RequestRegisterNotificationToken"},
85 {300, nullptr, "RequestUnlinkDevice"},
86 {301, nullptr, "RequestUnlinkDeviceIntegrated"},
87 {302, nullptr, "RequestLinkDevice"},
88 {303, nullptr, "HasDeviceLink"},
89 {304, nullptr, "RequestUnlinkDeviceAll"},
90 {305, nullptr, "RequestCreateVirtualAccount"},
91 {306, nullptr, "RequestDeviceLinkStatus"},
92 {400, nullptr, "GetAccountByVirtualAccount"},
93 {500, nullptr, "RequestSyncTicket"},
94 {501, nullptr, "RequestDownloadTicket"},
95 {502, nullptr, "RequestDownloadTicketForPrepurchasedContents"},
96 };
97 // clang-format on
98
99 RegisterHandlers(functions);
100 }
101};
102
103class NTC final : public ServiceFramework<NTC> {
104public:
105 explicit NTC() : ServiceFramework{"ntc"} {
106 // clang-format off
107 static const FunctionInfo functions[] = {
108 {0, nullptr, "OpenEnsureNetworkClockAvailabilityService"},
109 {100, nullptr, "SuspendAutonomicTimeCorrection"},
110 {101, nullptr, "ResumeAutonomicTimeCorrection"},
111 };
112 // clang-format on
113
114 RegisterHandlers(functions);
115 }
116};
117
118void InstallInterfaces(SM::ServiceManager& sm) {
119 std::make_shared<NIM>()->InstallAsService(sm);
120 std::make_shared<NIM_SHP>()->InstallAsService(sm);
121 std::make_shared<NTC>()->InstallAsService(sm);
122}
123
124} // namespace Service::NIM
diff --git a/src/core/hle/service/nim/nim.h b/src/core/hle/service/nim/nim.h
new file mode 100644
index 000000000..2a2a92df0
--- /dev/null
+++ b/src/core/hle/service/nim/nim.h
@@ -0,0 +1,15 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::NIM {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::NIM
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 482989ea7..f35828967 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -33,6 +33,7 @@
33#include "core/hle/service/mm/mm_u.h" 33#include "core/hle/service/mm/mm_u.h"
34#include "core/hle/service/nfp/nfp.h" 34#include "core/hle/service/nfp/nfp.h"
35#include "core/hle/service/nifm/nifm.h" 35#include "core/hle/service/nifm/nifm.h"
36#include "core/hle/service/nim/nim.h"
36#include "core/hle/service/ns/ns.h" 37#include "core/hle/service/ns/ns.h"
37#include "core/hle/service/nvdrv/nvdrv.h" 38#include "core/hle/service/nvdrv/nvdrv.h"
38#include "core/hle/service/pctl/pctl.h" 39#include "core/hle/service/pctl/pctl.h"
@@ -204,6 +205,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
204 MM::InstallInterfaces(*sm); 205 MM::InstallInterfaces(*sm);
205 NFP::InstallInterfaces(*sm); 206 NFP::InstallInterfaces(*sm);
206 NIFM::InstallInterfaces(*sm); 207 NIFM::InstallInterfaces(*sm);
208 NIM::InstallInterfaces(*sm);
207 NS::InstallInterfaces(*sm); 209 NS::InstallInterfaces(*sm);
208 Nvidia::InstallInterfaces(*sm); 210 Nvidia::InstallInterfaces(*sm);
209 PCTL::InstallInterfaces(*sm); 211 PCTL::InstallInterfaces(*sm);