Skip to content

Commit

Permalink
Merge pull request #32 from sudachi-emu/feature-1800-stubs
Browse files Browse the repository at this point in the history
Added v18.0.0 stubs for all documented functions in switchbrew.org
  • Loading branch information
jarrodnorwell committed Mar 29, 2024
2 parents 2af4aa3 + b8a4256 commit 063508e
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 9 deletions.
2 changes: 1 addition & 1 deletion externals/nx_tzdb/tzdb_to_nx
15 changes: 13 additions & 2 deletions src/core/hle/service/acc/acc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class IManagerForSystemService final : public ServiceFramework<IManagerForSystem
{150, nullptr, "CreateAuthorizationRequest"},
{160, nullptr, "RequiresUpdateNetworkServiceAccountIdTokenCache"},
{161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"},
{170, nullptr, "CreateDeviceHistoryRequest"} // 17.0.0+
{170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+
{180, nullptr, "GetRequestForNintendoAccountReauthentication"} // 18.0.0+
};
// clang-format on

Expand Down Expand Up @@ -136,6 +137,7 @@ class IFloatingRegistrationRequest final : public ServiceFramework<IFloatingRegi
{13, nullptr, "GetLinkedNintendoAccountId"},
{14, nullptr, "GetNickname"},
{15, nullptr, "GetProfileImage"},
{16, nullptr, "GetProfileLargeImage"}, // 18.0.0+
{21, nullptr, "LoadIdTokenCache"},
{100, nullptr, "RegisterUser"}, // [1.0.0-3.0.2] RegisterAsync
{101, nullptr, "RegisterUserWithUid"}, // [1.0.0-3.0.2] RegisterWithUidAsync
Expand Down Expand Up @@ -182,6 +184,7 @@ class IAdministrator final : public ServiceFramework<IAdministrator> {
{160, nullptr, "RequiresUpdateNetworkServiceAccountIdTokenCache"},
{161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"},
{170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+
{180, nullptr, "GetRequestForNintendoAccountReauthentication"}, // 18.0.0+
{200, nullptr, "IsRegistered"},
{201, nullptr, "RegisterAsync"},
{202, nullptr, "UnregisterAsync"},
Expand Down Expand Up @@ -265,6 +268,7 @@ class IOAuthProcedureForExternalNsa final : public ServiceFramework<IOAuthProced
{101, nullptr, "GetLinkedNintendoAccountId"},
{102, nullptr, "GetNickname"},
{103, nullptr, "GetProfileImage"},
{104, nullptr, "GetProfileLargeImage"} // 18.0.0+
};
// clang-format on

Expand Down Expand Up @@ -319,6 +323,9 @@ class IProfileCommon : public ServiceFramework<IProfileCommon> {
{1, &IProfileCommon::GetBase, "GetBase"},
{10, &IProfileCommon::GetImageSize, "GetImageSize"},
{11, &IProfileCommon::LoadImage, "LoadImage"},
{20, nullptr, "GetLargeImageSize"}, // 18.0.0+
{21, nullptr, "LoadLargeImage"}, // 18.0.0+
{30, nullptr, "GetImageId"} // 18.0.0+
};

RegisterHandlers(functions);
Expand All @@ -327,6 +334,7 @@ class IProfileCommon : public ServiceFramework<IProfileCommon> {
static const FunctionInfo editor_functions[] = {
{100, &IProfileCommon::Store, "Store"},
{101, &IProfileCommon::StoreWithImage, "StoreWithImage"},
{110, nullptr, "StoreWithLargeImage"} // 18.0.0+
};

RegisterHandlers(editor_functions);
Expand Down Expand Up @@ -532,6 +540,7 @@ class IGuestLoginRequest final : public ServiceFramework<IGuestLoginRequest> {
{13, nullptr, "GetLinkedNintendoAccountId"},
{14, nullptr, "GetNickname"},
{15, nullptr, "GetProfileImage"},
{16, nullptr, "GetProfileLargeImage"}, // 18.0.0+
{21, nullptr, "LoadIdTokenCache"}, // 3.0.0+
};
// clang-format on
Expand Down Expand Up @@ -686,13 +695,15 @@ class IOAuthProcedureForUserRegistration final
{101, nullptr, "GetLinkedNintendoAccountId"},
{102, nullptr, "GetNickname"},
{103, nullptr, "GetProfileImage"},
{104, nullptr, "GetProfileLargeImage"}, // 18.0.0+
{110, nullptr, "RegisterUserAsync"},
{111, nullptr, "GetUid"},
{200, nullptr, "ApplyResponseForUserCreationAsync"}, // 17.0.0+
{205, nullptr, "SuspendAfterApplyResponse"}, // 17.0.0+
{210, nullptr, "IsProfileAvailable"}, // 17.0.0+
{220, nullptr, "RegisterUserAsyncWithoutProfile"}, // 17.0.0+
{221, nullptr, "RegisterUserWithProfileAsync"} // 17.0.0+
{221, nullptr, "RegisterUserWithProfileAsync"}, // 17.0.0+
{230, nullptr, "RegisterUserWithLargeImageProfileAsync"} // 18.0.0+
};
// clang-format on

Expand Down
6 changes: 6 additions & 0 deletions src/core/hle/service/acc/acc_su.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ ACC_SU::ACC_SU(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager>
{290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"},
{291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"},
{299, nullptr, "SuspendBackgroundDaemon"},
{400, nullptr, "SetPinCode"}, // 18.0.0+
{401, nullptr, "GetPinCodeLength"}, // 18.0.0+
{402, nullptr, "GetPinCode"}, // 18.0.0+
{410, nullptr, "GetPinCodeErrorCount"}, // 18.0.0+
{411, nullptr, "ResetPinCodeErrorCount"}, // 18.0.0+
{412, nullptr, "IncrementPinCodeErrorCount"}, // 18.0.0+
{900, nullptr, "SetUserUnqualifiedForDebug"},
{901, nullptr, "UnsetUserUnqualifiedForDebug"},
{902, nullptr, "ListUsersUnqualifiedForDebug"},
Expand Down
2 changes: 2 additions & 0 deletions src/core/hle/service/acc/acc_u1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ ACC_U1::ACC_U1(std::shared_ptr<Module> module_, std::shared_ptr<ProfileManager>
{152, nullptr, "LoadSignedDeviceIdentifierCacheForNintendoAccount"},
{190, nullptr, "GetUserLastOpenedApplication"},
{191, nullptr, "ActivateOpenContextHolder"},
{401, nullptr, "GetPinCodeLength"}, // 18.0.0+
{402, nullptr, "GetPinCode"}, // 18.0.0+
{997, nullptr, "DebugInvalidateTokenCacheForUser"},
{998, nullptr, "DebugSetUserStateClose"},
{999, nullptr, "DebugSetUserStateOpen"},
Expand Down
10 changes: 6 additions & 4 deletions src/core/hle/service/audio/audio_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ IAudioDevice::IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u
{12, D<&IAudioDevice::QueryAudioDeviceOutputEvent>, "QueryAudioDeviceOutputEvent"},
{13, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioOutputDeviceName"},
{14, D<&IAudioDevice::ListAudioOutputDeviceName>, "ListAudioOutputDeviceName"},
{15, nullptr, "AcquireAudioInputDeviceNotification"}, // 17.0.0+
{16, nullptr, "ReleaseAudioInputDeviceNotification"}, // 17.0.0+
{17, nullptr, "AcquireAudioOutputDeviceNotification"}, // 17.0.0+
{18, nullptr, "ReleaseAudioOutputDeviceNotification"} // 17.0.0+
{15, nullptr, "AcquireAudioInputDeviceNotification"}, // 17.0.0+
{16, nullptr, "ReleaseAudioInputDeviceNotification"}, // 17.0.0+
{17, nullptr, "AcquireAudioOutputDeviceNotification"}, // 17.0.0+
{18, nullptr, "ReleaseAudioOutputDeviceNotification"}, // 17.0.0+
{19, nullptr, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, // 18.0.0+
{20, nullptr, "IsAudioDeviceOutputVolumeAutoTuneEnabled"} // 18.0.0+
};
RegisterHandlers(functions);

Expand Down
3 changes: 3 additions & 0 deletions src/core/hle/service/friend/friend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class IFriendService final : public ServiceFramework<IFriendService> {
{10101, &IFriendService::GetFriendList, "GetFriendList"},
{10102, nullptr, "UpdateFriendInfo"},
{10110, nullptr, "GetFriendProfileImage"},
{10111, nullptr, "GetFriendProfileImageWithImageSize"}, // 18.0.0+
{10120, &IFriendService::CheckFriendListAvailability, "CheckFriendListAvailability"},
{10121, nullptr, "EnsureFriendListAvailable"},
{10200, nullptr, "SendFriendRequestForApplication"},
Expand All @@ -35,13 +36,15 @@ class IFriendService final : public ServiceFramework<IFriendService> {
{10420, &IFriendService::CheckBlockedUserListAvailability, "CheckBlockedUserListAvailability"},
{10421, nullptr, "EnsureBlockedUserListAvailable"},
{10500, nullptr, "GetProfileList"},
{10501, nullptr, "GetProfileListV2"}, // 18.0.0+
{10600, nullptr, "DeclareOpenOnlinePlaySession"},
{10601, &IFriendService::DeclareCloseOnlinePlaySession, "DeclareCloseOnlinePlaySession"},
{10610, &IFriendService::UpdateUserPresence, "UpdateUserPresence"},
{10700, &IFriendService::GetPlayHistoryRegistrationKey, "GetPlayHistoryRegistrationKey"},
{10701, nullptr, "GetPlayHistoryRegistrationKeyWithNetworkServiceAccountId"},
{10702, nullptr, "AddPlayHistory"},
{11000, nullptr, "GetProfileImageUrl"},
{11001, nullptr, "GetProfileImageUrlV2"}, // 18.0.0+
{20100, &IFriendService::GetFriendCount, "GetFriendCount"},
{20101, &IFriendService::GetNewlyFriendCount, "GetNewlyFriendCount"},
{20102, nullptr, "GetFriendDetailedInfo"},
Expand Down
2 changes: 2 additions & 0 deletions src/core/hle/service/ldn/ldn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class ISystemServiceCreator final : public ServiceFramework<ISystemServiceCreato
// clang-format off
static const FunctionInfo functions[] = {
{0, C<&ISystemServiceCreator::CreateSystemLocalCommunicationService>, "CreateSystemLocalCommunicationService"},
{1, nullptr, "CreateClientProcessMonitor"} // 18.0.0+
};
// clang-format on

Expand All @@ -62,6 +63,7 @@ class IUserServiceCreator final : public ServiceFramework<IUserServiceCreator> {
// clang-format off
static const FunctionInfo functions[] = {
{0, C<&IUserServiceCreator::CreateUserLocalCommunicationService>, "CreateUserLocalCommunicationService"},
{1, nullptr, "CreateClientProcessMonitor"} // 18.0.0+
};
// clang-format on

Expand Down
7 changes: 7 additions & 0 deletions src/core/hle/service/nifm/nifm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,13 @@ IGeneralService::IGeneralService(Core::System& system_)
{41, nullptr, "GetAcceptableNetworkTypeFlag"},
{42, nullptr, "NotifyConnectionStateChanged"},
{43, nullptr, "SetWowlDelayedWakeTime"},
{44, nullptr, "IsWiredConnectionAvailable"}, // 18.0.0+
{45, nullptr, "IsNetworkEmulationFeatureEnabled"}, // 18.0.0+
{46, nullptr, "SelectActiveNetworkEmulationProfileIdForDebug"}, // 18.0.0+
{47, nullptr, "GetActiveNetworkEmulationProfileId"}, // 18.0.0+
{50, nullptr, "IsRewriteFeatureEnabled"}, // 18.0.0+
{51, nullptr, "CreateRewriteRule"}, // 18.0.0+
{52, nullptr, "DestroyRewriteRule"} // 18.0.0+
};
// clang-format on

Expand Down
22 changes: 20 additions & 2 deletions src/core/hle/service/npns/npns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,44 @@ class INpnsSystem final : public ServiceFramework<INpnsSystem> {
{4, nullptr, "ReceiveRaw"},
{5, C<&INpnsSystem::GetReceiveEvent>, "GetReceiveEvent"},
{6, nullptr, "ListenUndelivered"},
{7, nullptr, "GetStateChangeEVent"},
{7, nullptr, "GetStateChangeEvent"},
{8, nullptr, "ListenToByName"}, // 18.0.0+
{11, nullptr, "SubscribeTopic"},
{12, nullptr, "UnsubscribeTopic"},
{13, nullptr, "QueryIsTopicExist"},
{14, nullptr, "SubscribeTopicByAccount"}, // 18.0.0+
{15, nullptr, "UnsubscribeTopicByAccount"}, // 18.0.0+
{16, nullptr, "DownloadSubscriptionList"}, // 18.0.0+
{21, nullptr, "CreateToken"},
{22, nullptr, "CreateTokenWithApplicationId"},
{23, nullptr, "DestroyToken"},
{24, nullptr, "DestroyTokenWithApplicationId"},
{25, nullptr, "QueryIsTokenValid"},
{26, nullptr, "ListenToMyApplicationId"},
{27, nullptr, "DestroyTokenAll"},
{28, nullptr, "CreateTokenWithName"}, // 18.0.0+
{29, nullptr, "DestroyTokenWithName"}, // 18.0.0+
{31, nullptr, "UploadTokenToBaaS"},
{32, nullptr, "DestroyTokenForBaaS"},
{33, nullptr, "CreateTokenForBaaS"},
{34, nullptr, "SetBaaSDeviceAccountIdList"},
{35, nullptr, "LinkNsaId"}, // 17.0.0+
{36, nullptr, "UnlinkNsaId"}, // 17.0.0+
{37, nullptr, "RelinkNsaId"}, // 18.0.0+
{40, nullptr, "GetNetworkServiceAccountIdTokenRequestEvent"}, // 17.0.0+
{41, nullptr, "TryPopNetworkServiceAccountIdTokenRequestUid"}, // 17.0.0+
{42, nullptr, "SetNetworkServiceAccountIdTokenSuccess"}, // 17.0.0+
{43, nullptr, "SetNetworkServiceAccountIdTokenFailure"}, // 17.0.0+
{44, nullptr, "SetUidList"}, // 17.0.0+
{45, nullptr, "PutDigitalTwinKeyValue"}, // 17.0.0+
{51, nullptr, "DeleteDigitalTwinKeyValue"}, // 18.0.0+
{101, nullptr, "Suspend"},
{102, nullptr, "Resume"},
{103, nullptr, "GetState"},
{104, nullptr, "GetStatistics"},
{105, nullptr, "GetPlayReportRequestEvent"},
{106, nullptr, "GetLastNotifiedTime"}, // 18.0.0+
{107, nullptr, "SetLastNotifiedTime"}, // 18.0.0+
{111, nullptr, "GetJid"},
{112, nullptr, "CreateJid"},
{113, nullptr, "DestroyJid"},
Expand All @@ -63,10 +73,17 @@ class INpnsSystem final : public ServiceFramework<INpnsSystem> {
{153, nullptr, "GetDropEventWithHandover"},
{154, nullptr, "CreateTokenAsync"},
{155, nullptr, "CreateTokenAsyncWithApplicationId"},
{156, nullptr, "CreateTokenWithNameAsync"}, // 18.0.0+
{161, nullptr, "GetRequestChangeStateCancelEvent"},
{162, nullptr, "RequestChangeStateForceTimedWithCancelEvent"},
{201, nullptr, "RequestChangeStateForceTimed"},
{202, nullptr, "RequestChangeStateForceAsync"},
{301, nullptr, "GetPassword"}, // 18.0.0+
{302, nullptr, "GetAllImmigration"}, // 18.0.0+
{303, nullptr, "GetNotificationHistories"}, // 18.0.0+
{304, nullptr, "GetPersistentConnectionSummary"}, // 18.0.0+
{305, nullptr, "GetDigitalTwinSummary"}, // 18.0.0+
{306, nullptr, "GetDigitalTwinValue"}, // 18.0.0+
};
// clang-format on

Expand Down Expand Up @@ -106,7 +123,8 @@ class INpnsUser final : public ServiceFramework<INpnsUser> {
{3, nullptr, "Receive"},
{4, nullptr, "ReceiveRaw"},
{5, nullptr, "GetReceiveEvent"},
{7, nullptr, "GetStateChangeEVent"},
{7, nullptr, "GetStateChangeEvent"},
{8, nullptr, "ListenToByName"}, // 18.0.0+
{21, nullptr, "CreateToken"},
{23, nullptr, "DestroyToken"},
{25, nullptr, "QueryIsTokenValid"},
Expand Down
7 changes: 7 additions & 0 deletions src/core/hle/service/pctl/parental_control_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{1472, nullptr, "CancelNetworkRequest"},
{1473, D<&IParentalControlService::GetUnlinkedEvent>, "GetUnlinkedEvent"},
{1474, nullptr, "ClearUnlinkedEvent"},
{1475, nullptr, "GetExtendedPlayTimerEvent"}, // 18.0.0+
{1601, nullptr, "DisableAllFeatures"},
{1602, nullptr, "PostEnableAllFeatures"},
{1603, nullptr, "IsAllFeaturesDisabled"},
Expand All @@ -101,6 +102,10 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{1951, nullptr, "SetPlayTimerSettingsForDebug"},
{1952, nullptr, "GetPlayTimerSpentTimeForTest"},
{1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"},
{1954, nullptr, "IsBedtimeAlarmEnabled"}, // 18.0.0+
{1955, nullptr, "GetBedtimeAlarmTime"}, // 18.0.0+
{1956, nullptr, "GetBedtimeAlarmTimeHour"}, // 18.0.0+
{1957, nullptr, "GetBedtimeAlarmTimeMinute"}, // 18.0.0+
{2001, nullptr, "RequestPairingAsync"},
{2002, nullptr, "FinishRequestPairing"},
{2003, nullptr, "AuthorizePairingAsync"},
Expand All @@ -117,6 +122,8 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili
{2014, nullptr, "FinishSynchronizeParentalControlSettings"},
{2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"},
{2016, nullptr, "RequestUpdateExemptionListAsync"},
{145601, nullptr, "GetPlayTimerSettingsVer2"}, // 18.0.0+
{195101, nullptr, "SetPlayTimerSettingsForDebugVer2"} // 18.0.0+
};
// clang-format on
RegisterHandlers(functions);
Expand Down
7 changes: 7 additions & 0 deletions src/core/hle/service/pctl/pctl_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class IParentalControlService final : public ServiceFramework<IParentalControlSe
{1472, nullptr, "CancelNetworkRequest"},
{1473, &IParentalControlService::GetUnlinkedEvent, "GetUnlinkedEvent"},
{1474, nullptr, "ClearUnlinkedEvent"},
{1475, nullptr, "GetExtendedPlayTimerEvent"}, // 18.0.0+
{1601, nullptr, "DisableAllFeatures"},
{1602, nullptr, "PostEnableAllFeatures"},
{1603, nullptr, "IsAllFeaturesDisabled"},
Expand All @@ -114,6 +115,10 @@ class IParentalControlService final : public ServiceFramework<IParentalControlSe
{1951, nullptr, "SetPlayTimerSettingsForDebug"},
{1952, nullptr, "GetPlayTimerSpentTimeForTest"},
{1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"},
{1954, nullptr, "IsBedtimeAlarmEnabled"}, // 18.0.0+
{1955, nullptr, "GetBedtimeAlarmTime"}, // 18.0.0+
{1956, nullptr, "GetBedtimeAlarmTimeHour"}, // 18.0.0+
{1957, nullptr, "GetBedtimeAlarmTimeMinute"}, // 18.0.0+
{2001, nullptr, "RequestPairingAsync"},
{2002, nullptr, "FinishRequestPairing"},
{2003, nullptr, "AuthorizePairingAsync"},
Expand All @@ -130,6 +135,8 @@ class IParentalControlService final : public ServiceFramework<IParentalControlSe
{2014, nullptr, "FinishSynchronizeParentalControlSettings"},
{2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"},
{2016, nullptr, "RequestUpdateExemptionListAsync"},
{145601, nullptr, "GetPlayTimerSettingsVer2"}, // 18.0.0+
{195101, nullptr, "SetPlayTimerSettingsForDebugVer2"} // 18.0.0+
};
// clang-format on
RegisterHandlers(functions);
Expand Down

0 comments on commit 063508e

Please sign in to comment.