diff options
| author | 2018-07-26 02:17:15 -0400 | |
|---|---|---|
| committer | 2018-07-26 02:47:06 -0400 | |
| commit | f916611e321fa07d790e5ddb34fee222ddf7d4f0 (patch) | |
| tree | f382defc458740d574311218c936839071bdebf3 /src/core/hle/service/nim | |
| parent | Merge pull request #828 from lioncash/ldr (diff) | |
| download | yuzu-f916611e321fa07d790e5ddb34fee222ddf7d4f0.tar.gz yuzu-f916611e321fa07d790e5ddb34fee222ddf7d4f0.tar.xz yuzu-f916611e321fa07d790e5ddb34fee222ddf7d4f0.zip | |
service: Add the nim services
Adds the skeleton for the nim services based off information from Switch
Brew.
Diffstat (limited to 'src/core/hle/service/nim')
| -rw-r--r-- | src/core/hle/service/nim/nim.cpp | 124 | ||||
| -rw-r--r-- | src/core/hle/service/nim/nim.h | 15 |
2 files changed, 139 insertions, 0 deletions
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 | |||
| 9 | namespace Service::NIM { | ||
| 10 | |||
| 11 | class NIM final : public ServiceFramework<NIM> { | ||
| 12 | public: | ||
| 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 | |||
| 69 | class NIM_SHP final : public ServiceFramework<NIM_SHP> { | ||
| 70 | public: | ||
| 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 | |||
| 103 | class NTC final : public ServiceFramework<NTC> { | ||
| 104 | public: | ||
| 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 | |||
| 118 | void 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 | |||
| 7 | namespace Service::SM { | ||
| 8 | class ServiceManager; | ||
| 9 | } | ||
| 10 | |||
| 11 | namespace Service::NIM { | ||
| 12 | |||
| 13 | void InstallInterfaces(SM::ServiceManager& sm); | ||
| 14 | |||
| 15 | } // namespace Service::NIM | ||