Merge pull request #832 from lioncash/nim
service: Add the nim services
This commit is contained in:
commit
41d7b020a8
4 changed files with 143 additions and 0 deletions
|
@ -172,6 +172,8 @@ add_library(core STATIC
|
||||||
hle/service/nfp/nfp_user.h
|
hle/service/nfp/nfp_user.h
|
||||||
hle/service/nifm/nifm.cpp
|
hle/service/nifm/nifm.cpp
|
||||||
hle/service/nifm/nifm.h
|
hle/service/nifm/nifm.h
|
||||||
|
hle/service/nim/nim.cpp
|
||||||
|
hle/service/nim/nim.h
|
||||||
hle/service/ns/ns.cpp
|
hle/service/ns/ns.cpp
|
||||||
hle/service/ns/ns.h
|
hle/service/ns/ns.h
|
||||||
hle/service/ns/pl_u.cpp
|
hle/service/ns/pl_u.cpp
|
||||||
|
|
124
src/core/hle/service/nim/nim.cpp
Normal file
124
src/core/hle/service/nim/nim.cpp
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/service/nim/nim.h"
|
||||||
|
#include "core/hle/service/service.h"
|
||||||
|
#include "core/hle/service/sm/sm.h"
|
||||||
|
|
||||||
|
namespace Service::NIM {
|
||||||
|
|
||||||
|
class NIM final : public ServiceFramework<NIM> {
|
||||||
|
public:
|
||||||
|
explicit NIM() : ServiceFramework{"nim"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "CreateSystemUpdateTask"},
|
||||||
|
{1, nullptr, "DestroySystemUpdateTask"},
|
||||||
|
{2, nullptr, "ListSystemUpdateTask"},
|
||||||
|
{3, nullptr, "RequestSystemUpdateTaskRun"},
|
||||||
|
{4, nullptr, "GetSystemUpdateTaskInfo"},
|
||||||
|
{5, nullptr, "CommitSystemUpdateTask"},
|
||||||
|
{6, nullptr, "CreateNetworkInstallTask"},
|
||||||
|
{7, nullptr, "DestroyNetworkInstallTask"},
|
||||||
|
{8, nullptr, "ListNetworkInstallTask"},
|
||||||
|
{9, nullptr, "RequestNetworkInstallTaskRun"},
|
||||||
|
{10, nullptr, "GetNetworkInstallTaskInfo"},
|
||||||
|
{11, nullptr, "CommitNetworkInstallTask"},
|
||||||
|
{12, nullptr, "RequestLatestSystemUpdateMeta"},
|
||||||
|
{14, nullptr, "ListApplicationNetworkInstallTask"},
|
||||||
|
{15, nullptr, "ListNetworkInstallTaskContentMeta"},
|
||||||
|
{16, nullptr, "RequestLatestVersion"},
|
||||||
|
{17, nullptr, "SetNetworkInstallTaskAttribute"},
|
||||||
|
{18, nullptr, "AddNetworkInstallTaskContentMeta"},
|
||||||
|
{19, nullptr, "GetDownloadedSystemDataPath"},
|
||||||
|
{20, nullptr, "CalculateNetworkInstallTaskRequiredSize"},
|
||||||
|
{21, nullptr, "IsExFatDriverIncluded"},
|
||||||
|
{22, nullptr, "GetBackgroundDownloadStressTaskInfo"},
|
||||||
|
{23, nullptr, "RequestDeviceAuthenticationToken"},
|
||||||
|
{24, nullptr, "RequestGameCardRegistrationStatus"},
|
||||||
|
{25, nullptr, "RequestRegisterGameCard"},
|
||||||
|
{26, nullptr, "RequestRegisterNotificationToken"},
|
||||||
|
{27, nullptr, "RequestDownloadTaskList"},
|
||||||
|
{28, nullptr, "RequestApplicationControl"},
|
||||||
|
{29, nullptr, "RequestLatestApplicationControl"},
|
||||||
|
{30, nullptr, "RequestVersionList"},
|
||||||
|
{31, nullptr, "CreateApplyDeltaTask"},
|
||||||
|
{32, nullptr, "DestroyApplyDeltaTask"},
|
||||||
|
{33, nullptr, "ListApplicationApplyDeltaTask"},
|
||||||
|
{34, nullptr, "RequestApplyDeltaTaskRun"},
|
||||||
|
{35, nullptr, "GetApplyDeltaTaskInfo"},
|
||||||
|
{36, nullptr, "ListApplyDeltaTask"},
|
||||||
|
{37, nullptr, "CommitApplyDeltaTask"},
|
||||||
|
{38, nullptr, "CalculateApplyDeltaTaskRequiredSize"},
|
||||||
|
{39, nullptr, "PrepareShutdown"},
|
||||||
|
{40, nullptr, "ListApplyDeltaTask"},
|
||||||
|
{41, nullptr, "ClearNotEnoughSpaceStateOfApplyDeltaTask"},
|
||||||
|
{42, nullptr, "Unknown1"},
|
||||||
|
{43, nullptr, "Unknown2"},
|
||||||
|
{44, nullptr, "Unknown3"},
|
||||||
|
{45, nullptr, "Unknown4"},
|
||||||
|
{46, nullptr, "Unknown5"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class NIM_SHP final : public ServiceFramework<NIM_SHP> {
|
||||||
|
public:
|
||||||
|
explicit NIM_SHP() : ServiceFramework{"nim:shp"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "RequestDeviceAuthenticationToken"},
|
||||||
|
{1, nullptr, "RequestCachedDeviceAuthenticationToken"},
|
||||||
|
{100, nullptr, "RequestRegisterDeviceAccount"},
|
||||||
|
{101, nullptr, "RequestUnregisterDeviceAccount"},
|
||||||
|
{102, nullptr, "RequestDeviceAccountStatus"},
|
||||||
|
{103, nullptr, "GetDeviceAccountInfo"},
|
||||||
|
{104, nullptr, "RequestDeviceRegistrationInfo"},
|
||||||
|
{105, nullptr, "RequestTransferDeviceAccount"},
|
||||||
|
{106, nullptr, "RequestSyncRegistration"},
|
||||||
|
{107, nullptr, "IsOwnDeviceId"},
|
||||||
|
{200, nullptr, "RequestRegisterNotificationToken"},
|
||||||
|
{300, nullptr, "RequestUnlinkDevice"},
|
||||||
|
{301, nullptr, "RequestUnlinkDeviceIntegrated"},
|
||||||
|
{302, nullptr, "RequestLinkDevice"},
|
||||||
|
{303, nullptr, "HasDeviceLink"},
|
||||||
|
{304, nullptr, "RequestUnlinkDeviceAll"},
|
||||||
|
{305, nullptr, "RequestCreateVirtualAccount"},
|
||||||
|
{306, nullptr, "RequestDeviceLinkStatus"},
|
||||||
|
{400, nullptr, "GetAccountByVirtualAccount"},
|
||||||
|
{500, nullptr, "RequestSyncTicket"},
|
||||||
|
{501, nullptr, "RequestDownloadTicket"},
|
||||||
|
{502, nullptr, "RequestDownloadTicketForPrepurchasedContents"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class NTC final : public ServiceFramework<NTC> {
|
||||||
|
public:
|
||||||
|
explicit NTC() : ServiceFramework{"ntc"} {
|
||||||
|
// clang-format off
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
|
{0, nullptr, "OpenEnsureNetworkClockAvailabilityService"},
|
||||||
|
{100, nullptr, "SuspendAutonomicTimeCorrection"},
|
||||||
|
{101, nullptr, "ResumeAutonomicTimeCorrection"},
|
||||||
|
};
|
||||||
|
// clang-format on
|
||||||
|
|
||||||
|
RegisterHandlers(functions);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& sm) {
|
||||||
|
std::make_shared<NIM>()->InstallAsService(sm);
|
||||||
|
std::make_shared<NIM_SHP>()->InstallAsService(sm);
|
||||||
|
std::make_shared<NTC>()->InstallAsService(sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Service::NIM
|
15
src/core/hle/service/nim/nim.h
Normal file
15
src/core/hle/service/nim/nim.h
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
// Copyright 2018 yuzu emulator team
|
||||||
|
// Licensed under GPLv2 or any later version
|
||||||
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace Service::SM {
|
||||||
|
class ServiceManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Service::NIM {
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& sm);
|
||||||
|
|
||||||
|
} // namespace Service::NIM
|
|
@ -34,6 +34,7 @@
|
||||||
#include "core/hle/service/mm/mm_u.h"
|
#include "core/hle/service/mm/mm_u.h"
|
||||||
#include "core/hle/service/nfp/nfp.h"
|
#include "core/hle/service/nfp/nfp.h"
|
||||||
#include "core/hle/service/nifm/nifm.h"
|
#include "core/hle/service/nifm/nifm.h"
|
||||||
|
#include "core/hle/service/nim/nim.h"
|
||||||
#include "core/hle/service/ns/ns.h"
|
#include "core/hle/service/ns/ns.h"
|
||||||
#include "core/hle/service/nvdrv/nvdrv.h"
|
#include "core/hle/service/nvdrv/nvdrv.h"
|
||||||
#include "core/hle/service/pctl/pctl.h"
|
#include "core/hle/service/pctl/pctl.h"
|
||||||
|
@ -206,6 +207,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
|
||||||
MM::InstallInterfaces(*sm);
|
MM::InstallInterfaces(*sm);
|
||||||
NFP::InstallInterfaces(*sm);
|
NFP::InstallInterfaces(*sm);
|
||||||
NIFM::InstallInterfaces(*sm);
|
NIFM::InstallInterfaces(*sm);
|
||||||
|
NIM::InstallInterfaces(*sm);
|
||||||
NS::InstallInterfaces(*sm);
|
NS::InstallInterfaces(*sm);
|
||||||
Nvidia::InstallInterfaces(*sm);
|
Nvidia::InstallInterfaces(*sm);
|
||||||
PCTL::InstallInterfaces(*sm);
|
PCTL::InstallInterfaces(*sm);
|
||||||
|
|
Loading…
Reference in a new issue