diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 04977c27d8..62d54f04bf 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -346,7 +346,6 @@ public: explicit IProfileCommon(Core::System& system_, const char* name, bool editor_commands, Common::UUID user_id_, ProfileManager& profile_manager_) : ServiceFramework{system_, name}, profile_manager{profile_manager_}, user_id{user_id_} { - // clang-format off static const FunctionInfo functions[] = { FunctionInfo{0, &IProfileCommon::Get, "Get"}, FunctionInfo{1, &IProfileCommon::GetBase, "GetBase"}, @@ -356,17 +355,14 @@ public: FunctionInfo{21, &IProfileCommon::Unknown21, "Unknown21"}, FunctionInfo{30, &IProfileCommon::Unknown30, "Unknown30"} }; - // clang-format on RegisterHandlers(functions); if (editor_commands) { - // clang-format off static const FunctionInfo editor_functions[] = { FunctionInfo{100, &IProfileCommon::Store, "Store"}, FunctionInfo{101, &IProfileCommon::StoreWithImage, "StoreWithImage"}, FunctionInfo{110, &IProfileCommon::Unknown110, "Unknown110"} }; - // clang-format on RegisterHandlers(editor_functions); } } diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp index 437032c2f4..a6c435983f 100644 --- a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp +++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp @@ -19,23 +19,6 @@ namespace Service::AM { IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& system_, WindowSystem& window_system) : ServiceFramework{system_, "appletAE"}, m_window_system{window_system} { - // clang-format off - static const FunctionInfo functions[] = { - {100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"}, - {110, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxyEx"}, - {200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"}, - {201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"}, - {300, D<&IAllSystemAppletProxiesService::OpenOverlayAppletProxy>, "OpenOverlayAppletProxy"}, - {350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"}, - {400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"}, - {410, nullptr, "GetSystemAppletControllerForDebug"}, - {450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+ - {460, D<&IAllSystemAppletProxiesService::GetAppletAlternativeFunctions>, "GetAppletAlternativeFunctions"}, // 20.0.0+ - {1000, nullptr, "GetDebugFunctions"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAllSystemAppletProxiesService::~IAllSystemAppletProxiesService() = default; diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.h b/src/core/hle/service/am/service/all_system_applet_proxies_service.h index 73cb8a09ac..bb26f62503 100644 --- a/src/core/hle/service/am/service/all_system_applet_proxies_service.h +++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.h @@ -49,6 +49,22 @@ private: private: std::shared_ptr GetAppletFromProcessId(ProcessId pid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"}, + FunctionInfo{110, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxyEx"}, + FunctionInfo{200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"}, + FunctionInfo{201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"}, + FunctionInfo{300, D<&IAllSystemAppletProxiesService::OpenOverlayAppletProxy>, "OpenOverlayAppletProxy"}, + FunctionInfo{350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"}, + FunctionInfo{400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"}, + FunctionInfo{410, nullptr, "GetSystemAppletControllerForDebug"}, + FunctionInfo{450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+ + FunctionInfo{460, D<&IAllSystemAppletProxiesService::GetAppletAlternativeFunctions>, "GetAppletAlternativeFunctions"}, // 20.0.0+ + FunctionInfo{1000, nullptr, "GetDebugFunctions"} + ); WindowSystem& m_window_system; }; diff --git a/src/core/hle/service/am/service/applet_common_functions.cpp b/src/core/hle/service/am/service/applet_common_functions.cpp index 5ffec23b3e..c8792f1a45 100644 --- a/src/core/hle/service/am/service/applet_common_functions.cpp +++ b/src/core/hle/service/am/service/applet_common_functions.cpp @@ -15,36 +15,6 @@ namespace Service::AM { IAppletCommonFunctions::IAppletCommonFunctions(Core::System& system_, std::shared_ptr applet_) : ServiceFramework{system_, "IAppletCommonFunctions"}, applet{std::move(applet_)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "SetTerminateResult"}, - {10, nullptr, "ReadThemeStorage"}, - {11, nullptr, "WriteThemeStorage"}, - {20, nullptr, "PushToAppletBoundChannel"}, - {21, nullptr, "TryPopFromAppletBoundChannel"}, - {40, nullptr, "GetDisplayLogicalResolution"}, - {42, D<&IAppletCommonFunctions::SetDisplayMagnification>, "SetDisplayMagnification"}, - {50, D<&IAppletCommonFunctions::SetHomeButtonDoubleClickEnabled>, "SetHomeButtonDoubleClickEnabled"}, - {51, D<&IAppletCommonFunctions::GetHomeButtonDoubleClickEnabled>, "GetHomeButtonDoubleClickEnabled"}, - {52, nullptr, "IsHomeButtonShortPressedBlocked"}, - {60, nullptr, "IsVrModeCurtainRequired"}, - {61, nullptr, "IsSleepRequiredByHighTemperature"}, - {62, nullptr, "IsSleepRequiredByLowBattery"}, - {70, D<&IAppletCommonFunctions::SetCpuBoostRequestPriority>, "SetCpuBoostRequestPriority"}, - {80, nullptr, "SetHandlingCaptureButtonShortPressedMessageEnabledForApplet"}, - {81, nullptr, "SetHandlingCaptureButtonLongPressedMessageEnabledForApplet"}, - {90, nullptr, "OpenNamedChannelAsParent"}, - {91, nullptr, "OpenNamedChannelAsChild"}, - {100, nullptr, "SetApplicationCoreUsageMode"}, - {300, D<&IAppletCommonFunctions::GetCurrentApplicationId>, "GetCurrentApplicationId"}, - {310, nullptr, "IsSystemAppletHomeMenu"}, //19.0.0+ - {320, D<&IAppletCommonFunctions::SetGpuTimeSliceBoost>, "SetGpuTimeSliceBoost"}, //19.0.0+ - {321, nullptr, "SetGpuTimeSliceBoostDueToApplication"}, //19.0.0+ - {350, D<&IAppletCommonFunctions::Unknown350>, "Unknown350"} //20.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IAppletCommonFunctions::~IAppletCommonFunctions() = default; diff --git a/src/core/hle/service/am/service/applet_common_functions.h b/src/core/hle/service/am/service/applet_common_functions.h index 696fcd5bd1..daf0353c39 100644 --- a/src/core/hle/service/am/service/applet_common_functions.h +++ b/src/core/hle/service/am/service/applet_common_functions.h @@ -27,6 +27,35 @@ private: Result SetGpuTimeSliceBoost(s64 time_span); Result Unknown350(Out out_unknown); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "SetTerminateResult"}, + FunctionInfo{10, nullptr, "ReadThemeStorage"}, + FunctionInfo{11, nullptr, "WriteThemeStorage"}, + FunctionInfo{20, nullptr, "PushToAppletBoundChannel"}, + FunctionInfo{21, nullptr, "TryPopFromAppletBoundChannel"}, + FunctionInfo{40, nullptr, "GetDisplayLogicalResolution"}, + FunctionInfo{42, D<&IAppletCommonFunctions::SetDisplayMagnification>, "SetDisplayMagnification"}, + FunctionInfo{50, D<&IAppletCommonFunctions::SetHomeButtonDoubleClickEnabled>, "SetHomeButtonDoubleClickEnabled"}, + FunctionInfo{51, D<&IAppletCommonFunctions::GetHomeButtonDoubleClickEnabled>, "GetHomeButtonDoubleClickEnabled"}, + FunctionInfo{52, nullptr, "IsHomeButtonShortPressedBlocked"}, + FunctionInfo{60, nullptr, "IsVrModeCurtainRequired"}, + FunctionInfo{61, nullptr, "IsSleepRequiredByHighTemperature"}, + FunctionInfo{62, nullptr, "IsSleepRequiredByLowBattery"}, + FunctionInfo{70, D<&IAppletCommonFunctions::SetCpuBoostRequestPriority>, "SetCpuBoostRequestPriority"}, + FunctionInfo{80, nullptr, "SetHandlingCaptureButtonShortPressedMessageEnabledForApplet"}, + FunctionInfo{81, nullptr, "SetHandlingCaptureButtonLongPressedMessageEnabledForApplet"}, + FunctionInfo{90, nullptr, "OpenNamedChannelAsParent"}, + FunctionInfo{91, nullptr, "OpenNamedChannelAsChild"}, + FunctionInfo{100, nullptr, "SetApplicationCoreUsageMode"}, + FunctionInfo{300, D<&IAppletCommonFunctions::GetCurrentApplicationId>, "GetCurrentApplicationId"}, + FunctionInfo{310, nullptr, "IsSystemAppletHomeMenu"}, //19.0.0+ + FunctionInfo{320, D<&IAppletCommonFunctions::SetGpuTimeSliceBoost>, "SetGpuTimeSliceBoost"}, //19.0.0+ + FunctionInfo{321, nullptr, "SetGpuTimeSliceBoostDueToApplication"}, //19.0.0+ + FunctionInfo{350, D<&IAppletCommonFunctions::Unknown350>, "Unknown350"} //20.0.0+ + ); const std::shared_ptr applet; }; diff --git a/src/core/hle/service/am/service/application_accessor.cpp b/src/core/hle/service/am/service/application_accessor.cpp index f357871706..8dc67c340c 100644 --- a/src/core/hle/service/am/service/application_accessor.cpp +++ b/src/core/hle/service/am/service/application_accessor.cpp @@ -22,38 +22,6 @@ IApplicationAccessor::IApplicationAccessor(Core::System& system_, std::shared_pt WindowSystem& window_system) : ServiceFramework{system_, "IApplicationAccessor"}, m_window_system(window_system), m_applet(std::move(applet)) { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IApplicationAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"}, - {1, nullptr, "IsCompleted"}, - {10, D<&IApplicationAccessor::Start>, "Start"}, - {20, D<&IApplicationAccessor::RequestExit>, "RequestExit"}, - {25, D<&IApplicationAccessor::Terminate>, "Terminate"}, - {30, D<&IApplicationAccessor::GetResult>, "GetResult"}, - {101, D<&IApplicationAccessor::RequestForApplicationToGetForeground>, "RequestForApplicationToGetForeground"}, - {110, nullptr, "TerminateAllLibraryApplets"}, - {111, nullptr, "AreAnyLibraryAppletsLeft"}, - {112, D<&IApplicationAccessor::GetCurrentLibraryApplet>, "GetCurrentLibraryApplet"}, - {120, nullptr, "GetApplicationId"}, - {121, D<&IApplicationAccessor::PushLaunchParameter>, "PushLaunchParameter"}, - {122, D<&IApplicationAccessor::GetApplicationControlProperty>, "GetApplicationControlProperty"}, - {123, nullptr, "GetApplicationLaunchProperty"}, - {124, nullptr, "GetApplicationLaunchRequestInfo"}, - {130, D<&IApplicationAccessor::SetUsers>, "SetUsers"}, - {131, D<&IApplicationAccessor::CheckRightsEnvironmentAvailable>, "CheckRightsEnvironmentAvailable"}, - {132, D<&IApplicationAccessor::GetNsRightsEnvironmentHandle>, "GetNsRightsEnvironmentHandle"}, - {140, nullptr, "GetDesirableUids"}, - {150, D<&IApplicationAccessor::ReportApplicationExitTimeout>, "ReportApplicationExitTimeout"}, - {160, nullptr, "SetApplicationAttribute"}, - {170, nullptr, "HasSaveDataAccessPermission"}, - {180, nullptr, "PushToFriendInvitationStorageChannel"}, - {190, nullptr, "PushToNotificationStorageChannel"}, - {200, nullptr, "RequestApplicationSoftReset"}, - {201, nullptr, "RestartApplicationTimer"}, - }; - // clang-format on - - RegisterHandlers(functions); } IApplicationAccessor::~IApplicationAccessor() = default; diff --git a/src/core/hle/service/am/service/application_accessor.h b/src/core/hle/service/am/service/application_accessor.h index b9797bcc0a..497b3b8ca8 100644 --- a/src/core/hle/service/am/service/application_accessor.h +++ b/src/core/hle/service/am/service/application_accessor.h @@ -36,6 +36,37 @@ private: Result GetNsRightsEnvironmentHandle(Out out_handle); Result ReportApplicationExitTimeout(); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IApplicationAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"}, + FunctionInfo{1, nullptr, "IsCompleted"}, + FunctionInfo{10, D<&IApplicationAccessor::Start>, "Start"}, + FunctionInfo{20, D<&IApplicationAccessor::RequestExit>, "RequestExit"}, + FunctionInfo{25, D<&IApplicationAccessor::Terminate>, "Terminate"}, + FunctionInfo{30, D<&IApplicationAccessor::GetResult>, "GetResult"}, + FunctionInfo{101, D<&IApplicationAccessor::RequestForApplicationToGetForeground>, "RequestForApplicationToGetForeground"}, + FunctionInfo{110, nullptr, "TerminateAllLibraryApplets"}, + FunctionInfo{111, nullptr, "AreAnyLibraryAppletsLeft"}, + FunctionInfo{112, D<&IApplicationAccessor::GetCurrentLibraryApplet>, "GetCurrentLibraryApplet"}, + FunctionInfo{120, nullptr, "GetApplicationId"}, + FunctionInfo{121, D<&IApplicationAccessor::PushLaunchParameter>, "PushLaunchParameter"}, + FunctionInfo{122, D<&IApplicationAccessor::GetApplicationControlProperty>, "GetApplicationControlProperty"}, + FunctionInfo{123, nullptr, "GetApplicationLaunchProperty"}, + FunctionInfo{124, nullptr, "GetApplicationLaunchRequestInfo"}, + FunctionInfo{130, D<&IApplicationAccessor::SetUsers>, "SetUsers"}, + FunctionInfo{131, D<&IApplicationAccessor::CheckRightsEnvironmentAvailable>, "CheckRightsEnvironmentAvailable"}, + FunctionInfo{132, D<&IApplicationAccessor::GetNsRightsEnvironmentHandle>, "GetNsRightsEnvironmentHandle"}, + FunctionInfo{140, nullptr, "GetDesirableUids"}, + FunctionInfo{150, D<&IApplicationAccessor::ReportApplicationExitTimeout>, "ReportApplicationExitTimeout"}, + FunctionInfo{160, nullptr, "SetApplicationAttribute"}, + FunctionInfo{170, nullptr, "HasSaveDataAccessPermission"}, + FunctionInfo{180, nullptr, "PushToFriendInvitationStorageChannel"}, + FunctionInfo{190, nullptr, "PushToNotificationStorageChannel"}, + FunctionInfo{200, nullptr, "RequestApplicationSoftReset"}, + FunctionInfo{201, nullptr, "RestartApplicationTimer"} + ); WindowSystem& m_window_system; const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/application_creator.cpp b/src/core/hle/service/am/service/application_creator.cpp index 4eb2f29e22..b27eef5f06 100644 --- a/src/core/hle/service/am/service/application_creator.cpp +++ b/src/core/hle/service/am/service/application_creator.cpp @@ -54,16 +54,6 @@ Result CreateGuestApplication(SharedPointer* out_applicati IApplicationCreator::IApplicationCreator(Core::System& system_, WindowSystem& window_system) : ServiceFramework{system_, "IApplicationCreator"}, m_window_system{window_system} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IApplicationCreator::CreateApplication>, "CreateApplication"}, - {1, nullptr, "PopLaunchRequestedApplication"}, - {10, D<&IApplicationCreator::CreateSystemApplication>, "CreateSystemApplication"}, - {100, nullptr, "PopFloatingApplicationForDevelopment"}, - }; - // clang-format on - - RegisterHandlers(functions); } IApplicationCreator::~IApplicationCreator() = default; diff --git a/src/core/hle/service/am/service/application_creator.h b/src/core/hle/service/am/service/application_creator.h index 75975b9596..13897591ed 100644 --- a/src/core/hle/service/am/service/application_creator.h +++ b/src/core/hle/service/am/service/application_creator.h @@ -24,6 +24,15 @@ private: Result CreateApplication(Out>, u64 application_id); Result CreateSystemApplication(Out>, u64 application_id); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IApplicationCreator::CreateApplication>, "CreateApplication"}, + FunctionInfo{1, nullptr, "PopLaunchRequestedApplication"}, + FunctionInfo{10, D<&IApplicationCreator::CreateSystemApplication>, "CreateSystemApplication"}, + FunctionInfo{100, nullptr, "PopFloatingApplicationForDevelopment"} + ); WindowSystem& m_window_system; }; diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index 90d292c4a2..65a84259a7 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -55,74 +55,74 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_ : ServiceFramework{system_, "IApplicationFunctions"}, m_applet{std::move(applet)} { // clang-format off static const FunctionInfo functions[] = { - {1, D<&IApplicationFunctions::PopLaunchParameter>, "PopLaunchParameter"}, - {10, nullptr, "CreateApplicationAndPushAndRequestToStart"}, - {11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"}, - {12, D<&IApplicationFunctions::CreateApplicationAndRequestToStart>, "CreateApplicationAndRequestToStart"}, - {13, nullptr, "CreateApplicationAndRequestToStartForQuest"}, - {14, nullptr, "CreateApplicationWithAttributeAndPushAndRequestToStartForQuest"}, - {15, nullptr, "CreateApplicationWithAttributeAndRequestToStartForQuest"}, - {20, D<&IApplicationFunctions::EnsureSaveData>, "EnsureSaveData"}, - {21, D<&IApplicationFunctions::GetDesiredLanguage>, "GetDesiredLanguage"}, - {22, D<&IApplicationFunctions::SetTerminateResult>, "SetTerminateResult"}, - {23, D<&IApplicationFunctions::GetDisplayVersion>, "GetDisplayVersion"}, - {24, nullptr, "GetLaunchStorageInfoForDebug"}, - {25, D<&IApplicationFunctions::ExtendSaveData>, "ExtendSaveData"}, - {26, D<&IApplicationFunctions::GetSaveDataSize>, "GetSaveDataSize"}, - {27, D<&IApplicationFunctions::CreateCacheStorage>, "CreateCacheStorage"}, - {28, D<&IApplicationFunctions::GetSaveDataSizeMax>, "GetSaveDataSizeMax"}, - {29, D<&IApplicationFunctions::GetCacheStorageMax>, "GetCacheStorageMax"}, - {30, D<&IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed>, "BeginBlockingHomeButtonShortAndLongPressed"}, - {31, D<&IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed>, "EndBlockingHomeButtonShortAndLongPressed"}, - {32, D<&IApplicationFunctions::BeginBlockingHomeButton>, "BeginBlockingHomeButton"}, - {33, D<&IApplicationFunctions::EndBlockingHomeButton>, "EndBlockingHomeButton"}, - {34, nullptr, "SelectApplicationLicense"}, - {35, nullptr, "GetDeviceSaveDataSizeMax"}, - {36, nullptr, "GetLimitedApplicationLicense"}, - {37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, - {40, D<&IApplicationFunctions::NotifyRunning>, "NotifyRunning"}, - {50, D<&IApplicationFunctions::GetPseudoDeviceId>, "GetPseudoDeviceId"}, - {60, D<&IApplicationFunctions::SetMediaPlaybackStateForApplication>, "SetMediaPlaybackStateForApplication"}, - {65, D<&IApplicationFunctions::IsGamePlayRecordingSupported>, "IsGamePlayRecordingSupported"}, - {66, D<&IApplicationFunctions::InitializeGamePlayRecording>, "InitializeGamePlayRecording"}, - {67, D<&IApplicationFunctions::SetGamePlayRecordingState>, "SetGamePlayRecordingState"}, - {68, nullptr, "RequestFlushGamePlayingMovieForDebug"}, - {70, nullptr, "RequestToShutdown"}, - {71, nullptr, "RequestToReboot"}, - {72, nullptr, "RequestToSleep"}, - {80, nullptr, "ExitAndRequestToShowThanksMessage"}, - {90, D<&IApplicationFunctions::EnableApplicationCrashReport>, "EnableApplicationCrashReport"}, - {100, D<&IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer>, "InitializeApplicationCopyrightFrameBuffer"}, - {101, D<&IApplicationFunctions::SetApplicationCopyrightImage>, "SetApplicationCopyrightImage"}, - {102, D<&IApplicationFunctions::SetApplicationCopyrightVisibility>, "SetApplicationCopyrightVisibility"}, - {110, D<&IApplicationFunctions::QueryApplicationPlayStatistics>, "QueryApplicationPlayStatistics"}, - {111, D<&IApplicationFunctions::QueryApplicationPlayStatisticsByUid>, "QueryApplicationPlayStatisticsByUid"}, - {120, D<&IApplicationFunctions::ExecuteProgram>, "ExecuteProgram"}, - {121, D<&IApplicationFunctions::ClearUserChannel>, "ClearUserChannel"}, - {122, D<&IApplicationFunctions::UnpopToUserChannel>, "UnpopToUserChannel"}, - {123, D<&IApplicationFunctions::GetPreviousProgramIndex>, "GetPreviousProgramIndex"}, - {124, nullptr, "EnableApplicationAllThreadDumpOnCrash"}, - {130, D<&IApplicationFunctions::GetGpuErrorDetectedSystemEvent>, "GetGpuErrorDetectedSystemEvent"}, - {131, nullptr, "SetDelayTimeToAbortOnGpuError"}, - {140, D<&IApplicationFunctions::GetFriendInvitationStorageChannelEvent>, "GetFriendInvitationStorageChannelEvent"}, - {141, D<&IApplicationFunctions::TryPopFromFriendInvitationStorageChannel>, "TryPopFromFriendInvitationStorageChannel"}, - {150, D<&IApplicationFunctions::GetNotificationStorageChannelEvent>, "GetNotificationStorageChannelEvent"}, - {151, nullptr, "TryPopFromNotificationStorageChannel"}, - {160, D<&IApplicationFunctions::GetHealthWarningDisappearedSystemEvent>, "GetHealthWarningDisappearedSystemEvent"}, - {170, nullptr, "SetHdcpAuthenticationActivated"}, - {180, nullptr, "GetLaunchRequiredVersion"}, - {181, nullptr, "UpgradeLaunchRequiredVersion"}, - {190, nullptr, "SendServerMaintenanceOverlayNotification"}, - {200, nullptr, "GetLastApplicationExitReason"}, - {210, D<&IApplicationFunctions::GetUnknownEvent210>, "Unknown210"}, - {220, nullptr, "Unknown220"}, // [20.0.0+] - {300, nullptr, "CreateMovieWriter"}, // [19.0.0+] - {310, nullptr, "Unknown310"}, // [20.0.0+] - {320, nullptr, "Unknown320"}, // [20.0.0+] - {330, D<&IApplicationFunctions::Unknown330>, "Unknown330"}, // [20.0.0+] - {500, nullptr, "StartContinuousRecordingFlushForDebug"}, - {1000, nullptr, "CreateMovieMaker"}, - {1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"}, + FunctionInfo{1, D<&IApplicationFunctions::PopLaunchParameter>, "PopLaunchParameter"}, + FunctionInfo{10, nullptr, "CreateApplicationAndPushAndRequestToStart"}, + FunctionInfo{11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"}, + FunctionInfo{12, D<&IApplicationFunctions::CreateApplicationAndRequestToStart>, "CreateApplicationAndRequestToStart"}, + FunctionInfo{13, nullptr, "CreateApplicationAndRequestToStartForQuest"}, + FunctionInfo{14, nullptr, "CreateApplicationWithAttributeAndPushAndRequestToStartForQuest"}, + FunctionInfo{15, nullptr, "CreateApplicationWithAttributeAndRequestToStartForQuest"}, + FunctionInfo{20, D<&IApplicationFunctions::EnsureSaveData>, "EnsureSaveData"}, + FunctionInfo{21, D<&IApplicationFunctions::GetDesiredLanguage>, "GetDesiredLanguage"}, + FunctionInfo{22, D<&IApplicationFunctions::SetTerminateResult>, "SetTerminateResult"}, + FunctionInfo{23, D<&IApplicationFunctions::GetDisplayVersion>, "GetDisplayVersion"}, + FunctionInfo{24, nullptr, "GetLaunchStorageInfoForDebug"}, + FunctionInfo{25, D<&IApplicationFunctions::ExtendSaveData>, "ExtendSaveData"}, + FunctionInfo{26, D<&IApplicationFunctions::GetSaveDataSize>, "GetSaveDataSize"}, + FunctionInfo{27, D<&IApplicationFunctions::CreateCacheStorage>, "CreateCacheStorage"}, + FunctionInfo{28, D<&IApplicationFunctions::GetSaveDataSizeMax>, "GetSaveDataSizeMax"}, + FunctionInfo{29, D<&IApplicationFunctions::GetCacheStorageMax>, "GetCacheStorageMax"}, + FunctionInfo{30, D<&IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed>, "BeginBlockingHomeButtonShortAndLongPressed"}, + FunctionInfo{31, D<&IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed>, "EndBlockingHomeButtonShortAndLongPressed"}, + FunctionInfo{32, D<&IApplicationFunctions::BeginBlockingHomeButton>, "BeginBlockingHomeButton"}, + FunctionInfo{33, D<&IApplicationFunctions::EndBlockingHomeButton>, "EndBlockingHomeButton"}, + FunctionInfo{34, nullptr, "SelectApplicationLicense"}, + FunctionInfo{35, nullptr, "GetDeviceSaveDataSizeMax"}, + FunctionInfo{36, nullptr, "GetLimitedApplicationLicense"}, + FunctionInfo{37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, + FunctionInfo{40, D<&IApplicationFunctions::NotifyRunning>, "NotifyRunning"}, + FunctionInfo{50, D<&IApplicationFunctions::GetPseudoDeviceId>, "GetPseudoDeviceId"}, + FunctionInfo{60, D<&IApplicationFunctions::SetMediaPlaybackStateForApplication>, "SetMediaPlaybackStateForApplication"}, + FunctionInfo{65, D<&IApplicationFunctions::IsGamePlayRecordingSupported>, "IsGamePlayRecordingSupported"}, + FunctionInfo{66, D<&IApplicationFunctions::InitializeGamePlayRecording>, "InitializeGamePlayRecording"}, + FunctionInfo{67, D<&IApplicationFunctions::SetGamePlayRecordingState>, "SetGamePlayRecordingState"}, + FunctionInfo{68, nullptr, "RequestFlushGamePlayingMovieForDebug"}, + FunctionInfo{70, nullptr, "RequestToShutdown"}, + FunctionInfo{71, nullptr, "RequestToReboot"}, + FunctionInfo{72, nullptr, "RequestToSleep"}, + FunctionInfo{80, nullptr, "ExitAndRequestToShowThanksMessage"}, + FunctionInfo{90, D<&IApplicationFunctions::EnableApplicationCrashReport>, "EnableApplicationCrashReport"}, + FunctionInfo{100, D<&IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer>, "InitializeApplicationCopyrightFrameBuffer"}, + FunctionInfo{101, D<&IApplicationFunctions::SetApplicationCopyrightImage>, "SetApplicationCopyrightImage"}, + FunctionInfo{102, D<&IApplicationFunctions::SetApplicationCopyrightVisibility>, "SetApplicationCopyrightVisibility"}, + FunctionInfo{110, D<&IApplicationFunctions::QueryApplicationPlayStatistics>, "QueryApplicationPlayStatistics"}, + FunctionInfo{111, D<&IApplicationFunctions::QueryApplicationPlayStatisticsByUid>, "QueryApplicationPlayStatisticsByUid"}, + FunctionInfo{120, D<&IApplicationFunctions::ExecuteProgram>, "ExecuteProgram"}, + FunctionInfo{121, D<&IApplicationFunctions::ClearUserChannel>, "ClearUserChannel"}, + FunctionInfo{122, D<&IApplicationFunctions::UnpopToUserChannel>, "UnpopToUserChannel"}, + FunctionInfo{123, D<&IApplicationFunctions::GetPreviousProgramIndex>, "GetPreviousProgramIndex"}, + FunctionInfo{124, nullptr, "EnableApplicationAllThreadDumpOnCrash"}, + FunctionInfo{130, D<&IApplicationFunctions::GetGpuErrorDetectedSystemEvent>, "GetGpuErrorDetectedSystemEvent"}, + FunctionInfo{131, nullptr, "SetDelayTimeToAbortOnGpuError"}, + FunctionInfo{140, D<&IApplicationFunctions::GetFriendInvitationStorageChannelEvent>, "GetFriendInvitationStorageChannelEvent"}, + FunctionInfo{141, D<&IApplicationFunctions::TryPopFromFriendInvitationStorageChannel>, "TryPopFromFriendInvitationStorageChannel"}, + FunctionInfo{150, D<&IApplicationFunctions::GetNotificationStorageChannelEvent>, "GetNotificationStorageChannelEvent"}, + FunctionInfo{151, nullptr, "TryPopFromNotificationStorageChannel"}, + FunctionInfo{160, D<&IApplicationFunctions::GetHealthWarningDisappearedSystemEvent>, "GetHealthWarningDisappearedSystemEvent"}, + FunctionInfo{170, nullptr, "SetHdcpAuthenticationActivated"}, + FunctionInfo{180, nullptr, "GetLaunchRequiredVersion"}, + FunctionInfo{181, nullptr, "UpgradeLaunchRequiredVersion"}, + FunctionInfo{190, nullptr, "SendServerMaintenanceOverlayNotification"}, + FunctionInfo{200, nullptr, "GetLastApplicationExitReason"}, + FunctionInfo{210, D<&IApplicationFunctions::GetUnknownEvent210>, "Unknown210"}, + FunctionInfo{220, nullptr, "Unknown220"}, // [20.0.0+] + FunctionInfo{300, nullptr, "CreateMovieWriter"}, // [19.0.0+] + FunctionInfo{310, nullptr, "Unknown310"}, // [20.0.0+] + FunctionInfo{320, nullptr, "Unknown320"}, // [20.0.0+] + FunctionInfo{330, D<&IApplicationFunctions::Unknown330>, "Unknown330"}, // [20.0.0+] + FunctionInfo{500, nullptr, "StartContinuousRecordingFlushForDebug"}, + FunctionInfo{1000, nullptr, "CreateMovieMaker"}, + FunctionInfo{1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"}, }; // clang-format on diff --git a/src/core/hle/service/am/service/application_proxy.cpp b/src/core/hle/service/am/service/application_proxy.cpp index 6e1328fee7..c9cd26d2be 100644 --- a/src/core/hle/service/am/service/application_proxy.cpp +++ b/src/core/hle/service/am/service/application_proxy.cpp @@ -20,21 +20,6 @@ IApplicationProxy::IApplicationProxy(Core::System& system_, std::shared_ptr, "GetCommonStateGetter"}, - {1, D<&IApplicationProxy::GetSelfController>, "GetSelfController"}, - {2, D<&IApplicationProxy::GetWindowController>, "GetWindowController"}, - {3, D<&IApplicationProxy::GetAudioController>, "GetAudioController"}, - {4, D<&IApplicationProxy::GetDisplayController>, "GetDisplayController"}, - {10, D<&IApplicationProxy::GetProcessWindingController>, "GetProcessWindingController"}, - {11, D<&IApplicationProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, - {20, D<&IApplicationProxy::GetApplicationFunctions>, "GetApplicationFunctions"}, - {1000, D<&IApplicationProxy::GetDebugFunctions>, "GetDebugFunctions"}, - }; - // clang-format on - - RegisterHandlers(functions); } IApplicationProxy::~IApplicationProxy() = default; diff --git a/src/core/hle/service/am/service/application_proxy.h b/src/core/hle/service/am/service/application_proxy.h index 8c62459c45..2d2fef4b81 100644 --- a/src/core/hle/service/am/service/application_proxy.h +++ b/src/core/hle/service/am/service/application_proxy.h @@ -41,6 +41,20 @@ private: Out> out_application_functions); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IApplicationProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, + FunctionInfo{1, D<&IApplicationProxy::GetSelfController>, "GetSelfController"}, + FunctionInfo{2, D<&IApplicationProxy::GetWindowController>, "GetWindowController"}, + FunctionInfo{3, D<&IApplicationProxy::GetAudioController>, "GetAudioController"}, + FunctionInfo{4, D<&IApplicationProxy::GetDisplayController>, "GetDisplayController"}, + FunctionInfo{10, D<&IApplicationProxy::GetProcessWindingController>, "GetProcessWindingController"}, + FunctionInfo{11, D<&IApplicationProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, + FunctionInfo{20, D<&IApplicationProxy::GetApplicationFunctions>, "GetApplicationFunctions"}, + FunctionInfo{1000, D<&IApplicationProxy::GetDebugFunctions>, "GetDebugFunctions"} + ); WindowSystem& m_window_system; Kernel::KProcess* const m_process; const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/application_proxy_service.h b/src/core/hle/service/am/service/application_proxy_service.h index 5962e97afa..50134818ca 100644 --- a/src/core/hle/service/am/service/application_proxy_service.h +++ b/src/core/hle/service/am/service/application_proxy_service.h @@ -30,7 +30,7 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"} + FunctionInfo{0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"} ); WindowSystem& m_window_system; }; diff --git a/src/core/hle/service/am/service/audio_controller.cpp b/src/core/hle/service/am/service/audio_controller.cpp index f627b1df0e..3d93384ea2 100644 --- a/src/core/hle/service/am/service/audio_controller.cpp +++ b/src/core/hle/service/am/service/audio_controller.cpp @@ -11,18 +11,6 @@ namespace Service::AM { IAudioController::IAudioController(Core::System& system_) : ServiceFramework{system_, "IAudioController"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioController::SetExpectedMasterVolume>, "SetExpectedMasterVolume"}, - {1, D<&IAudioController::GetMainAppletExpectedMasterVolume>, "GetMainAppletExpectedMasterVolume"}, - {2, D<&IAudioController::GetLibraryAppletExpectedMasterVolume>, "GetLibraryAppletExpectedMasterVolume"}, - {3, D<&IAudioController::ChangeMainAppletMasterVolume>, "ChangeMainAppletMasterVolume"}, - {4, D<&IAudioController::SetTransparentVolumeRate>, "SetTransparentVolumeRate"}, - {5, nullptr, "Unknown5"}, //20.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IAudioController::~IAudioController() = default; diff --git a/src/core/hle/service/am/service/audio_controller.h b/src/core/hle/service/am/service/audio_controller.h index 4b0f3f9aed..5524a15a91 100644 --- a/src/core/hle/service/am/service/audio_controller.h +++ b/src/core/hle/service/am/service/audio_controller.h @@ -20,6 +20,17 @@ private: Result ChangeMainAppletMasterVolume(f32 volume, s64 fade_time_ns); Result SetTransparentVolumeRate(f32 transparent_volume_rate); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioController::SetExpectedMasterVolume>, "SetExpectedMasterVolume"}, + FunctionInfo{1, D<&IAudioController::GetMainAppletExpectedMasterVolume>, "GetMainAppletExpectedMasterVolume"}, + FunctionInfo{2, D<&IAudioController::GetLibraryAppletExpectedMasterVolume>, "GetLibraryAppletExpectedMasterVolume"}, + FunctionInfo{3, D<&IAudioController::ChangeMainAppletMasterVolume>, "ChangeMainAppletMasterVolume"}, + FunctionInfo{4, D<&IAudioController::SetTransparentVolumeRate>, "SetTransparentVolumeRate"}, + FunctionInfo{5, nullptr, "Unknown5"}, //20.0.0+ + ); static constexpr float MinAllowedVolume = 0.0f; static constexpr float MaxAllowedVolume = 1.0f; diff --git a/src/core/hle/service/am/service/common_state_getter.cpp b/src/core/hle/service/am/service/common_state_getter.cpp index 044929e434..466b9686e5 100644 --- a/src/core/hle/service/am/service/common_state_getter.cpp +++ b/src/core/hle/service/am/service/common_state_getter.cpp @@ -20,75 +20,6 @@ namespace Service::AM { ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr applet) : ServiceFramework{system_, "ICommonStateGetter"}, m_applet{std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ICommonStateGetter::GetEventHandle>, "GetEventHandle"}, - {1, D<&ICommonStateGetter::ReceiveMessage>, "ReceiveMessage"}, - {2, nullptr, "GetThisAppletKind"}, - {3, nullptr, "AllowToEnterSleep"}, - {4, nullptr, "DisallowToEnterSleep"}, - {5, D<&ICommonStateGetter::GetOperationMode>, "GetOperationMode"}, - {6, D<&ICommonStateGetter::GetPerformanceMode>, "GetPerformanceMode"}, - {7, nullptr, "GetCradleStatus"}, - {8, D<&ICommonStateGetter::GetBootMode>, "GetBootMode"}, - {9, D<&ICommonStateGetter::GetCurrentFocusState>, "GetCurrentFocusState"}, - {10, D<&ICommonStateGetter::RequestToAcquireSleepLock>, "RequestToAcquireSleepLock"}, - {11, D<&ICommonStateGetter::ReleaseSleepLock>, "ReleaseSleepLock"}, - {12, D<&ICommonStateGetter::ReleaseSleepLockTransiently>, "ReleaseSleepLockTransiently"}, - {13, D<&ICommonStateGetter::GetAcquiredSleepLockEvent>, "GetAcquiredSleepLockEvent"}, - {14, nullptr, "GetWakeupCount"}, //11.0.0+ - {15, nullptr, "Unknown15"}, //19.0.0+ - {20, D<&ICommonStateGetter::PushToGeneralChannel>, "PushToGeneralChannel"}, - {30, D<&ICommonStateGetter::GetHomeButtonReaderLockAccessor>, "GetHomeButtonReaderLockAccessor"}, - {31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"}, //2.0.0+ - {32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, //7.0.0+ - {40, nullptr, "GetCradleFwVersion"}, //2.0.0+ - {50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, //3.0.0+ - {51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, //3.0.0+ - {52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, //4.0.0+ - {53, D<&ICommonStateGetter::BeginVrModeEx>, "BeginVrModeEx"}, //7.0.0+ - {54, D<&ICommonStateGetter::EndVrModeEx>, "EndVrModeEx"}, //7.0.0+ - {55, D<&ICommonStateGetter::IsInControllerFirmwareUpdateSection>, "IsInControllerFirmwareUpdateSection"}, //3.0.0+ - {59, nullptr, "SetVrPositionForDebug"}, //1.0.0+ - {60, D<&ICommonStateGetter::GetDefaultDisplayResolution>, "GetDefaultDisplayResolution"}, - {61, D<&ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent>, "GetDefaultDisplayResolutionChangeEvent"}, - {62, D<&ICommonStateGetter::GetHdcpAuthenticationState>, "GetHdcpAuthenticationState"}, - {63, D<&ICommonStateGetter::GetHdcpAuthenticationStateChangeEvent>, "GetHdcpAuthenticationStateChangeEvent"}, - {64, nullptr, "SetTvPowerStateMatchingMode"}, - {65, nullptr, "GetApplicationIdByContentActionName"}, - {66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"}, - {67, nullptr, "CancelCpuBoostMode"}, - {68, D<&ICommonStateGetter::GetBuiltInDisplayType>, "GetBuiltInDisplayType"}, - {80, D<&ICommonStateGetter::PerformSystemButtonPressingIfInFocus>, "PerformSystemButtonPressingIfInFocus"}, - {90, nullptr, "SetPerformanceConfigurationChangedNotification"}, - {91, nullptr, "GetCurrentPerformanceConfiguration"}, - {100, D<&ICommonStateGetter::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"}, - {110, nullptr, "OpenMyGpuErrorHandler"}, - {120, D<&ICommonStateGetter::GetAppletLaunchedHistory>, "GetAppletLaunchedHistory"}, //13.0.0+ - {130, D<&ICommonStateGetter::EnableStartupLogoDisappearedMessage>, "EnableStartupLogoDisappearedMessage"}, //21.0.0+ - {200, D<&ICommonStateGetter::GetOperationModeSystemInfo>, "GetOperationModeSystemInfo"}, - {300, D<&ICommonStateGetter::GetSettingsPlatformRegion>, "GetSettingsPlatformRegion"}, - {400, nullptr, "ActivateMigrationService"}, - {401, nullptr, "DeactivateMigrationService"}, - {500, nullptr, "DisableSleepTillShutdown"}, - {501, nullptr, "SuppressDisablingSleepTemporarily"}, - {502, nullptr, "IsSleepEnabled"}, - {503, nullptr, "IsDisablingSleepSuppressed"}, - {600, nullptr, "SetHidInputMagnificationForApplication"}, //20.0.0+ - {610, D<&ICommonStateGetter::Unknown610>, "Unknown610"}, //21.0.0+ - {611, D<&ICommonStateGetter::Unknown611>, "Unknown611"}, //22.0.0+ - {900, D<&ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled>, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, //11.0.0+ - {910, nullptr, "GetLaunchRequiredTick"}, //17.0.0+ - {1000, D<&ICommonStateGetter::BeginVrMode3d>, "BeginVrMode3d"}, //19.0.0+ - {1001, D<&ICommonStateGetter::EndVrMode3d>, "EndVrMode3d"}, //19.0.0+ - {1002, D<&ICommonStateGetter::IsVrModeEnabled3d>, "IsVrModeEnabled3d"}, //19.0.0+ - {1003, D<&ICommonStateGetter::GetVrLaboGoggleViewport>, "GetVrLaboGoggleViewport"}, //21.0.0+ - {1004, D<&ICommonStateGetter::GetPanelPhysicalSizeForSpecificTitle>, "GetPanelPhysicalSizeForSpecificTitle"}, //21.0.0+ - {1005, D<&ICommonStateGetter::GetPanelResolutionForSpecificTitle>, "GetPanelResolutionForSpecificTitle"}, //21.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } ICommonStateGetter::~ICommonStateGetter() = default; diff --git a/src/core/hle/service/am/service/common_state_getter.h b/src/core/hle/service/am/service/common_state_getter.h index da86b5d079..2d2c0f07ac 100644 --- a/src/core/hle/service/am/service/common_state_getter.h +++ b/src/core/hle/service/am/service/common_state_getter.h @@ -76,6 +76,74 @@ private: void SetCpuBoostMode(HLERequestContext& ctx); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ICommonStateGetter::GetEventHandle>, "GetEventHandle"}, + FunctionInfo{1, D<&ICommonStateGetter::ReceiveMessage>, "ReceiveMessage"}, + FunctionInfo{2, nullptr, "GetThisAppletKind"}, + FunctionInfo{3, nullptr, "AllowToEnterSleep"}, + FunctionInfo{4, nullptr, "DisallowToEnterSleep"}, + FunctionInfo{5, D<&ICommonStateGetter::GetOperationMode>, "GetOperationMode"}, + FunctionInfo{6, D<&ICommonStateGetter::GetPerformanceMode>, "GetPerformanceMode"}, + FunctionInfo{7, nullptr, "GetCradleStatus"}, + FunctionInfo{8, D<&ICommonStateGetter::GetBootMode>, "GetBootMode"}, + FunctionInfo{9, D<&ICommonStateGetter::GetCurrentFocusState>, "GetCurrentFocusState"}, + FunctionInfo{10, D<&ICommonStateGetter::RequestToAcquireSleepLock>, "RequestToAcquireSleepLock"}, + FunctionInfo{11, D<&ICommonStateGetter::ReleaseSleepLock>, "ReleaseSleepLock"}, + FunctionInfo{12, D<&ICommonStateGetter::ReleaseSleepLockTransiently>, "ReleaseSleepLockTransiently"}, + FunctionInfo{13, D<&ICommonStateGetter::GetAcquiredSleepLockEvent>, "GetAcquiredSleepLockEvent"}, + FunctionInfo{14, nullptr, "GetWakeupCount"}, //11.0.0+ + FunctionInfo{15, nullptr, "Unknown15"}, //19.0.0+ + FunctionInfo{20, D<&ICommonStateGetter::PushToGeneralChannel>, "PushToGeneralChannel"}, + FunctionInfo{30, D<&ICommonStateGetter::GetHomeButtonReaderLockAccessor>, "GetHomeButtonReaderLockAccessor"}, + FunctionInfo{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"}, //2.0.0+ + FunctionInfo{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, //7.0.0+ + FunctionInfo{40, nullptr, "GetCradleFwVersion"}, //2.0.0+ + FunctionInfo{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, //3.0.0+ + FunctionInfo{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, //3.0.0+ + FunctionInfo{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, //4.0.0+ + FunctionInfo{53, D<&ICommonStateGetter::BeginVrModeEx>, "BeginVrModeEx"}, //7.0.0+ + FunctionInfo{54, D<&ICommonStateGetter::EndVrModeEx>, "EndVrModeEx"}, //7.0.0+ + FunctionInfo{55, D<&ICommonStateGetter::IsInControllerFirmwareUpdateSection>, "IsInControllerFirmwareUpdateSection"}, //3.0.0+ + FunctionInfo{59, nullptr, "SetVrPositionForDebug"}, //1.0.0+ + FunctionInfo{60, D<&ICommonStateGetter::GetDefaultDisplayResolution>, "GetDefaultDisplayResolution"}, + FunctionInfo{61, D<&ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent>, "GetDefaultDisplayResolutionChangeEvent"}, + FunctionInfo{62, D<&ICommonStateGetter::GetHdcpAuthenticationState>, "GetHdcpAuthenticationState"}, + FunctionInfo{63, D<&ICommonStateGetter::GetHdcpAuthenticationStateChangeEvent>, "GetHdcpAuthenticationStateChangeEvent"}, + FunctionInfo{64, nullptr, "SetTvPowerStateMatchingMode"}, + FunctionInfo{65, nullptr, "GetApplicationIdByContentActionName"}, + FunctionInfo{66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"}, + FunctionInfo{67, nullptr, "CancelCpuBoostMode"}, + FunctionInfo{68, D<&ICommonStateGetter::GetBuiltInDisplayType>, "GetBuiltInDisplayType"}, + FunctionInfo{80, D<&ICommonStateGetter::PerformSystemButtonPressingIfInFocus>, "PerformSystemButtonPressingIfInFocus"}, + FunctionInfo{90, nullptr, "SetPerformanceConfigurationChangedNotification"}, + FunctionInfo{91, nullptr, "GetCurrentPerformanceConfiguration"}, + FunctionInfo{100, D<&ICommonStateGetter::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"}, + FunctionInfo{110, nullptr, "OpenMyGpuErrorHandler"}, + FunctionInfo{120, D<&ICommonStateGetter::GetAppletLaunchedHistory>, "GetAppletLaunchedHistory"}, //13.0.0+ + FunctionInfo{130, D<&ICommonStateGetter::EnableStartupLogoDisappearedMessage>, "EnableStartupLogoDisappearedMessage"}, //21.0.0+ + FunctionInfo{200, D<&ICommonStateGetter::GetOperationModeSystemInfo>, "GetOperationModeSystemInfo"}, + FunctionInfo{300, D<&ICommonStateGetter::GetSettingsPlatformRegion>, "GetSettingsPlatformRegion"}, + FunctionInfo{400, nullptr, "ActivateMigrationService"}, + FunctionInfo{401, nullptr, "DeactivateMigrationService"}, + FunctionInfo{500, nullptr, "DisableSleepTillShutdown"}, + FunctionInfo{501, nullptr, "SuppressDisablingSleepTemporarily"}, + FunctionInfo{502, nullptr, "IsSleepEnabled"}, + FunctionInfo{503, nullptr, "IsDisablingSleepSuppressed"}, + FunctionInfo{600, nullptr, "SetHidInputMagnificationForApplication"}, //20.0.0+ + FunctionInfo{610, D<&ICommonStateGetter::Unknown610>, "Unknown610"}, //21.0.0+ + FunctionInfo{611, D<&ICommonStateGetter::Unknown611>, "Unknown611"}, //22.0.0+ + FunctionInfo{900, D<&ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled>, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, //11.0.0+ + FunctionInfo{910, nullptr, "GetLaunchRequiredTick"}, //17.0.0+ + FunctionInfo{1000, D<&ICommonStateGetter::BeginVrMode3d>, "BeginVrMode3d"}, //19.0.0+ + FunctionInfo{1001, D<&ICommonStateGetter::EndVrMode3d>, "EndVrMode3d"}, //19.0.0+ + FunctionInfo{1002, D<&ICommonStateGetter::IsVrModeEnabled3d>, "IsVrModeEnabled3d"}, //19.0.0+ + FunctionInfo{1003, D<&ICommonStateGetter::GetVrLaboGoggleViewport>, "GetVrLaboGoggleViewport"}, //21.0.0+ + FunctionInfo{1004, D<&ICommonStateGetter::GetPanelPhysicalSizeForSpecificTitle>, "GetPanelPhysicalSizeForSpecificTitle"}, //21.0.0+ + FunctionInfo{1005, D<&ICommonStateGetter::GetPanelResolutionForSpecificTitle>, "GetPanelResolutionForSpecificTitle"}, //21.0.0+ + ); const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/cradle_firmware_updater.cpp b/src/core/hle/service/am/service/cradle_firmware_updater.cpp index 0a8af0858d..062a81be2d 100644 --- a/src/core/hle/service/am/service/cradle_firmware_updater.cpp +++ b/src/core/hle/service/am/service/cradle_firmware_updater.cpp @@ -9,19 +9,6 @@ namespace Service::AM { ICradleFirmwareUpdater::ICradleFirmwareUpdater(Core::System& system_) : ServiceFramework{system_, "ICradleFirmwareUpdater"}, m_context{system, "ICradleFirmwareUpdater"}, m_cradle_device_info_event{m_context} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ICradleFirmwareUpdater::StartUpdate>, "StartUpdate"}, - {1, D<&ICradleFirmwareUpdater::FinishUpdate>, "FinishUpdate"}, - {2, D<&ICradleFirmwareUpdater::GetCradleDeviceInfo>, "GetCradleDeviceInfo"}, - {3, D<&ICradleFirmwareUpdater::GetCradleDeviceInfoChangeEvent>, "GetCradleDeviceInfoChangeEvent"}, - {4, nullptr, "GetUpdateProgressInfo"}, - {5, nullptr, "GetLastInternalResult"}, - - }; - // clang-format on - - RegisterHandlers(functions); } ICradleFirmwareUpdater::~ICradleFirmwareUpdater() = default; diff --git a/src/core/hle/service/am/service/cradle_firmware_updater.h b/src/core/hle/service/am/service/cradle_firmware_updater.h index 3e803f0ae9..9a4d620685 100644 --- a/src/core/hle/service/am/service/cradle_firmware_updater.h +++ b/src/core/hle/service/am/service/cradle_firmware_updater.h @@ -30,6 +30,17 @@ private: Result GetCradleDeviceInfoChangeEvent(OutCopyHandle out_event); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ICradleFirmwareUpdater::StartUpdate>, "StartUpdate"}, + FunctionInfo{1, D<&ICradleFirmwareUpdater::FinishUpdate>, "FinishUpdate"}, + FunctionInfo{2, D<&ICradleFirmwareUpdater::GetCradleDeviceInfo>, "GetCradleDeviceInfo"}, + FunctionInfo{3, D<&ICradleFirmwareUpdater::GetCradleDeviceInfoChangeEvent>, "GetCradleDeviceInfoChangeEvent"}, + FunctionInfo{4, nullptr, "GetUpdateProgressInfo"}, + FunctionInfo{5, nullptr, "GetLastInternalResult"} + ); KernelHelpers::ServiceContext m_context; Event m_cradle_device_info_event; }; diff --git a/src/core/hle/service/am/service/debug_functions.cpp b/src/core/hle/service/am/service/debug_functions.cpp index fcac4776db..7c5cd5e127 100644 --- a/src/core/hle/service/am/service/debug_functions.cpp +++ b/src/core/hle/service/am/service/debug_functions.cpp @@ -7,35 +7,6 @@ namespace Service::AM { IDebugFunctions::IDebugFunctions(Core::System& system_) : ServiceFramework{system_, "IDebugFunctions"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "NotifyMessageToHomeMenuForDebug"}, - {1, nullptr, "OpenMainApplication"}, - {10, nullptr, "PerformSystemButtonPressing"}, - {20, nullptr, "InvalidateTransitionLayer"}, - {30, nullptr, "RequestLaunchApplicationWithUserAndArgumentForDebug"}, - {31, nullptr, "RequestLaunchApplicationByApplicationLaunchInfoForDebug"}, - {40, nullptr, "GetAppletResourceUsageInfo"}, - {50, nullptr, "AddSystemProgramIdAndAppletIdForDebug"}, - {51, nullptr, "AddOperationConfirmedLibraryAppletIdForDebug"}, - {100, nullptr, "SetCpuBoostModeForApplet"}, - {101, nullptr, "CancelCpuBoostModeForApplet"}, - {110, nullptr, "PushToAppletBoundChannelForDebug"}, - {111, nullptr, "TryPopFromAppletBoundChannelForDebug"}, - {120, nullptr, "AlarmSettingNotificationEnableAppEventReserve"}, - {121, nullptr, "AlarmSettingNotificationDisableAppEventReserve"}, - {122, nullptr, "AlarmSettingNotificationPushAppEventNotify"}, - {130, nullptr, "FriendInvitationSetApplicationParameter"}, - {131, nullptr, "FriendInvitationClearApplicationParameter"}, - {132, nullptr, "FriendInvitationPushApplicationParameter"}, - {140, nullptr, "RestrictPowerOperationForSecureLaunchModeForDebug"}, - {200, nullptr, "CreateFloatingLibraryAppletAccepterForDebug"}, - {300, nullptr, "TerminateAllRunningApplicationsForDebug"}, - {900, nullptr, "GetGrcProcessLaunchedSystemEvent"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDebugFunctions::~IDebugFunctions() = default; diff --git a/src/core/hle/service/am/service/debug_functions.h b/src/core/hle/service/am/service/debug_functions.h index d559687439..6714e3f108 100644 --- a/src/core/hle/service/am/service/debug_functions.h +++ b/src/core/hle/service/am/service/debug_functions.h @@ -11,6 +11,35 @@ class IDebugFunctions final : public ServiceFramework { public: explicit IDebugFunctions(Core::System& system_); ~IDebugFunctions() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "NotifyMessageToHomeMenuForDebug"}, + FunctionInfo{1, nullptr, "OpenMainApplication"}, + FunctionInfo{10, nullptr, "PerformSystemButtonPressing"}, + FunctionInfo{20, nullptr, "InvalidateTransitionLayer"}, + FunctionInfo{30, nullptr, "RequestLaunchApplicationWithUserAndArgumentForDebug"}, + FunctionInfo{31, nullptr, "RequestLaunchApplicationByApplicationLaunchInfoForDebug"}, + FunctionInfo{40, nullptr, "GetAppletResourceUsageInfo"}, + FunctionInfo{50, nullptr, "AddSystemProgramIdAndAppletIdForDebug"}, + FunctionInfo{51, nullptr, "AddOperationConfirmedLibraryAppletIdForDebug"}, + FunctionInfo{100, nullptr, "SetCpuBoostModeForApplet"}, + FunctionInfo{101, nullptr, "CancelCpuBoostModeForApplet"}, + FunctionInfo{110, nullptr, "PushToAppletBoundChannelForDebug"}, + FunctionInfo{111, nullptr, "TryPopFromAppletBoundChannelForDebug"}, + FunctionInfo{120, nullptr, "AlarmSettingNotificationEnableAppEventReserve"}, + FunctionInfo{121, nullptr, "AlarmSettingNotificationDisableAppEventReserve"}, + FunctionInfo{122, nullptr, "AlarmSettingNotificationPushAppEventNotify"}, + FunctionInfo{130, nullptr, "FriendInvitationSetApplicationParameter"}, + FunctionInfo{131, nullptr, "FriendInvitationClearApplicationParameter"}, + FunctionInfo{132, nullptr, "FriendInvitationPushApplicationParameter"}, + FunctionInfo{140, nullptr, "RestrictPowerOperationForSecureLaunchModeForDebug"}, + FunctionInfo{200, nullptr, "CreateFloatingLibraryAppletAccepterForDebug"}, + FunctionInfo{300, nullptr, "TerminateAllRunningApplicationsForDebug"}, + FunctionInfo{900, nullptr, "GetGrcProcessLaunchedSystemEvent"} + ); }; } // namespace Service::AM diff --git a/src/core/hle/service/am/service/display_controller.cpp b/src/core/hle/service/am/service/display_controller.cpp index 8f87327b17..08aa6518fc 100644 --- a/src/core/hle/service/am/service/display_controller.cpp +++ b/src/core/hle/service/am/service/display_controller.cpp @@ -14,40 +14,6 @@ namespace Service::AM { IDisplayController::IDisplayController(Core::System& system_, std::shared_ptr applet_) : ServiceFramework{system_, "IDisplayController"}, applet(std::move(applet_)) { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetLastForegroundCaptureImage"}, - {1, nullptr, "UpdateLastForegroundCaptureImage"}, - {2, nullptr, "GetLastApplicationCaptureImage"}, - {3, nullptr, "GetCallerAppletCaptureImage"}, - {4, nullptr, "UpdateCallerAppletCaptureImage"}, - {5, D<&IDisplayController::GetLastForegroundCaptureImageEx>, "GetLastForegroundCaptureImageEx"}, - {6, nullptr, "GetLastApplicationCaptureImageEx"}, - {7, D<&IDisplayController::GetCallerAppletCaptureImageEx>, "GetCallerAppletCaptureImageEx"}, - {8, D<&IDisplayController::TakeScreenShotOfOwnLayer>, "TakeScreenShotOfOwnLayer"}, - {9, nullptr, "CopyBetweenCaptureBuffers"}, - {10, nullptr, "AcquireLastApplicationCaptureBuffer"}, - {11, nullptr, "ReleaseLastApplicationCaptureBuffer"}, - {12, nullptr, "AcquireLastForegroundCaptureBuffer"}, - {13, nullptr, "ReleaseLastForegroundCaptureBuffer"}, - {14, nullptr, "AcquireCallerAppletCaptureBuffer"}, - {15, nullptr, "ReleaseCallerAppletCaptureBuffer"}, - {16, nullptr, "AcquireLastApplicationCaptureBufferEx"}, - {17, nullptr, "AcquireLastForegroundCaptureBufferEx"}, - {18, nullptr, "AcquireCallerAppletCaptureBufferEx"}, - {20, D<&IDisplayController::ClearCaptureBuffer>, "ClearCaptureBuffer"}, - {21, nullptr, "ClearAppletTransitionBuffer"}, - {22, D<&IDisplayController::AcquireLastApplicationCaptureSharedBuffer>, "AcquireLastApplicationCaptureSharedBuffer"}, - {23, D<&IDisplayController::ReleaseLastApplicationCaptureSharedBuffer>, "ReleaseLastApplicationCaptureSharedBuffer"}, - {24, D<&IDisplayController::AcquireLastForegroundCaptureSharedBuffer>, "AcquireLastForegroundCaptureSharedBuffer"}, - {25, D<&IDisplayController::ReleaseLastForegroundCaptureSharedBuffer>, "ReleaseLastForegroundCaptureSharedBuffer"}, - {26, D<&IDisplayController::AcquireCallerAppletCaptureSharedBuffer>, "AcquireCallerAppletCaptureSharedBuffer"}, - {27, D<&IDisplayController::ReleaseCallerAppletCaptureSharedBuffer>, "ReleaseCallerAppletCaptureSharedBuffer"}, - {28, nullptr, "TakeScreenShotOfOwnLayerEx"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDisplayController::~IDisplayController() = default; diff --git a/src/core/hle/service/am/service/display_controller.h b/src/core/hle/service/am/service/display_controller.h index 171feace6e..f3f947178f 100644 --- a/src/core/hle/service/am/service/display_controller.h +++ b/src/core/hle/service/am/service/display_controller.h @@ -35,6 +35,39 @@ private: Out out_fbshare_layer_index); Result ReleaseLastApplicationCaptureSharedBuffer(); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetLastForegroundCaptureImage"}, + FunctionInfo{1, nullptr, "UpdateLastForegroundCaptureImage"}, + FunctionInfo{2, nullptr, "GetLastApplicationCaptureImage"}, + FunctionInfo{3, nullptr, "GetCallerAppletCaptureImage"}, + FunctionInfo{4, nullptr, "UpdateCallerAppletCaptureImage"}, + FunctionInfo{5, D<&IDisplayController::GetLastForegroundCaptureImageEx>, "GetLastForegroundCaptureImageEx"}, + FunctionInfo{6, nullptr, "GetLastApplicationCaptureImageEx"}, + FunctionInfo{7, D<&IDisplayController::GetCallerAppletCaptureImageEx>, "GetCallerAppletCaptureImageEx"}, + FunctionInfo{8, D<&IDisplayController::TakeScreenShotOfOwnLayer>, "TakeScreenShotOfOwnLayer"}, + FunctionInfo{9, nullptr, "CopyBetweenCaptureBuffers"}, + FunctionInfo{10, nullptr, "AcquireLastApplicationCaptureBuffer"}, + FunctionInfo{11, nullptr, "ReleaseLastApplicationCaptureBuffer"}, + FunctionInfo{12, nullptr, "AcquireLastForegroundCaptureBuffer"}, + FunctionInfo{13, nullptr, "ReleaseLastForegroundCaptureBuffer"}, + FunctionInfo{14, nullptr, "AcquireCallerAppletCaptureBuffer"}, + FunctionInfo{15, nullptr, "ReleaseCallerAppletCaptureBuffer"}, + FunctionInfo{16, nullptr, "AcquireLastApplicationCaptureBufferEx"}, + FunctionInfo{17, nullptr, "AcquireLastForegroundCaptureBufferEx"}, + FunctionInfo{18, nullptr, "AcquireCallerAppletCaptureBufferEx"}, + FunctionInfo{20, D<&IDisplayController::ClearCaptureBuffer>, "ClearCaptureBuffer"}, + FunctionInfo{21, nullptr, "ClearAppletTransitionBuffer"}, + FunctionInfo{22, D<&IDisplayController::AcquireLastApplicationCaptureSharedBuffer>, "AcquireLastApplicationCaptureSharedBuffer"}, + FunctionInfo{23, D<&IDisplayController::ReleaseLastApplicationCaptureSharedBuffer>, "ReleaseLastApplicationCaptureSharedBuffer"}, + FunctionInfo{24, D<&IDisplayController::AcquireLastForegroundCaptureSharedBuffer>, "AcquireLastForegroundCaptureSharedBuffer"}, + FunctionInfo{25, D<&IDisplayController::ReleaseLastForegroundCaptureSharedBuffer>, "ReleaseLastForegroundCaptureSharedBuffer"}, + FunctionInfo{26, D<&IDisplayController::AcquireCallerAppletCaptureSharedBuffer>, "AcquireCallerAppletCaptureSharedBuffer"}, + FunctionInfo{27, D<&IDisplayController::ReleaseCallerAppletCaptureSharedBuffer>, "ReleaseCallerAppletCaptureSharedBuffer"}, + FunctionInfo{28, nullptr, "TakeScreenShotOfOwnLayerEx"} + ); const std::shared_ptr applet; }; diff --git a/src/core/hle/service/am/service/global_state_controller.cpp b/src/core/hle/service/am/service/global_state_controller.cpp index 3e3b61b0a0..2b2f6f5da4 100644 --- a/src/core/hle/service/am/service/global_state_controller.cpp +++ b/src/core/hle/service/am/service/global_state_controller.cpp @@ -10,25 +10,6 @@ namespace Service::AM { IGlobalStateController::IGlobalStateController(Core::System& system_) : ServiceFramework{system_, "IGlobalStateController"}, m_context{system_, "IGlobalStateController"}, m_hdcp_authentication_failed_event{m_context} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestToEnterSleep"}, - {1, nullptr, "EnterSleep"}, - {2, nullptr, "StartSleepSequence"}, - {3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"}, - {4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"}, - {9, nullptr, "IsAutoPowerDownRequested"}, - {10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"}, - {11, nullptr, "NotifyCecSettingsChanged"}, - {12, nullptr, "SetDefaultHomeButtonLongPressTime"}, - {13, nullptr, "UpdateDefaultDisplayResolution"}, - {14, D<&IGlobalStateController::ShouldSleepOnBoot>, "ShouldSleepOnBoot"}, - {15, D<&IGlobalStateController::GetHdcpAuthenticationFailedEvent>, "GetHdcpAuthenticationFailedEvent"}, - {30, D<&IGlobalStateController::OpenCradleFirmwareUpdater>, "OpenCradleFirmwareUpdater"}, - }; - // clang-format on - - RegisterHandlers(functions); } Result IGlobalStateController::StartShutdownSequence() { diff --git a/src/core/hle/service/am/service/global_state_controller.h b/src/core/hle/service/am/service/global_state_controller.h index 83efb57dfc..02e07dafe9 100644 --- a/src/core/hle/service/am/service/global_state_controller.h +++ b/src/core/hle/service/am/service/global_state_controller.h @@ -23,9 +23,26 @@ private: Result LoadAndApplyIdlePolicySettings(); Result ShouldSleepOnBoot(Out out_should_sleep_on_boot); Result GetHdcpAuthenticationFailedEvent(OutCopyHandle out_event); - Result OpenCradleFirmwareUpdater( - Out> out_cradle_firmware_updater); + Result OpenCradleFirmwareUpdater(Out> out_cradle_firmware_updater); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "RequestToEnterSleep"}, + FunctionInfo{1, nullptr, "EnterSleep"}, + FunctionInfo{2, nullptr, "StartSleepSequence"}, + FunctionInfo{3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"}, + FunctionInfo{4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"}, + FunctionInfo{9, nullptr, "IsAutoPowerDownRequested"}, + FunctionInfo{10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"}, + FunctionInfo{11, nullptr, "NotifyCecSettingsChanged"}, + FunctionInfo{12, nullptr, "SetDefaultHomeButtonLongPressTime"}, + FunctionInfo{13, nullptr, "UpdateDefaultDisplayResolution"}, + FunctionInfo{14, D<&IGlobalStateController::ShouldSleepOnBoot>, "ShouldSleepOnBoot"}, + FunctionInfo{15, D<&IGlobalStateController::GetHdcpAuthenticationFailedEvent>, "GetHdcpAuthenticationFailedEvent"}, + FunctionInfo{30, D<&IGlobalStateController::OpenCradleFirmwareUpdater>, "OpenCradleFirmwareUpdater"} + ); KernelHelpers::ServiceContext m_context; Event m_hdcp_authentication_failed_event; }; diff --git a/src/core/hle/service/am/service/home_menu_functions.cpp b/src/core/hle/service/am/service/home_menu_functions.cpp index f9d402ca99..91916924fa 100644 --- a/src/core/hle/service/am/service/home_menu_functions.cpp +++ b/src/core/hle/service/am/service/home_menu_functions.cpp @@ -18,27 +18,6 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_, std::shared_ptr, "RequestToGetForeground"}, - {11, D<&IHomeMenuFunctions::LockForeground>, "LockForeground"}, - {12, D<&IHomeMenuFunctions::UnlockForeground>, "UnlockForeground"}, - {20, D<&IHomeMenuFunctions::PopFromGeneralChannel>, "PopFromGeneralChannel"}, - {21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"}, - {30, nullptr, "GetHomeButtonWriterLockAccessor"}, - {31, nullptr, "GetWriterLockAccessorEx"}, - {40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"}, - {41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"}, - {50, nullptr, "LaunchSystemApplet"}, - {51, nullptr, "LaunchStarter"}, - {100, nullptr, "PopRequestLaunchApplicationForDebug"}, - {110, D<&IHomeMenuFunctions::IsForceTerminateApplicationDisabledForDebug>, "IsForceTerminateApplicationDisabledForDebug"}, - {200, nullptr, "LaunchDevMenu"}, - {1000, nullptr, "SetLastApplicationExitReason"}, - }; - // clang-format on - - RegisterHandlers(functions); } IHomeMenuFunctions::~IHomeMenuFunctions() = default; diff --git a/src/core/hle/service/am/service/home_menu_functions.h b/src/core/hle/service/am/service/home_menu_functions.h index 2c3ef54375..0db812f6d5 100644 --- a/src/core/hle/service/am/service/home_menu_functions.h +++ b/src/core/hle/service/am/service/home_menu_functions.h @@ -34,6 +34,26 @@ private: Result IsForceTerminateApplicationDisabledForDebug( Out out_is_force_terminate_application_disabled_for_debug); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{10, D<&IHomeMenuFunctions::RequestToGetForeground>, "RequestToGetForeground"}, + FunctionInfo{11, D<&IHomeMenuFunctions::LockForeground>, "LockForeground"}, + FunctionInfo{12, D<&IHomeMenuFunctions::UnlockForeground>, "UnlockForeground"}, + FunctionInfo{20, D<&IHomeMenuFunctions::PopFromGeneralChannel>, "PopFromGeneralChannel"}, + FunctionInfo{21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"}, + FunctionInfo{30, nullptr, "GetHomeButtonWriterLockAccessor"}, + FunctionInfo{31, nullptr, "GetWriterLockAccessorEx"}, + FunctionInfo{40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"}, + FunctionInfo{41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"}, + FunctionInfo{50, nullptr, "LaunchSystemApplet"}, + FunctionInfo{51, nullptr, "LaunchStarter"}, + FunctionInfo{100, nullptr, "PopRequestLaunchApplicationForDebug"}, + FunctionInfo{110, D<&IHomeMenuFunctions::IsForceTerminateApplicationDisabledForDebug>, "IsForceTerminateApplicationDisabledForDebug"}, + FunctionInfo{200, nullptr, "LaunchDevMenu"}, + FunctionInfo{1000, nullptr, "SetLastApplicationExitReason"} + ); WindowSystem& m_window_system; const std::shared_ptr m_applet; KernelHelpers::ServiceContext m_context; diff --git a/src/core/hle/service/am/service/library_applet_accessor.cpp b/src/core/hle/service/am/service/library_applet_accessor.cpp index 849e5794cf..7904b7b943 100644 --- a/src/core/hle/service/am/service/library_applet_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_accessor.cpp @@ -54,35 +54,6 @@ ILibraryAppletAccessor::ILibraryAppletAccessor(Core::System& system_, std::shared_ptr applet) : ServiceFramework{system_, "ILibraryAppletAccessor"}, m_broker{std::move(broker)}, m_applet{std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ILibraryAppletAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"}, - {1, D<&ILibraryAppletAccessor::IsCompleted>, "IsCompleted"}, - {10, D<&ILibraryAppletAccessor::Start>, "Start"}, - {20, D<&ILibraryAppletAccessor::RequestExit>, "RequestExit"}, - {25, D<&ILibraryAppletAccessor::Terminate>, "Terminate"}, - {30, D<&ILibraryAppletAccessor::GetResult>, "GetResult"}, - {50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"}, - {60, D<&ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero>, "PresetLibraryAppletGpuTimeSliceZero"}, //10.0.0+ - {80, nullptr, "RequestForLibraryAppletToGetForeground"}, //19.0.0+ - {81, nullptr, "GetCurrentChildLibraryApplet"}, //19.0.0+ - {90, D<&ILibraryAppletAccessor::Unknown90>, "Unknown90"}, //20.0.0+ - {100, D<&ILibraryAppletAccessor::PushInData>, "PushInData"}, - {101, D<&ILibraryAppletAccessor::PopOutData>, "PopOutData"}, - {102, nullptr, "PushExtraStorage"}, - {103, D<&ILibraryAppletAccessor::PushInteractiveInData>, "PushInteractiveInData"}, - {104, D<&ILibraryAppletAccessor::PopInteractiveOutData>, "PopInteractiveOutData"}, - {105, D<&ILibraryAppletAccessor::GetPopOutDataEvent>, "GetPopOutDataEvent"}, - {106, D<&ILibraryAppletAccessor::GetPopInteractiveOutDataEvent>, "GetPopInteractiveOutDataEvent"}, - {110, nullptr, "NeedsToExitProcess"}, - {120, D<&ILibraryAppletAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"}, - {150, nullptr, "RequestForAppletToGetForeground"}, - {160, D<&ILibraryAppletAccessor::GetIndirectLayerConsumerHandle>, "GetIndirectLayerConsumerHandle"}, //2.0.0+ - {170, D<&ILibraryAppletAccessor::Unknown170>, "Unknown170"}, //22.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } ILibraryAppletAccessor::~ILibraryAppletAccessor() = default; diff --git a/src/core/hle/service/am/service/library_applet_accessor.h b/src/core/hle/service/am/service/library_applet_accessor.h index ad40bc76c7..933c522c70 100644 --- a/src/core/hle/service/am/service/library_applet_accessor.h +++ b/src/core/hle/service/am/service/library_applet_accessor.h @@ -49,6 +49,34 @@ private: void FrontendExecuteInteractive(); void FrontendRequestExit(); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ILibraryAppletAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"}, + FunctionInfo{1, D<&ILibraryAppletAccessor::IsCompleted>, "IsCompleted"}, + FunctionInfo{10, D<&ILibraryAppletAccessor::Start>, "Start"}, + FunctionInfo{20, D<&ILibraryAppletAccessor::RequestExit>, "RequestExit"}, + FunctionInfo{25, D<&ILibraryAppletAccessor::Terminate>, "Terminate"}, + FunctionInfo{30, D<&ILibraryAppletAccessor::GetResult>, "GetResult"}, + FunctionInfo{50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"}, + FunctionInfo{60, D<&ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero>, "PresetLibraryAppletGpuTimeSliceZero"}, //10.0.0+ + FunctionInfo{80, nullptr, "RequestForLibraryAppletToGetForeground"}, //19.0.0+ + FunctionInfo{81, nullptr, "GetCurrentChildLibraryApplet"}, //19.0.0+ + FunctionInfo{90, D<&ILibraryAppletAccessor::Unknown90>, "Unknown90"}, //20.0.0+ + FunctionInfo{100, D<&ILibraryAppletAccessor::PushInData>, "PushInData"}, + FunctionInfo{101, D<&ILibraryAppletAccessor::PopOutData>, "PopOutData"}, + FunctionInfo{102, nullptr, "PushExtraStorage"}, + FunctionInfo{103, D<&ILibraryAppletAccessor::PushInteractiveInData>, "PushInteractiveInData"}, + FunctionInfo{104, D<&ILibraryAppletAccessor::PopInteractiveOutData>, "PopInteractiveOutData"}, + FunctionInfo{105, D<&ILibraryAppletAccessor::GetPopOutDataEvent>, "GetPopOutDataEvent"}, + FunctionInfo{106, D<&ILibraryAppletAccessor::GetPopInteractiveOutDataEvent>, "GetPopInteractiveOutDataEvent"}, + FunctionInfo{110, nullptr, "NeedsToExitProcess"}, + FunctionInfo{120, D<&ILibraryAppletAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"}, + FunctionInfo{150, nullptr, "RequestForAppletToGetForeground"}, + FunctionInfo{160, D<&ILibraryAppletAccessor::GetIndirectLayerConsumerHandle>, "GetIndirectLayerConsumerHandle"}, //2.0.0+ + FunctionInfo{170, D<&ILibraryAppletAccessor::Unknown170>, "Unknown170"}, //22.0.0+ + ); const std::shared_ptr m_broker; const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/library_applet_creator.h b/src/core/hle/service/am/service/library_applet_creator.h index 3e0cf0bc93..419fb80e4d 100644 --- a/src/core/hle/service/am/service/library_applet_creator.h +++ b/src/core/hle/service/am/service/library_applet_creator.h @@ -41,13 +41,13 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"}, - {1, nullptr, "TerminateAllLibraryApplets"}, - {2, nullptr, "AreAnyLibraryAppletsLeft"}, - {3, D<&ILibraryAppletCreator::CreateLibraryAppletEx>, "CreateLibraryAppletEx"}, - {10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"}, - {11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"}, - {12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"} + FunctionInfo{0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"}, + FunctionInfo{1, nullptr, "TerminateAllLibraryApplets"}, + FunctionInfo{2, nullptr, "AreAnyLibraryAppletsLeft"}, + FunctionInfo{3, D<&ILibraryAppletCreator::CreateLibraryAppletEx>, "CreateLibraryAppletEx"}, + FunctionInfo{10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"}, + FunctionInfo{11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"}, + FunctionInfo{12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"} ); WindowSystem& m_window_system; const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/library_applet_proxy.cpp b/src/core/hle/service/am/service/library_applet_proxy.cpp index f9cfb82a90..87da2e9304 100644 --- a/src/core/hle/service/am/service/library_applet_proxy.cpp +++ b/src/core/hle/service/am/service/library_applet_proxy.cpp @@ -22,24 +22,6 @@ ILibraryAppletProxy::ILibraryAppletProxy(Core::System& system_, std::shared_ptr< Kernel::KProcess* process, WindowSystem& window_system) : ServiceFramework{system_, "ILibraryAppletProxy"}, m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ILibraryAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, - {1, D<&ILibraryAppletProxy::GetSelfController>, "GetSelfController"}, - {2, D<&ILibraryAppletProxy::GetWindowController>, "GetWindowController"}, - {3, D<&ILibraryAppletProxy::GetAudioController>, "GetAudioController"}, - {4, D<&ILibraryAppletProxy::GetDisplayController>, "GetDisplayController"}, - {10, D<&ILibraryAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, - {11, D<&ILibraryAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, - {20, D<&ILibraryAppletProxy::OpenLibraryAppletSelfAccessor>, "OpenLibraryAppletSelfAccessor"}, - {21, D<&ILibraryAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, - {22, D<&ILibraryAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, - {23, D<&ILibraryAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, - {1000, D<&ILibraryAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}, - }; - // clang-format on - - RegisterHandlers(functions); } ILibraryAppletProxy::~ILibraryAppletProxy() = default; diff --git a/src/core/hle/service/am/service/library_applet_proxy.h b/src/core/hle/service/am/service/library_applet_proxy.h index 792d585827..8edb593f92 100644 --- a/src/core/hle/service/am/service/library_applet_proxy.h +++ b/src/core/hle/service/am/service/library_applet_proxy.h @@ -48,6 +48,23 @@ private: Result GetGlobalStateController( Out> out_global_state_controller); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ILibraryAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, + FunctionInfo{1, D<&ILibraryAppletProxy::GetSelfController>, "GetSelfController"}, + FunctionInfo{2, D<&ILibraryAppletProxy::GetWindowController>, "GetWindowController"}, + FunctionInfo{3, D<&ILibraryAppletProxy::GetAudioController>, "GetAudioController"}, + FunctionInfo{4, D<&ILibraryAppletProxy::GetDisplayController>, "GetDisplayController"}, + FunctionInfo{10, D<&ILibraryAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, + FunctionInfo{11, D<&ILibraryAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, + FunctionInfo{20, D<&ILibraryAppletProxy::OpenLibraryAppletSelfAccessor>, "OpenLibraryAppletSelfAccessor"}, + FunctionInfo{21, D<&ILibraryAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, + FunctionInfo{22, D<&ILibraryAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, + FunctionInfo{23, D<&ILibraryAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, + FunctionInfo{1000, D<&ILibraryAppletProxy::GetDebugFunctions>, "GetDebugFunctions"} + ); WindowSystem& m_window_system; Kernel::KProcess* const m_process; const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/library_applet_self_accessor.cpp b/src/core/hle/service/am/service/library_applet_self_accessor.cpp index 907be49204..a3beb5ea70 100644 --- a/src/core/hle/service/am/service/library_applet_self_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_self_accessor.cpp @@ -46,47 +46,6 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_, std::shared_ptr applet) : ServiceFramework{system_, "ILibraryAppletSelfAccessor"}, m_applet{std::move(applet)}, m_broker{m_applet->caller_applet_broker} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ILibraryAppletSelfAccessor::PopInData>, "PopInData"}, - {1, D<&ILibraryAppletSelfAccessor::PushOutData>, "PushOutData"}, - {2, D<&ILibraryAppletSelfAccessor::PopInteractiveInData>, "PopInteractiveInData"}, - {3, D<&ILibraryAppletSelfAccessor::PushInteractiveOutData>, "PushInteractiveOutData"}, - {5, D<&ILibraryAppletSelfAccessor::GetPopInDataEvent>, "GetPopInDataEvent"}, - {6, D<&ILibraryAppletSelfAccessor::GetPopInteractiveInDataEvent>, "GetPopInteractiveInDataEvent"}, - {10, D<&ILibraryAppletSelfAccessor::ExitProcessAndReturn>, "ExitProcessAndReturn"}, - {11, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"}, - {12, D<&ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo>, "GetMainAppletIdentityInfo"}, - {13, D<&ILibraryAppletSelfAccessor::CanUseApplicationCore>, "CanUseApplicationCore"}, - {14, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo>, "GetCallerAppletIdentityInfo"}, - {15, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationControlProperty>, "GetMainAppletApplicationControlProperty"}, - {16, D<&ILibraryAppletSelfAccessor::GetMainAppletStorageId>, "GetMainAppletStorageId"}, - {17, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfoStack>, "GetCallerAppletIdentityInfoStack"}, - {18, nullptr, "GetNextReturnDestinationAppletIdentityInfo"}, - {19, D<&ILibraryAppletSelfAccessor::GetDesirableKeyboardLayout>, "GetDesirableKeyboardLayout"}, - {20, nullptr, "PopExtraStorage"}, - {25, nullptr, "GetPopExtraStorageEvent"}, - {30, D<&ILibraryAppletSelfAccessor::UnpopInData>, "UnpopInData"}, - {31, nullptr, "UnpopExtraStorage"}, - {40, nullptr, "GetIndirectLayerProducerHandle"}, - {50, D<&ILibraryAppletSelfAccessor::ReportVisibleError>, "ReportVisibleError"}, - {51, D<&ILibraryAppletSelfAccessor::ReportVisibleErrorWithErrorContext>, "ReportVisibleErrorWithErrorContext"}, - {60, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationDesiredLanguage>, "GetMainAppletApplicationDesiredLanguage"}, - {70, D<&ILibraryAppletSelfAccessor::GetCurrentApplicationId>, "GetCurrentApplicationId"}, - {80, nullptr, "RequestExitToSelf"}, - {90, nullptr, "CreateApplicationAndPushAndRequestToLaunch"}, - {100, nullptr, "CreateGameMovieTrimmer"}, - {101, nullptr, "ReserveResourceForMovieOperation"}, - {102, nullptr, "UnreserveResourceForMovieOperation"}, - {110, D<&ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers>, "GetMainAppletAvailableUsers"}, - {120, nullptr, "GetLaunchStorageInfoForDebug"}, - {130, nullptr, "GetGpuErrorDetectedSystemEvent"}, - {140, nullptr, "SetApplicationMemoryReservation"}, - {150, D<&ILibraryAppletSelfAccessor::ShouldSetGpuTimeSliceManually>, "ShouldSetGpuTimeSliceManually"}, - {160, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfoEx>, "GetLibraryAppletInfoEx"}, - }; - // clang-format on - RegisterHandlers(functions); } ILibraryAppletSelfAccessor::~ILibraryAppletSelfAccessor() = default; diff --git a/src/core/hle/service/am/service/library_applet_self_accessor.h b/src/core/hle/service/am/service/library_applet_self_accessor.h index d287f6b403..2a4e4e800c 100644 --- a/src/core/hle/service/am/service/library_applet_self_accessor.h +++ b/src/core/hle/service/am/service/library_applet_self_accessor.h @@ -80,6 +80,47 @@ private: Result ShouldSetGpuTimeSliceManually(Out out_should_set_gpu_time_slice_manually); Result GetLibraryAppletInfoEx(Out out_library_applet_info); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ILibraryAppletSelfAccessor::PopInData>, "PopInData"}, + FunctionInfo{1, D<&ILibraryAppletSelfAccessor::PushOutData>, "PushOutData"}, + FunctionInfo{2, D<&ILibraryAppletSelfAccessor::PopInteractiveInData>, "PopInteractiveInData"}, + FunctionInfo{3, D<&ILibraryAppletSelfAccessor::PushInteractiveOutData>, "PushInteractiveOutData"}, + FunctionInfo{5, D<&ILibraryAppletSelfAccessor::GetPopInDataEvent>, "GetPopInDataEvent"}, + FunctionInfo{6, D<&ILibraryAppletSelfAccessor::GetPopInteractiveInDataEvent>, "GetPopInteractiveInDataEvent"}, + FunctionInfo{10, D<&ILibraryAppletSelfAccessor::ExitProcessAndReturn>, "ExitProcessAndReturn"}, + FunctionInfo{11, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"}, + FunctionInfo{12, D<&ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo>, "GetMainAppletIdentityInfo"}, + FunctionInfo{13, D<&ILibraryAppletSelfAccessor::CanUseApplicationCore>, "CanUseApplicationCore"}, + FunctionInfo{14, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo>, "GetCallerAppletIdentityInfo"}, + FunctionInfo{15, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationControlProperty>, "GetMainAppletApplicationControlProperty"}, + FunctionInfo{16, D<&ILibraryAppletSelfAccessor::GetMainAppletStorageId>, "GetMainAppletStorageId"}, + FunctionInfo{17, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfoStack>, "GetCallerAppletIdentityInfoStack"}, + FunctionInfo{18, nullptr, "GetNextReturnDestinationAppletIdentityInfo"}, + FunctionInfo{19, D<&ILibraryAppletSelfAccessor::GetDesirableKeyboardLayout>, "GetDesirableKeyboardLayout"}, + FunctionInfo{20, nullptr, "PopExtraStorage"}, + FunctionInfo{25, nullptr, "GetPopExtraStorageEvent"}, + FunctionInfo{30, D<&ILibraryAppletSelfAccessor::UnpopInData>, "UnpopInData"}, + FunctionInfo{31, nullptr, "UnpopExtraStorage"}, + FunctionInfo{40, nullptr, "GetIndirectLayerProducerHandle"}, + FunctionInfo{50, D<&ILibraryAppletSelfAccessor::ReportVisibleError>, "ReportVisibleError"}, + FunctionInfo{51, D<&ILibraryAppletSelfAccessor::ReportVisibleErrorWithErrorContext>, "ReportVisibleErrorWithErrorContext"}, + FunctionInfo{60, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationDesiredLanguage>, "GetMainAppletApplicationDesiredLanguage"}, + FunctionInfo{70, D<&ILibraryAppletSelfAccessor::GetCurrentApplicationId>, "GetCurrentApplicationId"}, + FunctionInfo{80, nullptr, "RequestExitToSelf"}, + FunctionInfo{90, nullptr, "CreateApplicationAndPushAndRequestToLaunch"}, + FunctionInfo{100, nullptr, "CreateGameMovieTrimmer"}, + FunctionInfo{101, nullptr, "ReserveResourceForMovieOperation"}, + FunctionInfo{102, nullptr, "UnreserveResourceForMovieOperation"}, + FunctionInfo{110, D<&ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers>, "GetMainAppletAvailableUsers"}, + FunctionInfo{120, nullptr, "GetLaunchStorageInfoForDebug"}, + FunctionInfo{130, nullptr, "GetGpuErrorDetectedSystemEvent"}, + FunctionInfo{140, nullptr, "SetApplicationMemoryReservation"}, + FunctionInfo{150, D<&ILibraryAppletSelfAccessor::ShouldSetGpuTimeSliceManually>, "ShouldSetGpuTimeSliceManually"}, + FunctionInfo{160, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfoEx>, "GetLibraryAppletInfoEx"} + ); const std::shared_ptr m_applet; const std::shared_ptr m_broker; }; diff --git a/src/core/hle/service/am/service/lock_accessor.cpp b/src/core/hle/service/am/service/lock_accessor.cpp index 0341254449..314377e4b4 100644 --- a/src/core/hle/service/am/service/lock_accessor.cpp +++ b/src/core/hle/service/am/service/lock_accessor.cpp @@ -12,17 +12,6 @@ namespace Service::AM { ILockAccessor::ILockAccessor(Core::System& system_) : ServiceFramework{system_, "ILockAccessor"}, m_context{system_, "ILockAccessor"}, m_event{m_context} { - // clang-format off - static const FunctionInfo functions[] = { - {1, D<&ILockAccessor::TryLock>, "TryLock"}, - {2, D<&ILockAccessor::Unlock>, "Unlock"}, - {3, D<&ILockAccessor::GetEvent>, "GetEvent"}, - {4, D<&ILockAccessor::IsLocked>, "IsLocked"}, - }; - // clang-format on - - RegisterHandlers(functions); - m_event.Signal(system.Kernel()); } diff --git a/src/core/hle/service/am/service/lock_accessor.h b/src/core/hle/service/am/service/lock_accessor.h index 9bfb5c0502..2cdec5af0b 100644 --- a/src/core/hle/service/am/service/lock_accessor.h +++ b/src/core/hle/service/am/service/lock_accessor.h @@ -23,6 +23,15 @@ private: Result IsLocked(Out out_is_locked); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{1, D<&ILockAccessor::TryLock>, "TryLock"}, + FunctionInfo{2, D<&ILockAccessor::Unlock>, "Unlock"}, + FunctionInfo{3, D<&ILockAccessor::GetEvent>, "GetEvent"}, + FunctionInfo{4, D<&ILockAccessor::IsLocked>, "IsLocked"} + ); KernelHelpers::ServiceContext m_context; Event m_event; std::mutex m_mutex{}; diff --git a/src/core/hle/service/am/service/overlay_applet_proxy.cpp b/src/core/hle/service/am/service/overlay_applet_proxy.cpp index 5e140fe031..c7e235e8f2 100644 --- a/src/core/hle/service/am/service/overlay_applet_proxy.cpp +++ b/src/core/hle/service/am/service/overlay_applet_proxy.cpp @@ -19,23 +19,6 @@ namespace Service::AM { Kernel::KProcess *process, WindowSystem &window_system) : ServiceFramework{system_, "IOverlayAppletProxy"}, m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IOverlayAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, - {1, D<&IOverlayAppletProxy::GetSelfController>, "GetSelfController"}, - {2, D<&IOverlayAppletProxy::GetWindowController>, "GetWindowController"}, - {3, D<&IOverlayAppletProxy::GetAudioController>, "GetAudioController"}, - {4, D<&IOverlayAppletProxy::GetDisplayController>, "GetDisplayController"}, - {10, D<&IOverlayAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, - {11, D<&IOverlayAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, - {20, D<&IOverlayAppletProxy::GetOverlayFunctions>, "GetOverlayFunctions"}, - {21, D<&IOverlayAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, - {23, D<&IOverlayAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, - {1000, D<&IOverlayAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}, - }; - // clang-format on - - RegisterHandlers(functions); } IOverlayAppletProxy::~IOverlayAppletProxy() = default; diff --git a/src/core/hle/service/am/service/overlay_applet_proxy.h b/src/core/hle/service/am/service/overlay_applet_proxy.h index 2c7fa57dfd..6966ae936b 100644 --- a/src/core/hle/service/am/service/overlay_applet_proxy.h +++ b/src/core/hle/service/am/service/overlay_applet_proxy.h @@ -47,6 +47,22 @@ private: Out> out_global_state_controller); Result GetDebugFunctions(Out> out_debug_functions); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IOverlayAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, + FunctionInfo{1, D<&IOverlayAppletProxy::GetSelfController>, "GetSelfController"}, + FunctionInfo{2, D<&IOverlayAppletProxy::GetWindowController>, "GetWindowController"}, + FunctionInfo{3, D<&IOverlayAppletProxy::GetAudioController>, "GetAudioController"}, + FunctionInfo{4, D<&IOverlayAppletProxy::GetDisplayController>, "GetDisplayController"}, + FunctionInfo{10, D<&IOverlayAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, + FunctionInfo{11, D<&IOverlayAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, + FunctionInfo{20, D<&IOverlayAppletProxy::GetOverlayFunctions>, "GetOverlayFunctions"}, + FunctionInfo{21, D<&IOverlayAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, + FunctionInfo{23, D<&IOverlayAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, + FunctionInfo{1000, D<&IOverlayAppletProxy::GetDebugFunctions>, "GetDebugFunctions"} + ); WindowSystem& m_window_system; Kernel::KProcess* const m_process; const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/overlay_functions.cpp b/src/core/hle/service/am/service/overlay_functions.cpp index 8150b5dd07..367b0cc218 100644 --- a/src/core/hle/service/am/service/overlay_functions.cpp +++ b/src/core/hle/service/am/service/overlay_functions.cpp @@ -10,32 +10,6 @@ namespace Service::AM { IOverlayFunctions::IOverlayFunctions(Core::System &system_, std::shared_ptr applet) : ServiceFramework{system_, "IOverlayFunctions"}, m_applet{std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IOverlayFunctions::BeginToWatchShortHomeButtonMessage>, "BeginToWatchShortHomeButtonMessage"}, - {1, D<&IOverlayFunctions::EndToWatchShortHomeButtonMessage>, "EndToWatchShortHomeButtonMessage"}, - {2, D<&IOverlayFunctions::GetApplicationIdForLogo>, "GetApplicationIdForLogo"}, - {3, nullptr, "SetGpuTimeSliceBoost"}, - {4, D<&IOverlayFunctions::SetAutoSleepTimeAndDimmingTimeEnabled>, "SetAutoSleepTimeAndDimmingTimeEnabled"}, - {5, nullptr, "TerminateApplicationAndSetReason"}, - {6, nullptr, "SetScreenShotPermissionGlobally"}, - {10, nullptr, "StartShutdownSequenceForOverlay"}, - {11, nullptr, "StartRebootSequenceForOverlay"}, - {20, D<&IOverlayFunctions::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"}, - {21, D<&IOverlayFunctions::SetHandlingTouchScreenInputEnabled>, "SetHandlingTouchScreenInputEnabled"}, - {30, nullptr, "SetHealthWarningShowingState"}, - {31, D<&IOverlayFunctions::IsHealthWarningRequired>, "IsHealthWarningRequired"}, - {40, nullptr, "GetApplicationNintendoLogo"}, - {41, nullptr, "GetApplicationStartupMovie"}, - {50, nullptr, "SetGpuTimeSliceBoostForApplication"}, - {60, nullptr, "Unknown60"}, - {70, D<&IOverlayFunctions::Unknown70>, "Unknown70"}, - {90, nullptr, "SetRequiresGpuResourceUse"}, - {101, nullptr, "BeginToObserveHidInputForDevelop"}, - }; - // clang-format on - - RegisterHandlers(functions); } IOverlayFunctions::~IOverlayFunctions() = default; diff --git a/src/core/hle/service/am/service/overlay_functions.h b/src/core/hle/service/am/service/overlay_functions.h index eefd8d862b..1f0d682821 100644 --- a/src/core/hle/service/am/service/overlay_functions.h +++ b/src/core/hle/service/am/service/overlay_functions.h @@ -6,24 +6,49 @@ #include "core/hle/service/service.h" namespace Service::AM { - struct Applet; +struct Applet; - class IOverlayFunctions final : public ServiceFramework { - public: - explicit IOverlayFunctions(Core::System &system_, std::shared_ptr applet); - ~IOverlayFunctions() override; +class IOverlayFunctions final : public ServiceFramework { +public: + explicit IOverlayFunctions(Core::System &system_, std::shared_ptr applet); + ~IOverlayFunctions() override; - private: - Result BeginToWatchShortHomeButtonMessage(); - Result EndToWatchShortHomeButtonMessage(); - Result GetApplicationIdForLogo(Out out_application_id); - Result SetAutoSleepTimeAndDimmingTimeEnabled(bool enabled); - Result IsHealthWarningRequired(Out is_required); - Result SetHandlingHomeButtonShortPressedEnabled(bool enabled); - Result SetHandlingTouchScreenInputEnabled(bool enabled); - Result Unknown70(); +private: + Result BeginToWatchShortHomeButtonMessage(); + Result EndToWatchShortHomeButtonMessage(); + Result GetApplicationIdForLogo(Out out_application_id); + Result SetAutoSleepTimeAndDimmingTimeEnabled(bool enabled); + Result IsHealthWarningRequired(Out is_required); + Result SetHandlingHomeButtonShortPressedEnabled(bool enabled); + Result SetHandlingTouchScreenInputEnabled(bool enabled); + Result Unknown70(); - private: - const std::shared_ptr m_applet; - }; +private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IOverlayFunctions::BeginToWatchShortHomeButtonMessage>, "BeginToWatchShortHomeButtonMessage"}, + FunctionInfo{1, D<&IOverlayFunctions::EndToWatchShortHomeButtonMessage>, "EndToWatchShortHomeButtonMessage"}, + FunctionInfo{2, D<&IOverlayFunctions::GetApplicationIdForLogo>, "GetApplicationIdForLogo"}, + FunctionInfo{3, nullptr, "SetGpuTimeSliceBoost"}, + FunctionInfo{4, D<&IOverlayFunctions::SetAutoSleepTimeAndDimmingTimeEnabled>, "SetAutoSleepTimeAndDimmingTimeEnabled"}, + FunctionInfo{5, nullptr, "TerminateApplicationAndSetReason"}, + FunctionInfo{6, nullptr, "SetScreenShotPermissionGlobally"}, + FunctionInfo{10, nullptr, "StartShutdownSequenceForOverlay"}, + FunctionInfo{11, nullptr, "StartRebootSequenceForOverlay"}, + FunctionInfo{20, D<&IOverlayFunctions::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"}, + FunctionInfo{21, D<&IOverlayFunctions::SetHandlingTouchScreenInputEnabled>, "SetHandlingTouchScreenInputEnabled"}, + FunctionInfo{30, nullptr, "SetHealthWarningShowingState"}, + FunctionInfo{31, D<&IOverlayFunctions::IsHealthWarningRequired>, "IsHealthWarningRequired"}, + FunctionInfo{40, nullptr, "GetApplicationNintendoLogo"}, + FunctionInfo{41, nullptr, "GetApplicationStartupMovie"}, + FunctionInfo{50, nullptr, "SetGpuTimeSliceBoostForApplication"}, + FunctionInfo{60, nullptr, "Unknown60"}, + FunctionInfo{70, D<&IOverlayFunctions::Unknown70>, "Unknown70"}, + FunctionInfo{90, nullptr, "SetRequiresGpuResourceUse"}, + FunctionInfo{101, nullptr, "BeginToObserveHidInputForDevelop"} + ); + const std::shared_ptr m_applet; +}; } // namespace Service::AM diff --git a/src/core/hle/service/am/service/process_winding_controller.cpp b/src/core/hle/service/am/service/process_winding_controller.cpp index e284aa2d89..95cd20366e 100644 --- a/src/core/hle/service/am/service/process_winding_controller.cpp +++ b/src/core/hle/service/am/service/process_winding_controller.cpp @@ -16,20 +16,6 @@ namespace Service::AM { IProcessWindingController::IProcessWindingController(Core::System& system_, std::shared_ptr applet) : ServiceFramework{system_, "IProcessWindingController"}, m_applet{std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"}, - {11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"}, - {21, D<&IProcessWindingController::PushContext>, "PushContext"}, - {22, D<&IProcessWindingController::PopContext>, "PopContext"}, - {23, D<&IProcessWindingController::CancelWindingReservation>, "CancelWindingReservation"}, - {30, D<&IProcessWindingController::WindAndDoReserved>, "WindAndDoReserved"}, - {40, D<&IProcessWindingController::ReserveToStartAndWaitAndUnwindThis>, "ReserveToStartAndWaitAndUnwindThis"}, - {41, D<&IProcessWindingController::ReserveToStartAndWait>, "ReserveToStartAndWait"}, - }; - // clang-format on - - RegisterHandlers(functions); } IProcessWindingController::~IProcessWindingController() = default; diff --git a/src/core/hle/service/am/service/process_winding_controller.h b/src/core/hle/service/am/service/process_winding_controller.h index f3417bcd97..f17008722f 100644 --- a/src/core/hle/service/am/service/process_winding_controller.h +++ b/src/core/hle/service/am/service/process_winding_controller.h @@ -33,6 +33,19 @@ private: SharedPointer reserved_applet_accessor); Result ReserveToStartAndWait(SharedPointer reserved_applet_accessor); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"}, + FunctionInfo{11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"}, + FunctionInfo{21, D<&IProcessWindingController::PushContext>, "PushContext"}, + FunctionInfo{22, D<&IProcessWindingController::PopContext>, "PopContext"}, + FunctionInfo{23, D<&IProcessWindingController::CancelWindingReservation>, "CancelWindingReservation"}, + FunctionInfo{30, D<&IProcessWindingController::WindAndDoReserved>, "WindAndDoReserved"}, + FunctionInfo{40, D<&IProcessWindingController::ReserveToStartAndWaitAndUnwindThis>, "ReserveToStartAndWaitAndUnwindThis"}, + FunctionInfo{41, D<&IProcessWindingController::ReserveToStartAndWait>, "ReserveToStartAndWait"} + ); const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/self_controller.cpp b/src/core/hle/service/am/service/self_controller.cpp index 3a654b9daa..d110ac4048 100644 --- a/src/core/hle/service/am/service/self_controller.cpp +++ b/src/core/hle/service/am/service/self_controller.cpp @@ -21,63 +21,6 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr Kernel::KProcess* process) : ServiceFramework{system_, "ISelfController"}, m_process{process}, m_applet{ std::move(applet)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ISelfController::Exit>, "Exit"}, - {1, D<&ISelfController::LockExit>, "LockExit"}, - {2, D<&ISelfController::UnlockExit>, "UnlockExit"}, - {3, D<&ISelfController::EnterFatalSection>, "EnterFatalSection"}, - {4, D<&ISelfController::LeaveFatalSection>, "LeaveFatalSection"}, - {9, D<&ISelfController::GetLibraryAppletLaunchableEvent>, "GetLibraryAppletLaunchableEvent"}, - {10, D<&ISelfController::SetScreenShotPermission>, "SetScreenShotPermission"}, - {11, D<&ISelfController::SetOperationModeChangedNotification>, "SetOperationModeChangedNotification"}, - {12, D<&ISelfController::SetPerformanceModeChangedNotification>, "SetPerformanceModeChangedNotification"}, - {13, D<&ISelfController::SetFocusHandlingMode>, "SetFocusHandlingMode"}, - {14, D<&ISelfController::SetRestartMessageEnabled>, "SetRestartMessageEnabled"}, - {15, D<&ISelfController::SetScreenShotAppletIdentityInfo>, "SetScreenShotAppletIdentityInfo"}, - {16, D<&ISelfController::SetOutOfFocusSuspendingEnabled>, "SetOutOfFocusSuspendingEnabled"}, - {17, nullptr, "SetControllerFirmwareUpdateSection"}, - {18, nullptr, "SetRequiresCaptureButtonShortPressedMessage"}, - {19, D<&ISelfController::SetAlbumImageOrientation>, "SetAlbumImageOrientation"}, - {20, nullptr, "SetDesirableKeyboardLayout"}, - {21, nullptr, "GetScreenShotProgramId"}, - {40, D<&ISelfController::CreateManagedDisplayLayer>, "CreateManagedDisplayLayer"}, - {41, D<&ISelfController::IsSystemBufferSharingEnabled>, "IsSystemBufferSharingEnabled"}, - {42, D<&ISelfController::GetSystemSharedLayerHandle>, "GetSystemSharedLayerHandle"}, - {43, D<&ISelfController::GetSystemSharedBufferHandle>, "GetSystemSharedBufferHandle"}, - {44, D<&ISelfController::CreateManagedDisplaySeparableLayer>, "CreateManagedDisplaySeparableLayer"}, - {45, nullptr, "SetManagedDisplayLayerSeparationMode"}, - {46, nullptr, "SetRecordingLayerCompositionEnabled"}, - {50, D<&ISelfController::SetHandlesRequestToDisplay>, "SetHandlesRequestToDisplay"}, - {51, D<&ISelfController::ApproveToDisplay>, "ApproveToDisplay"}, - {60, D<&ISelfController::OverrideAutoSleepTimeAndDimmingTime>, "OverrideAutoSleepTimeAndDimmingTime"}, - {61, D<&ISelfController::SetMediaPlaybackState>, "SetMediaPlaybackState"}, - {62, D<&ISelfController::SetIdleTimeDetectionExtension>, "SetIdleTimeDetectionExtension"}, - {63, D<&ISelfController::GetIdleTimeDetectionExtension>, "GetIdleTimeDetectionExtension"}, - {64, nullptr, "SetInputDetectionSourceSet"}, - {65, D<&ISelfController::ReportUserIsActive>, "ReportUserIsActive"}, - {66, nullptr, "GetCurrentIlluminance"}, - {67, D<&ISelfController::IsIlluminanceAvailable>, "IsIlluminanceAvailable"}, - {68, D<&ISelfController::SetAutoSleepDisabled>, "SetAutoSleepDisabled"}, - {69, D<&ISelfController::IsAutoSleepDisabled>, "IsAutoSleepDisabled"}, - {70, nullptr, "ReportMultimediaError"}, - {71, nullptr, "GetCurrentIlluminanceEx"}, - {72, D<&ISelfController::SetInputDetectionPolicy>, "SetInputDetectionPolicy"}, - {80, nullptr, "SetWirelessPriorityMode"}, - {90, D<&ISelfController::GetAccumulatedSuspendedTickValue>, "GetAccumulatedSuspendedTickValue"}, - {91, D<&ISelfController::GetAccumulatedSuspendedTickChangedEvent>, "GetAccumulatedSuspendedTickChangedEvent"}, - {100, D<&ISelfController::SetAlbumImageTakenNotificationEnabled>, "SetAlbumImageTakenNotificationEnabled"}, - {110, nullptr, "SetApplicationAlbumUserData"}, - {120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"}, - {130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"}, - {230, D<&ISelfController::Unknown230>, "Unknown230"}, - {240, D<&ISelfController::Unknown240>, "Unknown240"}, - {1000, nullptr, "GetDebugStorageChannel"}, - }; - // clang-format on - - RegisterHandlers(functions); - std::scoped_lock lk{m_applet->lock}; m_applet->display_layer_manager.Initialize(system, m_process, m_applet->applet_id, m_applet->library_applet_mode); diff --git a/src/core/hle/service/am/service/self_controller.h b/src/core/hle/service/am/service/self_controller.h index c9f480f575..567303390f 100644 --- a/src/core/hle/service/am/service/self_controller.h +++ b/src/core/hle/service/am/service/self_controller.h @@ -70,6 +70,61 @@ private: Result Unknown230(u32 in_val, Out out_val); Result Unknown240(u32 in_val); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ISelfController::Exit>, "Exit"}, + FunctionInfo{1, D<&ISelfController::LockExit>, "LockExit"}, + FunctionInfo{2, D<&ISelfController::UnlockExit>, "UnlockExit"}, + FunctionInfo{3, D<&ISelfController::EnterFatalSection>, "EnterFatalSection"}, + FunctionInfo{4, D<&ISelfController::LeaveFatalSection>, "LeaveFatalSection"}, + FunctionInfo{9, D<&ISelfController::GetLibraryAppletLaunchableEvent>, "GetLibraryAppletLaunchableEvent"}, + FunctionInfo{10, D<&ISelfController::SetScreenShotPermission>, "SetScreenShotPermission"}, + FunctionInfo{11, D<&ISelfController::SetOperationModeChangedNotification>, "SetOperationModeChangedNotification"}, + FunctionInfo{12, D<&ISelfController::SetPerformanceModeChangedNotification>, "SetPerformanceModeChangedNotification"}, + FunctionInfo{13, D<&ISelfController::SetFocusHandlingMode>, "SetFocusHandlingMode"}, + FunctionInfo{14, D<&ISelfController::SetRestartMessageEnabled>, "SetRestartMessageEnabled"}, + FunctionInfo{15, D<&ISelfController::SetScreenShotAppletIdentityInfo>, "SetScreenShotAppletIdentityInfo"}, + FunctionInfo{16, D<&ISelfController::SetOutOfFocusSuspendingEnabled>, "SetOutOfFocusSuspendingEnabled"}, + FunctionInfo{17, nullptr, "SetControllerFirmwareUpdateSection"}, + FunctionInfo{18, nullptr, "SetRequiresCaptureButtonShortPressedMessage"}, + FunctionInfo{19, D<&ISelfController::SetAlbumImageOrientation>, "SetAlbumImageOrientation"}, + FunctionInfo{20, nullptr, "SetDesirableKeyboardLayout"}, + FunctionInfo{21, nullptr, "GetScreenShotProgramId"}, + FunctionInfo{40, D<&ISelfController::CreateManagedDisplayLayer>, "CreateManagedDisplayLayer"}, + FunctionInfo{41, D<&ISelfController::IsSystemBufferSharingEnabled>, "IsSystemBufferSharingEnabled"}, + FunctionInfo{42, D<&ISelfController::GetSystemSharedLayerHandle>, "GetSystemSharedLayerHandle"}, + FunctionInfo{43, D<&ISelfController::GetSystemSharedBufferHandle>, "GetSystemSharedBufferHandle"}, + FunctionInfo{44, D<&ISelfController::CreateManagedDisplaySeparableLayer>, "CreateManagedDisplaySeparableLayer"}, + FunctionInfo{45, nullptr, "SetManagedDisplayLayerSeparationMode"}, + FunctionInfo{46, nullptr, "SetRecordingLayerCompositionEnabled"}, + FunctionInfo{50, D<&ISelfController::SetHandlesRequestToDisplay>, "SetHandlesRequestToDisplay"}, + FunctionInfo{51, D<&ISelfController::ApproveToDisplay>, "ApproveToDisplay"}, + FunctionInfo{60, D<&ISelfController::OverrideAutoSleepTimeAndDimmingTime>, "OverrideAutoSleepTimeAndDimmingTime"}, + FunctionInfo{61, D<&ISelfController::SetMediaPlaybackState>, "SetMediaPlaybackState"}, + FunctionInfo{62, D<&ISelfController::SetIdleTimeDetectionExtension>, "SetIdleTimeDetectionExtension"}, + FunctionInfo{63, D<&ISelfController::GetIdleTimeDetectionExtension>, "GetIdleTimeDetectionExtension"}, + FunctionInfo{64, nullptr, "SetInputDetectionSourceSet"}, + FunctionInfo{65, D<&ISelfController::ReportUserIsActive>, "ReportUserIsActive"}, + FunctionInfo{66, nullptr, "GetCurrentIlluminance"}, + FunctionInfo{67, D<&ISelfController::IsIlluminanceAvailable>, "IsIlluminanceAvailable"}, + FunctionInfo{68, D<&ISelfController::SetAutoSleepDisabled>, "SetAutoSleepDisabled"}, + FunctionInfo{69, D<&ISelfController::IsAutoSleepDisabled>, "IsAutoSleepDisabled"}, + FunctionInfo{70, nullptr, "ReportMultimediaError"}, + FunctionInfo{71, nullptr, "GetCurrentIlluminanceEx"}, + FunctionInfo{72, D<&ISelfController::SetInputDetectionPolicy>, "SetInputDetectionPolicy"}, + FunctionInfo{80, nullptr, "SetWirelessPriorityMode"}, + FunctionInfo{90, D<&ISelfController::GetAccumulatedSuspendedTickValue>, "GetAccumulatedSuspendedTickValue"}, + FunctionInfo{91, D<&ISelfController::GetAccumulatedSuspendedTickChangedEvent>, "GetAccumulatedSuspendedTickChangedEvent"}, + FunctionInfo{100, D<&ISelfController::SetAlbumImageTakenNotificationEnabled>, "SetAlbumImageTakenNotificationEnabled"}, + FunctionInfo{110, nullptr, "SetApplicationAlbumUserData"}, + FunctionInfo{120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"}, + FunctionInfo{130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"}, + FunctionInfo{230, D<&ISelfController::Unknown230>, "Unknown230"}, + FunctionInfo{240, D<&ISelfController::Unknown240>, "Unknown240"}, + FunctionInfo{1000, nullptr, "GetDebugStorageChannel"} + ); Kernel::KProcess* const m_process; const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/storage.cpp b/src/core/hle/service/am/service/storage.cpp index 5fe191bf2f..d9aaa9cf0c 100644 --- a/src/core/hle/service/am/service/storage.cpp +++ b/src/core/hle/service/am/service/storage.cpp @@ -15,8 +15,8 @@ namespace Service::AM { IStorage::IStorage(Core::System& system_, std::shared_ptr impl) : ServiceFramework{system_, "IStorage"}, m_impl{std::move(impl)} { static const FunctionInfo functions[] = { - {0, D<&IStorage::Open>, "Open"}, - {1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"}, + FunctionInfo{0, D<&IStorage::Open>, "Open"}, + FunctionInfo{1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/am/service/storage_accessor.cpp b/src/core/hle/service/am/service/storage_accessor.cpp index 84577fee45..b747f4cbbb 100644 --- a/src/core/hle/service/am/service/storage_accessor.cpp +++ b/src/core/hle/service/am/service/storage_accessor.cpp @@ -12,9 +12,9 @@ IStorageAccessor::IStorageAccessor(Core::System& system_, std::shared_ptr impl) : ServiceFramework{system_, "IStorageAccessor"}, m_impl{std::move(impl)} { static const FunctionInfo functions[] = { - {0, D<&IStorageAccessor::GetSize>, "GetSize"}, - {10, D<&IStorageAccessor::Write>, "Write"}, - {11, D<&IStorageAccessor::Read>, "Read"}, + FunctionInfo{0, D<&IStorageAccessor::GetSize>, "GetSize"}, + FunctionInfo{10, D<&IStorageAccessor::Write>, "Write"}, + FunctionInfo{11, D<&IStorageAccessor::Read>, "Read"}, }; RegisterHandlers(functions); @@ -42,8 +42,8 @@ ITransferStorageAccessor::ITransferStorageAccessor(Core::System& system_, std::shared_ptr impl) : ServiceFramework{system_, "ITransferStorageAccessor"}, m_impl{std::move(impl)} { static const FunctionInfo functions[] = { - {0, D<&ITransferStorageAccessor::GetSize>, "GetSize"}, - {1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"}, + FunctionInfo{0, D<&ITransferStorageAccessor::GetSize>, "GetSize"}, + FunctionInfo{1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"}, }; RegisterHandlers(functions); diff --git a/src/core/hle/service/am/service/system_applet_proxy.cpp b/src/core/hle/service/am/service/system_applet_proxy.cpp index c435288a26..37a0a225cb 100644 --- a/src/core/hle/service/am/service/system_applet_proxy.cpp +++ b/src/core/hle/service/am/service/system_applet_proxy.cpp @@ -22,24 +22,6 @@ ISystemAppletProxy::ISystemAppletProxy(Core::System& system_, std::shared_ptr, "GetCommonStateGetter"}, - {1, D<&ISystemAppletProxy::GetSelfController>, "GetSelfController"}, - {2, D<&ISystemAppletProxy::GetWindowController>, "GetWindowController"}, - {3, D<&ISystemAppletProxy::GetAudioController>, "GetAudioController"}, - {4, D<&ISystemAppletProxy::GetDisplayController>, "GetDisplayController"}, - {10, D<&ISystemAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, - {11, D<&ISystemAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, - {20, D<&ISystemAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, - {21, D<&ISystemAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, - {22, D<&ISystemAppletProxy::GetApplicationCreator>, "GetApplicationCreator"}, - {23, D<&ISystemAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, - {1000, D<&ISystemAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISystemAppletProxy::~ISystemAppletProxy() = default; diff --git a/src/core/hle/service/am/service/system_applet_proxy.h b/src/core/hle/service/am/service/system_applet_proxy.h index ab9769b3d9..8ed82bfbfd 100644 --- a/src/core/hle/service/am/service/system_applet_proxy.h +++ b/src/core/hle/service/am/service/system_applet_proxy.h @@ -50,6 +50,23 @@ private: Result GetGlobalStateController( Out> out_global_state_controller); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ISystemAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, + FunctionInfo{1, D<&ISystemAppletProxy::GetSelfController>, "GetSelfController"}, + FunctionInfo{2, D<&ISystemAppletProxy::GetWindowController>, "GetWindowController"}, + FunctionInfo{3, D<&ISystemAppletProxy::GetAudioController>, "GetAudioController"}, + FunctionInfo{4, D<&ISystemAppletProxy::GetDisplayController>, "GetDisplayController"}, + FunctionInfo{10, D<&ISystemAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, + FunctionInfo{11, D<&ISystemAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, + FunctionInfo{20, D<&ISystemAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, + FunctionInfo{21, D<&ISystemAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, + FunctionInfo{22, D<&ISystemAppletProxy::GetApplicationCreator>, "GetApplicationCreator"}, + FunctionInfo{23, D<&ISystemAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, + FunctionInfo{1000, D<&ISystemAppletProxy::GetDebugFunctions>, "GetDebugFunctions"} + ); WindowSystem& m_window_system; Kernel::KProcess* const m_process; const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/window_controller.cpp b/src/core/hle/service/am/service/window_controller.cpp index 54396affbe..3612428e1c 100644 --- a/src/core/hle/service/am/service/window_controller.cpp +++ b/src/core/hle/service/am/service/window_controller.cpp @@ -13,20 +13,6 @@ IWindowController::IWindowController(Core::System& system_, std::shared_ptr, "GetAppletResourceUserId"}, - {2, D<&IWindowController::GetAppletResourceUserIdOfCallerApplet>, "GetAppletResourceUserIdOfCallerApplet"}, - {10, D<&IWindowController::AcquireForegroundRights>, "AcquireForegroundRights"}, - {11, D<&IWindowController::ReleaseForegroundRights>, "ReleaseForegroundRights"}, - {12, D<&IWindowController::RejectToChangeIntoBackground>, "RejectToChangeIntoBackground"}, - {20, D<&IWindowController::SetAppletWindowVisibility>, "SetAppletWindowVisibility"}, - {21, D<&IWindowController::SetAppletGpuTimeSlice>, "SetAppletGpuTimeSlice"}, - }; - // clang-format on - - RegisterHandlers(functions); } IWindowController::~IWindowController() = default; diff --git a/src/core/hle/service/am/service/window_controller.h b/src/core/hle/service/am/service/window_controller.h index a784dd4a49..8d4d045ece 100644 --- a/src/core/hle/service/am/service/window_controller.h +++ b/src/core/hle/service/am/service/window_controller.h @@ -26,6 +26,19 @@ private: Result SetAppletWindowVisibility(bool visible); Result SetAppletGpuTimeSlice(s64 time_slice); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "CreateWindow"}, + FunctionInfo{1, D<&IWindowController::GetAppletResourceUserId>, "GetAppletResourceUserId"}, + FunctionInfo{2, D<&IWindowController::GetAppletResourceUserIdOfCallerApplet>, "GetAppletResourceUserIdOfCallerApplet"}, + FunctionInfo{10, D<&IWindowController::AcquireForegroundRights>, "AcquireForegroundRights"}, + FunctionInfo{11, D<&IWindowController::ReleaseForegroundRights>, "ReleaseForegroundRights"}, + FunctionInfo{12, D<&IWindowController::RejectToChangeIntoBackground>, "RejectToChangeIntoBackground"}, + FunctionInfo{20, D<&IWindowController::SetAppletWindowVisibility>, "SetAppletWindowVisibility"}, + FunctionInfo{21, D<&IWindowController::SetAppletGpuTimeSlice>, "SetAppletGpuTimeSlice"} + ); WindowSystem& m_window_system; const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/aoc/addon_content_manager.cpp b/src/core/hle/service/aoc/addon_content_manager.cpp index be2aa34baa..a1c64f4bcb 100644 --- a/src/core/hle/service/aoc/addon_content_manager.cpp +++ b/src/core/hle/service/aoc/addon_content_manager.cpp @@ -57,35 +57,6 @@ static std::vector AccumulateAOCTitleIDs(Core::System& system) { IAddOnContentManager::IAddOnContentManager(Core::System& system_) : ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)}, service_context{system_, "aoc:u"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "CountAddOnContentByApplicationId"}, - {1, nullptr, "ListAddOnContentByApplicationId"}, - {2, D<&IAddOnContentManager::CountAddOnContent>, "CountAddOnContent"}, - {3, D<&IAddOnContentManager::ListAddOnContent>, "ListAddOnContent"}, - {4, nullptr, "GetAddOnContentBaseIdByApplicationId"}, - {5, D<&IAddOnContentManager::GetAddOnContentBaseId>, "GetAddOnContentBaseId"}, - {6, nullptr, "PrepareAddOnContentByApplicationId"}, - {7, D<&IAddOnContentManager::PrepareAddOnContent>, "PrepareAddOnContent"}, - {8, D<&IAddOnContentManager::GetAddOnContentListChangedEvent>, "GetAddOnContentListChangedEvent"}, - {9, nullptr, "GetAddOnContentLostErrorCode"}, - {10, D<&IAddOnContentManager::GetAddOnContentListChangedEventWithProcessId>, "GetAddOnContentListChangedEventWithProcessId"}, - {11, D<&IAddOnContentManager::NotifyMountAddOnContent>, "NotifyMountAddOnContent"}, - {12, D<&IAddOnContentManager::NotifyUnmountAddOnContent>, "NotifyUnmountAddOnContent"}, - {13, nullptr, "IsAddOnContentMountedForDebug"}, - {50, D<&IAddOnContentManager::CheckAddOnContentMountStatus>, "CheckAddOnContentMountStatus"}, - {100, D<&IAddOnContentManager::CreateEcPurchasedEventManager>, "CreateEcPurchasedEventManager"}, - {101, D<&IAddOnContentManager::CreatePermanentEcPurchasedEventManager>, "CreatePermanentEcPurchasedEventManager"}, - {110, nullptr, "CreateContentsServiceManager"}, - {200, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"}, - {300, nullptr, "SetupHostAddOnContent"}, - {301, nullptr, "GetRegisteredAddOnContentPath"}, - {302, nullptr, "UpdateCachedList"}, - }; - // clang-format on - - RegisterHandlers(functions); - aoc_change_event = service_context.CreateEvent("GetAddOnContentListChanged:Event"); } diff --git a/src/core/hle/service/aoc/addon_content_manager.h b/src/core/hle/service/aoc/addon_content_manager.h index 91857df4c7..fce0787977 100644 --- a/src/core/hle/service/aoc/addon_content_manager.h +++ b/src/core/hle/service/aoc/addon_content_manager.h @@ -40,9 +40,35 @@ public: OutInterface out_interface); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "CountAddOnContentByApplicationId"}, + FunctionInfo{1, nullptr, "ListAddOnContentByApplicationId"}, + FunctionInfo{2, D<&IAddOnContentManager::CountAddOnContent>, "CountAddOnContent"}, + FunctionInfo{3, D<&IAddOnContentManager::ListAddOnContent>, "ListAddOnContent"}, + FunctionInfo{4, nullptr, "GetAddOnContentBaseIdByApplicationId"}, + FunctionInfo{5, D<&IAddOnContentManager::GetAddOnContentBaseId>, "GetAddOnContentBaseId"}, + FunctionInfo{6, nullptr, "PrepareAddOnContentByApplicationId"}, + FunctionInfo{7, D<&IAddOnContentManager::PrepareAddOnContent>, "PrepareAddOnContent"}, + FunctionInfo{8, D<&IAddOnContentManager::GetAddOnContentListChangedEvent>, "GetAddOnContentListChangedEvent"}, + FunctionInfo{9, nullptr, "GetAddOnContentLostErrorCode"}, + FunctionInfo{10, D<&IAddOnContentManager::GetAddOnContentListChangedEventWithProcessId>, "GetAddOnContentListChangedEventWithProcessId"}, + FunctionInfo{11, D<&IAddOnContentManager::NotifyMountAddOnContent>, "NotifyMountAddOnContent"}, + FunctionInfo{12, D<&IAddOnContentManager::NotifyUnmountAddOnContent>, "NotifyUnmountAddOnContent"}, + FunctionInfo{13, nullptr, "IsAddOnContentMountedForDebug"}, + FunctionInfo{50, D<&IAddOnContentManager::CheckAddOnContentMountStatus>, "CheckAddOnContentMountStatus"}, + FunctionInfo{100, D<&IAddOnContentManager::CreateEcPurchasedEventManager>, "CreateEcPurchasedEventManager"}, + FunctionInfo{101, D<&IAddOnContentManager::CreatePermanentEcPurchasedEventManager>, "CreatePermanentEcPurchasedEventManager"}, + FunctionInfo{110, nullptr, "CreateContentsServiceManager"}, + FunctionInfo{200, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"}, + FunctionInfo{300, nullptr, "SetupHostAddOnContent"}, + FunctionInfo{301, nullptr, "GetRegisteredAddOnContentPath"}, + FunctionInfo{302, nullptr, "UpdateCachedList"} + ); std::vector add_on_content; KernelHelpers::ServiceContext service_context; - Kernel::KEvent* aoc_change_event; }; diff --git a/src/core/hle/service/aoc/purchase_event_manager.cpp b/src/core/hle/service/aoc/purchase_event_manager.cpp index 22e18ded0d..2a75767f2b 100644 --- a/src/core/hle/service/aoc/purchase_event_manager.cpp +++ b/src/core/hle/service/aoc/purchase_event_manager.cpp @@ -15,16 +15,16 @@ IPurchaseEventManager::IPurchaseEventManager(Core::System& system_) : ServiceFramework{system_, "IPurchaseEventManager"}, service_context{system, "IPurchaseEventManager"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IPurchaseEventManager::SetDefaultDeliveryTarget>, "SetDefaultDeliveryTarget"}, FunctionInfo{1, D<&IPurchaseEventManager::SetDeliveryTarget>, "SetDeliveryTarget"}, FunctionInfo{2, D<&IPurchaseEventManager::GetPurchasedEvent>, "GetPurchasedEvent"}, FunctionInfo{3, D<&IPurchaseEventManager::PopPurchasedProductInfo>, "PopPurchasedProductInfo"}, FunctionInfo{4, D<&IPurchaseEventManager::PopPurchasedProductInfoWithUid>, "PopPurchasedProductInfoWithUid"} - }; - // clang-format on - - RegisterHandlers(functions); + ); purchased_event = service_context.CreateEvent("IPurchaseEventManager:PurchasedEvent"); } diff --git a/src/core/hle/service/apm/apm_interface.cpp b/src/core/hle/service/apm/apm_interface.cpp index 2ed65c55d1..5371d5647d 100644 --- a/src/core/hle/service/apm/apm_interface.cpp +++ b/src/core/hle/service/apm/apm_interface.cpp @@ -98,14 +98,14 @@ APM_Sys::APM_Sys(Core::System& system_, Controller& controller_) : ServiceFramework{system_, "apm:sys"}, controller{controller_} { // clang-format off static const FunctionInfo functions[] = { - {0, nullptr, "RequestPerformanceMode"}, - {1, &APM_Sys::GetPerformanceEvent, "GetPerformanceEvent"}, - {2, nullptr, "GetThrottlingState"}, - {3, nullptr, "GetLastThrottlingState"}, - {4, nullptr, "ClearLastThrottlingState"}, - {5, nullptr, "LoadAndApplySettings"}, - {6, &APM_Sys::SetCpuBoostMode, "SetCpuBoostMode"}, - {7, &APM_Sys::GetCurrentPerformanceConfiguration, "GetCurrentPerformanceConfiguration"}, + FunctionInfo{0, nullptr, "RequestPerformanceMode"}, + FunctionInfo{1, &APM_Sys::GetPerformanceEvent, "GetPerformanceEvent"}, + FunctionInfo{2, nullptr, "GetThrottlingState"}, + FunctionInfo{3, nullptr, "GetLastThrottlingState"}, + FunctionInfo{4, nullptr, "ClearLastThrottlingState"}, + FunctionInfo{5, nullptr, "LoadAndApplySettings"}, + FunctionInfo{6, &APM_Sys::SetCpuBoostMode, "SetCpuBoostMode"}, + FunctionInfo{7, &APM_Sys::GetCurrentPerformanceConfiguration, "GetCurrentPerformanceConfiguration"}, }; // clang-format on diff --git a/src/core/hle/service/apm/apm_interface.h b/src/core/hle/service/apm/apm_interface.h index 1303e4fc5b..b71f06d224 100644 --- a/src/core/hle/service/apm/apm_interface.h +++ b/src/core/hle/service/apm/apm_interface.h @@ -25,9 +25,9 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, &APM::OpenSession, "OpenSession"}, - {1, &APM::GetPerformanceMode, "GetPerformanceMode"}, - {6, &APM::IsCpuOverclockEnabled, "IsCpuOverclockEnabled"} + FunctionInfo{0, &APM::OpenSession, "OpenSession"}, + FunctionInfo{1, &APM::GetPerformanceMode, "GetPerformanceMode"}, + FunctionInfo{6, &APM::IsCpuOverclockEnabled, "IsCpuOverclockEnabled"} ); std::shared_ptr apm; Controller& controller; diff --git a/src/core/hle/service/audio/audio_controller.cpp b/src/core/hle/service/audio/audio_controller.cpp index 611e48e8ba..fd2c56c14e 100644 --- a/src/core/hle/service/audio/audio_controller.cpp +++ b/src/core/hle/service/audio/audio_controller.cpp @@ -24,66 +24,66 @@ IAudioController::IAudioController(Core::System& system_) : ServiceFramework{system_, "audctl"}, service_context{system, "audctl"} { // clang-format off static const FunctionInfo functions[] = { - {0, D<&IAudioController::GetTargetVolume>, "GetTargetVolume"}, - {1, D<&IAudioController::SetTargetVolume>, "SetTargetVolume"}, - {2, D<&IAudioController::GetTargetVolumeMin>, "GetTargetVolumeMin"}, - {3, D<&IAudioController::GetTargetVolumeMax>, "GetTargetVolumeMax"}, - {4, D<&IAudioController::IsTargetMute>, "IsTargetMute"}, - {5, D<&IAudioController::SetTargetMute>, "SetTargetMute"}, - {6, nullptr, "IsTargetConnected"}, //20.0.0+ - {7, nullptr, "SetDefaultTarget"}, - {8, nullptr, "GetDefaultTarget"}, - {9, D<&IAudioController::GetAudioOutputMode>, "GetAudioOutputMode"}, - {10, D<&IAudioController::SetAudioOutputMode>, "SetAudioOutputMode"}, - {11, nullptr, "SetForceMutePolicy"}, - {12, D<&IAudioController::GetForceMutePolicy>, "GetForceMutePolicy"}, - {13, D<&IAudioController::GetOutputModeSetting>, "GetOutputModeSetting"}, - {14, D<&IAudioController::SetOutputModeSetting>, "SetOutputModeSetting"}, - {15, nullptr, "SetOutputTarget"}, - {16, nullptr, "SetInputTargetForceEnabled"}, - {17, D<&IAudioController::SetHeadphoneOutputLevelMode>, "SetHeadphoneOutputLevelMode"}, - {18, D<&IAudioController::GetHeadphoneOutputLevelMode>, "GetHeadphoneOutputLevelMode"}, - {19, nullptr, "AcquireAudioVolumeUpdateEventForPlayReport"}, - {20, nullptr, "AcquireAudioOutputDeviceUpdateEventForPlayReport"}, - {21, nullptr, "GetAudioOutputTargetForPlayReport"}, - {22, D<&IAudioController::NotifyHeadphoneVolumeWarningDisplayedEvent>, "NotifyHeadphoneVolumeWarningDisplayedEvent"}, - {23, nullptr, "SetSystemOutputMasterVolume"}, - {24, nullptr, "GetSystemOutputMasterVolume"}, - {25, nullptr, "GetAudioVolumeDataForPlayReport"}, - {26, nullptr, "UpdateHeadphoneSettings"}, - {27, nullptr, "SetVolumeMappingTableForDev"}, - {28, nullptr, "GetAudioOutputChannelCountForPlayReport"}, - {29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, - {30, D<&IAudioController::SetSpeakerAutoMuteEnabled>, "SetSpeakerAutoMuteEnabled"}, - {31, D<&IAudioController::IsSpeakerAutoMuteEnabled>, "IsSpeakerAutoMuteEnabled"}, - {32, D<&IAudioController::GetActiveOutputTarget>, "GetActiveOutputTarget"}, - {33, nullptr, "GetTargetDeviceInfo"}, - {34, D<&IAudioController::AcquireTargetNotification>, "AcquireTargetNotification"}, - {35, nullptr, "SetHearingProtectionSafeguardTimerRemainingTimeForDebug"}, - {36, nullptr, "GetHearingProtectionSafeguardTimerRemainingTimeForDebug"}, - {37, nullptr, "SetHearingProtectionSafeguardEnabled"}, - {38, nullptr, "IsHearingProtectionSafeguardEnabled"}, - {39, nullptr, "IsHearingProtectionSafeguardMonitoringOutputForDebug"}, - {40, nullptr, "GetSystemInformationForDebug"}, - {41, nullptr, "SetVolumeButtonLongPressTime"}, - {42, nullptr, "SetNativeVolumeForDebug"}, - {43, nullptr, "Unknown43"}, //21.0.0+ - {5000, D<&IAudioController::Unknown5000>, "Unknown5000"}, //19.0.0+ - {10000, nullptr, "NotifyAudioOutputTargetForPlayReport"}, - {10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"}, - {10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"}, - {10100, nullptr, "GetAudioVolumeDataForPlayReport"}, - {10101, nullptr, "BindAudioVolumeUpdateEventForPlayReport"}, - {10102, nullptr, "BindAudioOutputTargetUpdateEventForPlayReport"}, - {10103, nullptr, "GetAudioOutputTargetForPlayReport"}, - {10104, nullptr, "GetAudioOutputChannelCountForPlayReport"}, - {10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, //14.0.0-19.0.1 - {10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"}, //14.0.0-19.0.1 - {10200, nullptr, "Unknown10200"}, //20.0.0+ - {50000, nullptr, "SetAnalogInputBoostGainForPrototyping"}, //15.0.0-18.1.0 - {50001, nullptr, "OverrideDefaultTargetForDebug"}, //19.0.0-19.0.1 - {50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"}, //19.0.0+ - {50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"} //19.0.0+ + FunctionInfo{0, D<&IAudioController::GetTargetVolume>, "GetTargetVolume"}, + FunctionInfo{1, D<&IAudioController::SetTargetVolume>, "SetTargetVolume"}, + FunctionInfo{2, D<&IAudioController::GetTargetVolumeMin>, "GetTargetVolumeMin"}, + FunctionInfo{3, D<&IAudioController::GetTargetVolumeMax>, "GetTargetVolumeMax"}, + FunctionInfo{4, D<&IAudioController::IsTargetMute>, "IsTargetMute"}, + FunctionInfo{5, D<&IAudioController::SetTargetMute>, "SetTargetMute"}, + FunctionInfo{6, nullptr, "IsTargetConnected"}, //20.0.0+ + FunctionInfo{7, nullptr, "SetDefaultTarget"}, + FunctionInfo{8, nullptr, "GetDefaultTarget"}, + FunctionInfo{9, D<&IAudioController::GetAudioOutputMode>, "GetAudioOutputMode"}, + FunctionInfo{10, D<&IAudioController::SetAudioOutputMode>, "SetAudioOutputMode"}, + FunctionInfo{11, nullptr, "SetForceMutePolicy"}, + FunctionInfo{12, D<&IAudioController::GetForceMutePolicy>, "GetForceMutePolicy"}, + FunctionInfo{13, D<&IAudioController::GetOutputModeSetting>, "GetOutputModeSetting"}, + FunctionInfo{14, D<&IAudioController::SetOutputModeSetting>, "SetOutputModeSetting"}, + FunctionInfo{15, nullptr, "SetOutputTarget"}, + FunctionInfo{16, nullptr, "SetInputTargetForceEnabled"}, + FunctionInfo{17, D<&IAudioController::SetHeadphoneOutputLevelMode>, "SetHeadphoneOutputLevelMode"}, + FunctionInfo{18, D<&IAudioController::GetHeadphoneOutputLevelMode>, "GetHeadphoneOutputLevelMode"}, + FunctionInfo{19, nullptr, "AcquireAudioVolumeUpdateEventForPlayReport"}, + FunctionInfo{20, nullptr, "AcquireAudioOutputDeviceUpdateEventForPlayReport"}, + FunctionInfo{21, nullptr, "GetAudioOutputTargetForPlayReport"}, + FunctionInfo{22, D<&IAudioController::NotifyHeadphoneVolumeWarningDisplayedEvent>, "NotifyHeadphoneVolumeWarningDisplayedEvent"}, + FunctionInfo{23, nullptr, "SetSystemOutputMasterVolume"}, + FunctionInfo{24, nullptr, "GetSystemOutputMasterVolume"}, + FunctionInfo{25, nullptr, "GetAudioVolumeDataForPlayReport"}, + FunctionInfo{26, nullptr, "UpdateHeadphoneSettings"}, + FunctionInfo{27, nullptr, "SetVolumeMappingTableForDev"}, + FunctionInfo{28, nullptr, "GetAudioOutputChannelCountForPlayReport"}, + FunctionInfo{29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, + FunctionInfo{30, D<&IAudioController::SetSpeakerAutoMuteEnabled>, "SetSpeakerAutoMuteEnabled"}, + FunctionInfo{31, D<&IAudioController::IsSpeakerAutoMuteEnabled>, "IsSpeakerAutoMuteEnabled"}, + FunctionInfo{32, D<&IAudioController::GetActiveOutputTarget>, "GetActiveOutputTarget"}, + FunctionInfo{33, nullptr, "GetTargetDeviceInfo"}, + FunctionInfo{34, D<&IAudioController::AcquireTargetNotification>, "AcquireTargetNotification"}, + FunctionInfo{35, nullptr, "SetHearingProtectionSafeguardTimerRemainingTimeForDebug"}, + FunctionInfo{36, nullptr, "GetHearingProtectionSafeguardTimerRemainingTimeForDebug"}, + FunctionInfo{37, nullptr, "SetHearingProtectionSafeguardEnabled"}, + FunctionInfo{38, nullptr, "IsHearingProtectionSafeguardEnabled"}, + FunctionInfo{39, nullptr, "IsHearingProtectionSafeguardMonitoringOutputForDebug"}, + FunctionInfo{40, nullptr, "GetSystemInformationForDebug"}, + FunctionInfo{41, nullptr, "SetVolumeButtonLongPressTime"}, + FunctionInfo{42, nullptr, "SetNativeVolumeForDebug"}, + FunctionInfo{43, nullptr, "Unknown43"}, //21.0.0+ + FunctionInfo{5000, D<&IAudioController::Unknown5000>, "Unknown5000"}, //19.0.0+ + FunctionInfo{10000, nullptr, "NotifyAudioOutputTargetForPlayReport"}, + FunctionInfo{10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"}, + FunctionInfo{10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"}, + FunctionInfo{10100, nullptr, "GetAudioVolumeDataForPlayReport"}, + FunctionInfo{10101, nullptr, "BindAudioVolumeUpdateEventForPlayReport"}, + FunctionInfo{10102, nullptr, "BindAudioOutputTargetUpdateEventForPlayReport"}, + FunctionInfo{10103, nullptr, "GetAudioOutputTargetForPlayReport"}, + FunctionInfo{10104, nullptr, "GetAudioOutputChannelCountForPlayReport"}, + FunctionInfo{10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, //14.0.0-19.0.1 + FunctionInfo{10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"}, //14.0.0-19.0.1 + FunctionInfo{10200, nullptr, "Unknown10200"}, //20.0.0+ + FunctionInfo{50000, nullptr, "SetAnalogInputBoostGainForPrototyping"}, //15.0.0-18.1.0 + FunctionInfo{50001, nullptr, "OverrideDefaultTargetForDebug"}, //19.0.0-19.0.1 + FunctionInfo{50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"}, //19.0.0+ + FunctionInfo{50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"} //19.0.0+ }; // clang-format on diff --git a/src/core/hle/service/audio/audio_device.cpp b/src/core/hle/service/audio/audio_device.cpp index e9f7e074a1..bdd9a27473 100644 --- a/src/core/hle/service/audio/audio_device.cpp +++ b/src/core/hle/service/audio/audio_device.cpp @@ -18,27 +18,27 @@ IAudioDevice::IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u impl{std::make_unique(system_, applet_resource_user_id, revision)}, event{service_context.CreateEvent(fmt::format("IAudioDeviceEvent-{}", device_num))} { static const FunctionInfo functions[] = { - {0, D<&IAudioDevice::ListAudioDeviceName>, "ListAudioDeviceName"}, - {1, D<&IAudioDevice::SetAudioDeviceOutputVolume>, "SetAudioDeviceOutputVolume"}, - {2, D<&IAudioDevice::GetAudioDeviceOutputVolume>, "GetAudioDeviceOutputVolume"}, - {3, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioDeviceName"}, - {4, D<&IAudioDevice::QueryAudioDeviceSystemEvent>, "QueryAudioDeviceSystemEvent"}, - {5, D<&IAudioDevice::GetActiveChannelCount>, "GetActiveChannelCount"}, - {6, D<&IAudioDevice::ListAudioDeviceNameAuto>, "ListAudioDeviceNameAuto"}, - {7, D<&IAudioDevice::SetAudioDeviceOutputVolumeAuto>, "SetAudioDeviceOutputVolumeAuto"}, - {8, D<&IAudioDevice::GetAudioDeviceOutputVolumeAuto>, "GetAudioDeviceOutputVolumeAuto"}, - {10, D<&IAudioDevice::GetActiveAudioDeviceNameAuto>, "GetActiveAudioDeviceNameAuto"}, - {11, D<&IAudioDevice::QueryAudioDeviceInputEvent>, "QueryAudioDeviceInputEvent"}, - {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+ - {19, D<&IAudioDevice::SetAudioDeviceOutputVolumeAutoTuneEnabled>, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+ - {20, D<&IAudioDevice::IsAudioDeviceOutputVolumeAutoTuneEnabled>, "IsAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+ - {21, nullptr, "IsActiveOutputDeviceEstimatedLowLatency"} //21.0.0+ + FunctionInfo{0, D<&IAudioDevice::ListAudioDeviceName>, "ListAudioDeviceName"}, + FunctionInfo{1, D<&IAudioDevice::SetAudioDeviceOutputVolume>, "SetAudioDeviceOutputVolume"}, + FunctionInfo{2, D<&IAudioDevice::GetAudioDeviceOutputVolume>, "GetAudioDeviceOutputVolume"}, + FunctionInfo{3, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioDeviceName"}, + FunctionInfo{4, D<&IAudioDevice::QueryAudioDeviceSystemEvent>, "QueryAudioDeviceSystemEvent"}, + FunctionInfo{5, D<&IAudioDevice::GetActiveChannelCount>, "GetActiveChannelCount"}, + FunctionInfo{6, D<&IAudioDevice::ListAudioDeviceNameAuto>, "ListAudioDeviceNameAuto"}, + FunctionInfo{7, D<&IAudioDevice::SetAudioDeviceOutputVolumeAuto>, "SetAudioDeviceOutputVolumeAuto"}, + FunctionInfo{8, D<&IAudioDevice::GetAudioDeviceOutputVolumeAuto>, "GetAudioDeviceOutputVolumeAuto"}, + FunctionInfo{10, D<&IAudioDevice::GetActiveAudioDeviceNameAuto>, "GetActiveAudioDeviceNameAuto"}, + FunctionInfo{11, D<&IAudioDevice::QueryAudioDeviceInputEvent>, "QueryAudioDeviceInputEvent"}, + FunctionInfo{12, D<&IAudioDevice::QueryAudioDeviceOutputEvent>, "QueryAudioDeviceOutputEvent"}, + FunctionInfo{13, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioOutputDeviceName"}, + FunctionInfo{14, D<&IAudioDevice::ListAudioOutputDeviceName>, "ListAudioOutputDeviceName"}, + FunctionInfo{15, nullptr, "AcquireAudioInputDeviceNotification"}, //17.0.0+ + FunctionInfo{16, nullptr, "ReleaseAudioInputDeviceNotification"}, //17.0.0+ + FunctionInfo{17, nullptr, "AcquireAudioOutputDeviceNotification"}, //17.0.0+ + FunctionInfo{18, nullptr, "ReleaseAudioOutputDeviceNotification"}, //17.0.0+ + FunctionInfo{19, D<&IAudioDevice::SetAudioDeviceOutputVolumeAutoTuneEnabled>, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+ + FunctionInfo{20, D<&IAudioDevice::IsAudioDeviceOutputVolumeAutoTuneEnabled>, "IsAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+ + FunctionInfo{21, nullptr, "IsActiveOutputDeviceEstimatedLowLatency"} //21.0.0+ }; RegisterHandlers(functions); diff --git a/src/core/hle/service/audio/audio_in.cpp b/src/core/hle/service/audio/audio_in.cpp index 6208c2d104..9132c0ca32 100644 --- a/src/core/hle/service/audio/audio_in.cpp +++ b/src/core/hle/service/audio/audio_in.cpp @@ -14,32 +14,9 @@ using namespace AudioCore::AudioIn; IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id, const std::string& device_name, const AudioInParameter& in_params, Kernel::KProcess* handle, u64 applet_resource_user_id) - : ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"}, - event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared(system_, - manager, event, - session_id)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"}, - {1, D<&IAudioIn::Start>, "Start"}, - {2, D<&IAudioIn::Stop>, "Stop"}, - {3, D<&IAudioIn::AppendAudioInBuffer>, "AppendAudioInBuffer"}, - {4, D<&IAudioIn::RegisterBufferEvent>, "RegisterBufferEvent"}, - {5, D<&IAudioIn::GetReleasedAudioInBuffers>, "GetReleasedAudioInBuffers"}, - {6, D<&IAudioIn::ContainsAudioInBuffer>, "ContainsAudioInBuffer"}, - {7, D<&IAudioIn::AppendAudioInBuffer>, "AppendUacInBuffer"}, - {8, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendAudioInBufferAuto"}, - {9, D<&IAudioIn::GetReleasedAudioInBuffersAuto>, "GetReleasedAudioInBuffersAuto"}, - {10, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendUacInBufferAuto"}, - {11, D<&IAudioIn::GetAudioInBufferCount>, "GetAudioInBufferCount"}, - {12, D<&IAudioIn::SetDeviceGain>, "SetDeviceGain"}, - {13, D<&IAudioIn::GetDeviceGain>, "GetDeviceGain"}, - {14, D<&IAudioIn::FlushAudioInBuffers>, "FlushAudioInBuffers"}, - }; - // clang-format on - - RegisterHandlers(functions); - + : ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"} + , event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared(system_, manager, event, session_id)} +{ process->Open(system.Kernel()); if (impl->GetSystem() diff --git a/src/core/hle/service/audio/audio_in.h b/src/core/hle/service/audio/audio_in.h index 3fe1e1e870..5e216fb1b1 100644 --- a/src/core/hle/service/audio/audio_in.h +++ b/src/core/hle/service/audio/audio_in.h @@ -43,6 +43,26 @@ public: Result FlushAudioInBuffers(Out out_flushed); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"}, + FunctionInfo{1, D<&IAudioIn::Start>, "Start"}, + FunctionInfo{2, D<&IAudioIn::Stop>, "Stop"}, + FunctionInfo{3, D<&IAudioIn::AppendAudioInBuffer>, "AppendAudioInBuffer"}, + FunctionInfo{4, D<&IAudioIn::RegisterBufferEvent>, "RegisterBufferEvent"}, + FunctionInfo{5, D<&IAudioIn::GetReleasedAudioInBuffers>, "GetReleasedAudioInBuffers"}, + FunctionInfo{6, D<&IAudioIn::ContainsAudioInBuffer>, "ContainsAudioInBuffer"}, + FunctionInfo{7, D<&IAudioIn::AppendAudioInBuffer>, "AppendUacInBuffer"}, + FunctionInfo{8, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendAudioInBufferAuto"}, + FunctionInfo{9, D<&IAudioIn::GetReleasedAudioInBuffersAuto>, "GetReleasedAudioInBuffersAuto"}, + FunctionInfo{10, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendUacInBufferAuto"}, + FunctionInfo{11, D<&IAudioIn::GetAudioInBufferCount>, "GetAudioInBufferCount"}, + FunctionInfo{12, D<&IAudioIn::SetDeviceGain>, "SetDeviceGain"}, + FunctionInfo{13, D<&IAudioIn::GetDeviceGain>, "GetDeviceGain"}, + FunctionInfo{14, D<&IAudioIn::FlushAudioInBuffers>, "FlushAudioInBuffers"} + ); Kernel::KProcess* process; KernelHelpers::ServiceContext service_context; Kernel::KEvent* event; diff --git a/src/core/hle/service/audio/audio_in_manager.cpp b/src/core/hle/service/audio/audio_in_manager.cpp index 2675a57735..07e4731ade 100644 --- a/src/core/hle/service/audio/audio_in_manager.cpp +++ b/src/core/hle/service/audio/audio_in_manager.cpp @@ -10,21 +10,9 @@ namespace Service::Audio { using namespace AudioCore::AudioIn; IAudioInManager::IAudioInManager(Core::System& system_) - : ServiceFramework{system_, "audin:u"}, impl{std::make_unique( - system_)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"}, - {1, D<&IAudioInManager::OpenAudioIn>, "OpenAudioIn"}, - {2, D<&IAudioInManager::ListAudioIns>, "ListAudioInsAuto"}, - {3, D<&IAudioInManager::OpenAudioIn>, "OpenAudioInAuto"}, - {4, D<&IAudioInManager::ListAudioInsAutoFiltered>, "ListAudioInsAutoFiltered"}, - {5, D<&IAudioInManager::OpenAudioInProtocolSpecified>, "OpenAudioInProtocolSpecified"}, - }; - // clang-format on - - RegisterHandlers(functions); -} + : ServiceFramework{system_, "audin:u"} + , impl{std::make_unique(system_)} +{} IAudioInManager::~IAudioInManager() = default; diff --git a/src/core/hle/service/audio/audio_in_manager.h b/src/core/hle/service/audio/audio_in_manager.h index 2a983bc607..492194d764 100644 --- a/src/core/hle/service/audio/audio_in_manager.h +++ b/src/core/hle/service/audio/audio_in_manager.h @@ -51,6 +51,17 @@ private: AudioCore::AudioIn::AudioInParameter parameter, InCopyHandle process_handle, ClientAppletResourceUserId aruid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"}, + FunctionInfo{1, D<&IAudioInManager::OpenAudioIn>, "OpenAudioIn"}, + FunctionInfo{2, D<&IAudioInManager::ListAudioIns>, "ListAudioInsAuto"}, + FunctionInfo{3, D<&IAudioInManager::OpenAudioIn>, "OpenAudioInAuto"}, + FunctionInfo{4, D<&IAudioInManager::ListAudioInsAutoFiltered>, "ListAudioInsAutoFiltered"}, + FunctionInfo{5, D<&IAudioInManager::OpenAudioInProtocolSpecified>, "OpenAudioInProtocolSpecified"} + ); std::unique_ptr impl; }; diff --git a/src/core/hle/service/audio/audio_out.cpp b/src/core/hle/service/audio/audio_out.cpp index 996eeede58..23e52ba24d 100644 --- a/src/core/hle/service/audio/audio_out.cpp +++ b/src/core/hle/service/audio/audio_out.cpp @@ -23,24 +23,25 @@ IAudioOut::IAudioOut(Core::System& system_, Manager& manager, size_t session_id, impl{std::make_shared(system_, manager, event, session_id)} { // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioOut::GetAudioOutState>, "GetAudioOutState"}, - {1, D<&IAudioOut::Start>, "Start"}, - {2, D<&IAudioOut::Stop>, "Stop"}, - {3, D<&IAudioOut::AppendAudioOutBuffer>, "AppendAudioOutBuffer"}, - {4, D<&IAudioOut::RegisterBufferEvent>, "RegisterBufferEvent"}, - {5, D<&IAudioOut::GetReleasedAudioOutBuffers>, "GetReleasedAudioOutBuffers"}, - {6, D<&IAudioOut::ContainsAudioOutBuffer>, "ContainsAudioOutBuffer"}, - {7, D<&IAudioOut::AppendAudioOutBufferAuto>, "AppendAudioOutBufferAuto"}, - {8, D<&IAudioOut::GetReleasedAudioOutBuffersAuto>, "GetReleasedAudioOutBuffersAuto"}, - {9, D<&IAudioOut::GetAudioOutBufferCount>, "GetAudioOutBufferCount"}, - {10, D<&IAudioOut::GetAudioOutPlayedSampleCount>, "GetAudioOutPlayedSampleCount"}, - {11, D<&IAudioOut::FlushAudioOutBuffers>, "FlushAudioOutBuffers"}, - {12, D<&IAudioOut::SetAudioOutVolume>, "SetAudioOutVolume"}, - {13, D<&IAudioOut::GetAudioOutVolume>, "GetAudioOutVolume"}, - }; - // clang-format on - RegisterHandlers(functions); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioOut::GetAudioOutState>, "GetAudioOutState"}, + FunctionInfo{1, D<&IAudioOut::Start>, "Start"}, + FunctionInfo{2, D<&IAudioOut::Stop>, "Stop"}, + FunctionInfo{3, D<&IAudioOut::AppendAudioOutBuffer>, "AppendAudioOutBuffer"}, + FunctionInfo{4, D<&IAudioOut::RegisterBufferEvent>, "RegisterBufferEvent"}, + FunctionInfo{5, D<&IAudioOut::GetReleasedAudioOutBuffers>, "GetReleasedAudioOutBuffers"}, + FunctionInfo{6, D<&IAudioOut::ContainsAudioOutBuffer>, "ContainsAudioOutBuffer"}, + FunctionInfo{7, D<&IAudioOut::AppendAudioOutBufferAuto>, "AppendAudioOutBufferAuto"}, + FunctionInfo{8, D<&IAudioOut::GetReleasedAudioOutBuffersAuto>, "GetReleasedAudioOutBuffersAuto"}, + FunctionInfo{9, D<&IAudioOut::GetAudioOutBufferCount>, "GetAudioOutBufferCount"}, + FunctionInfo{10, D<&IAudioOut::GetAudioOutPlayedSampleCount>, "GetAudioOutPlayedSampleCount"}, + FunctionInfo{11, D<&IAudioOut::FlushAudioOutBuffers>, "FlushAudioOutBuffers"}, + FunctionInfo{12, D<&IAudioOut::SetAudioOutVolume>, "SetAudioOutVolume"}, + FunctionInfo{13, D<&IAudioOut::GetAudioOutVolume>, "GetAudioOutVolume"} + ); process->Open(system.Kernel()); } diff --git a/src/core/hle/service/audio/audio_out_manager.cpp b/src/core/hle/service/audio/audio_out_manager.cpp index 3b2087932c..73006b5dee 100644 --- a/src/core/hle/service/audio/audio_out_manager.cpp +++ b/src/core/hle/service/audio/audio_out_manager.cpp @@ -17,16 +17,6 @@ IAudioOutManager::IAudioOutManager(Core::System& system_) : ServiceFramework{system_, "audout:u"} , impl(system_) { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioOutManager::ListAudioOuts>, "ListAudioOuts"}, - {1, D<&IAudioOutManager::OpenAudioOut>, "OpenAudioOut"}, - {2, D<&IAudioOutManager::ListAudioOutsAuto>, "ListAudioOutsAuto"}, - {3, D<&IAudioOutManager::OpenAudioOutAuto>, "OpenAudioOutAuto"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAudioOutManager::~IAudioOutManager() = default; diff --git a/src/core/hle/service/audio/audio_out_manager.h b/src/core/hle/service/audio/audio_out_manager.h index ec974aaba4..781d2bb33f 100644 --- a/src/core/hle/service/audio/audio_out_manager.h +++ b/src/core/hle/service/audio/audio_out_manager.h @@ -43,6 +43,15 @@ private: AudioCore::AudioOut::AudioOutParameter parameter, InCopyHandle process_handle, ClientAppletResourceUserId aruid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioOutManager::ListAudioOuts>, "ListAudioOuts"}, + FunctionInfo{1, D<&IAudioOutManager::OpenAudioOut>, "OpenAudioOut"}, + FunctionInfo{2, D<&IAudioOutManager::ListAudioOutsAuto>, "ListAudioOutsAuto"}, + FunctionInfo{3, D<&IAudioOutManager::OpenAudioOutAuto>, "OpenAudioOutAuto"} + ); std::optional impl; }; diff --git a/src/core/hle/service/audio/audio_renderer.cpp b/src/core/hle/service/audio/audio_renderer.cpp index dd76544094..48b26c83a4 100644 --- a/src/core/hle/service/audio/audio_renderer.cpp +++ b/src/core/hle/service/audio/audio_renderer.cpp @@ -15,33 +15,12 @@ IAudioRenderer::IAudioRenderer(Core::System& system_, Manager& manager_, Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size, Kernel::KProcess* process_handle_, u64 applet_resource_user_id, s32 session_id) - : ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"}, - rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_}, - impl{std::make_unique(system_, manager, rendered_event)}, process_handle{ - process_handle_} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"}, - {1, D<&IAudioRenderer::GetSampleCount>, "GetSampleCount"}, - {2, D<&IAudioRenderer::GetMixBufferCount>, "GetMixBufferCount"}, - {3, D<&IAudioRenderer::GetState>, "GetState"}, - {4, D<&IAudioRenderer::RequestUpdate>, "RequestUpdate"}, - {5, D<&IAudioRenderer::Start>, "Start"}, - {6, D<&IAudioRenderer::Stop>, "Stop"}, - {7, D<&IAudioRenderer::QuerySystemEvent>, "QuerySystemEvent"}, - {8, D<&IAudioRenderer::SetRenderingTimeLimit>, "SetRenderingTimeLimit"}, - {9, D<&IAudioRenderer::GetRenderingTimeLimit>, "GetRenderingTimeLimit"}, - {10, D<&IAudioRenderer::RequestUpdateAuto>, "RequestUpdateAuto"}, //3.0.0+ - {11, nullptr, "ExecuteAudioRendererRendering"}, //3.0.0+ - {12, D<&IAudioRenderer::SetVoiceDropParameter>, "SetVoiceDropParameter"}, //15.0.0+ - {13, D<&IAudioRenderer::GetVoiceDropParameter>, "GetVoiceDropParameter"}, //15.0.0+ - }; - // clang-format on - RegisterHandlers(functions); - + : ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"} + , rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_} + , impl{std::make_unique(system_, manager, rendered_event)} + , process_handle{process_handle_} { process_handle->Open(system_.Kernel()); - impl->Initialize(params, transfer_memory, transfer_memory_size, process_handle, - applet_resource_user_id, session_id); + impl->Initialize(params, transfer_memory, transfer_memory_size, process_handle, applet_resource_user_id, session_id); } IAudioRenderer::~IAudioRenderer() { diff --git a/src/core/hle/service/audio/audio_renderer.h b/src/core/hle/service/audio/audio_renderer.h index f25c50ce8d..e88173804b 100644 --- a/src/core/hle/service/audio/audio_renderer.h +++ b/src/core/hle/service/audio/audio_renderer.h @@ -42,6 +42,25 @@ private: Result SetVoiceDropParameter(f32 voice_drop_parameter); Result GetVoiceDropParameter(Out out_voice_drop_parameter); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"}, + FunctionInfo{1, D<&IAudioRenderer::GetSampleCount>, "GetSampleCount"}, + FunctionInfo{2, D<&IAudioRenderer::GetMixBufferCount>, "GetMixBufferCount"}, + FunctionInfo{3, D<&IAudioRenderer::GetState>, "GetState"}, + FunctionInfo{4, D<&IAudioRenderer::RequestUpdate>, "RequestUpdate"}, + FunctionInfo{5, D<&IAudioRenderer::Start>, "Start"}, + FunctionInfo{6, D<&IAudioRenderer::Stop>, "Stop"}, + FunctionInfo{7, D<&IAudioRenderer::QuerySystemEvent>, "QuerySystemEvent"}, + FunctionInfo{8, D<&IAudioRenderer::SetRenderingTimeLimit>, "SetRenderingTimeLimit"}, + FunctionInfo{9, D<&IAudioRenderer::GetRenderingTimeLimit>, "GetRenderingTimeLimit"}, + FunctionInfo{10, D<&IAudioRenderer::RequestUpdateAuto>, "RequestUpdateAuto"}, //3.0.0+ + FunctionInfo{11, nullptr, "ExecuteAudioRendererRendering"}, //3.0.0+ + FunctionInfo{12, D<&IAudioRenderer::SetVoiceDropParameter>, "SetVoiceDropParameter"}, //15.0.0+ + FunctionInfo{13, D<&IAudioRenderer::GetVoiceDropParameter>, "GetVoiceDropParameter"}, //15.0.0+ + ); KernelHelpers::ServiceContext service_context; Kernel::KEvent* rendered_event; AudioCore::Renderer::Manager& manager; diff --git a/src/core/hle/service/audio/audio_renderer_manager.cpp b/src/core/hle/service/audio/audio_renderer_manager.cpp index 4756802eeb..c5e15d69fe 100644 --- a/src/core/hle/service/audio/audio_renderer_manager.cpp +++ b/src/core/hle/service/audio/audio_renderer_manager.cpp @@ -22,17 +22,6 @@ IAudioRendererManager::IAudioRendererManager(Core::System& system_) : ServiceFramework{system_, "audren:u"} , impl(system_) { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IAudioRendererManager::OpenAudioRenderer>, "OpenAudioRenderer"}, - {1, D<&IAudioRendererManager::GetWorkBufferSize>, "GetWorkBufferSize"}, - {2, D<&IAudioRendererManager::GetAudioDeviceService>, "GetAudioDeviceService"}, - {3, nullptr, "OpenAudioRendererForManualExecution"}, - {4, D<&IAudioRendererManager::GetAudioDeviceServiceWithRevisionInfo>, "GetAudioDeviceServiceWithRevisionInfo"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAudioRendererManager::~IAudioRendererManager() = default; diff --git a/src/core/hle/service/audio/audio_renderer_manager.h b/src/core/hle/service/audio/audio_renderer_manager.h index fdce8b6ffa..213affa783 100644 --- a/src/core/hle/service/audio/audio_renderer_manager.h +++ b/src/core/hle/service/audio/audio_renderer_manager.h @@ -33,6 +33,16 @@ private: Result GetAudioDeviceServiceWithRevisionInfo(Out> out_audio_device, u32 revision, ClientAppletResourceUserId aruid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IAudioRendererManager::OpenAudioRenderer>, "OpenAudioRenderer"}, + FunctionInfo{1, D<&IAudioRendererManager::GetWorkBufferSize>, "GetWorkBufferSize"}, + FunctionInfo{2, D<&IAudioRendererManager::GetAudioDeviceService>, "GetAudioDeviceService"}, + FunctionInfo{3, nullptr, "OpenAudioRendererForManualExecution"}, + FunctionInfo{4, D<&IAudioRendererManager::GetAudioDeviceServiceWithRevisionInfo>, "GetAudioDeviceServiceWithRevisionInfo"} + ); std::optional impl; u32 num_audio_devices{0}; }; diff --git a/src/core/hle/service/audio/final_output_recorder_manager.h b/src/core/hle/service/audio/final_output_recorder_manager.h index 43ff834fba..4212454965 100644 --- a/src/core/hle/service/audio/final_output_recorder_manager.h +++ b/src/core/hle/service/audio/final_output_recorder_manager.h @@ -20,7 +20,7 @@ public: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, nullptr, "OpenFinalOutputRecorder"} + FunctionInfo{0, nullptr, "OpenFinalOutputRecorder"} ); }; diff --git a/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp index 7e2e42bbe7..7cccd0139b 100644 --- a/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp +++ b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.cpp @@ -7,14 +7,6 @@ namespace Service::Audio { IFinalOutputRecorderManagerForApplet::IFinalOutputRecorderManagerForApplet(Core::System& system_) : ServiceFramework{system_, "audrec:a"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestSuspend"}, - {1, nullptr, "RequestResume"}, - }; - // clang-format on - - RegisterHandlers(functions); } IFinalOutputRecorderManagerForApplet::~IFinalOutputRecorderManagerForApplet() = default; diff --git a/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h index 27940f7e0d..b6abefb135 100644 --- a/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h +++ b/src/core/hle/service/audio/final_output_recorder_manager_for_applet.h @@ -16,6 +16,14 @@ class IFinalOutputRecorderManagerForApplet final public: explicit IFinalOutputRecorderManagerForApplet(Core::System& system_); ~IFinalOutputRecorderManagerForApplet() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "RequestSuspend"}, + FunctionInfo{1, nullptr, "RequestResume"} + ); }; } // namespace Service::Audio diff --git a/src/core/hle/service/audio/hardware_opus_decoder.cpp b/src/core/hle/service/audio/hardware_opus_decoder.cpp index 03d3374c14..9e435dad9c 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder.cpp +++ b/src/core/hle/service/audio/hardware_opus_decoder.cpp @@ -11,22 +11,6 @@ using namespace AudioCore::OpusDecoder; IHardwareOpusDecoder::IHardwareOpusDecoder(Core::System& system_, HardwareOpus& hardware_opus) : ServiceFramework{system_, "IHardwareOpusDecoder"}, impl{std::make_unique(system_, hardware_opus)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IHardwareOpusDecoder::DecodeInterleavedOld>, "DecodeInterleavedOld"}, - {1, D<&IHardwareOpusDecoder::SetContext>, "SetContext"}, - {2, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamOld>, "DecodeInterleavedForMultiStreamOld"}, - {3, D<&IHardwareOpusDecoder::SetContextForMultiStream>, "SetContextForMultiStream"}, - {4, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfOld>, "DecodeInterleavedWithPerfOld"}, - {5, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfOld>, "DecodeInterleavedForMultiStreamWithPerfOld"}, - {6, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfAndResetOld>, "DecodeInterleavedWithPerfAndResetOld"}, - {7, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfAndResetOld>, "DecodeInterleavedForMultiStreamWithPerfAndResetOld"}, - {8, D<&IHardwareOpusDecoder::DecodeInterleaved>, "DecodeInterleaved"}, - {9, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStream>, "DecodeInterleavedForMultiStream"}, - }; - // clang-format on - - RegisterHandlers(functions); } IHardwareOpusDecoder::~IHardwareOpusDecoder() = default; diff --git a/src/core/hle/service/audio/hardware_opus_decoder.h b/src/core/hle/service/audio/hardware_opus_decoder.h index 511bf46bdb..fce35613a8 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder.h +++ b/src/core/hle/service/audio/hardware_opus_decoder.h @@ -56,6 +56,21 @@ private: InBuffer opus_data, bool reset); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IHardwareOpusDecoder::DecodeInterleavedOld>, "DecodeInterleavedOld"}, + FunctionInfo{1, D<&IHardwareOpusDecoder::SetContext>, "SetContext"}, + FunctionInfo{2, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamOld>, "DecodeInterleavedForMultiStreamOld"}, + FunctionInfo{3, D<&IHardwareOpusDecoder::SetContextForMultiStream>, "SetContextForMultiStream"}, + FunctionInfo{4, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfOld>, "DecodeInterleavedWithPerfOld"}, + FunctionInfo{5, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfOld>, "DecodeInterleavedForMultiStreamWithPerfOld"}, + FunctionInfo{6, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfAndResetOld>, "DecodeInterleavedWithPerfAndResetOld"}, + FunctionInfo{7, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfAndResetOld>, "DecodeInterleavedForMultiStreamWithPerfAndResetOld"}, + FunctionInfo{8, D<&IHardwareOpusDecoder::DecodeInterleaved>, "DecodeInterleaved"}, + FunctionInfo{9, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStream>, "DecodeInterleavedForMultiStream"} + ); std::unique_ptr impl; Common::ScratchBuffer output_data; }; diff --git a/src/core/hle/service/audio/hardware_opus_decoder_manager.cpp b/src/core/hle/service/audio/hardware_opus_decoder_manager.cpp index 9de72e30fe..c4a115f873 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder_manager.cpp +++ b/src/core/hle/service/audio/hardware_opus_decoder_manager.cpp @@ -11,21 +11,6 @@ using namespace AudioCore::OpusDecoder; IHardwareOpusDecoderManager::IHardwareOpusDecoderManager(Core::System& system_) : ServiceFramework{system_, "hwopus"}, system{system_}, impl{system} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoder>, "OpenHardwareOpusDecoder"}, - {1, D<&IHardwareOpusDecoderManager::GetWorkBufferSize>, "GetWorkBufferSize"}, - {2, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStream>, "OpenOpusDecoderForMultiStream"}, - {3, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStream>, "GetWorkBufferSizeForMultiStream"}, - {4, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderEx>, "OpenHardwareOpusDecoderEx"}, - {5, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeEx>, "GetWorkBufferSizeEx"}, - {6, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStreamEx>, "OpenHardwareOpusDecoderForMultiStreamEx"}, - {7, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamEx>, "GetWorkBufferSizeForMultiStreamEx"}, - {8, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeExEx>, "GetWorkBufferSizeExEx"}, - {9, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamExEx>, "GetWorkBufferSizeForMultiStreamExEx"}, - }; - // clang-format on - RegisterHandlers(functions); } IHardwareOpusDecoderManager::~IHardwareOpusDecoderManager() = default; diff --git a/src/core/hle/service/audio/hardware_opus_decoder_manager.h b/src/core/hle/service/audio/hardware_opus_decoder_manager.h index 4f869c5174..b842455d64 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder_manager.h +++ b/src/core/hle/service/audio/hardware_opus_decoder_manager.h @@ -46,6 +46,21 @@ private: Result GetWorkBufferSizeForMultiStreamExEx( Out out_size, InLargeData params); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoder>, "OpenHardwareOpusDecoder"}, + FunctionInfo{1, D<&IHardwareOpusDecoderManager::GetWorkBufferSize>, "GetWorkBufferSize"}, + FunctionInfo{2, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStream>, "OpenOpusDecoderForMultiStream"}, + FunctionInfo{3, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStream>, "GetWorkBufferSizeForMultiStream"}, + FunctionInfo{4, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderEx>, "OpenHardwareOpusDecoderEx"}, + FunctionInfo{5, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeEx>, "GetWorkBufferSizeEx"}, + FunctionInfo{6, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStreamEx>, "OpenHardwareOpusDecoderForMultiStreamEx"}, + FunctionInfo{7, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamEx>, "GetWorkBufferSizeForMultiStreamEx"}, + FunctionInfo{8, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeExEx>, "GetWorkBufferSizeExEx"}, + FunctionInfo{9, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamExEx>, "GetWorkBufferSizeForMultiStreamExEx"} + ); Core::System& system; AudioCore::OpusDecoder::OpusDecoderManager impl; }; diff --git a/src/core/hle/service/bcat/delivery_cache_directory_service.cpp b/src/core/hle/service/bcat/delivery_cache_directory_service.cpp index 8ead0bae99..7e1e5ec7b0 100644 --- a/src/core/hle/service/bcat/delivery_cache_directory_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_directory_service.cpp @@ -30,15 +30,6 @@ static BcatDigest DigestFile(const FileSys::VirtualFile& file) { IDeliveryCacheDirectoryService::IDeliveryCacheDirectoryService(Core::System& system_, FileSys::VirtualDir root_) : ServiceFramework{system_, "IDeliveryCacheDirectoryService"}, root(std::move(root_)) { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IDeliveryCacheDirectoryService::Open>, "Open"}, - {1, D<&IDeliveryCacheDirectoryService::Read>, "Read"}, - {2, D<&IDeliveryCacheDirectoryService::GetCount>, "GetCount"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDeliveryCacheDirectoryService::~IDeliveryCacheDirectoryService() = default; diff --git a/src/core/hle/service/bcat/delivery_cache_directory_service.h b/src/core/hle/service/bcat/delivery_cache_directory_service.h index b902c64959..8abc88eb86 100644 --- a/src/core/hle/service/bcat/delivery_cache_directory_service.h +++ b/src/core/hle/service/bcat/delivery_cache_directory_service.h @@ -26,6 +26,14 @@ private: OutArray out_buffer); Result GetCount(Out out_count); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IDeliveryCacheDirectoryService::Open>, "Open"}, + FunctionInfo{1, D<&IDeliveryCacheDirectoryService::Read>, "Read"}, + FunctionInfo{2, D<&IDeliveryCacheDirectoryService::GetCount>, "GetCount"} + ); FileSys::VirtualDir root; FileSys::VirtualDir current_dir; }; diff --git a/src/core/hle/service/bcat/delivery_cache_file_service.cpp b/src/core/hle/service/bcat/delivery_cache_file_service.cpp index b75fac4bfe..bc67117054 100644 --- a/src/core/hle/service/bcat/delivery_cache_file_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_file_service.cpp @@ -12,16 +12,6 @@ namespace Service::BCAT { IDeliveryCacheFileService::IDeliveryCacheFileService(Core::System& system_, FileSys::VirtualDir root_) : ServiceFramework{system_, "IDeliveryCacheFileService"}, root(std::move(root_)) { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IDeliveryCacheFileService::Open>, "Open"}, - {1, D<&IDeliveryCacheFileService::Read>, "Read"}, - {2, D<&IDeliveryCacheFileService::GetSize>, "GetSize"}, - {3, D<&IDeliveryCacheFileService::GetDigest>, "GetDigest"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDeliveryCacheFileService::~IDeliveryCacheFileService() = default; diff --git a/src/core/hle/service/bcat/delivery_cache_file_service.h b/src/core/hle/service/bcat/delivery_cache_file_service.h index e1012e6873..2eb6f116fe 100644 --- a/src/core/hle/service/bcat/delivery_cache_file_service.h +++ b/src/core/hle/service/bcat/delivery_cache_file_service.h @@ -26,6 +26,15 @@ private: Result GetSize(Out out_size); Result GetDigest(Out out_digest); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IDeliveryCacheFileService::Open>, "Open"}, + FunctionInfo{1, D<&IDeliveryCacheFileService::Read>, "Read"}, + FunctionInfo{2, D<&IDeliveryCacheFileService::GetSize>, "GetSize"}, + FunctionInfo{3, D<&IDeliveryCacheFileService::GetDigest>, "GetDigest"} + ); FileSys::VirtualDir root; FileSys::VirtualFile current_file; }; diff --git a/src/core/hle/service/bcat/delivery_cache_progress_service.cpp b/src/core/hle/service/bcat/delivery_cache_progress_service.cpp index 79e7e0d957..303df839d5 100644 --- a/src/core/hle/service/bcat/delivery_cache_progress_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_progress_service.cpp @@ -11,14 +11,6 @@ IDeliveryCacheProgressService::IDeliveryCacheProgressService(Core::System& syste Kernel::KReadableEvent& event_, const DeliveryCacheProgressImpl& impl_) : ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{event_}, impl{impl_} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IDeliveryCacheProgressService::GetEvent>, "Get"}, - {1, D<&IDeliveryCacheProgressService::GetImpl>, "Get"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDeliveryCacheProgressService::~IDeliveryCacheProgressService() = default; diff --git a/src/core/hle/service/bcat/delivery_cache_progress_service.h b/src/core/hle/service/bcat/delivery_cache_progress_service.h index f81a139806..ec6aa16abd 100644 --- a/src/core/hle/service/bcat/delivery_cache_progress_service.h +++ b/src/core/hle/service/bcat/delivery_cache_progress_service.h @@ -28,6 +28,13 @@ private: Result GetEvent(OutCopyHandle out_event); Result GetImpl(OutLargeData out_impl); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IDeliveryCacheProgressService::GetEvent>, "Get"}, + FunctionInfo{1, D<&IDeliveryCacheProgressService::GetImpl>, "Get"} + ); Kernel::KReadableEvent& event; const DeliveryCacheProgressImpl& impl; }; diff --git a/src/core/hle/service/bcat/delivery_cache_storage_service.cpp b/src/core/hle/service/bcat/delivery_cache_storage_service.cpp index 46ed4dae67..7f2ee73cc5 100644 --- a/src/core/hle/service/bcat/delivery_cache_storage_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_storage_service.cpp @@ -15,15 +15,6 @@ namespace Service::BCAT { IDeliveryCacheStorageService::IDeliveryCacheStorageService(Core::System& system_, FileSys::VirtualDir root_) : ServiceFramework{system_, "IDeliveryCacheStorageService"}, root(std::move(root_)) { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IDeliveryCacheStorageService::CreateFileService>, "CreateFileService"}, - {1, D<&IDeliveryCacheStorageService::CreateDirectoryService>, "CreateDirectoryService"}, - {10, D<&IDeliveryCacheStorageService::EnumerateDeliveryCacheDirectory>, "EnumerateDeliveryCacheDirectory"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDeliveryCacheStorageService::~IDeliveryCacheStorageService() = default; diff --git a/src/core/hle/service/bcat/delivery_cache_storage_service.h b/src/core/hle/service/bcat/delivery_cache_storage_service.h index 3b8dfb1a39..d2ef3882fe 100644 --- a/src/core/hle/service/bcat/delivery_cache_storage_service.h +++ b/src/core/hle/service/bcat/delivery_cache_storage_service.h @@ -28,6 +28,14 @@ private: Out out_directory_count, OutArray out_directories); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IDeliveryCacheStorageService::CreateFileService>, "CreateFileService"}, + FunctionInfo{1, D<&IDeliveryCacheStorageService::CreateDirectoryService>, "CreateDirectoryService"}, + FunctionInfo{10, D<&IDeliveryCacheStorageService::EnumerateDeliveryCacheDirectory>, "EnumerateDeliveryCacheDirectory"} + ); FileSys::VirtualDir root; std::vector entries; std::size_t next_read_index = 0; diff --git a/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp b/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp index ed393f7a26..79f080df93 100644 --- a/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp +++ b/src/core/hle/service/bcat/news/newly_arrived_event_holder.cpp @@ -7,16 +7,8 @@ namespace Service::News { INewlyArrivedEventHolder::INewlyArrivedEventHolder(Core::System& system_) - : ServiceFramework{system_, "INewlyArrivedEventHolder"}, service_context{ - system_, - "INewlyArrivedEventHolder"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&INewlyArrivedEventHolder::Get>, "Get"}, - }; - // clang-format on - - RegisterHandlers(functions); + : ServiceFramework{system_, "INewlyArrivedEventHolder"} + , service_context{system_, "INewlyArrivedEventHolder"} { arrived_event = service_context.CreateEvent("INewlyArrivedEventHolder::ArrivedEvent"); } diff --git a/src/core/hle/service/bcat/news/newly_arrived_event_holder.h b/src/core/hle/service/bcat/news/newly_arrived_event_holder.h index 6cc9ae0997..91dca6511a 100644 --- a/src/core/hle/service/bcat/news/newly_arrived_event_holder.h +++ b/src/core/hle/service/bcat/news/newly_arrived_event_holder.h @@ -26,6 +26,12 @@ public: private: Result Get(OutCopyHandle out_event); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&INewlyArrivedEventHolder::Get>, "Get"} + ); Kernel::KEvent* arrived_event; KernelHelpers::ServiceContext service_context; }; diff --git a/src/core/hle/service/bcat/news/news_data_service.h b/src/core/hle/service/bcat/news/news_data_service.h index 52ea221d5f..0146e43ff1 100644 --- a/src/core/hle/service/bcat/news/news_data_service.h +++ b/src/core/hle/service/bcat/news/news_data_service.h @@ -35,11 +35,11 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&INewsDataService::Open>, "Open"}, - {1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"}, - {2, D<&INewsDataService::Read>, "Read"}, - {3, D<&INewsDataService::GetSize>, "GetSize"}, - {1001, D<&INewsDataService::OpenWithNewsRecord>, "OpenWithNewsRecord"} + FunctionInfo{0, D<&INewsDataService::Open>, "Open"}, + FunctionInfo{1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"}, + FunctionInfo{2, D<&INewsDataService::Read>, "Read"}, + FunctionInfo{3, D<&INewsDataService::GetSize>, "GetSize"}, + FunctionInfo{1001, D<&INewsDataService::OpenWithNewsRecord>, "OpenWithNewsRecord"} ); std::vector opened_payload; }; diff --git a/src/core/hle/service/bcat/news/news_database_service.h b/src/core/hle/service/bcat/news/news_database_service.h index 15f079cc43..33308e9b97 100644 --- a/src/core/hle/service/bcat/news/news_database_service.h +++ b/src/core/hle/service/bcat/news/news_database_service.h @@ -54,13 +54,13 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&INewsDatabaseService::GetListV1>, "GetListV1"}, - {1, D<&INewsDatabaseService::Count>, "Count"}, - {2, D<&INewsDatabaseService::CountWithKey>, "CountWithKey"}, - {3, D<&INewsDatabaseService::UpdateIntegerValue>, "UpdateIntegerValue"}, - {4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"}, - {5, D<&INewsDatabaseService::UpdateStringValue>, "UpdateStringValue"}, - {1000, D<&INewsDatabaseService::GetList>, "GetList"} + FunctionInfo{0, D<&INewsDatabaseService::GetListV1>, "GetListV1"}, + FunctionInfo{1, D<&INewsDatabaseService::Count>, "Count"}, + FunctionInfo{2, D<&INewsDatabaseService::CountWithKey>, "CountWithKey"}, + FunctionInfo{3, D<&INewsDatabaseService::UpdateIntegerValue>, "UpdateIntegerValue"}, + FunctionInfo{4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"}, + FunctionInfo{5, D<&INewsDatabaseService::UpdateStringValue>, "UpdateStringValue"}, + FunctionInfo{1000, D<&INewsDatabaseService::GetList>, "GetList"} ); }; diff --git a/src/core/hle/service/bcat/news/news_service.cpp b/src/core/hle/service/bcat/news/news_service.cpp index aed1536bfe..d865d04249 100644 --- a/src/core/hle/service/bcat/news/news_service.cpp +++ b/src/core/hle/service/bcat/news/news_service.cpp @@ -15,25 +15,25 @@ namespace Service::News { INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "INewsService"} { // clang-format off static const FunctionInfo functions[] = { - {10100, D<&INewsService::PostLocalNews>, "PostLocalNews"}, - {20100, D<&INewsService::SetPassphrase>, "SetPassphrase"}, - {30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"}, - {30101, D<&INewsService::GetTopicList>, "GetTopicList"}, //3.0.0+ - {30110, D<&INewsService::GetTopicList>, "Unknown30110"}, //6.0.0+ (stub) - {30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"}, - {30201, D<&INewsService::IsSystemUpdateRequired>, "Unknown30201"}, //8.0.0+ (stub) - {30210, D<&INewsService::IsSystemUpdateRequired>, "Unknown30210"}, //10.0.0+ (stub) - {30300, nullptr, "RequestImmediateReception"}, - {30400, nullptr, "DecodeArchiveFile"}, //3.0.0-18.1.0 (stub) - {30500, nullptr, "Unknown30500"}, //8.0.0+ (stub) - {30900, nullptr, "Unknown30900"}, //1.0.0 (stub) - {30901, nullptr, "Unknown30901"}, //1.0.0 (stub) - {30902, nullptr, "Unknown30902"}, //1.0.0 (stub) - {40100, nullptr, "SetSubscriptionStatus"}, - {40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"}, //3.0.0+ - {40200, D<&INewsService::ClearStorage>, "ClearStorage"}, - {40201, D<&INewsService::ClearSubscriptionStatusAll>, "ClearSubscriptionStatusAll"}, - {90100, D<&INewsService::GetNewsDatabaseDump>, "GetNewsDatabaseDump"}, + FunctionInfo{10100, D<&INewsService::PostLocalNews>, "PostLocalNews"}, + FunctionInfo{20100, D<&INewsService::SetPassphrase>, "SetPassphrase"}, + FunctionInfo{30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"}, + FunctionInfo{30101, D<&INewsService::GetTopicList>, "GetTopicList"}, //3.0.0+ + FunctionInfo{30110, D<&INewsService::GetTopicList>, "Unknown30110"}, //6.0.0+ (stub) + FunctionInfo{30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"}, + FunctionInfo{30201, D<&INewsService::IsSystemUpdateRequired>, "Unknown30201"}, //8.0.0+ (stub) + FunctionInfo{30210, D<&INewsService::IsSystemUpdateRequired>, "Unknown30210"}, //10.0.0+ (stub) + FunctionInfo{30300, nullptr, "RequestImmediateReception"}, + FunctionInfo{30400, nullptr, "DecodeArchiveFile"}, //3.0.0-18.1.0 (stub) + FunctionInfo{30500, nullptr, "Unknown30500"}, //8.0.0+ (stub) + FunctionInfo{30900, nullptr, "Unknown30900"}, //1.0.0 (stub) + FunctionInfo{30901, nullptr, "Unknown30901"}, //1.0.0 (stub) + FunctionInfo{30902, nullptr, "Unknown30902"}, //1.0.0 (stub) + FunctionInfo{40100, nullptr, "SetSubscriptionStatus"}, + FunctionInfo{40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"}, //3.0.0+ + FunctionInfo{40200, D<&INewsService::ClearStorage>, "ClearStorage"}, + FunctionInfo{40201, D<&INewsService::ClearSubscriptionStatusAll>, "ClearSubscriptionStatusAll"}, + FunctionInfo{90100, D<&INewsService::GetNewsDatabaseDump>, "GetNewsDatabaseDump"}, }; // clang-format on diff --git a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp index 1712971e4d..b761f34826 100644 --- a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp +++ b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp @@ -7,15 +7,8 @@ namespace Service::News { IOverwriteEventHolder::IOverwriteEventHolder(Core::System& system_) - : ServiceFramework{system_, "IOverwriteEventHolder"}, service_context{system_, - "IOverwriteEventHolder"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IOverwriteEventHolder::Get>, "Get"}, - }; - // clang-format on - - RegisterHandlers(functions); + : ServiceFramework{system_, "IOverwriteEventHolder"} + , service_context{system_, "IOverwriteEventHolder"} { overwrite_event = service_context.CreateEvent("IOverwriteEventHolder::OverwriteEvent"); } diff --git a/src/core/hle/service/bcat/news/overwrite_event_holder.h b/src/core/hle/service/bcat/news/overwrite_event_holder.h index cdc87d782c..7eedb276f1 100644 --- a/src/core/hle/service/bcat/news/overwrite_event_holder.h +++ b/src/core/hle/service/bcat/news/overwrite_event_holder.h @@ -26,6 +26,12 @@ public: private: Result Get(OutCopyHandle out_event); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IOverwriteEventHolder::Get>, "Get"} + ); Kernel::KEvent* overwrite_event; KernelHelpers::ServiceContext service_context; }; diff --git a/src/core/hle/service/bcat/news/service_creator.cpp b/src/core/hle/service/bcat/news/service_creator.cpp index a1b22c0044..4c664f1c9e 100644 --- a/src/core/hle/service/bcat/news/service_creator.cpp +++ b/src/core/hle/service/bcat/news/service_creator.cpp @@ -13,17 +13,6 @@ namespace Service::News { IServiceCreator::IServiceCreator(Core::System& system_, u32 permissions_, const char* name_) : ServiceFramework{system_, name_}, permissions{permissions_} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IServiceCreator::CreateNewsService>, "CreateNewsService"}, - {1, D<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"}, - {2, D<&IServiceCreator::CreateNewsDataService>, "CreateNewsDataService"}, - {3, D<&IServiceCreator::CreateNewsDatabaseService>, "CreateNewsDatabaseService"}, - {4, D<&IServiceCreator::CreateOverwriteEventHolder>, "CreateOverwriteEventHolder"}, - }; - // clang-format on - - RegisterHandlers(functions); } IServiceCreator::~IServiceCreator() = default; diff --git a/src/core/hle/service/bcat/news/service_creator.h b/src/core/hle/service/bcat/news/service_creator.h index 5a62e7c1a9..883018ee95 100644 --- a/src/core/hle/service/bcat/news/service_creator.h +++ b/src/core/hle/service/bcat/news/service_creator.h @@ -29,6 +29,16 @@ private: Result CreateNewsDatabaseService(OutInterface out_interface); Result CreateOverwriteEventHolder(OutInterface out_interface); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IServiceCreator::CreateNewsService>, "CreateNewsService"}, + FunctionInfo{1, D<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"}, + FunctionInfo{2, D<&IServiceCreator::CreateNewsDataService>, "CreateNewsDataService"}, + FunctionInfo{3, D<&IServiceCreator::CreateNewsDatabaseService>, "CreateNewsDatabaseService"}, + FunctionInfo{4, D<&IServiceCreator::CreateOverwriteEventHolder>, "CreateOverwriteEventHolder"} + ); u32 permissions; }; diff --git a/src/core/hle/service/bcat/service_creator.cpp b/src/core/hle/service/bcat/service_creator.cpp index 15f59d3056..450f9046be 100644 --- a/src/core/hle/service/bcat/service_creator.cpp +++ b/src/core/hle/service/bcat/service_creator.cpp @@ -20,20 +20,7 @@ std::unique_ptr CreateBackendFromSettings([[maybe_unused]] Core::Sy IServiceCreator::IServiceCreator(Core::System& system_, const char* name_) : ServiceFramework{system_, name_}, fsc{system.GetFileSystemController()} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IServiceCreator::CreateBcatService>, "CreateBcatService"}, - {1, D<&IServiceCreator::CreateDeliveryCacheStorageService>, "CreateDeliveryCacheStorageService"}, - {2, D<&IServiceCreator::CreateDeliveryCacheStorageServiceWithApplicationId>, "CreateDeliveryCacheStorageServiceWithApplicationId"}, - {3, nullptr, "CreateDeliveryCacheProgressService"}, - {4, nullptr, "CreateDeliveryCacheProgressServiceWithApplicationId"}, - }; - // clang-format on - - RegisterHandlers(functions); - - backend = - CreateBackendFromSettings(system_, [this](u64 tid) { return fsc.GetBCATDirectory(tid); }); + backend = CreateBackendFromSettings(system_, [this](u64 tid) { return fsc.GetBCATDirectory(tid); }); } IServiceCreator::~IServiceCreator() = default; diff --git a/src/core/hle/service/bcat/service_creator.h b/src/core/hle/service/bcat/service_creator.h index 50e6633248..015d839046 100644 --- a/src/core/hle/service/bcat/service_creator.h +++ b/src/core/hle/service/bcat/service_creator.h @@ -33,6 +33,16 @@ private: Result CreateDeliveryCacheStorageServiceWithApplicationId( u64 application_id, OutInterface out_interface); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IServiceCreator::CreateBcatService>, "CreateBcatService"}, + FunctionInfo{1, D<&IServiceCreator::CreateDeliveryCacheStorageService>, "CreateDeliveryCacheStorageService"}, + FunctionInfo{2, D<&IServiceCreator::CreateDeliveryCacheStorageServiceWithApplicationId>, "CreateDeliveryCacheStorageServiceWithApplicationId"}, + FunctionInfo{3, nullptr, "CreateDeliveryCacheProgressService"}, + FunctionInfo{4, nullptr, "CreateDeliveryCacheProgressServiceWithApplicationId"} + ); std::unique_ptr backend; Service::FileSystem::FileSystemController& fsc; }; diff --git a/src/core/hle/service/btm/btm_debug.cpp b/src/core/hle/service/btm/btm_debug.cpp index 0c9a3a6557..30a8ed8aa8 100644 --- a/src/core/hle/service/btm/btm_debug.cpp +++ b/src/core/hle/service/btm/btm_debug.cpp @@ -9,30 +9,6 @@ namespace Service::BTM { IBtmDebug::IBtmDebug(Core::System& system_) : ServiceFramework{system_, "btm:dbg"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "AcquireDiscoveryEvent"}, - {1, nullptr, "StartDiscovery"}, - {2, nullptr, "CancelDiscovery"}, - {3, nullptr, "GetDeviceProperty"}, - {4, nullptr, "CreateBond"}, - {5, nullptr, "CancelBond"}, - {6, nullptr, "SetTsiMode"}, - {7, nullptr, "GeneralTest"}, - {8, nullptr, "HidConnect"}, - {9, nullptr, "GeneralGet"}, //5.0.0+ - {10, nullptr, "GetGattClientDisconnectionReason"}, //5.0.0+ - {11, nullptr, "GetBleConnectionParameter"}, //5.1.0+ - {12, nullptr, "GetBleConnectionParameterRequest"}, //5.1.0+ - {13, nullptr, "GetDiscoveredDevice"}, //12.0.0+ - {14, nullptr, "SleepAwakeLoopTest"}, //15.0.0+ - {15, nullptr, "SleepTest"}, //15.0.0+ - {16, nullptr, "MinimumAwakeTest"}, //15.0.0+ - {17, nullptr, "ForceEnableBtm"}, //15.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IBtmDebug::~IBtmDebug() = default; diff --git a/src/core/hle/service/btm/btm_debug.h b/src/core/hle/service/btm/btm_debug.h index bf4f7e14fd..769e700aac 100644 --- a/src/core/hle/service/btm/btm_debug.h +++ b/src/core/hle/service/btm/btm_debug.h @@ -16,6 +16,30 @@ class IBtmDebug final : public ServiceFramework { public: explicit IBtmDebug(Core::System& system_); ~IBtmDebug() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "AcquireDiscoveryEvent"}, + FunctionInfo{1, nullptr, "StartDiscovery"}, + FunctionInfo{2, nullptr, "CancelDiscovery"}, + FunctionInfo{3, nullptr, "GetDeviceProperty"}, + FunctionInfo{4, nullptr, "CreateBond"}, + FunctionInfo{5, nullptr, "CancelBond"}, + FunctionInfo{6, nullptr, "SetTsiMode"}, + FunctionInfo{7, nullptr, "GeneralTest"}, + FunctionInfo{8, nullptr, "HidConnect"}, + FunctionInfo{9, nullptr, "GeneralGet"}, //5.0.0+ + FunctionInfo{10, nullptr, "GetGattClientDisconnectionReason"}, //5.0.0+ + FunctionInfo{11, nullptr, "GetBleConnectionParameter"}, //5.1.0+ + FunctionInfo{12, nullptr, "GetBleConnectionParameterRequest"}, //5.1.0+ + FunctionInfo{13, nullptr, "GetDiscoveredDevice"}, //12.0.0+ + FunctionInfo{14, nullptr, "SleepAwakeLoopTest"}, //15.0.0+ + FunctionInfo{15, nullptr, "SleepTest"}, //15.0.0+ + FunctionInfo{16, nullptr, "MinimumAwakeTest"}, //15.0.0+ + FunctionInfo{17, nullptr, "ForceEnableBtm"}, //15.0.0+ + ); }; } // namespace Service::BTM diff --git a/src/core/hle/service/btm/btm_system.cpp b/src/core/hle/service/btm/btm_system.cpp index 1684b0193e..b4905354ec 100644 --- a/src/core/hle/service/btm/btm_system.cpp +++ b/src/core/hle/service/btm/btm_system.cpp @@ -13,13 +13,6 @@ namespace Service::BTM { IBtmSystem::IBtmSystem(Core::System& system_) : ServiceFramework{system_, "btm:sys"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, C<&IBtmSystem::GetCore>, "GetCore"}, - }; - // clang-format on - - RegisterHandlers(functions); } IBtmSystem::~IBtmSystem() = default; diff --git a/src/core/hle/service/btm/btm_system.h b/src/core/hle/service/btm/btm_system.h index fe1c6dbd78..ae4d0106b9 100644 --- a/src/core/hle/service/btm/btm_system.h +++ b/src/core/hle/service/btm/btm_system.h @@ -20,6 +20,13 @@ public: private: Result GetCore(OutInterface out_interface); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&IBtmSystem::GetCore>, "GetCore"} + ); }; } // namespace Service::BTM diff --git a/src/core/hle/service/btm/btm_system_core.cpp b/src/core/hle/service/btm/btm_system_core.cpp index 318657fc32..57dc805d7b 100644 --- a/src/core/hle/service/btm/btm_system_core.cpp +++ b/src/core/hle/service/btm/btm_system_core.cpp @@ -14,42 +14,9 @@ namespace Service::BTM { IBtmSystemCore::IBtmSystemCore(Core::System& system_) : ServiceFramework{system_, "IBtmSystemCore"}, service_context{system_, "IBtmSystemCore"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, C<&IBtmSystemCore::StartGamepadPairing>, "StartGamepadPairing"}, - {1, C<&IBtmSystemCore::CancelGamepadPairing>, "CancelGamepadPairing"}, - {2, nullptr, "ClearGamepadPairingDatabase"}, - {3, nullptr, "GetPairedGamepadCount"}, - {4, C<&IBtmSystemCore::EnableRadio>, "EnableRadio"}, - {5, C<&IBtmSystemCore::DisableRadio>, "DisableRadio"}, - {6, C<&IBtmSystemCore::IsRadioEnabled>, "IsRadioEnabled"}, - {7, C<&IBtmSystemCore::AcquireRadioEvent>, "AcquireRadioEvent"}, - {8, nullptr, "AcquireGamepadPairingEvent"}, - {9, nullptr, "IsGamepadPairingStarted"}, - {10, nullptr, "StartAudioDeviceDiscovery"}, - {11, nullptr, "StopAudioDeviceDiscovery"}, - {12, nullptr, "IsDiscoveryingAudioDevice"}, - {13, C<&IBtmSystemCore::GetDiscoveredAudioDevice>, "GetDiscoveredAudioDevice"}, - {14, C<&IBtmSystemCore::AcquireAudioDeviceConnectionEvent>, "AcquireAudioDeviceConnectionEvent"}, - {15, nullptr, "ConnectAudioDevice"}, - {16, nullptr, "IsConnectingAudioDevice"}, - {17, C<&IBtmSystemCore::GetConnectedAudioDevices>, "GetConnectedAudioDevices"}, - {18, nullptr, "DisconnectAudioDevice"}, - {19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"}, - {20, C<&IBtmSystemCore::GetPairedAudioDevices>, "GetPairedAudioDevices"}, - {21, nullptr, "RemoveAudioDevicePairing"}, - {22, C<&IBtmSystemCore::RequestAudioDeviceConnectionRejection>, "RequestAudioDeviceConnectionRejection"}, - {23, C<&IBtmSystemCore::CancelAudioDeviceConnectionRejection>, "CancelAudioDeviceConnectionRejection"} - }; - // clang-format on - - RegisterHandlers(functions); radio_event = service_context.CreateEvent("IBtmSystemCore::RadioEvent"); - audio_device_connection_event = - service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent"); - - m_set_sys = - system.ServiceManager().GetService("set:sys", true); + audio_device_connection_event = service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent"); + m_set_sys = system.ServiceManager().GetService("set:sys", true); } IBtmSystemCore::~IBtmSystemCore() { diff --git a/src/core/hle/service/btm/btm_system_core.h b/src/core/hle/service/btm/btm_system_core.h index 3fc4c0d56c..8dd533eb95 100644 --- a/src/core/hle/service/btm/btm_system_core.h +++ b/src/core/hle/service/btm/btm_system_core.h @@ -52,8 +52,36 @@ private: Result RequestAudioDeviceConnectionRejection(ClientAppletResourceUserId aruid); Result CancelAudioDeviceConnectionRejection(ClientAppletResourceUserId aruid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&IBtmSystemCore::StartGamepadPairing>, "StartGamepadPairing"}, + FunctionInfo{1, C<&IBtmSystemCore::CancelGamepadPairing>, "CancelGamepadPairing"}, + FunctionInfo{2, nullptr, "ClearGamepadPairingDatabase"}, + FunctionInfo{3, nullptr, "GetPairedGamepadCount"}, + FunctionInfo{4, C<&IBtmSystemCore::EnableRadio>, "EnableRadio"}, + FunctionInfo{5, C<&IBtmSystemCore::DisableRadio>, "DisableRadio"}, + FunctionInfo{6, C<&IBtmSystemCore::IsRadioEnabled>, "IsRadioEnabled"}, + FunctionInfo{7, C<&IBtmSystemCore::AcquireRadioEvent>, "AcquireRadioEvent"}, + FunctionInfo{8, nullptr, "AcquireGamepadPairingEvent"}, + FunctionInfo{9, nullptr, "IsGamepadPairingStarted"}, + FunctionInfo{10, nullptr, "StartAudioDeviceDiscovery"}, + FunctionInfo{11, nullptr, "StopAudioDeviceDiscovery"}, + FunctionInfo{12, nullptr, "IsDiscoveryingAudioDevice"}, + FunctionInfo{13, C<&IBtmSystemCore::GetDiscoveredAudioDevice>, "GetDiscoveredAudioDevice"}, + FunctionInfo{14, C<&IBtmSystemCore::AcquireAudioDeviceConnectionEvent>, "AcquireAudioDeviceConnectionEvent"}, + FunctionInfo{15, nullptr, "ConnectAudioDevice"}, + FunctionInfo{16, nullptr, "IsConnectingAudioDevice"}, + FunctionInfo{17, C<&IBtmSystemCore::GetConnectedAudioDevices>, "GetConnectedAudioDevices"}, + FunctionInfo{18, nullptr, "DisconnectAudioDevice"}, + FunctionInfo{19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"}, + FunctionInfo{20, C<&IBtmSystemCore::GetPairedAudioDevices>, "GetPairedAudioDevices"}, + FunctionInfo{21, nullptr, "RemoveAudioDevicePairing"}, + FunctionInfo{22, C<&IBtmSystemCore::RequestAudioDeviceConnectionRejection>, "RequestAudioDeviceConnectionRejection"}, + FunctionInfo{23, C<&IBtmSystemCore::CancelAudioDeviceConnectionRejection>, "CancelAudioDeviceConnectionRejection"} + ); KernelHelpers::ServiceContext service_context; - Kernel::KEvent* radio_event; Kernel::KEvent* audio_device_connection_event; std::shared_ptr m_set_sys; diff --git a/src/core/hle/service/btm/btm_user.cpp b/src/core/hle/service/btm/btm_user.cpp index c380c573fa..f3e18e8ae0 100644 --- a/src/core/hle/service/btm/btm_user.cpp +++ b/src/core/hle/service/btm/btm_user.cpp @@ -12,13 +12,6 @@ namespace Service::BTM { IBtmUser::IBtmUser(Core::System& system_) : ServiceFramework{system_, "btm:u"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, C<&IBtmUser::GetCore>, "GetCore"}, - }; - // clang-format on - - RegisterHandlers(functions); } IBtmUser::~IBtmUser() = default; diff --git a/src/core/hle/service/btm/btm_user.h b/src/core/hle/service/btm/btm_user.h index d9ee5db455..bdfe63471e 100644 --- a/src/core/hle/service/btm/btm_user.h +++ b/src/core/hle/service/btm/btm_user.h @@ -20,6 +20,13 @@ public: private: Result GetCore(OutInterface out_interface); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&IBtmUser::GetCore>, "GetCore"} + ); }; } // namespace Service::BTM diff --git a/src/core/hle/service/btm/btm_user_core.cpp b/src/core/hle/service/btm/btm_user_core.cpp index b120df14c0..76d68cf1d1 100644 --- a/src/core/hle/service/btm/btm_user_core.cpp +++ b/src/core/hle/service/btm/btm_user_core.cpp @@ -16,44 +16,6 @@ namespace Service::BTM { IBtmUserCore::IBtmUserCore(Core::System& system_) : ServiceFramework{system_, "IBtmUserCore"}, service_context{system_, "IBtmUserCore"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, C<&IBtmUserCore::AcquireBleScanEvent>, "AcquireBleScanEvent"}, - {1, nullptr, "GetBleScanFilterParameter"}, - {2, nullptr, "GetBleScanFilterParameter2"}, - {3, nullptr, "StartBleScanForGeneral"}, - {4, nullptr, "StopBleScanForGeneral"}, - {5, nullptr, "GetBleScanResultsForGeneral"}, - {6, nullptr, "StartBleScanForPaired"}, - {7, nullptr, "StopBleScanForPaired"}, - {8, nullptr, "StartBleScanForSmartDevice"}, - {9, nullptr, "StopBleScanForSmartDevice"}, - {10, nullptr, "GetBleScanResultsForSmartDevice"}, - {17, C<&IBtmUserCore::AcquireBleConnectionEvent>, "AcquireBleConnectionEvent"}, - {18, nullptr, "BleConnect"}, - {19, nullptr, "BleDisconnect"}, - {20, nullptr, "BleGetConnectionState"}, - {21, nullptr, "AcquireBlePairingEvent"}, - {22, nullptr, "BlePairDevice"}, - {23, nullptr, "BleUnPairDevice"}, - {24, nullptr, "BleUnPairDevice2"}, - {25, nullptr, "BleGetPairedDevices"}, - {26, C<&IBtmUserCore::AcquireBleServiceDiscoveryEvent>, "AcquireBleServiceDiscoveryEvent"}, - {27, nullptr, "GetGattServices"}, - {28, nullptr, "GetGattService"}, - {29, nullptr, "GetGattIncludedServices"}, - {30, nullptr, "GetBelongingGattService"}, - {31, nullptr, "GetGattCharacteristics"}, - {32, nullptr, "GetGattDescriptors"}, - {33, C<&IBtmUserCore::AcquireBleMtuConfigEvent>, "AcquireBleMtuConfigEvent"}, - {34, nullptr, "ConfigureBleMtu"}, - {35, nullptr, "GetBleMtu"}, - {36, nullptr, "RegisterBleGattDataPath"}, - {37, nullptr, "UnregisterBleGattDataPath"}, - }; - // clang-format on - RegisterHandlers(functions); - scan_event = service_context.CreateEvent("IBtmUserCore:ScanEvent"); connection_event = service_context.CreateEvent("IBtmUserCore:ConnectionEvent"); service_discovery_event = service_context.CreateEvent("IBtmUserCore:DiscoveryEvent"); diff --git a/src/core/hle/service/btm/btm_user_core.h b/src/core/hle/service/btm/btm_user_core.h index dc0a22e810..693225ac3c 100644 --- a/src/core/hle/service/btm/btm_user_core.h +++ b/src/core/hle/service/btm/btm_user_core.h @@ -24,20 +24,49 @@ public: ~IBtmUserCore() override; private: - Result AcquireBleScanEvent(Out out_is_valid, - OutCopyHandle out_event); - - Result AcquireBleConnectionEvent(Out out_is_valid, - OutCopyHandle out_event); - - Result AcquireBleServiceDiscoveryEvent(Out out_is_valid, - OutCopyHandle out_event); - - Result AcquireBleMtuConfigEvent(Out out_is_valid, - OutCopyHandle out_event); + Result AcquireBleScanEvent(Out out_is_valid, OutCopyHandle out_event); + Result AcquireBleConnectionEvent(Out out_is_valid, OutCopyHandle out_event); + Result AcquireBleServiceDiscoveryEvent(Out out_is_valid, OutCopyHandle out_event); + Result AcquireBleMtuConfigEvent(Out out_is_valid, OutCopyHandle out_event); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&IBtmUserCore::AcquireBleScanEvent>, "AcquireBleScanEvent"}, + FunctionInfo{1, nullptr, "GetBleScanFilterParameter"}, + FunctionInfo{2, nullptr, "GetBleScanFilterParameter2"}, + FunctionInfo{3, nullptr, "StartBleScanForGeneral"}, + FunctionInfo{4, nullptr, "StopBleScanForGeneral"}, + FunctionInfo{5, nullptr, "GetBleScanResultsForGeneral"}, + FunctionInfo{6, nullptr, "StartBleScanForPaired"}, + FunctionInfo{7, nullptr, "StopBleScanForPaired"}, + FunctionInfo{8, nullptr, "StartBleScanForSmartDevice"}, + FunctionInfo{9, nullptr, "StopBleScanForSmartDevice"}, + FunctionInfo{10, nullptr, "GetBleScanResultsForSmartDevice"}, + FunctionInfo{17, C<&IBtmUserCore::AcquireBleConnectionEvent>, "AcquireBleConnectionEvent"}, + FunctionInfo{18, nullptr, "BleConnect"}, + FunctionInfo{19, nullptr, "BleDisconnect"}, + FunctionInfo{20, nullptr, "BleGetConnectionState"}, + FunctionInfo{21, nullptr, "AcquireBlePairingEvent"}, + FunctionInfo{22, nullptr, "BlePairDevice"}, + FunctionInfo{23, nullptr, "BleUnPairDevice"}, + FunctionInfo{24, nullptr, "BleUnPairDevice2"}, + FunctionInfo{25, nullptr, "BleGetPairedDevices"}, + FunctionInfo{26, C<&IBtmUserCore::AcquireBleServiceDiscoveryEvent>, "AcquireBleServiceDiscoveryEvent"}, + FunctionInfo{27, nullptr, "GetGattServices"}, + FunctionInfo{28, nullptr, "GetGattService"}, + FunctionInfo{29, nullptr, "GetGattIncludedServices"}, + FunctionInfo{30, nullptr, "GetBelongingGattService"}, + FunctionInfo{31, nullptr, "GetGattCharacteristics"}, + FunctionInfo{32, nullptr, "GetGattDescriptors"}, + FunctionInfo{33, C<&IBtmUserCore::AcquireBleMtuConfigEvent>, "AcquireBleMtuConfigEvent"}, + FunctionInfo{34, nullptr, "ConfigureBleMtu"}, + FunctionInfo{35, nullptr, "GetBleMtu"}, + FunctionInfo{36, nullptr, "RegisterBleGattDataPath"}, + FunctionInfo{37, nullptr, "UnregisterBleGattDataPath"} + ); KernelHelpers::ServiceContext service_context; - Kernel::KEvent* scan_event; Kernel::KEvent* connection_event; Kernel::KEvent* service_discovery_event; diff --git a/src/core/hle/service/caps/caps_a.cpp b/src/core/hle/service/caps/caps_a.cpp index 8f561bfcdc..00de6ad25c 100644 --- a/src/core/hle/service/caps/caps_a.cpp +++ b/src/core/hle/service/caps/caps_a.cpp @@ -16,52 +16,6 @@ namespace Service::Capture { IAlbumAccessorService::IAlbumAccessorService(Core::System& system_, std::shared_ptr album_manager) : ServiceFramework{system_, "caps:a"}, manager{album_manager} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetAlbumFileCount"}, - {1, C<&IAlbumAccessorService::GetAlbumFileList>, "GetAlbumFileList"}, - {2, nullptr, "LoadAlbumFile"}, - {3, C<&IAlbumAccessorService::DeleteAlbumFile>, "DeleteAlbumFile"}, - {4, nullptr, "StorageCopyAlbumFile"}, - {5, C<&IAlbumAccessorService::IsAlbumMounted>, "IsAlbumMounted"}, - {6, nullptr, "GetAlbumUsage"}, - {7, nullptr, "GetAlbumFileSize"}, - {8, nullptr, "LoadAlbumFileThumbnail"}, - {9, nullptr, "LoadAlbumScreenShotImage"}, - {10, nullptr, "LoadAlbumScreenShotThumbnailImage"}, - {11, nullptr, "GetAlbumEntryFromApplicationAlbumEntry"}, - {12, nullptr, "LoadAlbumScreenShotImageEx"}, - {13, nullptr, "LoadAlbumScreenShotThumbnailImageEx"}, - {14, nullptr, "LoadAlbumScreenShotImageEx0"}, - {15, nullptr, "GetAlbumUsage3"}, - {16, nullptr, "GetAlbumMountResult"}, - {17, nullptr, "GetAlbumUsage16"}, - {18, C<&IAlbumAccessorService::Unknown18>, "Unknown18"}, - {19, nullptr, "Unknown19"}, - {100, nullptr, "GetAlbumFileCountEx0"}, - {101, C<&IAlbumAccessorService::GetAlbumFileListEx0>, "GetAlbumFileListEx0"}, - {202, nullptr, "SaveEditedScreenShot"}, - {301, nullptr, "GetLastThumbnail"}, - {302, nullptr, "GetLastOverlayMovieThumbnail"}, - {401, C<&IAlbumAccessorService::GetAutoSavingStorage>, "GetAutoSavingStorage"}, - {501, nullptr, "GetRequiredStorageSpaceSizeToCopyAll"}, - {1001, nullptr, "LoadAlbumScreenShotThumbnailImageEx0"}, - {1002, C<&IAlbumAccessorService::LoadAlbumScreenShotImageEx1>, "LoadAlbumScreenShotImageEx1"}, - {1003, C<&IAlbumAccessorService::LoadAlbumScreenShotThumbnailImageEx1>, "LoadAlbumScreenShotThumbnailImageEx1"}, - {8001, nullptr, "ForceAlbumUnmounted"}, - {8002, nullptr, "ResetAlbumMountStatus"}, - {8011, nullptr, "RefreshAlbumCache"}, - {8012, nullptr, "GetAlbumCache"}, - {8013, nullptr, "GetAlbumCacheEx"}, - {8021, nullptr, "GetAlbumEntryFromApplicationAlbumEntryAruid"}, - {10011, nullptr, "SetInternalErrorConversionEnabled"}, - {50000, nullptr, "LoadMakerNoteInfoForDebug"}, - {50011, C<&IAlbumAccessorService::GetAlbumAccessResultForDebug>, "GetAlbumAccessResultForDebug"}, - {60002, nullptr, "OpenAccessorSession"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAlbumAccessorService::~IAlbumAccessorService() = default; diff --git a/src/core/hle/service/caps/caps_a.h b/src/core/hle/service/caps/caps_a.h index 1885ba6be0..5f671c7cb1 100644 --- a/src/core/hle/service/caps/caps_a.h +++ b/src/core/hle/service/caps/caps_a.h @@ -57,6 +57,51 @@ private: Result GetAlbumAccessResultForDebug(Out out_result); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetAlbumFileCount"}, + FunctionInfo{1, C<&IAlbumAccessorService::GetAlbumFileList>, "GetAlbumFileList"}, + FunctionInfo{2, nullptr, "LoadAlbumFile"}, + FunctionInfo{3, C<&IAlbumAccessorService::DeleteAlbumFile>, "DeleteAlbumFile"}, + FunctionInfo{4, nullptr, "StorageCopyAlbumFile"}, + FunctionInfo{5, C<&IAlbumAccessorService::IsAlbumMounted>, "IsAlbumMounted"}, + FunctionInfo{6, nullptr, "GetAlbumUsage"}, + FunctionInfo{7, nullptr, "GetAlbumFileSize"}, + FunctionInfo{8, nullptr, "LoadAlbumFileThumbnail"}, + FunctionInfo{9, nullptr, "LoadAlbumScreenShotImage"}, + FunctionInfo{10, nullptr, "LoadAlbumScreenShotThumbnailImage"}, + FunctionInfo{11, nullptr, "GetAlbumEntryFromApplicationAlbumEntry"}, + FunctionInfo{12, nullptr, "LoadAlbumScreenShotImageEx"}, + FunctionInfo{13, nullptr, "LoadAlbumScreenShotThumbnailImageEx"}, + FunctionInfo{14, nullptr, "LoadAlbumScreenShotImageEx0"}, + FunctionInfo{15, nullptr, "GetAlbumUsage3"}, + FunctionInfo{16, nullptr, "GetAlbumMountResult"}, + FunctionInfo{17, nullptr, "GetAlbumUsage16"}, + FunctionInfo{18, C<&IAlbumAccessorService::Unknown18>, "Unknown18"}, + FunctionInfo{19, nullptr, "Unknown19"}, + FunctionInfo{100, nullptr, "GetAlbumFileCountEx0"}, + FunctionInfo{101, C<&IAlbumAccessorService::GetAlbumFileListEx0>, "GetAlbumFileListEx0"}, + FunctionInfo{202, nullptr, "SaveEditedScreenShot"}, + FunctionInfo{301, nullptr, "GetLastThumbnail"}, + FunctionInfo{302, nullptr, "GetLastOverlayMovieThumbnail"}, + FunctionInfo{401, C<&IAlbumAccessorService::GetAutoSavingStorage>, "GetAutoSavingStorage"}, + FunctionInfo{501, nullptr, "GetRequiredStorageSpaceSizeToCopyAll"}, + FunctionInfo{1001, nullptr, "LoadAlbumScreenShotThumbnailImageEx0"}, + FunctionInfo{1002, C<&IAlbumAccessorService::LoadAlbumScreenShotImageEx1>, "LoadAlbumScreenShotImageEx1"}, + FunctionInfo{1003, C<&IAlbumAccessorService::LoadAlbumScreenShotThumbnailImageEx1>, "LoadAlbumScreenShotThumbnailImageEx1"}, + FunctionInfo{8001, nullptr, "ForceAlbumUnmounted"}, + FunctionInfo{8002, nullptr, "ResetAlbumMountStatus"}, + FunctionInfo{8011, nullptr, "RefreshAlbumCache"}, + FunctionInfo{8012, nullptr, "GetAlbumCache"}, + FunctionInfo{8013, nullptr, "GetAlbumCacheEx"}, + FunctionInfo{8021, nullptr, "GetAlbumEntryFromApplicationAlbumEntryAruid"}, + FunctionInfo{10011, nullptr, "SetInternalErrorConversionEnabled"}, + FunctionInfo{50000, nullptr, "LoadMakerNoteInfoForDebug"}, + FunctionInfo{50011, C<&IAlbumAccessorService::GetAlbumAccessResultForDebug>, "GetAlbumAccessResultForDebug"}, + FunctionInfo{60002, nullptr, "OpenAccessorSession"} + ); std::shared_ptr manager = nullptr; }; diff --git a/src/core/hle/service/caps/caps_c.cpp b/src/core/hle/service/caps/caps_c.cpp index 6c9f8e964d..b978e80db2 100644 --- a/src/core/hle/service/caps/caps_c.cpp +++ b/src/core/hle/service/caps/caps_c.cpp @@ -17,31 +17,6 @@ namespace Service::Capture { IAlbumControlService::IAlbumControlService(Core::System& system_, std::shared_ptr album_manager) : ServiceFramework{system_, "caps:c"}, manager{album_manager} { - // clang-format off - static const FunctionInfo functions[] = { - {1, nullptr, "CaptureRawImage"}, - {2, nullptr, "CaptureRawImageWithTimeout"}, - {33, C<&IAlbumControlService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, - {1001, nullptr, "RequestTakingScreenShot"}, - {1002, nullptr, "RequestTakingScreenShotWithTimeout"}, - {1011, nullptr, "NotifyTakingScreenShotRefused"}, - {2001, nullptr, "NotifyAlbumStorageIsAvailable"}, - {2002, nullptr, "NotifyAlbumStorageIsUnavailable"}, - {2011, nullptr, "RegisterAppletResourceUserId"}, - {2012, nullptr, "UnregisterAppletResourceUserId"}, - {2013, nullptr, "GetApplicationIdFromAruid"}, - {2014, nullptr, "CheckApplicationIdRegistered"}, - {2101, nullptr, "GenerateCurrentAlbumFileId"}, - {2102, nullptr, "GenerateApplicationAlbumEntry"}, - {2201, nullptr, "SaveAlbumScreenShotFile"}, - {2202, nullptr, "SaveAlbumScreenShotFileEx"}, - {2301, nullptr, "SetOverlayScreenShotThumbnailData"}, - {2302, nullptr, "SetOverlayMovieThumbnailData"}, - {60001, nullptr, "OpenControlSession"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAlbumControlService::~IAlbumControlService() = default; diff --git a/src/core/hle/service/caps/caps_c.h b/src/core/hle/service/caps/caps_c.h index 0ecdfa1147..245b61a29f 100644 --- a/src/core/hle/service/caps/caps_c.h +++ b/src/core/hle/service/caps/caps_c.h @@ -24,6 +24,30 @@ private: Result SetShimLibraryVersion(ShimLibraryVersion library_version, ClientAppletResourceUserId aruid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{1, nullptr, "CaptureRawImage"}, + FunctionInfo{2, nullptr, "CaptureRawImageWithTimeout"}, + FunctionInfo{33, C<&IAlbumControlService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, + FunctionInfo{1001, nullptr, "RequestTakingScreenShot"}, + FunctionInfo{1002, nullptr, "RequestTakingScreenShotWithTimeout"}, + FunctionInfo{1011, nullptr, "NotifyTakingScreenShotRefused"}, + FunctionInfo{2001, nullptr, "NotifyAlbumStorageIsAvailable"}, + FunctionInfo{2002, nullptr, "NotifyAlbumStorageIsUnavailable"}, + FunctionInfo{2011, nullptr, "RegisterAppletResourceUserId"}, + FunctionInfo{2012, nullptr, "UnregisterAppletResourceUserId"}, + FunctionInfo{2013, nullptr, "GetApplicationIdFromAruid"}, + FunctionInfo{2014, nullptr, "CheckApplicationIdRegistered"}, + FunctionInfo{2101, nullptr, "GenerateCurrentAlbumFileId"}, + FunctionInfo{2102, nullptr, "GenerateApplicationAlbumEntry"}, + FunctionInfo{2201, nullptr, "SaveAlbumScreenShotFile"}, + FunctionInfo{2202, nullptr, "SaveAlbumScreenShotFileEx"}, + FunctionInfo{2301, nullptr, "SetOverlayScreenShotThumbnailData"}, + FunctionInfo{2302, nullptr, "SetOverlayMovieThumbnailData"}, + FunctionInfo{60001, nullptr, "OpenControlSession"} + ); std::shared_ptr manager = nullptr; }; diff --git a/src/core/hle/service/caps/caps_sc.cpp b/src/core/hle/service/caps/caps_sc.cpp index 6117cb7c6c..72a2977cf4 100644 --- a/src/core/hle/service/caps/caps_sc.cpp +++ b/src/core/hle/service/caps/caps_sc.cpp @@ -7,32 +7,6 @@ namespace Service::Capture { IScreenShotControlService::IScreenShotControlService(Core::System& system_) : ServiceFramework{system_, "caps:sc"} { - // clang-format off - static const FunctionInfo functions[] = { - {1, nullptr, "CaptureRawImage"}, - {2, nullptr, "CaptureRawImageWithTimeout"}, - {3, nullptr, "AttachSharedBuffer"}, - {5, nullptr, "CaptureRawImageToAttachedSharedBuffer"}, - {210, nullptr, "Unknown210"}, - {1001, nullptr, "RequestTakingScreenShot"}, - {1002, nullptr, "RequestTakingScreenShotWithTimeout"}, - {1003, nullptr, "RequestTakingScreenShotEx"}, - {1004, nullptr, "RequestTakingScreenShotEx1"}, - {1009, nullptr, "CancelTakingScreenShot"}, - {1010, nullptr, "SetTakingScreenShotCancelState"}, - {1011, nullptr, "NotifyTakingScreenShotRefused"}, - {1012, nullptr, "NotifyTakingScreenShotFailed"}, - {1101, nullptr, "SetupOverlayMovieThumbnail"}, - {1106, nullptr, "Unknown1106"}, - {1107, nullptr, "Unknown1107"}, - {1201, nullptr, "OpenRawScreenShotReadStream"}, - {1202, nullptr, "CloseRawScreenShotReadStream"}, - {1203, nullptr, "ReadRawScreenShotReadStream"}, - {1204, nullptr, "Unknown1204"}, - }; - // clang-format on - - RegisterHandlers(functions); } IScreenShotControlService::~IScreenShotControlService() = default; diff --git a/src/core/hle/service/caps/caps_sc.h b/src/core/hle/service/caps/caps_sc.h index d555f49792..c9b12d7846 100644 --- a/src/core/hle/service/caps/caps_sc.h +++ b/src/core/hle/service/caps/caps_sc.h @@ -15,6 +15,32 @@ class IScreenShotControlService final : public ServiceFramework album_manager) : ServiceFramework{system_, "caps:ss"}, manager{album_manager} { - // clang-format off - static const FunctionInfo functions[] = { - {201, nullptr, "SaveScreenShot"}, - {202, nullptr, "SaveEditedScreenShot"}, - {203, C<&IScreenShotService::SaveScreenShotEx0>, "SaveScreenShotEx0"}, - {204, nullptr, "SaveEditedScreenShotEx0"}, - {206, C<&IScreenShotService::SaveEditedScreenShotEx1>, "SaveEditedScreenShotEx1"}, - {208, nullptr, "SaveScreenShotOfMovieEx1"}, - {1000, nullptr, "Unknown1000"}, - }; - // clang-format on - - RegisterHandlers(functions); } IScreenShotService::~IScreenShotService() = default; diff --git a/src/core/hle/service/caps/caps_ss.h b/src/core/hle/service/caps/caps_ss.h index da4b4cc5fc..0ad8db3100 100644 --- a/src/core/hle/service/caps/caps_ss.h +++ b/src/core/hle/service/caps/caps_ss.h @@ -34,6 +34,18 @@ private: const InBuffer thumbnail_image_data_buffer); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{201, nullptr, "SaveScreenShot"}, + FunctionInfo{202, nullptr, "SaveEditedScreenShot"}, + FunctionInfo{203, C<&IScreenShotService::SaveScreenShotEx0>, "SaveScreenShotEx0"}, + FunctionInfo{204, nullptr, "SaveEditedScreenShotEx0"}, + FunctionInfo{206, C<&IScreenShotService::SaveEditedScreenShotEx1>, "SaveEditedScreenShotEx1"}, + FunctionInfo{208, nullptr, "SaveScreenShotOfMovieEx1"}, + FunctionInfo{1000, nullptr, "Unknown1000"} + ); std::shared_ptr manager; }; diff --git a/src/core/hle/service/caps/caps_su.cpp b/src/core/hle/service/caps/caps_su.cpp index 4ecfc840e4..aa39beb117 100644 --- a/src/core/hle/service/caps/caps_su.cpp +++ b/src/core/hle/service/caps/caps_su.cpp @@ -18,17 +18,6 @@ namespace Service::Capture { IScreenShotApplicationService::IScreenShotApplicationService( Core::System& system_, std::shared_ptr album_manager) : ServiceFramework{system_, "caps:su"}, manager{album_manager} { - // clang-format off - static const FunctionInfo functions[] = { - {32, C<&IScreenShotApplicationService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, - {201, nullptr, "SaveScreenShot"}, - {203, C<&IScreenShotApplicationService::SaveScreenShotEx0>, "SaveScreenShotEx0"}, - {205, C<&IScreenShotApplicationService::SaveScreenShotEx1>, "SaveScreenShotEx1"}, - {210, nullptr, "SaveScreenShotEx2"}, - }; - // clang-format on - - RegisterHandlers(functions); } IScreenShotApplicationService::~IScreenShotApplicationService() = default; diff --git a/src/core/hle/service/caps/caps_su.h b/src/core/hle/service/caps/caps_su.h index 4b4cbd09e6..2565789f90 100644 --- a/src/core/hle/service/caps/caps_su.h +++ b/src/core/hle/service/caps/caps_su.h @@ -42,8 +42,17 @@ private: const InBuffer image_data_buffer); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{32, C<&IScreenShotApplicationService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, + FunctionInfo{201, nullptr, "SaveScreenShot"}, + FunctionInfo{203, C<&IScreenShotApplicationService::SaveScreenShotEx0>, "SaveScreenShotEx0"}, + FunctionInfo{205, C<&IScreenShotApplicationService::SaveScreenShotEx1>, "SaveScreenShotEx1"}, + FunctionInfo{210, nullptr, "SaveScreenShotEx2"} + ); std::array image_data; - std::shared_ptr manager; }; diff --git a/src/core/hle/service/caps/caps_u.cpp b/src/core/hle/service/caps/caps_u.cpp index 6472b2bac6..5b07c82224 100644 --- a/src/core/hle/service/caps/caps_u.cpp +++ b/src/core/hle/service/caps/caps_u.cpp @@ -16,26 +16,6 @@ namespace Service::Capture { IAlbumApplicationService::IAlbumApplicationService(Core::System& system_, std::shared_ptr album_manager) : ServiceFramework{system_, "caps:u"}, manager{album_manager} { - // clang-format off - static const FunctionInfo functions[] = { - {32, C<&IAlbumApplicationService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, - {102, C<&IAlbumApplicationService::GetAlbumFileList0AafeAruidDeprecated>, "GetAlbumFileList0AafeAruidDeprecated"}, - {103, nullptr, "DeleteAlbumFileByAruid"}, - {104, nullptr, "GetAlbumFileSizeByAruid"}, - {105, nullptr, "DeleteAlbumFileByAruidForDebug"}, - {110, nullptr, "LoadAlbumScreenShotImageByAruid"}, - {120, nullptr, "LoadAlbumScreenShotThumbnailImageByAruid"}, - {130, nullptr, "PrecheckToCreateContentsByAruid"}, - {140, nullptr, "GetAlbumFileList1AafeAruidDeprecated"}, - {141, nullptr, "GetAlbumFileList2AafeUidAruidDeprecated"}, - {142, C<&IAlbumApplicationService::GetAlbumFileList3AaeAruid>, "GetAlbumFileList3AaeAruid"}, - {143, nullptr, "GetAlbumFileList4AaeUidAruid"}, - {144, nullptr, "GetAllAlbumFileList3AaeAruid"}, - {60002, nullptr, "OpenAccessorSessionForApplication"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAlbumApplicationService::~IAlbumApplicationService() = default; diff --git a/src/core/hle/service/caps/caps_u.h b/src/core/hle/service/caps/caps_u.h index 023ee1fe79..25dc13d218 100644 --- a/src/core/hle/service/caps/caps_u.h +++ b/src/core/hle/service/caps/caps_u.h @@ -33,6 +33,25 @@ private: AlbumFileDateTime end_date_time, ClientAppletResourceUserId aruid, OutArray out_entries); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{32, C<&IAlbumApplicationService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, + FunctionInfo{102, C<&IAlbumApplicationService::GetAlbumFileList0AafeAruidDeprecated>, "GetAlbumFileList0AafeAruidDeprecated"}, + FunctionInfo{103, nullptr, "DeleteAlbumFileByAruid"}, + FunctionInfo{104, nullptr, "GetAlbumFileSizeByAruid"}, + FunctionInfo{105, nullptr, "DeleteAlbumFileByAruidForDebug"}, + FunctionInfo{110, nullptr, "LoadAlbumScreenShotImageByAruid"}, + FunctionInfo{120, nullptr, "LoadAlbumScreenShotThumbnailImageByAruid"}, + FunctionInfo{130, nullptr, "PrecheckToCreateContentsByAruid"}, + FunctionInfo{140, nullptr, "GetAlbumFileList1AafeAruidDeprecated"}, + FunctionInfo{141, nullptr, "GetAlbumFileList2AafeUidAruidDeprecated"}, + FunctionInfo{142, C<&IAlbumApplicationService::GetAlbumFileList3AaeAruid>, "GetAlbumFileList3AaeAruid"}, + FunctionInfo{143, nullptr, "GetAlbumFileList4AaeUidAruid"}, + FunctionInfo{144, nullptr, "GetAllAlbumFileList3AaeAruid"}, + FunctionInfo{60002, nullptr, "OpenAccessorSessionForApplication"} + ); std::shared_ptr manager = nullptr; }; diff --git a/src/core/hle/service/fatal/fatal_p.h b/src/core/hle/service/fatal/fatal_p.h index 3b5485a0da..73bdc2bcaf 100644 --- a/src/core/hle/service/fatal/fatal_p.h +++ b/src/core/hle/service/fatal/fatal_p.h @@ -16,8 +16,8 @@ public: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, nullptr, "GetFatalEvent"}, - {10, nullptr, "GetFatalContext"} + FunctionInfo{0, nullptr, "GetFatalEvent"}, + FunctionInfo{10, nullptr, "GetFatalContext"} ); }; diff --git a/src/core/hle/service/fatal/fatal_u.cpp b/src/core/hle/service/fatal/fatal_u.cpp index 3739711fce..354fadcaa6 100644 --- a/src/core/hle/service/fatal/fatal_u.cpp +++ b/src/core/hle/service/fatal/fatal_u.cpp @@ -8,9 +8,9 @@ namespace Service::Fatal { Fatal_U::Fatal_U(std::shared_ptr module_, Core::System& system_) : Interface(std::move(module_), system_, "fatal:u") { static const FunctionInfo functions[] = { - {0, &Fatal_U::ThrowFatal, "ThrowFatal"}, - {1, &Fatal_U::ThrowFatalWithPolicy, "ThrowFatalWithPolicy"}, - {2, &Fatal_U::ThrowFatalWithCpuContext, "ThrowFatalWithCpuContext"}, + FunctionInfo{0, &Fatal_U::ThrowFatal, "ThrowFatal"}, + FunctionInfo{1, &Fatal_U::ThrowFatalWithPolicy, "ThrowFatalWithPolicy"}, + FunctionInfo{2, &Fatal_U::ThrowFatalWithCpuContext, "ThrowFatalWithCpuContext"}, }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/filesystem/fsp/fs_i_directory.h b/src/core/hle/service/filesystem/fsp/fs_i_directory.h index af6a2e86e3..96673e9ded 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_directory.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_directory.h @@ -31,8 +31,8 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&IDirectory::Read>, "Read"}, - {1, D<&IDirectory::GetEntryCount>, "GetEntryCount"} + FunctionInfo{0, D<&IDirectory::Read>, "Read"}, + FunctionInfo{1, D<&IDirectory::GetEntryCount>, "GetEntryCount"} ); }; diff --git a/src/core/hle/service/filesystem/fsp/fs_i_file.cpp b/src/core/hle/service/filesystem/fsp/fs_i_file.cpp index 22cbe2be2c..78ca90a4af 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_file.cpp +++ b/src/core/hle/service/filesystem/fsp/fs_i_file.cpp @@ -12,18 +12,6 @@ namespace Service::FileSystem { IFile::IFile(Core::System& system_, FileSys::VirtualFile file_) : ServiceFramework{system_, "IFile"}, backend{std::make_unique(file_)} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IFile::Read>, "Read"}, - {1, D<&IFile::Write>, "Write"}, - {2, D<&IFile::Flush>, "Flush"}, - {3, D<&IFile::SetSize>, "SetSize"}, - {4, D<&IFile::GetSize>, "GetSize"}, - {5, nullptr, "OperateRange"}, - {6, nullptr, "OperateRangeWithBuffer"}, - }; - // clang-format on - RegisterHandlers(functions); } Result IFile::Read( diff --git a/src/core/hle/service/filesystem/fsp/fs_i_file.h b/src/core/hle/service/filesystem/fsp/fs_i_file.h index e8599ee2f8..dbfd9baf3f 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_file.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_file.h @@ -27,6 +27,19 @@ private: Result Flush(); Result SetSize(s64 size); Result GetSize(Out out_size); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IFile::Read>, "Read"}, + FunctionInfo{1, D<&IFile::Write>, "Write"}, + FunctionInfo{2, D<&IFile::Flush>, "Flush"}, + FunctionInfo{3, D<&IFile::SetSize>, "SetSize"}, + FunctionInfo{4, D<&IFile::GetSize>, "GetSize"}, + FunctionInfo{5, nullptr, "OperateRange"}, + FunctionInfo{6, nullptr, "OperateRangeWithBuffer"} + ); }; } // namespace Service::FileSystem diff --git a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h index 31c1eed7f2..652877b5c9 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h @@ -62,23 +62,23 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&IFileSystem::CreateFile>, "CreateFile"}, - {1, D<&IFileSystem::DeleteFile>, "DeleteFile"}, - {2, D<&IFileSystem::CreateDirectory>, "CreateDirectory"}, - {3, D<&IFileSystem::DeleteDirectory>, "DeleteDirectory"}, - {4, D<&IFileSystem::DeleteDirectoryRecursively>, "DeleteDirectoryRecursively"}, - {5, D<&IFileSystem::RenameFile>, "RenameFile"}, - {6, D<&IFileSystem::RenameDirectory>, "RenameDirectory"}, - {7, D<&IFileSystem::GetEntryType>, "GetEntryType"}, - {8, D<&IFileSystem::OpenFile>, "OpenFile"}, - {9, D<&IFileSystem::OpenDirectory>, "OpenDirectory"}, - {10, D<&IFileSystem::Commit>, "Commit"}, - {11, D<&IFileSystem::GetFreeSpaceSize>, "GetFreeSpaceSize"}, - {12, D<&IFileSystem::GetTotalSpaceSize>, "GetTotalSpaceSize"}, - {13, D<&IFileSystem::CleanDirectoryRecursively>, "CleanDirectoryRecursively"}, - {14, D<&IFileSystem::GetFileTimeStampRaw>, "GetFileTimeStampRaw"}, - {15, nullptr, "QueryEntry"}, - {16, D<&IFileSystem::GetFileSystemAttribute>, "GetFileSystemAttribute"} + FunctionInfo{0, D<&IFileSystem::CreateFile>, "CreateFile"}, + FunctionInfo{1, D<&IFileSystem::DeleteFile>, "DeleteFile"}, + FunctionInfo{2, D<&IFileSystem::CreateDirectory>, "CreateDirectory"}, + FunctionInfo{3, D<&IFileSystem::DeleteDirectory>, "DeleteDirectory"}, + FunctionInfo{4, D<&IFileSystem::DeleteDirectoryRecursively>, "DeleteDirectoryRecursively"}, + FunctionInfo{5, D<&IFileSystem::RenameFile>, "RenameFile"}, + FunctionInfo{6, D<&IFileSystem::RenameDirectory>, "RenameDirectory"}, + FunctionInfo{7, D<&IFileSystem::GetEntryType>, "GetEntryType"}, + FunctionInfo{8, D<&IFileSystem::OpenFile>, "OpenFile"}, + FunctionInfo{9, D<&IFileSystem::OpenDirectory>, "OpenDirectory"}, + FunctionInfo{10, D<&IFileSystem::Commit>, "Commit"}, + FunctionInfo{11, D<&IFileSystem::GetFreeSpaceSize>, "GetFreeSpaceSize"}, + FunctionInfo{12, D<&IFileSystem::GetTotalSpaceSize>, "GetTotalSpaceSize"}, + FunctionInfo{13, D<&IFileSystem::CleanDirectoryRecursively>, "CleanDirectoryRecursively"}, + FunctionInfo{14, D<&IFileSystem::GetFileTimeStampRaw>, "GetFileTimeStampRaw"}, + FunctionInfo{15, nullptr, "QueryEntry"}, + FunctionInfo{16, D<&IFileSystem::GetFileSystemAttribute>, "GetFileSystemAttribute"} ); std::unique_ptr backend; SizeGetter size_getter; diff --git a/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h b/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h index a8b8753d27..0b464456b0 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h @@ -21,8 +21,8 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {1, D<&IMultiCommitManager::Add>, "Add"}, - {2, D<&IMultiCommitManager::Commit>, "Commit"} + FunctionInfo{1, D<&IMultiCommitManager::Add>, "Add"}, + FunctionInfo{2, D<&IMultiCommitManager::Commit>, "Commit"} ); FileSys::VirtualFile backend; }; diff --git a/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h b/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h index 26f1d15045..fe102928ff 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.h @@ -46,7 +46,7 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&ISaveDataInfoReader::ReadSaveDataInfo>, "ReadSaveDataInfo"} + FunctionInfo{0, D<&ISaveDataInfoReader::ReadSaveDataInfo>, "ReadSaveDataInfo"} ); std::shared_ptr save_data_controller; std::vector info; diff --git a/src/core/hle/service/filesystem/fsp/fs_i_storage.h b/src/core/hle/service/filesystem/fsp/fs_i_storage.h index fbe8e9a4cb..bad5c00fe5 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_storage.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_storage.h @@ -24,12 +24,12 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&IStorage::Read>, "Read"}, - {1, nullptr, "Write"}, - {2, nullptr, "Flush"}, - {3, nullptr, "SetSize"}, - {4, D<&IStorage::GetSize>, "GetSize"}, - {5, nullptr, "OperateRange"} + FunctionInfo{0, D<&IStorage::Read>, "Read"}, + FunctionInfo{1, nullptr, "Write"}, + FunctionInfo{2, nullptr, "Flush"}, + FunctionInfo{3, nullptr, "SetSize"}, + FunctionInfo{4, D<&IStorage::GetSize>, "GetSize"}, + FunctionInfo{5, nullptr, "OperateRange"} ); FileSys::VirtualFile backend; }; diff --git a/src/core/hle/service/filesystem/fsp/fsp_ldr.cpp b/src/core/hle/service/filesystem/fsp/fsp_ldr.cpp index 8ee733f474..448319864b 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_ldr.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_ldr.cpp @@ -6,15 +6,6 @@ namespace Service::FileSystem { FSP_LDR::FSP_LDR(Core::System& system_) : ServiceFramework{system_, "fsp:ldr"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "OpenCodeFileSystem"}, - {1, nullptr, "IsArchivedProgram"}, - {2, nullptr, "SetCurrentProcess"}, - }; - // clang-format on - - RegisterHandlers(functions); } FSP_LDR::~FSP_LDR() = default; diff --git a/src/core/hle/service/filesystem/fsp/fsp_ldr.h b/src/core/hle/service/filesystem/fsp/fsp_ldr.h index 358739a872..93a6d603c8 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_ldr.h +++ b/src/core/hle/service/filesystem/fsp/fsp_ldr.h @@ -15,6 +15,15 @@ class FSP_LDR final : public ServiceFramework { public: explicit FSP_LDR(Core::System& system_); ~FSP_LDR() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "OpenCodeFileSystem"}, + FunctionInfo{1, nullptr, "IsArchivedProgram"}, + FunctionInfo{2, nullptr, "SetCurrentProcess"} + ); }; } // namespace Service::FileSystem diff --git a/src/core/hle/service/filesystem/fsp/fsp_pr.cpp b/src/core/hle/service/filesystem/fsp/fsp_pr.cpp index 7c03ebaeae..7e810281fd 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_pr.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_pr.cpp @@ -6,16 +6,6 @@ namespace Service::FileSystem { FSP_PR::FSP_PR(Core::System& system_) : ServiceFramework{system_, "fsp:pr"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RegisterProgram"}, - {1, nullptr, "UnregisterProgram"}, - {2, nullptr, "SetCurrentProcess"}, - {256, nullptr, "SetEnabledProgramVerification"}, - }; - // clang-format on - - RegisterHandlers(functions); } FSP_PR::~FSP_PR() = default; diff --git a/src/core/hle/service/filesystem/fsp/fsp_pr.h b/src/core/hle/service/filesystem/fsp/fsp_pr.h index bd4e0a730c..d1fea0187a 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_pr.h +++ b/src/core/hle/service/filesystem/fsp/fsp_pr.h @@ -15,6 +15,16 @@ class FSP_PR final : public ServiceFramework { public: explicit FSP_PR(Core::System& system_); ~FSP_PR() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "RegisterProgram"}, + FunctionInfo{1, nullptr, "UnregisterProgram"}, + FunctionInfo{2, nullptr, "SetCurrentProcess"}, + FunctionInfo{256, nullptr, "SetEnabledProgramVerification"} + ); }; } // namespace Service::FileSystem diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp index 58303a0bd6..d9d78091d5 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp @@ -52,134 +52,134 @@ FSP_SRV::FSP_SRV(Core::System& system_) content_provider{system.GetContentProvider()}, reporter{system.GetReporter()} { // clang-format off static const FunctionInfo functions[] = { - {0, nullptr, "OpenFileSystem"}, - {1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"}, - {2, D<&FSP_SRV::OpenDataFileSystemByCurrentProcess>, "OpenDataFileSystemByCurrentProcess"}, - {7, D<&FSP_SRV::OpenFileSystemWithPatch>, "OpenFileSystemWithPatch"}, - {8, nullptr, "OpenFileSystemWithId"}, - {9, nullptr, "OpenDataFileSystemByApplicationId"}, - {11, nullptr, "OpenBisFileSystem"}, - {12, nullptr, "OpenBisStorage"}, - {13, nullptr, "InvalidateBisCache"}, - {17, nullptr, "OpenHostFileSystem"}, - {18, D<&FSP_SRV::OpenSdCardFileSystem>, "OpenSdCardFileSystem"}, - {19, nullptr, "FormatSdCardFileSystem"}, - {21, nullptr, "DeleteSaveDataFileSystem"}, - {22, D<&FSP_SRV::CreateSaveDataFileSystem>, "CreateSaveDataFileSystem"}, - {23, D<&FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId>, "CreateSaveDataFileSystemBySystemSaveDataId"}, - {24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"}, - {25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"}, - {26, nullptr, "FormatSdCardDryRun"}, - {27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"}, - {28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, - {30, nullptr, "OpenGameCardStorage"}, - {31, nullptr, "OpenGameCardFileSystem"}, - {32, D<&FSP_SRV::ExtendSaveDataFileSystem>, "ExtendSaveDataFileSystem"}, - {33, nullptr, "DeleteCacheStorage"}, - {34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"}, - {35, nullptr, "CreateSaveDataFileSystemByHashSalt"}, - {36, nullptr, "OpenHostFileSystemWithOption"}, - {37, D<&FSP_SRV::CreateSaveDataFileSystemWithCreationInfo2>, "CreateSaveDataFileSystemWithCreationInfo2"}, - {51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"}, - {52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"}, - {53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"}, - {57, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataSpaceId>, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"}, - {58, D<&FSP_SRV::ReadSaveDataFileSystemExtraData>, "ReadSaveDataFileSystemExtraData"}, - {59, D<&FSP_SRV::WriteSaveDataFileSystemExtraData>, "WriteSaveDataFileSystemExtraData"}, - {60, nullptr, "OpenSaveDataInfoReader"}, - {61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, - {62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"}, - {64, nullptr, "OpenSaveDataInternalStorageFileSystem"}, - {65, nullptr, "UpdateSaveDataMacForDebug"}, - {66, nullptr, "WriteSaveDataFileSystemExtraData2"}, - {67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"}, - {68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"}, - {69, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"}, - {70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, - {71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, - {80, nullptr, "OpenSaveDataMetaFile"}, - {81, nullptr, "OpenSaveDataTransferManager"}, - {82, nullptr, "OpenSaveDataTransferManagerVersion2"}, - {83, D<&FSP_SRV::OpenSaveDataTransferProhibiter>, "OpenSaveDataTransferProhibiter"}, - {84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"}, - {85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"}, - {86, nullptr, "OpenSaveDataMover"}, - {87, nullptr, "OpenSaveDataTransferManagerForRepair"}, - {100, nullptr, "OpenImageDirectoryFileSystem"}, - {101, nullptr, "OpenBaseFileSystem"}, - {102, nullptr, "FormatBaseFileSystem"}, - {110, nullptr, "OpenContentStorageFileSystem"}, - {120, nullptr, "OpenCloudBackupWorkStorageFileSystem"}, - {130, nullptr, "OpenCustomStorageFileSystem"}, - {200, D<&FSP_SRV::OpenDataStorageByCurrentProcess>, "OpenDataStorageByCurrentProcess"}, - {201, nullptr, "OpenDataStorageByProgramId"}, - {202, D<&FSP_SRV::OpenDataStorageByDataId>, "OpenDataStorageByDataId"}, - {203, D<&FSP_SRV::OpenPatchDataStorageByCurrentProcess>, "OpenPatchDataStorageByCurrentProcess"}, - {204, nullptr, "OpenDataFileSystemByProgramIndex"}, - {205, D<&FSP_SRV::OpenDataStorageWithProgramIndex>, "OpenDataStorageWithProgramIndex"}, - {206, nullptr, "OpenDataStorageByPath"}, - {210, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"}, - {400, nullptr, "OpenDeviceOperator"}, - {500, nullptr, "OpenSdCardDetectionEventNotifier"}, - {501, nullptr, "OpenGameCardDetectionEventNotifier"}, - {510, nullptr, "OpenSystemDataUpdateEventNotifier"}, - {511, nullptr, "NotifySystemDataUpdateEvent"}, - {520, nullptr, "SimulateGameCardDetectionEvent"}, - {600, nullptr, "SetCurrentPosixTime"}, - {601, nullptr, "QuerySaveDataTotalSize"}, - {602, nullptr, "VerifySaveDataFileSystem"}, - {603, nullptr, "CorruptSaveDataFileSystem"}, - {604, nullptr, "CreatePaddingFile"}, - {605, nullptr, "DeleteAllPaddingFiles"}, - {606, nullptr, "GetRightsId"}, - {607, nullptr, "RegisterExternalKey"}, - {608, nullptr, "UnregisterAllExternalKey"}, - {609, nullptr, "GetRightsIdByPath"}, - {610, nullptr, "GetRightsIdAndKeyGenerationByPath"}, - {611, nullptr, "SetCurrentPosixTimeWithTimeDifference"}, - {612, nullptr, "GetFreeSpaceSizeForSaveData"}, - {613, nullptr, "VerifySaveDataFileSystemBySaveDataSpaceId"}, - {614, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId"}, - {615, nullptr, "QuerySaveDataInternalStorageTotalSize"}, - {616, nullptr, "GetSaveDataCommitId"}, - {617, nullptr, "UnregisterExternalKey"}, - {620, nullptr, "SetSdCardEncryptionSeed"}, - {630, nullptr, "SetSdCardAccessibility"}, - {631, D<&FSP_SRV::IsSdCardAccessible>, "IsSdCardAccessible"}, - {640, nullptr, "IsSignedSystemPartitionOnSdCardValid"}, - {700, nullptr, "OpenAccessFailureResolver"}, - {701, nullptr, "GetAccessFailureDetectionEvent"}, - {702, nullptr, "IsAccessFailureDetected"}, - {710, nullptr, "ResolveAccessFailure"}, - {720, nullptr, "AbandonAccessFailure"}, - {800, nullptr, "GetAndClearFileSystemProxyErrorInfo"}, - {810, nullptr, "RegisterProgramIndexMapInfo"}, - {820, nullptr, "GetContentStorageInfoIndex"}, - {830, nullptr, "EncryptStreamPlaySaveData"}, - {831, nullptr, "DecryptStreamPlaySaveData"}, - {1000, nullptr, "SetBisRootForHost"}, - {1001, nullptr, "SetSaveDataSize"}, - {1002, nullptr, "SetSaveDataRootPath"}, - {1003, D<&FSP_SRV::DisableAutoSaveDataCreation>, "DisableAutoSaveDataCreation"}, - {1004, D<&FSP_SRV::SetGlobalAccessLogMode>, "SetGlobalAccessLogMode"}, - {1005, D<&FSP_SRV::GetGlobalAccessLogMode>, "GetGlobalAccessLogMode"}, - {1006, D<&FSP_SRV::OutputAccessLogToSdCard>, "OutputAccessLogToSdCard"}, - {1007, nullptr, "RegisterUpdatePartition"}, - {1008, nullptr, "OpenRegisteredUpdatePartition"}, - {1009, nullptr, "GetAndClearMemoryReportInfo"}, - {1010, nullptr, "SetDataStorageRedirectTarget"}, - {1011, D<&FSP_SRV::GetProgramIndexForAccessLog>, "GetProgramIndexForAccessLog"}, - {1012, nullptr, "GetFsStackUsage"}, - {1013, nullptr, "UnsetSaveDataRootPath"}, - {1014, nullptr, "OutputMultiProgramTagAccessLog"}, - {1016, D<&FSP_SRV::FlushAccessLogOnSdCard>, "FlushAccessLogOnSdCard"}, - {1017, nullptr, "OutputApplicationInfoAccessLog"}, - {1018, nullptr, "SetDebugOption"}, - {1019, nullptr, "UnsetDebugOption"}, - {1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, - {1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"}, - {1200, D<&FSP_SRV::OpenMultiCommitManager>, "OpenMultiCommitManager"}, - {1300, nullptr, "OpenBisWiper"}, + FunctionInfo{0, nullptr, "OpenFileSystem"}, + FunctionInfo{1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"}, + FunctionInfo{2, D<&FSP_SRV::OpenDataFileSystemByCurrentProcess>, "OpenDataFileSystemByCurrentProcess"}, + FunctionInfo{7, D<&FSP_SRV::OpenFileSystemWithPatch>, "OpenFileSystemWithPatch"}, + FunctionInfo{8, nullptr, "OpenFileSystemWithId"}, + FunctionInfo{9, nullptr, "OpenDataFileSystemByApplicationId"}, + FunctionInfo{11, nullptr, "OpenBisFileSystem"}, + FunctionInfo{12, nullptr, "OpenBisStorage"}, + FunctionInfo{13, nullptr, "InvalidateBisCache"}, + FunctionInfo{17, nullptr, "OpenHostFileSystem"}, + FunctionInfo{18, D<&FSP_SRV::OpenSdCardFileSystem>, "OpenSdCardFileSystem"}, + FunctionInfo{19, nullptr, "FormatSdCardFileSystem"}, + FunctionInfo{21, nullptr, "DeleteSaveDataFileSystem"}, + FunctionInfo{22, D<&FSP_SRV::CreateSaveDataFileSystem>, "CreateSaveDataFileSystem"}, + FunctionInfo{23, D<&FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId>, "CreateSaveDataFileSystemBySystemSaveDataId"}, + FunctionInfo{24, nullptr, "RegisterSaveDataFileSystemAtomicDeletion"}, + FunctionInfo{25, nullptr, "DeleteSaveDataFileSystemBySaveDataSpaceId"}, + FunctionInfo{26, nullptr, "FormatSdCardDryRun"}, + FunctionInfo{27, D<&FSP_SRV::IsExFatSupported>, "IsExFatSupported"}, + FunctionInfo{28, nullptr, "DeleteSaveDataFileSystemBySaveDataAttribute"}, + FunctionInfo{30, nullptr, "OpenGameCardStorage"}, + FunctionInfo{31, nullptr, "OpenGameCardFileSystem"}, + FunctionInfo{32, D<&FSP_SRV::ExtendSaveDataFileSystem>, "ExtendSaveDataFileSystem"}, + FunctionInfo{33, nullptr, "DeleteCacheStorage"}, + FunctionInfo{34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"}, + FunctionInfo{35, nullptr, "CreateSaveDataFileSystemByHashSalt"}, + FunctionInfo{36, nullptr, "OpenHostFileSystemWithOption"}, + FunctionInfo{37, D<&FSP_SRV::CreateSaveDataFileSystemWithCreationInfo2>, "CreateSaveDataFileSystemWithCreationInfo2"}, + FunctionInfo{51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"}, + FunctionInfo{52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"}, + FunctionInfo{53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"}, + FunctionInfo{57, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataSpaceId>, "ReadSaveDataFileSystemExtraDataBySaveDataSpaceId"}, + FunctionInfo{58, D<&FSP_SRV::ReadSaveDataFileSystemExtraData>, "ReadSaveDataFileSystemExtraData"}, + FunctionInfo{59, D<&FSP_SRV::WriteSaveDataFileSystemExtraData>, "WriteSaveDataFileSystemExtraData"}, + FunctionInfo{60, nullptr, "OpenSaveDataInfoReader"}, + FunctionInfo{61, D<&FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId>, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, + FunctionInfo{62, D<&FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage>, "OpenSaveDataInfoReaderOnlyCacheStorage"}, + FunctionInfo{64, nullptr, "OpenSaveDataInternalStorageFileSystem"}, + FunctionInfo{65, nullptr, "UpdateSaveDataMacForDebug"}, + FunctionInfo{66, nullptr, "WriteSaveDataFileSystemExtraData2"}, + FunctionInfo{67, D<&FSP_SRV::FindSaveDataWithFilter>, "FindSaveDataWithFilter"}, + FunctionInfo{68, nullptr, "OpenSaveDataInfoReaderBySaveDataFilter"}, + FunctionInfo{69, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataBySaveDataAttribute"}, + FunctionInfo{70, D<&FSP_SRV::WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "WriteSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, + FunctionInfo{71, D<&FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute>, "ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute"}, + FunctionInfo{80, nullptr, "OpenSaveDataMetaFile"}, + FunctionInfo{81, nullptr, "OpenSaveDataTransferManager"}, + FunctionInfo{82, nullptr, "OpenSaveDataTransferManagerVersion2"}, + FunctionInfo{83, D<&FSP_SRV::OpenSaveDataTransferProhibiter>, "OpenSaveDataTransferProhibiter"}, + FunctionInfo{84, nullptr, "ListApplicationAccessibleSaveDataOwnerId"}, + FunctionInfo{85, nullptr, "OpenSaveDataTransferManagerForSaveDataRepair"}, + FunctionInfo{86, nullptr, "OpenSaveDataMover"}, + FunctionInfo{87, nullptr, "OpenSaveDataTransferManagerForRepair"}, + FunctionInfo{100, nullptr, "OpenImageDirectoryFileSystem"}, + FunctionInfo{101, nullptr, "OpenBaseFileSystem"}, + FunctionInfo{102, nullptr, "FormatBaseFileSystem"}, + FunctionInfo{110, nullptr, "OpenContentStorageFileSystem"}, + FunctionInfo{120, nullptr, "OpenCloudBackupWorkStorageFileSystem"}, + FunctionInfo{130, nullptr, "OpenCustomStorageFileSystem"}, + FunctionInfo{200, D<&FSP_SRV::OpenDataStorageByCurrentProcess>, "OpenDataStorageByCurrentProcess"}, + FunctionInfo{201, nullptr, "OpenDataStorageByProgramId"}, + FunctionInfo{202, D<&FSP_SRV::OpenDataStorageByDataId>, "OpenDataStorageByDataId"}, + FunctionInfo{203, D<&FSP_SRV::OpenPatchDataStorageByCurrentProcess>, "OpenPatchDataStorageByCurrentProcess"}, + FunctionInfo{204, nullptr, "OpenDataFileSystemByProgramIndex"}, + FunctionInfo{205, D<&FSP_SRV::OpenDataStorageWithProgramIndex>, "OpenDataStorageWithProgramIndex"}, + FunctionInfo{206, nullptr, "OpenDataStorageByPath"}, + FunctionInfo{210, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"}, + FunctionInfo{400, nullptr, "OpenDeviceOperator"}, + FunctionInfo{500, nullptr, "OpenSdCardDetectionEventNotifier"}, + FunctionInfo{501, nullptr, "OpenGameCardDetectionEventNotifier"}, + FunctionInfo{510, nullptr, "OpenSystemDataUpdateEventNotifier"}, + FunctionInfo{511, nullptr, "NotifySystemDataUpdateEvent"}, + FunctionInfo{520, nullptr, "SimulateGameCardDetectionEvent"}, + FunctionInfo{600, nullptr, "SetCurrentPosixTime"}, + FunctionInfo{601, nullptr, "QuerySaveDataTotalSize"}, + FunctionInfo{602, nullptr, "VerifySaveDataFileSystem"}, + FunctionInfo{603, nullptr, "CorruptSaveDataFileSystem"}, + FunctionInfo{604, nullptr, "CreatePaddingFile"}, + FunctionInfo{605, nullptr, "DeleteAllPaddingFiles"}, + FunctionInfo{606, nullptr, "GetRightsId"}, + FunctionInfo{607, nullptr, "RegisterExternalKey"}, + FunctionInfo{608, nullptr, "UnregisterAllExternalKey"}, + FunctionInfo{609, nullptr, "GetRightsIdByPath"}, + FunctionInfo{610, nullptr, "GetRightsIdAndKeyGenerationByPath"}, + FunctionInfo{611, nullptr, "SetCurrentPosixTimeWithTimeDifference"}, + FunctionInfo{612, nullptr, "GetFreeSpaceSizeForSaveData"}, + FunctionInfo{613, nullptr, "VerifySaveDataFileSystemBySaveDataSpaceId"}, + FunctionInfo{614, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId"}, + FunctionInfo{615, nullptr, "QuerySaveDataInternalStorageTotalSize"}, + FunctionInfo{616, nullptr, "GetSaveDataCommitId"}, + FunctionInfo{617, nullptr, "UnregisterExternalKey"}, + FunctionInfo{620, nullptr, "SetSdCardEncryptionSeed"}, + FunctionInfo{630, nullptr, "SetSdCardAccessibility"}, + FunctionInfo{631, D<&FSP_SRV::IsSdCardAccessible>, "IsSdCardAccessible"}, + FunctionInfo{640, nullptr, "IsSignedSystemPartitionOnSdCardValid"}, + FunctionInfo{700, nullptr, "OpenAccessFailureResolver"}, + FunctionInfo{701, nullptr, "GetAccessFailureDetectionEvent"}, + FunctionInfo{702, nullptr, "IsAccessFailureDetected"}, + FunctionInfo{710, nullptr, "ResolveAccessFailure"}, + FunctionInfo{720, nullptr, "AbandonAccessFailure"}, + FunctionInfo{800, nullptr, "GetAndClearFileSystemProxyErrorInfo"}, + FunctionInfo{810, nullptr, "RegisterProgramIndexMapInfo"}, + FunctionInfo{820, nullptr, "GetContentStorageInfoIndex"}, + FunctionInfo{830, nullptr, "EncryptStreamPlaySaveData"}, + FunctionInfo{831, nullptr, "DecryptStreamPlaySaveData"}, + FunctionInfo{1000, nullptr, "SetBisRootForHost"}, + FunctionInfo{1001, nullptr, "SetSaveDataSize"}, + FunctionInfo{1002, nullptr, "SetSaveDataRootPath"}, + FunctionInfo{1003, D<&FSP_SRV::DisableAutoSaveDataCreation>, "DisableAutoSaveDataCreation"}, + FunctionInfo{1004, D<&FSP_SRV::SetGlobalAccessLogMode>, "SetGlobalAccessLogMode"}, + FunctionInfo{1005, D<&FSP_SRV::GetGlobalAccessLogMode>, "GetGlobalAccessLogMode"}, + FunctionInfo{1006, D<&FSP_SRV::OutputAccessLogToSdCard>, "OutputAccessLogToSdCard"}, + FunctionInfo{1007, nullptr, "RegisterUpdatePartition"}, + FunctionInfo{1008, nullptr, "OpenRegisteredUpdatePartition"}, + FunctionInfo{1009, nullptr, "GetAndClearMemoryReportInfo"}, + FunctionInfo{1010, nullptr, "SetDataStorageRedirectTarget"}, + FunctionInfo{1011, D<&FSP_SRV::GetProgramIndexForAccessLog>, "GetProgramIndexForAccessLog"}, + FunctionInfo{1012, nullptr, "GetFsStackUsage"}, + FunctionInfo{1013, nullptr, "UnsetSaveDataRootPath"}, + FunctionInfo{1014, nullptr, "OutputMultiProgramTagAccessLog"}, + FunctionInfo{1016, D<&FSP_SRV::FlushAccessLogOnSdCard>, "FlushAccessLogOnSdCard"}, + FunctionInfo{1017, nullptr, "OutputApplicationInfoAccessLog"}, + FunctionInfo{1018, nullptr, "SetDebugOption"}, + FunctionInfo{1019, nullptr, "UnsetDebugOption"}, + FunctionInfo{1100, nullptr, "OverrideSaveDataTransferTokenSignVerificationKey"}, + FunctionInfo{1110, nullptr, "CorruptSaveDataFileSystemBySaveDataSpaceId2"}, + FunctionInfo{1200, D<&FSP_SRV::OpenMultiCommitManager>, "OpenMultiCommitManager"}, + FunctionInfo{1300, nullptr, "OpenBisWiper"}, }; // clang-format on RegisterHandlers(functions); diff --git a/src/core/hle/service/friend/friend_interface.h b/src/core/hle/service/friend/friend_interface.h index 8e601e3720..58701631a3 100644 --- a/src/core/hle/service/friend/friend_interface.h +++ b/src/core/hle/service/friend/friend_interface.h @@ -16,9 +16,9 @@ public: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, &Friend::CreateFriendService, "CreateFriendService"}, - {1, &Friend::CreateNotificationService, "CreateNotificationService"}, - {2, nullptr, "CreateDaemonSuspendSessionService"} + FunctionInfo{0, &Friend::CreateFriendService, "CreateFriendService"}, + FunctionInfo{1, &Friend::CreateNotificationService, "CreateNotificationService"}, + FunctionInfo{2, nullptr, "CreateDaemonSuspendSessionService"} ); }; diff --git a/src/core/hle/service/glue/arp.cpp b/src/core/hle/service/glue/arp.cpp index 37a31a7347..540ccb42e6 100644 --- a/src/core/hle/service/glue/arp.cpp +++ b/src/core/hle/service/glue/arp.cpp @@ -37,16 +37,16 @@ ARP_R::ARP_R(Core::System& system_, const ARPManager& manager_) : ServiceFramework{system_, "arp:r"}, manager{manager_} { // clang-format off static const FunctionInfo functions[] = { - {0, &ARP_R::GetApplicationLaunchProperty, "GetApplicationLaunchProperty"}, - {1, &ARP_R::GetApplicationLaunchPropertyWithApplicationId, "GetApplicationLaunchPropertyWithApplicationId"}, - {2, &ARP_R::GetApplicationControlProperty, "GetApplicationControlProperty"}, - {3, &ARP_R::GetApplicationControlPropertyWithApplicationId, "GetApplicationControlPropertyWithApplicationId"}, - {4, nullptr, "GetApplicationInstanceUnregistrationNotifier"}, - {5, nullptr, "ListApplicationInstanceId"}, - {6, nullptr, "GetMicroApplicationInstanceId"}, - {7, nullptr, "GetApplicationCertificate"}, - {9998, nullptr, "GetPreomiaApplicationLaunchProperty"}, - {9999, nullptr, "GetPreomiaApplicationControlProperty"}, + FunctionInfo{0, &ARP_R::GetApplicationLaunchProperty, "GetApplicationLaunchProperty"}, + FunctionInfo{1, &ARP_R::GetApplicationLaunchPropertyWithApplicationId, "GetApplicationLaunchPropertyWithApplicationId"}, + FunctionInfo{2, &ARP_R::GetApplicationControlProperty, "GetApplicationControlProperty"}, + FunctionInfo{3, &ARP_R::GetApplicationControlPropertyWithApplicationId, "GetApplicationControlPropertyWithApplicationId"}, + FunctionInfo{4, nullptr, "GetApplicationInstanceUnregistrationNotifier"}, + FunctionInfo{5, nullptr, "ListApplicationInstanceId"}, + FunctionInfo{6, nullptr, "GetMicroApplicationInstanceId"}, + FunctionInfo{7, nullptr, "GetApplicationCertificate"}, + FunctionInfo{9998, nullptr, "GetPreomiaApplicationLaunchProperty"}, + FunctionInfo{9999, nullptr, "GetPreomiaApplicationControlProperty"}, }; // clang-format on diff --git a/src/core/hle/service/glue/bgtc.cpp b/src/core/hle/service/glue/bgtc.cpp index 360f16f0dd..b64e0c23a4 100644 --- a/src/core/hle/service/glue/bgtc.cpp +++ b/src/core/hle/service/glue/bgtc.cpp @@ -14,7 +14,7 @@ namespace Service::Glue { BGTC_T::BGTC_T(Core::System& system_) : ServiceFramework{system_, "bgtc:t"} { // clang-format off static const FunctionInfo functions[] = { - {100, &BGTC_T::OpenTaskService, "OpenTaskService"}, + FunctionInfo{100, &BGTC_T::OpenTaskService, "OpenTaskService"}, }; // clang-format on @@ -32,44 +32,11 @@ void BGTC_T::OpenTaskService(HLERequestContext& ctx) { } ITaskService::ITaskService(Core::System& system_) : ServiceFramework{system_, "ITaskService"} { - // clang-format off - static const FunctionInfo functions[] = { - {1, nullptr, "NotifyTaskStarting"}, - {2, nullptr, "NotifyTaskFinished"}, - {3, nullptr, "GetTriggerEvent"}, - {4, nullptr, "IsInHalfAwake"}, - {5, nullptr, "NotifyClientName"}, - {6, nullptr, "IsInFullAwake"}, - {11, nullptr, "ScheduleTask"}, - {12, nullptr, "GetScheduledTaskInterval"}, - {13, nullptr, "UnscheduleTask"}, - {14, nullptr, "GetScheduleEvent"}, - {15, nullptr, "SchedulePeriodicTask"}, - {16, nullptr, "Unknown16"}, - {101, nullptr, "GetOperationMode"}, - {102, nullptr, "WillDisconnectNetworkWhenEnteringSleep"}, - {103, nullptr, "WillStayHalfAwakeInsteadSleep"}, - {200, nullptr, "Unknown200"}, - }; - // clang-format on - - RegisterHandlers(functions); } ITaskService::~ITaskService() = default; BGTC_SC::BGTC_SC(Core::System& system_) : ServiceFramework{system_, "bgtc:sc"} { - // clang-format off - static const FunctionInfo functions[] = { - {1, nullptr, "GetState"}, - {2, nullptr, "GetStateChangedEvent"}, - {3, nullptr, "NotifyEnteringHalfAwake"}, - {4, nullptr, "NotifyLeavingHalfAwake"}, - {5, nullptr, "SetIsUsingSleepUnsupportedDevices"}, - }; - // clang-format on - - RegisterHandlers(functions); } BGTC_SC::~BGTC_SC() = default; diff --git a/src/core/hle/service/glue/bgtc.h b/src/core/hle/service/glue/bgtc.h index 5a5d9c9a7a..4e323f4671 100644 --- a/src/core/hle/service/glue/bgtc.h +++ b/src/core/hle/service/glue/bgtc.h @@ -23,12 +23,45 @@ class ITaskService final : public ServiceFramework { public: explicit ITaskService(Core::System& system_); ~ITaskService() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{1, nullptr, "NotifyTaskStarting"}, + FunctionInfo{2, nullptr, "NotifyTaskFinished"}, + FunctionInfo{3, nullptr, "GetTriggerEvent"}, + FunctionInfo{4, nullptr, "IsInHalfAwake"}, + FunctionInfo{5, nullptr, "NotifyClientName"}, + FunctionInfo{6, nullptr, "IsInFullAwake"}, + FunctionInfo{11, nullptr, "ScheduleTask"}, + FunctionInfo{12, nullptr, "GetScheduledTaskInterval"}, + FunctionInfo{13, nullptr, "UnscheduleTask"}, + FunctionInfo{14, nullptr, "GetScheduleEvent"}, + FunctionInfo{15, nullptr, "SchedulePeriodicTask"}, + FunctionInfo{16, nullptr, "Unknown16"}, + FunctionInfo{101, nullptr, "GetOperationMode"}, + FunctionInfo{102, nullptr, "WillDisconnectNetworkWhenEnteringSleep"}, + FunctionInfo{103, nullptr, "WillStayHalfAwakeInsteadSleep"}, + FunctionInfo{200, nullptr, "Unknown200"} + ); }; class BGTC_SC final : public ServiceFramework { public: explicit BGTC_SC(Core::System& system_); ~BGTC_SC() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{1, nullptr, "GetState"}, + FunctionInfo{2, nullptr, "GetStateChangedEvent"}, + FunctionInfo{3, nullptr, "NotifyEnteringHalfAwake"}, + FunctionInfo{4, nullptr, "NotifyLeavingHalfAwake"}, + FunctionInfo{5, nullptr, "SetIsUsingSleepUnsupportedDevices"} + ); }; } // namespace Service::Glue diff --git a/src/core/hle/service/glue/ectx.cpp b/src/core/hle/service/glue/ectx.cpp index 7ec8df68a0..33af739b05 100644 --- a/src/core/hle/service/glue/ectx.cpp +++ b/src/core/hle/service/glue/ectx.cpp @@ -44,38 +44,14 @@ private: }; ECTX_W::ECTX_W(Core::System& system_) : ServiceFramework{system_, "ectx:w"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "CreateContextRegistrar"}, - {1, nullptr, "CommitContext"}, - {2, nullptr, "RemoveContext"}, - }; - // clang-format on - RegisterHandlers(functions); } ECTX_W::~ECTX_W() = default; ECTX_R::ECTX_R(Core::System& system_) : ServiceFramework{system_, "ectx:r"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetContextInfo"}, - {1, nullptr, "PullContext"}, - {2, nullptr, "ListContextDescriptorWithResultForDebug"}, - }; - // clang-format on - RegisterHandlers(functions); } ECTX_R::~ECTX_R() = default; ECTX_AW::ECTX_AW(Core::System& system_) : ServiceFramework{system_, "ectx:aw"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, &ECTX_AW::CreateContextRegistrar, "CreateContextRegistrar"}, - {1, nullptr, "CommitContext"}, - }; - // clang-format on - - RegisterHandlers(functions); } ECTX_AW::~ECTX_AW() = default; diff --git a/src/core/hle/service/glue/ectx.h b/src/core/hle/service/glue/ectx.h index ff48075eda..fbe0e266ec 100644 --- a/src/core/hle/service/glue/ectx.h +++ b/src/core/hle/service/glue/ectx.h @@ -18,12 +18,30 @@ class ECTX_W final : public ServiceFramework { public: explicit ECTX_W(Core::System& system_); ~ECTX_W() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "CreateContextRegistrar"}, + FunctionInfo{1, nullptr, "CommitContext"}, + FunctionInfo{2, nullptr, "RemoveContext"} + ); }; class ECTX_R final : public ServiceFramework { public: explicit ECTX_R(Core::System& system_); ~ECTX_R() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetContextInfo"}, + FunctionInfo{1, nullptr, "PullContext"}, + FunctionInfo{2, nullptr, "ListContextDescriptorWithResultForDebug"} + ); }; class ECTX_AW final : public ServiceFramework { @@ -33,6 +51,14 @@ public: private: void CreateContextRegistrar(HLERequestContext& ctx); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &ECTX_AW::CreateContextRegistrar, "CreateContextRegistrar"}, + FunctionInfo{1, nullptr, "CommitContext"} + ); }; } // namespace Service::Glue diff --git a/src/core/hle/service/glue/notif.cpp b/src/core/hle/service/glue/notif.cpp index 7eb2ec85b2..43e72eb882 100644 --- a/src/core/hle/service/glue/notif.cpp +++ b/src/core/hle/service/glue/notif.cpp @@ -124,18 +124,6 @@ std::vector::iterator NotificationServiceImpl::GetAlarmFromId(Alar INotificationServicesForApplication::INotificationServicesForApplication(Core::System& system_) : ServiceFramework{system_, "notif:a"} { - // clang-format off - static const FunctionInfo functions[] = { - {500, D<&INotificationServicesForApplication::RegisterAlarmSetting>, "RegisterAlarmSetting"}, - {510, D<&INotificationServicesForApplication::UpdateAlarmSetting>, "UpdateAlarmSetting"}, - {520, D<&INotificationServicesForApplication::ListAlarmSettings>, "ListAlarmSettings"}, - {530, D<&INotificationServicesForApplication::LoadApplicationParameter>, "LoadApplicationParameter"}, - {540, D<&INotificationServicesForApplication::DeleteAlarmSetting>, "DeleteAlarmSetting"}, - {1000, D<&INotificationServicesForApplication::Initialize>, "Initialize"}, - }; - // clang-format on - - RegisterHandlers(functions); } INotificationServicesForApplication::~INotificationServicesForApplication() = default; @@ -208,32 +196,6 @@ private: INotificationServices::INotificationServices(Core::System& system_) : ServiceFramework{system_, "notif:s"} { - // clang-format off - static const FunctionInfo functions[] = { - {500, D<&INotificationServices::RegisterAlarmSetting>, "RegisterAlarmSetting"}, - {510, D<&INotificationServices::UpdateAlarmSetting>, "UpdateAlarmSetting"}, - {520, D<&INotificationServices::ListAlarmSettings>, "ListAlarmSettings"}, - {530, D<&INotificationServices::LoadApplicationParameter>, "LoadApplicationParameter"}, - {540, D<&INotificationServices::DeleteAlarmSetting>, "DeleteAlarmSetting"}, - {1000, D<&INotificationServices::Initialize>, "Initialize"}, - {1010, nullptr, "ListNotifications"}, - {1020, nullptr, "DeleteNotification"}, - {1030, nullptr, "ClearNotifications"}, - {1040, D<&INotificationServices::OpenNotificationSystemEventAccessor>, "OpenNotificationSystemEventAccessor"}, - {1500, nullptr, "SetNotificationPresentationSetting"}, - {1510, D<&INotificationServices::GetNotificationPresentationSetting>, "GetNotificationPresentationSetting"}, - {2000, nullptr, "GetAlarmSetting"}, - {2001, nullptr, "GetAlarmSettingWithApplicationParameter"}, - {2010, nullptr, "MuteAlarmSetting"}, - {2020, nullptr, "IsAlarmSettingReady"}, - {8000, nullptr, "RegisterAppletResourceUserId"}, - {8010, nullptr, "UnregisterAppletResourceUserId"}, - {8999, nullptr, "GetCurrentTime"}, - {9000, nullptr, "GetAlarmSettingNextNotificationTime"}, - }; - // clang-format on - - RegisterHandlers(functions); } INotificationServices::~INotificationServices() = default; diff --git a/src/core/hle/service/glue/notif.h b/src/core/hle/service/glue/notif.h index ef2522fdfb..8be6671cab 100644 --- a/src/core/hle/service/glue/notif.h +++ b/src/core/hle/service/glue/notif.h @@ -98,6 +98,17 @@ private: Result DeleteAlarmSetting(AlarmSettingId alarm_setting_id); Result Initialize(ClientAppletResourceUserId aruid); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{500, D<&INotificationServicesForApplication::RegisterAlarmSetting>, "RegisterAlarmSetting"}, + FunctionInfo{510, D<&INotificationServicesForApplication::UpdateAlarmSetting>, "UpdateAlarmSetting"}, + FunctionInfo{520, D<&INotificationServicesForApplication::ListAlarmSettings>, "ListAlarmSettings"}, + FunctionInfo{530, D<&INotificationServicesForApplication::LoadApplicationParameter>, "LoadApplicationParameter"}, + FunctionInfo{540, D<&INotificationServicesForApplication::DeleteAlarmSetting>, "DeleteAlarmSetting"}, + FunctionInfo{1000, D<&INotificationServicesForApplication::Initialize>, "Initialize"} + ); NotificationServiceImpl impl; }; @@ -127,6 +138,31 @@ private: Out out_notification_presentation_setting, NotificationChannel notification_channel); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{500, D<&INotificationServices::RegisterAlarmSetting>, "RegisterAlarmSetting"}, + FunctionInfo{510, D<&INotificationServices::UpdateAlarmSetting>, "UpdateAlarmSetting"}, + FunctionInfo{520, D<&INotificationServices::ListAlarmSettings>, "ListAlarmSettings"}, + FunctionInfo{530, D<&INotificationServices::LoadApplicationParameter>, "LoadApplicationParameter"}, + FunctionInfo{540, D<&INotificationServices::DeleteAlarmSetting>, "DeleteAlarmSetting"}, + FunctionInfo{1000, D<&INotificationServices::Initialize>, "Initialize"}, + FunctionInfo{1010, nullptr, "ListNotifications"}, + FunctionInfo{1020, nullptr, "DeleteNotification"}, + FunctionInfo{1030, nullptr, "ClearNotifications"}, + FunctionInfo{1040, D<&INotificationServices::OpenNotificationSystemEventAccessor>, "OpenNotificationSystemEventAccessor"}, + FunctionInfo{1500, nullptr, "SetNotificationPresentationSetting"}, + FunctionInfo{1510, D<&INotificationServices::GetNotificationPresentationSetting>, "GetNotificationPresentationSetting"}, + FunctionInfo{2000, nullptr, "GetAlarmSetting"}, + FunctionInfo{2001, nullptr, "GetAlarmSettingWithApplicationParameter"}, + FunctionInfo{2010, nullptr, "MuteAlarmSetting"}, + FunctionInfo{2020, nullptr, "IsAlarmSettingReady"}, + FunctionInfo{8000, nullptr, "RegisterAppletResourceUserId"}, + FunctionInfo{8010, nullptr, "UnregisterAppletResourceUserId"}, + FunctionInfo{8999, nullptr, "GetCurrentTime"}, + FunctionInfo{9000, nullptr, "GetAlarmSettingNextNotificationTime"} + ); NotificationServiceImpl impl; }; } // namespace Service::Glue diff --git a/src/core/hle/service/glue/time/static.cpp b/src/core/hle/service/glue/time/static.cpp index 6a8de43cf5..a471343a1e 100644 --- a/src/core/hle/service/glue/time/static.cpp +++ b/src/core/hle/service/glue/time/static.cpp @@ -33,7 +33,10 @@ StaticService::StaticService(Core::System& system_, m_standard_steady_clock_resource{time->m_steady_clock_resource}, m_time_zone_binary{time->m_time_zone_binary} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&StaticService::GetStandardUserSystemClock>, "GetStandardUserSystemClock"}, FunctionInfo{1, D<&StaticService::GetStandardNetworkSystemClock>, "GetStandardNetworkSystemClock"}, FunctionInfo{2, D<&StaticService::GetStandardSteadyClock>, "GetStandardSteadyClock"}, @@ -53,10 +56,7 @@ StaticService::StaticService(Core::System& system_, FunctionInfo{401, D<&StaticService::GetClockSnapshotFromSystemClockContext>, "GetClockSnapshotFromSystemClockContext"}, FunctionInfo{500, D<&StaticService::CalculateStandardUserSystemClockDifferenceByUser>, "CalculateStandardUserSystemClockDifferenceByUser"}, FunctionInfo{501, D<&StaticService::CalculateSpanBetween>, "CalculateSpanBetween"} - }; - // clang-format on - - RegisterHandlers(functions); + ); m_set_sys = m_system.ServiceManager().GetService("set:sys", true); diff --git a/src/core/hle/service/glue/time/time_zone.cpp b/src/core/hle/service/glue/time/time_zone.cpp index 52bd651f2b..c0dbc00588 100644 --- a/src/core/hle/service/glue/time/time_zone.cpp +++ b/src/core/hle/service/glue/time/time_zone.cpp @@ -30,26 +30,6 @@ TimeZoneService::TimeZoneService( , m_operation_event{system} , m_time_zone_binary{time_zone_binary} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"}, - {1, D<&TimeZoneService::SetDeviceLocationName>, "SetDeviceLocationName"}, - {2, D<&TimeZoneService::GetTotalLocationNameCount>, "GetTotalLocationNameCount"}, - {3, D<&TimeZoneService::LoadLocationNameList>, "LoadLocationNameList"}, - {4, D<&TimeZoneService::LoadTimeZoneRule>, "LoadTimeZoneRule"}, - {5, D<&TimeZoneService::GetTimeZoneRuleVersion>, "GetTimeZoneRuleVersion"}, - {6, D<&TimeZoneService::GetDeviceLocationNameAndUpdatedTime>, "GetDeviceLocationNameAndUpdatedTime"}, - {7, D<&TimeZoneService::SetDeviceLocationNameWithTimeZoneRule>, "SetDeviceLocationNameWithTimeZoneRule"}, - {8, D<&TimeZoneService::ParseTimeZoneBinary>, "ParseTimeZoneBinary"}, - {20, D<&TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle>, "GetDeviceLocationNameOperationEventReadableHandle"}, - {100, D<&TimeZoneService::ToCalendarTime>, "ToCalendarTime"}, - {101, D<&TimeZoneService::ToCalendarTimeWithMyRule>, "ToCalendarTimeWithMyRule"}, - {201, D<&TimeZoneService::ToPosixTime>, "ToPosixTime"}, - {202, D<&TimeZoneService::ToPosixTimeWithMyRule>, "ToPosixTimeWithMyRule"}, - }; - // clang-format on - RegisterHandlers(functions); - m_set_sys = system.ServiceManager().GetService("set:sys", true); } diff --git a/src/core/hle/service/glue/time/time_zone.h b/src/core/hle/service/glue/time/time_zone.h index 635070263b..4f46c48cbb 100644 --- a/src/core/hle/service/glue/time/time_zone.h +++ b/src/core/hle/service/glue/time/time_zone.h @@ -80,6 +80,25 @@ public: const Service::PSC::Time::CalendarTime& calendar_time); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"}, + FunctionInfo{1, D<&TimeZoneService::SetDeviceLocationName>, "SetDeviceLocationName"}, + FunctionInfo{2, D<&TimeZoneService::GetTotalLocationNameCount>, "GetTotalLocationNameCount"}, + FunctionInfo{3, D<&TimeZoneService::LoadLocationNameList>, "LoadLocationNameList"}, + FunctionInfo{4, D<&TimeZoneService::LoadTimeZoneRule>, "LoadTimeZoneRule"}, + FunctionInfo{5, D<&TimeZoneService::GetTimeZoneRuleVersion>, "GetTimeZoneRuleVersion"}, + FunctionInfo{6, D<&TimeZoneService::GetDeviceLocationNameAndUpdatedTime>, "GetDeviceLocationNameAndUpdatedTime"}, + FunctionInfo{7, D<&TimeZoneService::SetDeviceLocationNameWithTimeZoneRule>, "SetDeviceLocationNameWithTimeZoneRule"}, + FunctionInfo{8, D<&TimeZoneService::ParseTimeZoneBinary>, "ParseTimeZoneBinary"}, + FunctionInfo{20, D<&TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle>, "GetDeviceLocationNameOperationEventReadableHandle"}, + FunctionInfo{100, D<&TimeZoneService::ToCalendarTime>, "ToCalendarTime"}, + FunctionInfo{101, D<&TimeZoneService::ToCalendarTimeWithMyRule>, "ToCalendarTimeWithMyRule"}, + FunctionInfo{201, D<&TimeZoneService::ToPosixTime>, "ToPosixTime"}, + FunctionInfo{202, D<&TimeZoneService::ToPosixTimeWithMyRule>, "ToPosixTimeWithMyRule"} + ); std::shared_ptr m_set_sys; bool m_can_write_timezone_device_location; FileTimestampWorker& m_file_timestamp_worker; diff --git a/src/core/hle/service/hid/active_vibration_device_list.cpp b/src/core/hle/service/hid/active_vibration_device_list.cpp index 2179ad4ab5..2e0b6ba555 100644 --- a/src/core/hle/service/hid/active_vibration_device_list.cpp +++ b/src/core/hle/service/hid/active_vibration_device_list.cpp @@ -18,12 +18,12 @@ IActiveVibrationDeviceList::IActiveVibrationDeviceList(Core::System& system_, std::shared_ptr resource) : ServiceFramework{system_, "IActiveVibrationDeviceList"}, resource_manager(resource) { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IActiveVibrationDeviceList::ActivateVibrationDevice>, "ActivateVibrationDevice"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } IActiveVibrationDeviceList::~IActiveVibrationDeviceList() = default; diff --git a/src/core/hle/service/hid/applet_resource.h b/src/core/hle/service/hid/applet_resource.h index 33092cd751..f80f7b43dc 100644 --- a/src/core/hle/service/hid/applet_resource.h +++ b/src/core/hle/service/hid/applet_resource.h @@ -33,7 +33,7 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, C<&IAppletResource::GetSharedMemoryHandle>, "GetSharedMemoryHandle"} + FunctionInfo{0, C<&IAppletResource::GetSharedMemoryHandle>, "GetSharedMemoryHandle"} ); u64 aruid{}; std::shared_ptr resource_manager; diff --git a/src/core/hle/service/hid/hid_debug_server.cpp b/src/core/hle/service/hid/hid_debug_server.cpp index 43fe0f3a19..4bee02bc3d 100644 --- a/src/core/hle/service/hid/hid_debug_server.cpp +++ b/src/core/hle/service/hid/hid_debug_server.cpp @@ -24,164 +24,164 @@ IHidDebugServer::IHidDebugServer(Core::System& system_, std::shared_ptr, "DeactivateTouchScreen"}, - {11, C<&IHidDebugServer::SetTouchScreenAutoPilotState>, "SetTouchScreenAutoPilotState"}, - {12, C<&IHidDebugServer::UnsetTouchScreenAutoPilotState>, "UnsetTouchScreenAutoPilotState"}, - {13, C<&IHidDebugServer::GetTouchScreenConfiguration>, "GetTouchScreenConfiguration"}, - {14, C<&IHidDebugServer::ProcessTouchScreenAutoTune>, "ProcessTouchScreenAutoTune"}, - {15, C<&IHidDebugServer::ForceStopTouchScreenManagement>, "ForceStopTouchScreenManagement"}, - {16, C<&IHidDebugServer::ForceRestartTouchScreenManagement>, "ForceRestartTouchScreenManagement"}, - {17, C<&IHidDebugServer::IsTouchScreenManaged>, "IsTouchScreenManaged"}, - {20, nullptr, "DeactivateMouse"}, - {21, nullptr, "SetMouseAutoPilotState"}, - {22, nullptr, "UnsetMouseAutoPilotState"}, - {23, nullptr, "AddMouseSideWheelDelta"}, - {25, nullptr, "SetDebugMouseAutoPilotState"}, - {26, nullptr, "UnsetDebugMouseAutoPilotState"}, - {30, nullptr, "DeactivateKeyboard"}, - {31, nullptr, "SetKeyboardAutoPilotState"}, - {32, nullptr, "UnsetKeyboardAutoPilotState"}, - {50, nullptr, "DeactivateXpad"}, - {51, nullptr, "SetXpadAutoPilotState"}, - {52, nullptr, "UnsetXpadAutoPilotState"}, - {53, nullptr, "DeactivateJoyXpad"}, - {60, nullptr, "ClearNpadSystemCommonPolicy"}, - {61, nullptr, "DeactivateNpad"}, - {62, nullptr, "ForceDisconnectNpad"}, - {91, C<&IHidDebugServer::DeactivateGesture>, "DeactivateGesture"}, - {110, nullptr, "DeactivateHomeButton"}, - {111, nullptr, "SetHomeButtonAutoPilotState"}, - {112, nullptr, "UnsetHomeButtonAutoPilotState"}, - {120, nullptr, "DeactivateSleepButton"}, - {121, nullptr, "SetSleepButtonAutoPilotState"}, - {122, nullptr, "UnsetSleepButtonAutoPilotState"}, - {123, nullptr, "DeactivateInputDetector"}, - {130, nullptr, "DeactivateCaptureButton"}, - {131, nullptr, "SetCaptureButtonAutoPilotState"}, - {132, nullptr, "UnsetCaptureButtonAutoPilotState"}, - {133, nullptr, "SetShiftAccelerometerCalibrationValue"}, - {134, nullptr, "GetShiftAccelerometerCalibrationValue"}, - {135, nullptr, "SetShiftGyroscopeCalibrationValue"}, - {136, nullptr, "GetShiftGyroscopeCalibrationValue"}, - {140, nullptr, "DeactivateConsoleSixAxisSensor"}, - {141, nullptr, "GetConsoleSixAxisSensorSamplingFrequency"}, - {142, nullptr, "DeactivateSevenSixAxisSensor"}, - {143, nullptr, "GetConsoleSixAxisSensorCountStates"}, - {144, nullptr, "GetAccelerometerFsr"}, - {145, nullptr, "SetAccelerometerFsr"}, - {146, nullptr, "GetAccelerometerOdr"}, - {147, nullptr, "SetAccelerometerOdr"}, - {148, nullptr, "GetGyroscopeFsr"}, - {149, nullptr, "SetGyroscopeFsr"}, - {150, nullptr, "GetGyroscopeOdr"}, - {151, nullptr, "SetGyroscopeOdr"}, - {152, nullptr, "GetWhoAmI"}, - {201, nullptr, "ActivateFirmwareUpdate"}, - {202, nullptr, "DeactivateFirmwareUpdate"}, - {203, nullptr, "StartFirmwareUpdate"}, - {204, nullptr, "GetFirmwareUpdateStage"}, - {205, nullptr, "GetFirmwareVersion"}, - {206, nullptr, "GetDestinationFirmwareVersion"}, - {207, nullptr, "DiscardFirmwareInfoCacheForRevert"}, - {208, nullptr, "StartFirmwareUpdateForRevert"}, - {209, nullptr, "GetAvailableFirmwareVersionForRevert"}, - {210, nullptr, "IsFirmwareUpdatingDevice"}, - {211, nullptr, "StartFirmwareUpdateIndividual"}, - {212, nullptr, "GetDetailFirmwareVersion"}, // 19.0.0+ - {215, nullptr, "SetUsbFirmwareForceUpdateEnabled"}, - {216, nullptr, "SetAllKuinaDevicesToFirmwareUpdateMode"}, - {221, nullptr, "UpdateControllerColor"}, - {222, nullptr, "ConnectUsbPadsAsync"}, - {223, nullptr, "DisconnectUsbPadsAsync"}, - {224, nullptr, "UpdateDesignInfo"}, - {225, nullptr, "GetUniquePadDriverState"}, - {226, nullptr, "GetSixAxisSensorDriverStates"}, - {227, nullptr, "GetRxPacketHistory"}, - {228, nullptr, "AcquireOperationEventHandle"}, - {229, nullptr, "ReadSerialFlash"}, - {230, nullptr, "WriteSerialFlash"}, - {231, nullptr, "GetOperationResult"}, - {232, nullptr, "EnableShipmentMode"}, - {233, nullptr, "ClearPairingInfo"}, - {234, nullptr, "GetUniquePadDeviceTypeSetInternal"}, - {235, nullptr, "EnableAnalogStickPower"}, - {236, nullptr, "RequestKuinaUartClockCal"}, - {237, nullptr, "GetKuinaUartClockCal"}, - {238, nullptr, "SetKuinaUartClockTrim"}, - {239, nullptr, "KuinaLoopbackTest"}, - {240, nullptr, "RequestBatteryVoltage"}, - {241, nullptr, "GetBatteryVoltage"}, - {242, nullptr, "GetUniquePadPowerInfo"}, - {243, nullptr, "RebootUniquePad"}, - {244, nullptr, "RequestKuinaFirmwareVersion"}, - {245, nullptr, "GetKuinaFirmwareVersion"}, - {246, nullptr, "GetVidPid"}, - {247, nullptr, "GetAnalogStickCalibrationValue"}, - {248, nullptr, "GetUniquePadIdsFull"}, - {249, nullptr, "ConnectUniquePad"}, - {250, nullptr, "IsVirtual"}, - {251, nullptr, "GetAnalogStickModuleParam"}, - {253, nullptr, "ClearStorageForShipment"}, //19.0.0+ - {261, nullptr, "UpdateDesignInfo12"}, //21.0.0+ - {262, nullptr, "GetUniquePadButtonCount"}, //21.0.0+ - {267, nullptr, "SetAnalogStickCalibration"}, //21.0.0+ - {268, nullptr, "ResetAnalogStickCalibration"}, //21.0.0+ - {301, nullptr, "GetAbstractedPadHandles"}, - {302, nullptr, "GetAbstractedPadState"}, - {303, nullptr, "GetAbstractedPadsState"}, - {321, nullptr, "SetAutoPilotVirtualPadState"}, - {322, nullptr, "UnsetAutoPilotVirtualPadState"}, - {323, nullptr, "UnsetAllAutoPilotVirtualPadState"}, - {324, nullptr, "AttachHdlsWorkBuffer"}, - {325, nullptr, "ReleaseHdlsWorkBuffer"}, - {326, nullptr, "DumpHdlsNpadAssignmentState"}, - {327, nullptr, "DumpHdlsStates"}, - {328, nullptr, "ApplyHdlsNpadAssignmentState"}, - {329, nullptr, "ApplyHdlsStateList"}, - {330, nullptr, "AttachHdlsVirtualDevice"}, - {331, nullptr, "DetachHdlsVirtualDevice"}, - {332, nullptr, "SetHdlsState"}, - {350, nullptr, "AddRegisteredDevice"}, - {351, nullptr, "GetRegisteredDevicesCountDebug"}, //17.0.0-18.1.0 - {352, nullptr, "DeleteRegisteredDevicesDebug"}, //17.0.0-18.1.0 - {400, nullptr, "DisableExternalMcuOnNxDevice"}, - {401, nullptr, "DisableRailDeviceFiltering"}, - {402, nullptr, "EnableWiredPairing"}, - {403, nullptr, "EnableShipmentModeAutoClear"}, - {404, nullptr, "SetRailEnabled"}, - {500, nullptr, "SetFactoryInt"}, - {501, nullptr, "IsFactoryBootEnabled"}, - {550, nullptr, "SetAnalogStickModelDataTemporarily"}, - {551, nullptr, "GetAnalogStickModelData"}, - {552, nullptr, "ResetAnalogStickModelData"}, - {600, nullptr, "ConvertPadState"}, - {601, nullptr, "IsButtonConfigSupported"}, //18.0.0+ - {602, nullptr, "IsButtonConfigEmbeddedSupported"}, //18.0.0+ - {603, nullptr, "DeleteButtonConfig"}, //18.0.0+ - {604, nullptr, "DeleteButtonConfigEmbedded"}, //18.0.0+ - {605, nullptr, "SetButtonConfigEnabled"}, //18.0.0+ - {606, nullptr, "SetButtonConfigEmbeddedEnabled"}, //18.0.0+ - {607, nullptr, "IsButtonConfigEnabled"}, //18.0.0+ - {608, nullptr, "IsButtonConfigEmbeddedEnabled"}, //18.0.0+ - {609, nullptr, "SetButtonConfigEmbedded"}, //18.0.0+ - {610, nullptr, "SetButtonConfigFull"}, //18.0.0+ - {611, nullptr, "SetButtonConfigLeft"}, //18.0.0+ - {612, nullptr, "SetButtonConfigRight"}, //18.0.0+ - {613, nullptr, "GetButtonConfigEmbedded"}, //18.0.0+ - {614, nullptr, "GetButtonConfigFull"}, //18.0.0+ - {615, nullptr, "GetButtonConfigLeft"}, //18.0.0+ - {616, nullptr, "GetButtonConfigRight"}, //18.0.0+ - {650, nullptr, "AddButtonPlayData"}, - {651, nullptr, "StartButtonPlayData"}, - {652, nullptr, "StopButtonPlayData"}, - {700, nullptr, "GetRailAttachEventCount"}, //21.0.0+ - {2000, nullptr, "DeactivateDigitizer"}, - {2001, nullptr, "SetDigitizerAutoPilotState"}, - {2002, nullptr, "UnsetDigitizerAutoPilotState"}, - {3000, nullptr, "ReloadFirmwareDebugSettings"}, + FunctionInfo{0, nullptr, "DeactivateDebugPad"}, + FunctionInfo{1, nullptr, "SetDebugPadAutoPilotState"}, + FunctionInfo{2, nullptr, "UnsetDebugPadAutoPilotState"}, + FunctionInfo{10, C<&IHidDebugServer::DeactivateTouchScreen>, "DeactivateTouchScreen"}, + FunctionInfo{11, C<&IHidDebugServer::SetTouchScreenAutoPilotState>, "SetTouchScreenAutoPilotState"}, + FunctionInfo{12, C<&IHidDebugServer::UnsetTouchScreenAutoPilotState>, "UnsetTouchScreenAutoPilotState"}, + FunctionInfo{13, C<&IHidDebugServer::GetTouchScreenConfiguration>, "GetTouchScreenConfiguration"}, + FunctionInfo{14, C<&IHidDebugServer::ProcessTouchScreenAutoTune>, "ProcessTouchScreenAutoTune"}, + FunctionInfo{15, C<&IHidDebugServer::ForceStopTouchScreenManagement>, "ForceStopTouchScreenManagement"}, + FunctionInfo{16, C<&IHidDebugServer::ForceRestartTouchScreenManagement>, "ForceRestartTouchScreenManagement"}, + FunctionInfo{17, C<&IHidDebugServer::IsTouchScreenManaged>, "IsTouchScreenManaged"}, + FunctionInfo{20, nullptr, "DeactivateMouse"}, + FunctionInfo{21, nullptr, "SetMouseAutoPilotState"}, + FunctionInfo{22, nullptr, "UnsetMouseAutoPilotState"}, + FunctionInfo{23, nullptr, "AddMouseSideWheelDelta"}, + FunctionInfo{25, nullptr, "SetDebugMouseAutoPilotState"}, + FunctionInfo{26, nullptr, "UnsetDebugMouseAutoPilotState"}, + FunctionInfo{30, nullptr, "DeactivateKeyboard"}, + FunctionInfo{31, nullptr, "SetKeyboardAutoPilotState"}, + FunctionInfo{32, nullptr, "UnsetKeyboardAutoPilotState"}, + FunctionInfo{50, nullptr, "DeactivateXpad"}, + FunctionInfo{51, nullptr, "SetXpadAutoPilotState"}, + FunctionInfo{52, nullptr, "UnsetXpadAutoPilotState"}, + FunctionInfo{53, nullptr, "DeactivateJoyXpad"}, + FunctionInfo{60, nullptr, "ClearNpadSystemCommonPolicy"}, + FunctionInfo{61, nullptr, "DeactivateNpad"}, + FunctionInfo{62, nullptr, "ForceDisconnectNpad"}, + FunctionInfo{91, C<&IHidDebugServer::DeactivateGesture>, "DeactivateGesture"}, + FunctionInfo{110, nullptr, "DeactivateHomeButton"}, + FunctionInfo{111, nullptr, "SetHomeButtonAutoPilotState"}, + FunctionInfo{112, nullptr, "UnsetHomeButtonAutoPilotState"}, + FunctionInfo{120, nullptr, "DeactivateSleepButton"}, + FunctionInfo{121, nullptr, "SetSleepButtonAutoPilotState"}, + FunctionInfo{122, nullptr, "UnsetSleepButtonAutoPilotState"}, + FunctionInfo{123, nullptr, "DeactivateInputDetector"}, + FunctionInfo{130, nullptr, "DeactivateCaptureButton"}, + FunctionInfo{131, nullptr, "SetCaptureButtonAutoPilotState"}, + FunctionInfo{132, nullptr, "UnsetCaptureButtonAutoPilotState"}, + FunctionInfo{133, nullptr, "SetShiftAccelerometerCalibrationValue"}, + FunctionInfo{134, nullptr, "GetShiftAccelerometerCalibrationValue"}, + FunctionInfo{135, nullptr, "SetShiftGyroscopeCalibrationValue"}, + FunctionInfo{136, nullptr, "GetShiftGyroscopeCalibrationValue"}, + FunctionInfo{140, nullptr, "DeactivateConsoleSixAxisSensor"}, + FunctionInfo{141, nullptr, "GetConsoleSixAxisSensorSamplingFrequency"}, + FunctionInfo{142, nullptr, "DeactivateSevenSixAxisSensor"}, + FunctionInfo{143, nullptr, "GetConsoleSixAxisSensorCountStates"}, + FunctionInfo{144, nullptr, "GetAccelerometerFsr"}, + FunctionInfo{145, nullptr, "SetAccelerometerFsr"}, + FunctionInfo{146, nullptr, "GetAccelerometerOdr"}, + FunctionInfo{147, nullptr, "SetAccelerometerOdr"}, + FunctionInfo{148, nullptr, "GetGyroscopeFsr"}, + FunctionInfo{149, nullptr, "SetGyroscopeFsr"}, + FunctionInfo{150, nullptr, "GetGyroscopeOdr"}, + FunctionInfo{151, nullptr, "SetGyroscopeOdr"}, + FunctionInfo{152, nullptr, "GetWhoAmI"}, + FunctionInfo{201, nullptr, "ActivateFirmwareUpdate"}, + FunctionInfo{202, nullptr, "DeactivateFirmwareUpdate"}, + FunctionInfo{203, nullptr, "StartFirmwareUpdate"}, + FunctionInfo{204, nullptr, "GetFirmwareUpdateStage"}, + FunctionInfo{205, nullptr, "GetFirmwareVersion"}, + FunctionInfo{206, nullptr, "GetDestinationFirmwareVersion"}, + FunctionInfo{207, nullptr, "DiscardFirmwareInfoCacheForRevert"}, + FunctionInfo{208, nullptr, "StartFirmwareUpdateForRevert"}, + FunctionInfo{209, nullptr, "GetAvailableFirmwareVersionForRevert"}, + FunctionInfo{210, nullptr, "IsFirmwareUpdatingDevice"}, + FunctionInfo{211, nullptr, "StartFirmwareUpdateIndividual"}, + FunctionInfo{212, nullptr, "GetDetailFirmwareVersion"}, // 19.0.0+ + FunctionInfo{215, nullptr, "SetUsbFirmwareForceUpdateEnabled"}, + FunctionInfo{216, nullptr, "SetAllKuinaDevicesToFirmwareUpdateMode"}, + FunctionInfo{221, nullptr, "UpdateControllerColor"}, + FunctionInfo{222, nullptr, "ConnectUsbPadsAsync"}, + FunctionInfo{223, nullptr, "DisconnectUsbPadsAsync"}, + FunctionInfo{224, nullptr, "UpdateDesignInfo"}, + FunctionInfo{225, nullptr, "GetUniquePadDriverState"}, + FunctionInfo{226, nullptr, "GetSixAxisSensorDriverStates"}, + FunctionInfo{227, nullptr, "GetRxPacketHistory"}, + FunctionInfo{228, nullptr, "AcquireOperationEventHandle"}, + FunctionInfo{229, nullptr, "ReadSerialFlash"}, + FunctionInfo{230, nullptr, "WriteSerialFlash"}, + FunctionInfo{231, nullptr, "GetOperationResult"}, + FunctionInfo{232, nullptr, "EnableShipmentMode"}, + FunctionInfo{233, nullptr, "ClearPairingInfo"}, + FunctionInfo{234, nullptr, "GetUniquePadDeviceTypeSetInternal"}, + FunctionInfo{235, nullptr, "EnableAnalogStickPower"}, + FunctionInfo{236, nullptr, "RequestKuinaUartClockCal"}, + FunctionInfo{237, nullptr, "GetKuinaUartClockCal"}, + FunctionInfo{238, nullptr, "SetKuinaUartClockTrim"}, + FunctionInfo{239, nullptr, "KuinaLoopbackTest"}, + FunctionInfo{240, nullptr, "RequestBatteryVoltage"}, + FunctionInfo{241, nullptr, "GetBatteryVoltage"}, + FunctionInfo{242, nullptr, "GetUniquePadPowerInfo"}, + FunctionInfo{243, nullptr, "RebootUniquePad"}, + FunctionInfo{244, nullptr, "RequestKuinaFirmwareVersion"}, + FunctionInfo{245, nullptr, "GetKuinaFirmwareVersion"}, + FunctionInfo{246, nullptr, "GetVidPid"}, + FunctionInfo{247, nullptr, "GetAnalogStickCalibrationValue"}, + FunctionInfo{248, nullptr, "GetUniquePadIdsFull"}, + FunctionInfo{249, nullptr, "ConnectUniquePad"}, + FunctionInfo{250, nullptr, "IsVirtual"}, + FunctionInfo{251, nullptr, "GetAnalogStickModuleParam"}, + FunctionInfo{253, nullptr, "ClearStorageForShipment"}, //19.0.0+ + FunctionInfo{261, nullptr, "UpdateDesignInfo12"}, //21.0.0+ + FunctionInfo{262, nullptr, "GetUniquePadButtonCount"}, //21.0.0+ + FunctionInfo{267, nullptr, "SetAnalogStickCalibration"}, //21.0.0+ + FunctionInfo{268, nullptr, "ResetAnalogStickCalibration"}, //21.0.0+ + FunctionInfo{301, nullptr, "GetAbstractedPadHandles"}, + FunctionInfo{302, nullptr, "GetAbstractedPadState"}, + FunctionInfo{303, nullptr, "GetAbstractedPadsState"}, + FunctionInfo{321, nullptr, "SetAutoPilotVirtualPadState"}, + FunctionInfo{322, nullptr, "UnsetAutoPilotVirtualPadState"}, + FunctionInfo{323, nullptr, "UnsetAllAutoPilotVirtualPadState"}, + FunctionInfo{324, nullptr, "AttachHdlsWorkBuffer"}, + FunctionInfo{325, nullptr, "ReleaseHdlsWorkBuffer"}, + FunctionInfo{326, nullptr, "DumpHdlsNpadAssignmentState"}, + FunctionInfo{327, nullptr, "DumpHdlsStates"}, + FunctionInfo{328, nullptr, "ApplyHdlsNpadAssignmentState"}, + FunctionInfo{329, nullptr, "ApplyHdlsStateList"}, + FunctionInfo{330, nullptr, "AttachHdlsVirtualDevice"}, + FunctionInfo{331, nullptr, "DetachHdlsVirtualDevice"}, + FunctionInfo{332, nullptr, "SetHdlsState"}, + FunctionInfo{350, nullptr, "AddRegisteredDevice"}, + FunctionInfo{351, nullptr, "GetRegisteredDevicesCountDebug"}, //17.0.0-18.1.0 + FunctionInfo{352, nullptr, "DeleteRegisteredDevicesDebug"}, //17.0.0-18.1.0 + FunctionInfo{400, nullptr, "DisableExternalMcuOnNxDevice"}, + FunctionInfo{401, nullptr, "DisableRailDeviceFiltering"}, + FunctionInfo{402, nullptr, "EnableWiredPairing"}, + FunctionInfo{403, nullptr, "EnableShipmentModeAutoClear"}, + FunctionInfo{404, nullptr, "SetRailEnabled"}, + FunctionInfo{500, nullptr, "SetFactoryInt"}, + FunctionInfo{501, nullptr, "IsFactoryBootEnabled"}, + FunctionInfo{550, nullptr, "SetAnalogStickModelDataTemporarily"}, + FunctionInfo{551, nullptr, "GetAnalogStickModelData"}, + FunctionInfo{552, nullptr, "ResetAnalogStickModelData"}, + FunctionInfo{600, nullptr, "ConvertPadState"}, + FunctionInfo{601, nullptr, "IsButtonConfigSupported"}, //18.0.0+ + FunctionInfo{602, nullptr, "IsButtonConfigEmbeddedSupported"}, //18.0.0+ + FunctionInfo{603, nullptr, "DeleteButtonConfig"}, //18.0.0+ + FunctionInfo{604, nullptr, "DeleteButtonConfigEmbedded"}, //18.0.0+ + FunctionInfo{605, nullptr, "SetButtonConfigEnabled"}, //18.0.0+ + FunctionInfo{606, nullptr, "SetButtonConfigEmbeddedEnabled"}, //18.0.0+ + FunctionInfo{607, nullptr, "IsButtonConfigEnabled"}, //18.0.0+ + FunctionInfo{608, nullptr, "IsButtonConfigEmbeddedEnabled"}, //18.0.0+ + FunctionInfo{609, nullptr, "SetButtonConfigEmbedded"}, //18.0.0+ + FunctionInfo{610, nullptr, "SetButtonConfigFull"}, //18.0.0+ + FunctionInfo{611, nullptr, "SetButtonConfigLeft"}, //18.0.0+ + FunctionInfo{612, nullptr, "SetButtonConfigRight"}, //18.0.0+ + FunctionInfo{613, nullptr, "GetButtonConfigEmbedded"}, //18.0.0+ + FunctionInfo{614, nullptr, "GetButtonConfigFull"}, //18.0.0+ + FunctionInfo{615, nullptr, "GetButtonConfigLeft"}, //18.0.0+ + FunctionInfo{616, nullptr, "GetButtonConfigRight"}, //18.0.0+ + FunctionInfo{650, nullptr, "AddButtonPlayData"}, + FunctionInfo{651, nullptr, "StartButtonPlayData"}, + FunctionInfo{652, nullptr, "StopButtonPlayData"}, + FunctionInfo{700, nullptr, "GetRailAttachEventCount"}, //21.0.0+ + FunctionInfo{2000, nullptr, "DeactivateDigitizer"}, + FunctionInfo{2001, nullptr, "SetDigitizerAutoPilotState"}, + FunctionInfo{2002, nullptr, "UnsetDigitizerAutoPilotState"}, + FunctionInfo{3000, nullptr, "ReloadFirmwareDebugSettings"}, }; // clang-format on diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp index 9689bce8dd..938379c0cf 100644 --- a/src/core/hle/service/hid/hid_server.cpp +++ b/src/core/hle/service/hid/hid_server.cpp @@ -47,197 +47,197 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr r : ServiceFramework{system_, "hid"}, resource_manager{resource}, firmware_settings{settings} { // clang-format off static const FunctionInfo functions[] = { - {0, C<&IHidServer::CreateAppletResource>, "CreateAppletResource"}, - {1, C<&IHidServer::ActivateDebugPad>, "ActivateDebugPad"}, - {11, C<&IHidServer::ActivateTouchScreen>, "ActivateTouchScreen"}, - {21, C<&IHidServer::ActivateMouse>, "ActivateMouse"}, - {26, C<&IHidServer::ActivateDebugMouse>, "ActivateDebugMouse"}, - {31, C<&IHidServer::ActivateKeyboard>, "ActivateKeyboard"}, - {32, C<&IHidServer::SendKeyboardLockKeyEvent>, "SendKeyboardLockKeyEvent"}, - {40, C<&IHidServer::AcquireXpadIdEventHandle>, "AcquireXpadIdEventHandle"}, - {41, C<&IHidServer::ReleaseXpadIdEventHandle>, "ReleaseXpadIdEventHandle"}, - {51, C<&IHidServer::ActivateXpad>, "ActivateXpad"}, - {55, C<&IHidServer::GetXpadIds>, "GetXpadIds"}, - {56, C<&IHidServer::ActivateJoyXpad>, "ActivateJoyXpad"}, - {58, C<&IHidServer::GetJoyXpadLifoHandle>, "GetJoyXpadLifoHandle"}, - {59, C<&IHidServer::GetJoyXpadIds>, "GetJoyXpadIds"}, - {60, C<&IHidServer::ActivateSixAxisSensor>, "ActivateSixAxisSensor"}, - {61, C<&IHidServer::DeactivateSixAxisSensor>, "DeactivateSixAxisSensor"}, - {62, C<&IHidServer::GetSixAxisSensorLifoHandle>, "GetSixAxisSensorLifoHandle"}, - {63, C<&IHidServer::ActivateJoySixAxisSensor>, "ActivateJoySixAxisSensor"}, - {64, C<&IHidServer::DeactivateJoySixAxisSensor>, "DeactivateJoySixAxisSensor"}, - {65, C<&IHidServer::GetJoySixAxisSensorLifoHandle>, "GetJoySixAxisSensorLifoHandle"}, - {66, C<&IHidServer::StartSixAxisSensor>, "StartSixAxisSensor"}, - {67, C<&IHidServer::StopSixAxisSensor>, "StopSixAxisSensor"}, - {68, C<&IHidServer::IsSixAxisSensorFusionEnabled>, "IsSixAxisSensorFusionEnabled"}, - {69, C<&IHidServer::EnableSixAxisSensorFusion>, "EnableSixAxisSensorFusion"}, - {70, C<&IHidServer::SetSixAxisSensorFusionParameters>, "SetSixAxisSensorFusionParameters"}, - {71, C<&IHidServer::GetSixAxisSensorFusionParameters>, "GetSixAxisSensorFusionParameters"}, - {72, C<&IHidServer::ResetSixAxisSensorFusionParameters>, "ResetSixAxisSensorFusionParameters"}, - {73, nullptr, "SetAccelerometerParameters"}, - {74, nullptr, "GetAccelerometerParameters"}, - {75, nullptr, "ResetAccelerometerParameters"}, - {76, nullptr, "SetAccelerometerPlayMode"}, - {77, nullptr, "GetAccelerometerPlayMode"}, - {78, nullptr, "ResetAccelerometerPlayMode"}, - {79, C<&IHidServer::SetGyroscopeZeroDriftMode>, "SetGyroscopeZeroDriftMode"}, - {80, C<&IHidServer::GetGyroscopeZeroDriftMode>, "GetGyroscopeZeroDriftMode"}, - {81, C<&IHidServer::ResetGyroscopeZeroDriftMode>, "ResetGyroscopeZeroDriftMode"}, - {82, C<&IHidServer::IsSixAxisSensorAtRest>, "IsSixAxisSensorAtRest"}, - {83, C<&IHidServer::IsFirmwareUpdateAvailableForSixAxisSensor>, "IsFirmwareUpdateAvailableForSixAxisSensor"}, - {84, C<&IHidServer::EnableSixAxisSensorUnalteredPassthrough>, "EnableSixAxisSensorUnalteredPassthrough"}, - {85, C<&IHidServer::IsSixAxisSensorUnalteredPassthroughEnabled>, "IsSixAxisSensorUnalteredPassthroughEnabled"}, - {86, nullptr, "StoreSixAxisSensorCalibrationParameter"}, - {87, C<&IHidServer::LoadSixAxisSensorCalibrationParameter>, "LoadSixAxisSensorCalibrationParameter"}, - {88, C<&IHidServer::GetSixAxisSensorIcInformation>, "GetSixAxisSensorIcInformation"}, - {89, C<&IHidServer::ResetIsSixAxisSensorDeviceNewlyAssigned>, "ResetIsSixAxisSensorDeviceNewlyAssigned"}, - {91, C<&IHidServer::ActivateGesture>, "ActivateGesture"}, - {92, C<&IHidServer::SetGestureOutputRanges>, "SetGestureOutputRanges"}, - {100, C<&IHidServer::SetSupportedNpadStyleSet>, "SetSupportedNpadStyleSet"}, - {101, C<&IHidServer::GetSupportedNpadStyleSet>, "GetSupportedNpadStyleSet"}, - {102, C<&IHidServer::SetSupportedNpadIdType>, "SetSupportedNpadIdType"}, - {103, C<&IHidServer::ActivateNpad>, "ActivateNpad"}, - {104, C<&IHidServer::DeactivateNpad>, "DeactivateNpad"}, - {106, C<&IHidServer::AcquireNpadStyleSetUpdateEventHandle>, "AcquireNpadStyleSetUpdateEventHandle"}, - {107, C<&IHidServer::DisconnectNpad>, "DisconnectNpad"}, - {108, C<&IHidServer::GetPlayerLedPattern>, "GetPlayerLedPattern"}, - {109, C<&IHidServer::ActivateNpadWithRevision>, "ActivateNpadWithRevision"}, - {120, C<&IHidServer::SetNpadJoyHoldType>, "SetNpadJoyHoldType"}, - {121, C<&IHidServer::GetNpadJoyHoldType>, "GetNpadJoyHoldType"}, - {122, C<&IHidServer::SetNpadJoyAssignmentModeSingleByDefault>, "SetNpadJoyAssignmentModeSingleByDefault"}, - {123, C<&IHidServer::SetNpadJoyAssignmentModeSingle>, "SetNpadJoyAssignmentModeSingle"}, - {124, C<&IHidServer::SetNpadJoyAssignmentModeDual>, "SetNpadJoyAssignmentModeDual"}, - {125, C<&IHidServer::MergeSingleJoyAsDualJoy>, "MergeSingleJoyAsDualJoy"}, - {126, C<&IHidServer::StartLrAssignmentMode>, "StartLrAssignmentMode"}, - {127, C<&IHidServer::StopLrAssignmentMode>, "StopLrAssignmentMode"}, - {128, C<&IHidServer::SetNpadHandheldActivationMode>, "SetNpadHandheldActivationMode"}, - {129, C<&IHidServer::GetNpadHandheldActivationMode>, "GetNpadHandheldActivationMode"}, - {130, C<&IHidServer::SwapNpadAssignment>, "SwapNpadAssignment"}, - {131, C<&IHidServer::IsUnintendedHomeButtonInputProtectionEnabled>, "IsUnintendedHomeButtonInputProtectionEnabled"}, - {132, C<&IHidServer::EnableUnintendedHomeButtonInputProtection>, "EnableUnintendedHomeButtonInputProtection"}, - {133, C<&IHidServer::SetNpadJoyAssignmentModeSingleWithDestination>, "SetNpadJoyAssignmentModeSingleWithDestination"}, - {134, C<&IHidServer::SetNpadAnalogStickUseCenterClamp>, "SetNpadAnalogStickUseCenterClamp"}, - {135, C<&IHidServer::SetNpadCaptureButtonAssignment>, "SetNpadCaptureButtonAssignment"}, - {136, C<&IHidServer::ClearNpadCaptureButtonAssignment>, "ClearNpadCaptureButtonAssignment"}, - {200, C<&IHidServer::GetVibrationDeviceInfo>, "GetVibrationDeviceInfo"}, - {201, C<&IHidServer::SendVibrationValue>, "SendVibrationValue"}, - {202, C<&IHidServer::GetActualVibrationValue>, "GetActualVibrationValue"}, - {203, C<&IHidServer::CreateActiveVibrationDeviceList>, "CreateActiveVibrationDeviceList"}, - {204, C<&IHidServer::PermitVibration>, "PermitVibration"}, - {205, C<&IHidServer::IsVibrationPermitted>, "IsVibrationPermitted"}, - {206, C<&IHidServer::SendVibrationValues>, "SendVibrationValues"}, - {207, C<&IHidServer::SendVibrationGcErmCommand>, "SendVibrationGcErmCommand"}, - {208, C<&IHidServer::GetActualVibrationGcErmCommand>, "GetActualVibrationGcErmCommand"}, - {209, C<&IHidServer::BeginPermitVibrationSession>, "BeginPermitVibrationSession"}, - {210, C<&IHidServer::EndPermitVibrationSession>, "EndPermitVibrationSession"}, - {211, C<&IHidServer::IsVibrationDeviceMounted>, "IsVibrationDeviceMounted"}, - {212, C<&IHidServer::SendVibrationValueInBool>, "SendVibrationValueInBool"}, - {300, C<&IHidServer::ActivateConsoleSixAxisSensor>, "ActivateConsoleSixAxisSensor"}, - {301, C<&IHidServer::StartConsoleSixAxisSensor>, "StartConsoleSixAxisSensor"}, - {302, C<&IHidServer::StopConsoleSixAxisSensor>, "StopConsoleSixAxisSensor"}, - {303, C<&IHidServer::ActivateSevenSixAxisSensor>, "ActivateSevenSixAxisSensor"}, - {304, C<&IHidServer::StartSevenSixAxisSensor>, "StartSevenSixAxisSensor"}, - {305, C<&IHidServer::StopSevenSixAxisSensor>, "StopSevenSixAxisSensor"}, - {306, C<&IHidServer::InitializeSevenSixAxisSensor>, "InitializeSevenSixAxisSensor"}, - {307, C<&IHidServer::FinalizeSevenSixAxisSensor>, "FinalizeSevenSixAxisSensor"}, - {308, nullptr, "SetSevenSixAxisSensorFusionStrength"}, - {309, nullptr, "GetSevenSixAxisSensorFusionStrength"}, - {310, C<&IHidServer::ResetSevenSixAxisSensorTimestamp>, "ResetSevenSixAxisSensorTimestamp"}, - {320, nullptr, "EnableNpadImu"}, //21.0.0+ - {321, nullptr, "DisableNpadImu"}, //21.0.0+ - {400, C<&IHidServer::IsUsbFullKeyControllerEnabled>, "IsUsbFullKeyControllerEnabled"}, - {401, nullptr, "EnableUsbFullKeyController"}, - {402, nullptr, "IsUsbFullKeyControllerConnected"}, - {403, nullptr, "HasBattery"}, - {404, nullptr, "HasLeftRightBattery"}, - {405, nullptr, "GetNpadInterfaceType"}, - {406, nullptr, "GetNpadLeftRightInterfaceType"}, - {407, nullptr, "GetNpadOfHighestBatteryLevel"}, - {408, nullptr, "GetNpadOfHighestBatteryLevelForJoyRight"}, - {500, C<&IHidServer::GetPalmaConnectionHandle>, "GetPalmaConnectionHandle"}, - {501, C<&IHidServer::InitializePalma>, "InitializePalma"}, - {502, C<&IHidServer::AcquirePalmaOperationCompleteEvent>, "AcquirePalmaOperationCompleteEvent"}, - {503, C<&IHidServer::GetPalmaOperationInfo>, "GetPalmaOperationInfo"}, - {504, C<&IHidServer::PlayPalmaActivity>, "PlayPalmaActivity"}, - {505, C<&IHidServer::SetPalmaFrModeType>, "SetPalmaFrModeType"}, - {506, C<&IHidServer::ReadPalmaStep>, "ReadPalmaStep"}, - {507, C<&IHidServer::EnablePalmaStep>, "EnablePalmaStep"}, - {508, C<&IHidServer::ResetPalmaStep>, "ResetPalmaStep"}, - {509, C<&IHidServer::ReadPalmaApplicationSection>, "ReadPalmaApplicationSection"}, - {510, C<&IHidServer::WritePalmaApplicationSection>, "WritePalmaApplicationSection"}, - {511, C<&IHidServer::ReadPalmaUniqueCode>, "ReadPalmaUniqueCode"}, - {512, C<&IHidServer::SetPalmaUniqueCodeInvalid>, "SetPalmaUniqueCodeInvalid"}, - {513, C<&IHidServer::WritePalmaActivityEntry>, "WritePalmaActivityEntry"}, - {514, C<&IHidServer::WritePalmaRgbLedPatternEntry>, "WritePalmaRgbLedPatternEntry"}, - {515, C<&IHidServer::WritePalmaWaveEntry>, "WritePalmaWaveEntry"}, - {516, C<&IHidServer::SetPalmaDataBaseIdentificationVersion>, "SetPalmaDataBaseIdentificationVersion"}, - {517, C<&IHidServer::GetPalmaDataBaseIdentificationVersion>, "GetPalmaDataBaseIdentificationVersion"}, - {518, C<&IHidServer::SuspendPalmaFeature>, "SuspendPalmaFeature"}, - {519, C<&IHidServer::GetPalmaOperationResult>, "GetPalmaOperationResult"}, - {520, C<&IHidServer::ReadPalmaPlayLog>, "ReadPalmaPlayLog"}, - {521, C<&IHidServer::ResetPalmaPlayLog>, "ResetPalmaPlayLog"}, - {522, C<&IHidServer::SetIsPalmaAllConnectable>, "SetIsPalmaAllConnectable"}, - {523, C<&IHidServer::SetIsPalmaPairedConnectable>, "SetIsPalmaPairedConnectable"}, - {524, C<&IHidServer::PairPalma>, "PairPalma"}, - {525, C<&IHidServer::SetPalmaBoostMode>, "SetPalmaBoostMode"}, - {526, C<&IHidServer::CancelWritePalmaWaveEntry>, "CancelWritePalmaWaveEntry"}, - {527, C<&IHidServer::EnablePalmaBoostMode>, "EnablePalmaBoostMode"}, - {528, C<&IHidServer::GetPalmaBluetoothAddress>, "GetPalmaBluetoothAddress"}, - {529, C<&IHidServer::SetDisallowedPalmaConnection>, "SetDisallowedPalmaConnection"}, - {1000, C<&IHidServer::SetNpadCommunicationMode>, "SetNpadCommunicationMode"}, - {1001, C<&IHidServer::GetNpadCommunicationMode>, "GetNpadCommunicationMode"}, - {1002, C<&IHidServer::SetTouchScreenConfiguration>, "SetTouchScreenConfiguration"}, - {1003, C<&IHidServer::IsFirmwareUpdateNeededForNotification>, "IsFirmwareUpdateNeededForNotification"}, - {1004, C<&IHidServer::SetTouchScreenResolution>, "SetTouchScreenResolution"}, - {1270, nullptr, "DeleteButtonConfigStorageRight"}, - {1271, nullptr, "IsUsingCustomButtonConfig"}, - {1272, nullptr, "IsAnyCustomButtonConfigEnabled"}, - {1273, nullptr, "SetAllCustomButtonConfigEnabled"}, - {1274, nullptr, "SetDefaultButtonConfig"}, - {1275, nullptr, "SetAllDefaultButtonConfig"}, - {1276, nullptr, "SetHidButtonConfigEmbedded"}, - {1277, nullptr, "SetHidButtonConfigFull"}, - {1278, nullptr, "SetHidButtonConfigLeft"}, - {1279, nullptr, "SetHidButtonConfigRight"}, - {1280, nullptr, "GetHidButtonConfigEmbedded"}, - {1281, nullptr, "GetHidButtonConfigFull"}, - {1282, nullptr, "GetHidButtonConfigLeft"}, - {1283, nullptr, "GetHidButtonConfigRight"}, - {1284, nullptr, "GetButtonConfigStorageEmbedded"}, - {1285, nullptr, "GetButtonConfigStorageFull"}, - {1286, nullptr, "GetButtonConfigStorageLeft"}, - {1287, nullptr, "GetButtonConfigStorageRight"}, - {1288, nullptr, "SetButtonConfigStorageEmbedded"}, - {1289, nullptr, "SetButtonConfigStorageFull"}, - {1290, nullptr, "SetButtonConfigStorageLeft"}, - {1291, nullptr, "SetButtonConfigStorageRight"}, - {1308, nullptr, "SetButtonConfigVisible"}, - {1309, nullptr, "IsButtonConfigVisible"}, - {1320, nullptr, "WakeTouchScreenUp"}, - {1321, nullptr, "PutTouchScreenToSleep"}, - {1322, nullptr, "AcquireTouchScreenAsyncWakeCompletedEvent"}, - {1323, nullptr, "StartTouchScreenAutoTuneForSystemSettings"}, - {1324, nullptr, "AcquireTouchScreenAutoTuneCompletedEvent"}, - {1325, nullptr, "IsTouchScreenAutoTuneRequiredForRepairProviderReplacement"}, - {1420, nullptr, "GetAppletResourceProperty"}, - {2000, nullptr, "ActivateDigitizer"}, - {3000, nullptr, "GetDebugPadGenericPadMap"}, - {3001, nullptr, "SetDebugPadGenericPadMap"}, - {3002, nullptr, "ResetDebugPadGenericPadMap"}, - {3003, nullptr, "GetDebugPadKeyboardMap"}, - {3004, nullptr, "SetDebugPadKeyboardMap"}, - {3005, nullptr, "ResetDebugPadKeyboardMap"}, - {3006, nullptr, "GetFullKeyGenericPadMap"}, - {3007, nullptr, "SetFullKeyGenericPadMap"}, - {3008, nullptr, "ResetFullKeyGenericPadMap"}, - {3009, nullptr, "GetFullKeyKeyboardMap"}, - {3010, nullptr, "SetFullKeyKeyboardMap"}, - {3011, nullptr, "ResetFullKeyKeyboardMap"}, - {3012, nullptr, "GetDebugPadGenericPadMap"}, //21.0.0+ - {3013, nullptr, "SetDebugPadGenericPadMap"}, //21.0.0+ - {3014, nullptr, "GetDebugPadKeyboardMap"}, //21.0.0+ - {3015, nullptr, "SetDebugPadKeyboardMap"}, //21.0.0+ - {3150, C<&IHidServer::SetMouseLibraryVersion>, "SetMouseLibraryVersion"}, //21.0.0+ + FunctionInfo{0, C<&IHidServer::CreateAppletResource>, "CreateAppletResource"}, + FunctionInfo{1, C<&IHidServer::ActivateDebugPad>, "ActivateDebugPad"}, + FunctionInfo{11, C<&IHidServer::ActivateTouchScreen>, "ActivateTouchScreen"}, + FunctionInfo{21, C<&IHidServer::ActivateMouse>, "ActivateMouse"}, + FunctionInfo{26, C<&IHidServer::ActivateDebugMouse>, "ActivateDebugMouse"}, + FunctionInfo{31, C<&IHidServer::ActivateKeyboard>, "ActivateKeyboard"}, + FunctionInfo{32, C<&IHidServer::SendKeyboardLockKeyEvent>, "SendKeyboardLockKeyEvent"}, + FunctionInfo{40, C<&IHidServer::AcquireXpadIdEventHandle>, "AcquireXpadIdEventHandle"}, + FunctionInfo{41, C<&IHidServer::ReleaseXpadIdEventHandle>, "ReleaseXpadIdEventHandle"}, + FunctionInfo{51, C<&IHidServer::ActivateXpad>, "ActivateXpad"}, + FunctionInfo{55, C<&IHidServer::GetXpadIds>, "GetXpadIds"}, + FunctionInfo{56, C<&IHidServer::ActivateJoyXpad>, "ActivateJoyXpad"}, + FunctionInfo{58, C<&IHidServer::GetJoyXpadLifoHandle>, "GetJoyXpadLifoHandle"}, + FunctionInfo{59, C<&IHidServer::GetJoyXpadIds>, "GetJoyXpadIds"}, + FunctionInfo{60, C<&IHidServer::ActivateSixAxisSensor>, "ActivateSixAxisSensor"}, + FunctionInfo{61, C<&IHidServer::DeactivateSixAxisSensor>, "DeactivateSixAxisSensor"}, + FunctionInfo{62, C<&IHidServer::GetSixAxisSensorLifoHandle>, "GetSixAxisSensorLifoHandle"}, + FunctionInfo{63, C<&IHidServer::ActivateJoySixAxisSensor>, "ActivateJoySixAxisSensor"}, + FunctionInfo{64, C<&IHidServer::DeactivateJoySixAxisSensor>, "DeactivateJoySixAxisSensor"}, + FunctionInfo{65, C<&IHidServer::GetJoySixAxisSensorLifoHandle>, "GetJoySixAxisSensorLifoHandle"}, + FunctionInfo{66, C<&IHidServer::StartSixAxisSensor>, "StartSixAxisSensor"}, + FunctionInfo{67, C<&IHidServer::StopSixAxisSensor>, "StopSixAxisSensor"}, + FunctionInfo{68, C<&IHidServer::IsSixAxisSensorFusionEnabled>, "IsSixAxisSensorFusionEnabled"}, + FunctionInfo{69, C<&IHidServer::EnableSixAxisSensorFusion>, "EnableSixAxisSensorFusion"}, + FunctionInfo{70, C<&IHidServer::SetSixAxisSensorFusionParameters>, "SetSixAxisSensorFusionParameters"}, + FunctionInfo{71, C<&IHidServer::GetSixAxisSensorFusionParameters>, "GetSixAxisSensorFusionParameters"}, + FunctionInfo{72, C<&IHidServer::ResetSixAxisSensorFusionParameters>, "ResetSixAxisSensorFusionParameters"}, + FunctionInfo{73, nullptr, "SetAccelerometerParameters"}, + FunctionInfo{74, nullptr, "GetAccelerometerParameters"}, + FunctionInfo{75, nullptr, "ResetAccelerometerParameters"}, + FunctionInfo{76, nullptr, "SetAccelerometerPlayMode"}, + FunctionInfo{77, nullptr, "GetAccelerometerPlayMode"}, + FunctionInfo{78, nullptr, "ResetAccelerometerPlayMode"}, + FunctionInfo{79, C<&IHidServer::SetGyroscopeZeroDriftMode>, "SetGyroscopeZeroDriftMode"}, + FunctionInfo{80, C<&IHidServer::GetGyroscopeZeroDriftMode>, "GetGyroscopeZeroDriftMode"}, + FunctionInfo{81, C<&IHidServer::ResetGyroscopeZeroDriftMode>, "ResetGyroscopeZeroDriftMode"}, + FunctionInfo{82, C<&IHidServer::IsSixAxisSensorAtRest>, "IsSixAxisSensorAtRest"}, + FunctionInfo{83, C<&IHidServer::IsFirmwareUpdateAvailableForSixAxisSensor>, "IsFirmwareUpdateAvailableForSixAxisSensor"}, + FunctionInfo{84, C<&IHidServer::EnableSixAxisSensorUnalteredPassthrough>, "EnableSixAxisSensorUnalteredPassthrough"}, + FunctionInfo{85, C<&IHidServer::IsSixAxisSensorUnalteredPassthroughEnabled>, "IsSixAxisSensorUnalteredPassthroughEnabled"}, + FunctionInfo{86, nullptr, "StoreSixAxisSensorCalibrationParameter"}, + FunctionInfo{87, C<&IHidServer::LoadSixAxisSensorCalibrationParameter>, "LoadSixAxisSensorCalibrationParameter"}, + FunctionInfo{88, C<&IHidServer::GetSixAxisSensorIcInformation>, "GetSixAxisSensorIcInformation"}, + FunctionInfo{89, C<&IHidServer::ResetIsSixAxisSensorDeviceNewlyAssigned>, "ResetIsSixAxisSensorDeviceNewlyAssigned"}, + FunctionInfo{91, C<&IHidServer::ActivateGesture>, "ActivateGesture"}, + FunctionInfo{92, C<&IHidServer::SetGestureOutputRanges>, "SetGestureOutputRanges"}, + FunctionInfo{100, C<&IHidServer::SetSupportedNpadStyleSet>, "SetSupportedNpadStyleSet"}, + FunctionInfo{101, C<&IHidServer::GetSupportedNpadStyleSet>, "GetSupportedNpadStyleSet"}, + FunctionInfo{102, C<&IHidServer::SetSupportedNpadIdType>, "SetSupportedNpadIdType"}, + FunctionInfo{103, C<&IHidServer::ActivateNpad>, "ActivateNpad"}, + FunctionInfo{104, C<&IHidServer::DeactivateNpad>, "DeactivateNpad"}, + FunctionInfo{106, C<&IHidServer::AcquireNpadStyleSetUpdateEventHandle>, "AcquireNpadStyleSetUpdateEventHandle"}, + FunctionInfo{107, C<&IHidServer::DisconnectNpad>, "DisconnectNpad"}, + FunctionInfo{108, C<&IHidServer::GetPlayerLedPattern>, "GetPlayerLedPattern"}, + FunctionInfo{109, C<&IHidServer::ActivateNpadWithRevision>, "ActivateNpadWithRevision"}, + FunctionInfo{120, C<&IHidServer::SetNpadJoyHoldType>, "SetNpadJoyHoldType"}, + FunctionInfo{121, C<&IHidServer::GetNpadJoyHoldType>, "GetNpadJoyHoldType"}, + FunctionInfo{122, C<&IHidServer::SetNpadJoyAssignmentModeSingleByDefault>, "SetNpadJoyAssignmentModeSingleByDefault"}, + FunctionInfo{123, C<&IHidServer::SetNpadJoyAssignmentModeSingle>, "SetNpadJoyAssignmentModeSingle"}, + FunctionInfo{124, C<&IHidServer::SetNpadJoyAssignmentModeDual>, "SetNpadJoyAssignmentModeDual"}, + FunctionInfo{125, C<&IHidServer::MergeSingleJoyAsDualJoy>, "MergeSingleJoyAsDualJoy"}, + FunctionInfo{126, C<&IHidServer::StartLrAssignmentMode>, "StartLrAssignmentMode"}, + FunctionInfo{127, C<&IHidServer::StopLrAssignmentMode>, "StopLrAssignmentMode"}, + FunctionInfo{128, C<&IHidServer::SetNpadHandheldActivationMode>, "SetNpadHandheldActivationMode"}, + FunctionInfo{129, C<&IHidServer::GetNpadHandheldActivationMode>, "GetNpadHandheldActivationMode"}, + FunctionInfo{130, C<&IHidServer::SwapNpadAssignment>, "SwapNpadAssignment"}, + FunctionInfo{131, C<&IHidServer::IsUnintendedHomeButtonInputProtectionEnabled>, "IsUnintendedHomeButtonInputProtectionEnabled"}, + FunctionInfo{132, C<&IHidServer::EnableUnintendedHomeButtonInputProtection>, "EnableUnintendedHomeButtonInputProtection"}, + FunctionInfo{133, C<&IHidServer::SetNpadJoyAssignmentModeSingleWithDestination>, "SetNpadJoyAssignmentModeSingleWithDestination"}, + FunctionInfo{134, C<&IHidServer::SetNpadAnalogStickUseCenterClamp>, "SetNpadAnalogStickUseCenterClamp"}, + FunctionInfo{135, C<&IHidServer::SetNpadCaptureButtonAssignment>, "SetNpadCaptureButtonAssignment"}, + FunctionInfo{136, C<&IHidServer::ClearNpadCaptureButtonAssignment>, "ClearNpadCaptureButtonAssignment"}, + FunctionInfo{200, C<&IHidServer::GetVibrationDeviceInfo>, "GetVibrationDeviceInfo"}, + FunctionInfo{201, C<&IHidServer::SendVibrationValue>, "SendVibrationValue"}, + FunctionInfo{202, C<&IHidServer::GetActualVibrationValue>, "GetActualVibrationValue"}, + FunctionInfo{203, C<&IHidServer::CreateActiveVibrationDeviceList>, "CreateActiveVibrationDeviceList"}, + FunctionInfo{204, C<&IHidServer::PermitVibration>, "PermitVibration"}, + FunctionInfo{205, C<&IHidServer::IsVibrationPermitted>, "IsVibrationPermitted"}, + FunctionInfo{206, C<&IHidServer::SendVibrationValues>, "SendVibrationValues"}, + FunctionInfo{207, C<&IHidServer::SendVibrationGcErmCommand>, "SendVibrationGcErmCommand"}, + FunctionInfo{208, C<&IHidServer::GetActualVibrationGcErmCommand>, "GetActualVibrationGcErmCommand"}, + FunctionInfo{209, C<&IHidServer::BeginPermitVibrationSession>, "BeginPermitVibrationSession"}, + FunctionInfo{210, C<&IHidServer::EndPermitVibrationSession>, "EndPermitVibrationSession"}, + FunctionInfo{211, C<&IHidServer::IsVibrationDeviceMounted>, "IsVibrationDeviceMounted"}, + FunctionInfo{212, C<&IHidServer::SendVibrationValueInBool>, "SendVibrationValueInBool"}, + FunctionInfo{300, C<&IHidServer::ActivateConsoleSixAxisSensor>, "ActivateConsoleSixAxisSensor"}, + FunctionInfo{301, C<&IHidServer::StartConsoleSixAxisSensor>, "StartConsoleSixAxisSensor"}, + FunctionInfo{302, C<&IHidServer::StopConsoleSixAxisSensor>, "StopConsoleSixAxisSensor"}, + FunctionInfo{303, C<&IHidServer::ActivateSevenSixAxisSensor>, "ActivateSevenSixAxisSensor"}, + FunctionInfo{304, C<&IHidServer::StartSevenSixAxisSensor>, "StartSevenSixAxisSensor"}, + FunctionInfo{305, C<&IHidServer::StopSevenSixAxisSensor>, "StopSevenSixAxisSensor"}, + FunctionInfo{306, C<&IHidServer::InitializeSevenSixAxisSensor>, "InitializeSevenSixAxisSensor"}, + FunctionInfo{307, C<&IHidServer::FinalizeSevenSixAxisSensor>, "FinalizeSevenSixAxisSensor"}, + FunctionInfo{308, nullptr, "SetSevenSixAxisSensorFusionStrength"}, + FunctionInfo{309, nullptr, "GetSevenSixAxisSensorFusionStrength"}, + FunctionInfo{310, C<&IHidServer::ResetSevenSixAxisSensorTimestamp>, "ResetSevenSixAxisSensorTimestamp"}, + FunctionInfo{320, nullptr, "EnableNpadImu"}, //21.0.0+ + FunctionInfo{321, nullptr, "DisableNpadImu"}, //21.0.0+ + FunctionInfo{400, C<&IHidServer::IsUsbFullKeyControllerEnabled>, "IsUsbFullKeyControllerEnabled"}, + FunctionInfo{401, nullptr, "EnableUsbFullKeyController"}, + FunctionInfo{402, nullptr, "IsUsbFullKeyControllerConnected"}, + FunctionInfo{403, nullptr, "HasBattery"}, + FunctionInfo{404, nullptr, "HasLeftRightBattery"}, + FunctionInfo{405, nullptr, "GetNpadInterfaceType"}, + FunctionInfo{406, nullptr, "GetNpadLeftRightInterfaceType"}, + FunctionInfo{407, nullptr, "GetNpadOfHighestBatteryLevel"}, + FunctionInfo{408, nullptr, "GetNpadOfHighestBatteryLevelForJoyRight"}, + FunctionInfo{500, C<&IHidServer::GetPalmaConnectionHandle>, "GetPalmaConnectionHandle"}, + FunctionInfo{501, C<&IHidServer::InitializePalma>, "InitializePalma"}, + FunctionInfo{502, C<&IHidServer::AcquirePalmaOperationCompleteEvent>, "AcquirePalmaOperationCompleteEvent"}, + FunctionInfo{503, C<&IHidServer::GetPalmaOperationInfo>, "GetPalmaOperationInfo"}, + FunctionInfo{504, C<&IHidServer::PlayPalmaActivity>, "PlayPalmaActivity"}, + FunctionInfo{505, C<&IHidServer::SetPalmaFrModeType>, "SetPalmaFrModeType"}, + FunctionInfo{506, C<&IHidServer::ReadPalmaStep>, "ReadPalmaStep"}, + FunctionInfo{507, C<&IHidServer::EnablePalmaStep>, "EnablePalmaStep"}, + FunctionInfo{508, C<&IHidServer::ResetPalmaStep>, "ResetPalmaStep"}, + FunctionInfo{509, C<&IHidServer::ReadPalmaApplicationSection>, "ReadPalmaApplicationSection"}, + FunctionInfo{510, C<&IHidServer::WritePalmaApplicationSection>, "WritePalmaApplicationSection"}, + FunctionInfo{511, C<&IHidServer::ReadPalmaUniqueCode>, "ReadPalmaUniqueCode"}, + FunctionInfo{512, C<&IHidServer::SetPalmaUniqueCodeInvalid>, "SetPalmaUniqueCodeInvalid"}, + FunctionInfo{513, C<&IHidServer::WritePalmaActivityEntry>, "WritePalmaActivityEntry"}, + FunctionInfo{514, C<&IHidServer::WritePalmaRgbLedPatternEntry>, "WritePalmaRgbLedPatternEntry"}, + FunctionInfo{515, C<&IHidServer::WritePalmaWaveEntry>, "WritePalmaWaveEntry"}, + FunctionInfo{516, C<&IHidServer::SetPalmaDataBaseIdentificationVersion>, "SetPalmaDataBaseIdentificationVersion"}, + FunctionInfo{517, C<&IHidServer::GetPalmaDataBaseIdentificationVersion>, "GetPalmaDataBaseIdentificationVersion"}, + FunctionInfo{518, C<&IHidServer::SuspendPalmaFeature>, "SuspendPalmaFeature"}, + FunctionInfo{519, C<&IHidServer::GetPalmaOperationResult>, "GetPalmaOperationResult"}, + FunctionInfo{520, C<&IHidServer::ReadPalmaPlayLog>, "ReadPalmaPlayLog"}, + FunctionInfo{521, C<&IHidServer::ResetPalmaPlayLog>, "ResetPalmaPlayLog"}, + FunctionInfo{522, C<&IHidServer::SetIsPalmaAllConnectable>, "SetIsPalmaAllConnectable"}, + FunctionInfo{523, C<&IHidServer::SetIsPalmaPairedConnectable>, "SetIsPalmaPairedConnectable"}, + FunctionInfo{524, C<&IHidServer::PairPalma>, "PairPalma"}, + FunctionInfo{525, C<&IHidServer::SetPalmaBoostMode>, "SetPalmaBoostMode"}, + FunctionInfo{526, C<&IHidServer::CancelWritePalmaWaveEntry>, "CancelWritePalmaWaveEntry"}, + FunctionInfo{527, C<&IHidServer::EnablePalmaBoostMode>, "EnablePalmaBoostMode"}, + FunctionInfo{528, C<&IHidServer::GetPalmaBluetoothAddress>, "GetPalmaBluetoothAddress"}, + FunctionInfo{529, C<&IHidServer::SetDisallowedPalmaConnection>, "SetDisallowedPalmaConnection"}, + FunctionInfo{1000, C<&IHidServer::SetNpadCommunicationMode>, "SetNpadCommunicationMode"}, + FunctionInfo{1001, C<&IHidServer::GetNpadCommunicationMode>, "GetNpadCommunicationMode"}, + FunctionInfo{1002, C<&IHidServer::SetTouchScreenConfiguration>, "SetTouchScreenConfiguration"}, + FunctionInfo{1003, C<&IHidServer::IsFirmwareUpdateNeededForNotification>, "IsFirmwareUpdateNeededForNotification"}, + FunctionInfo{1004, C<&IHidServer::SetTouchScreenResolution>, "SetTouchScreenResolution"}, + FunctionInfo{1270, nullptr, "DeleteButtonConfigStorageRight"}, + FunctionInfo{1271, nullptr, "IsUsingCustomButtonConfig"}, + FunctionInfo{1272, nullptr, "IsAnyCustomButtonConfigEnabled"}, + FunctionInfo{1273, nullptr, "SetAllCustomButtonConfigEnabled"}, + FunctionInfo{1274, nullptr, "SetDefaultButtonConfig"}, + FunctionInfo{1275, nullptr, "SetAllDefaultButtonConfig"}, + FunctionInfo{1276, nullptr, "SetHidButtonConfigEmbedded"}, + FunctionInfo{1277, nullptr, "SetHidButtonConfigFull"}, + FunctionInfo{1278, nullptr, "SetHidButtonConfigLeft"}, + FunctionInfo{1279, nullptr, "SetHidButtonConfigRight"}, + FunctionInfo{1280, nullptr, "GetHidButtonConfigEmbedded"}, + FunctionInfo{1281, nullptr, "GetHidButtonConfigFull"}, + FunctionInfo{1282, nullptr, "GetHidButtonConfigLeft"}, + FunctionInfo{1283, nullptr, "GetHidButtonConfigRight"}, + FunctionInfo{1284, nullptr, "GetButtonConfigStorageEmbedded"}, + FunctionInfo{1285, nullptr, "GetButtonConfigStorageFull"}, + FunctionInfo{1286, nullptr, "GetButtonConfigStorageLeft"}, + FunctionInfo{1287, nullptr, "GetButtonConfigStorageRight"}, + FunctionInfo{1288, nullptr, "SetButtonConfigStorageEmbedded"}, + FunctionInfo{1289, nullptr, "SetButtonConfigStorageFull"}, + FunctionInfo{1290, nullptr, "SetButtonConfigStorageLeft"}, + FunctionInfo{1291, nullptr, "SetButtonConfigStorageRight"}, + FunctionInfo{1308, nullptr, "SetButtonConfigVisible"}, + FunctionInfo{1309, nullptr, "IsButtonConfigVisible"}, + FunctionInfo{1320, nullptr, "WakeTouchScreenUp"}, + FunctionInfo{1321, nullptr, "PutTouchScreenToSleep"}, + FunctionInfo{1322, nullptr, "AcquireTouchScreenAsyncWakeCompletedEvent"}, + FunctionInfo{1323, nullptr, "StartTouchScreenAutoTuneForSystemSettings"}, + FunctionInfo{1324, nullptr, "AcquireTouchScreenAutoTuneCompletedEvent"}, + FunctionInfo{1325, nullptr, "IsTouchScreenAutoTuneRequiredForRepairProviderReplacement"}, + FunctionInfo{1420, nullptr, "GetAppletResourceProperty"}, + FunctionInfo{2000, nullptr, "ActivateDigitizer"}, + FunctionInfo{3000, nullptr, "GetDebugPadGenericPadMap"}, + FunctionInfo{3001, nullptr, "SetDebugPadGenericPadMap"}, + FunctionInfo{3002, nullptr, "ResetDebugPadGenericPadMap"}, + FunctionInfo{3003, nullptr, "GetDebugPadKeyboardMap"}, + FunctionInfo{3004, nullptr, "SetDebugPadKeyboardMap"}, + FunctionInfo{3005, nullptr, "ResetDebugPadKeyboardMap"}, + FunctionInfo{3006, nullptr, "GetFullKeyGenericPadMap"}, + FunctionInfo{3007, nullptr, "SetFullKeyGenericPadMap"}, + FunctionInfo{3008, nullptr, "ResetFullKeyGenericPadMap"}, + FunctionInfo{3009, nullptr, "GetFullKeyKeyboardMap"}, + FunctionInfo{3010, nullptr, "SetFullKeyKeyboardMap"}, + FunctionInfo{3011, nullptr, "ResetFullKeyKeyboardMap"}, + FunctionInfo{3012, nullptr, "GetDebugPadGenericPadMap"}, //21.0.0+ + FunctionInfo{3013, nullptr, "SetDebugPadGenericPadMap"}, //21.0.0+ + FunctionInfo{3014, nullptr, "GetDebugPadKeyboardMap"}, //21.0.0+ + FunctionInfo{3015, nullptr, "SetDebugPadKeyboardMap"}, //21.0.0+ + FunctionInfo{3150, C<&IHidServer::SetMouseLibraryVersion>, "SetMouseLibraryVersion"}, //21.0.0+ // What? -- {12010, nullptr, "SetButtonConfigLeft"}, }; // clang-format on diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp index e544adf03c..d46be24c80 100644 --- a/src/core/hle/service/hid/hid_system_server.cpp +++ b/src/core/hle/service/hid/hid_system_server.cpp @@ -24,246 +24,246 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr, "GetBusHandle"}, FunctionInfo{2, C<&Hidbus::IsExternalDeviceConnected>, "IsExternalDeviceConnected"}, FunctionInfo{3, C<&Hidbus::Initialize>, "Initialize"}, @@ -44,11 +47,8 @@ Hidbus::Hidbus(Core::System& system_) FunctionInfo{11, C<&Hidbus::EnableJoyPollingReceiveMode>, "EnableJoyPollingReceiveMode"}, FunctionInfo{12, C<&Hidbus::DisableJoyPollingReceiveMode>, "DisableJoyPollingReceiveMode"}, FunctionInfo{13, nullptr, "GetPollingData"}, - FunctionInfo{14, C<&Hidbus::SetStatusManagerType>, "SetStatusManagerType"}, - }; - // clang-format on - - RegisterHandlers(functions); + FunctionInfo{14, C<&Hidbus::SetStatusManagerType>, "SetStatusManagerType"} + ); // Register update callbacks hidbus_update_event = Core::Timing::CreateEvent( diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp index 3d87e6788d..43aabd36d4 100644 --- a/src/core/hle/service/hid/irs.cpp +++ b/src/core/hle/service/hid/irs.cpp @@ -32,24 +32,24 @@ namespace Service::IRS { IRS::IRS(Core::System& system_) : ServiceFramework{system_, "irs"} { // clang-format off static const FunctionInfo functions[] = { - {302, C<&IRS::ActivateIrsensor>, "ActivateIrsensor"}, - {303, C<&IRS::DeactivateIrsensor>, "DeactivateIrsensor"}, - {304, C<&IRS::GetIrsensorSharedMemoryHandle>, "GetIrsensorSharedMemoryHandle"}, - {305, C<&IRS::StopImageProcessor>, "StopImageProcessor"}, - {306, C<&IRS::RunMomentProcessor>, "RunMomentProcessor"}, - {307, C<&IRS::RunClusteringProcessor>, "RunClusteringProcessor"}, - {308, C<&IRS::RunImageTransferProcessor>, "RunImageTransferProcessor"}, - {309, C<&IRS::GetImageTransferProcessorState>, "GetImageTransferProcessorState"}, - {310, C<&IRS::RunTeraPluginProcessor>, "RunTeraPluginProcessor"}, - {311, C<&IRS::GetNpadIrCameraHandle>, "GetNpadIrCameraHandle"}, - {312, C<&IRS::RunPointingProcessor>, "RunPointingProcessor"}, - {313, C<&IRS::SuspendImageProcessor>, "SuspendImageProcessor"}, - {314, C<&IRS::CheckFirmwareVersion>, "CheckFirmwareVersion"}, - {315, C<&IRS::SetFunctionLevel>, "SetFunctionLevel"}, - {316, C<&IRS::RunImageTransferExProcessor>, "RunImageTransferExProcessor"}, - {317, C<&IRS::RunIrLedProcessor>, "RunIrLedProcessor"}, - {318, C<&IRS::StopImageProcessorAsync>, "StopImageProcessorAsync"}, - {319, C<&IRS::ActivateIrsensorWithFunctionLevel>, "ActivateIrsensorWithFunctionLevel"}, + FunctionInfo{302, C<&IRS::ActivateIrsensor>, "ActivateIrsensor"}, + FunctionInfo{303, C<&IRS::DeactivateIrsensor>, "DeactivateIrsensor"}, + FunctionInfo{304, C<&IRS::GetIrsensorSharedMemoryHandle>, "GetIrsensorSharedMemoryHandle"}, + FunctionInfo{305, C<&IRS::StopImageProcessor>, "StopImageProcessor"}, + FunctionInfo{306, C<&IRS::RunMomentProcessor>, "RunMomentProcessor"}, + FunctionInfo{307, C<&IRS::RunClusteringProcessor>, "RunClusteringProcessor"}, + FunctionInfo{308, C<&IRS::RunImageTransferProcessor>, "RunImageTransferProcessor"}, + FunctionInfo{309, C<&IRS::GetImageTransferProcessorState>, "GetImageTransferProcessorState"}, + FunctionInfo{310, C<&IRS::RunTeraPluginProcessor>, "RunTeraPluginProcessor"}, + FunctionInfo{311, C<&IRS::GetNpadIrCameraHandle>, "GetNpadIrCameraHandle"}, + FunctionInfo{312, C<&IRS::RunPointingProcessor>, "RunPointingProcessor"}, + FunctionInfo{313, C<&IRS::SuspendImageProcessor>, "SuspendImageProcessor"}, + FunctionInfo{314, C<&IRS::CheckFirmwareVersion>, "CheckFirmwareVersion"}, + FunctionInfo{315, C<&IRS::SetFunctionLevel>, "SetFunctionLevel"}, + FunctionInfo{316, C<&IRS::RunImageTransferExProcessor>, "RunImageTransferExProcessor"}, + FunctionInfo{317, C<&IRS::RunIrLedProcessor>, "RunIrLedProcessor"}, + FunctionInfo{318, C<&IRS::StopImageProcessorAsync>, "StopImageProcessorAsync"}, + FunctionInfo{319, C<&IRS::ActivateIrsensorWithFunctionLevel>, "ActivateIrsensorWithFunctionLevel"}, }; // clang-format on @@ -369,16 +369,6 @@ Core::IrSensor::DeviceFormat& IRS::GetIrCameraSharedMemoryDeviceEntry( } IRS_SYS::IRS_SYS(Core::System& system_) : ServiceFramework{system_, "irs:sys"} { - // clang-format off - static const FunctionInfo functions[] = { - {500, nullptr, "SetAppletResourceUserId"}, - {501, nullptr, "RegisterAppletResourceUserId"}, - {502, nullptr, "UnregisterAppletResourceUserId"}, - {503, nullptr, "EnableAppletToGetInput"}, - }; - // clang-format on - - RegisterHandlers(functions); } IRS_SYS::~IRS_SYS() = default; diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h index 58dfee6c36..b7266a6ce5 100644 --- a/src/core/hle/service/hid/irs.h +++ b/src/core/hle/service/hid/irs.h @@ -163,6 +163,16 @@ class IRS_SYS final : public ServiceFramework { public: explicit IRS_SYS(Core::System& system); ~IRS_SYS() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{500, nullptr, "SetAppletResourceUserId"}, + FunctionInfo{501, nullptr, "RegisterAppletResourceUserId"}, + FunctionInfo{502, nullptr, "UnregisterAppletResourceUserId"}, + FunctionInfo{503, nullptr, "EnableAppletToGetInput"} + ); }; } // namespace Service::IRS diff --git a/src/core/hle/service/hid/xcd.cpp b/src/core/hle/service/hid/xcd.cpp index 75cc266ea9..b6ef71c555 100644 --- a/src/core/hle/service/hid/xcd.cpp +++ b/src/core/hle/service/hid/xcd.cpp @@ -6,33 +6,6 @@ namespace Service::HID { XCD_SYS::XCD_SYS(Core::System& system_) : ServiceFramework{system_, "xcd:sys"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetDataFormat"}, - {1, nullptr, "SetDataFormat"}, - {2, nullptr, "GetMcuState"}, - {3, nullptr, "SetMcuState"}, - {4, nullptr, "GetMcuVersionForNfc"}, - {5, nullptr, "CheckNfcDevicePower"}, - {10, nullptr, "SetNfcEvent"}, - {11, nullptr, "GetNfcInfo"}, - {12, nullptr, "StartNfcDiscovery"}, - {13, nullptr, "StopNfcDiscovery"}, - {14, nullptr, "StartNtagRead"}, - {15, nullptr, "StartNtagWrite"}, - {16, nullptr, "SendNfcRawData"}, - {17, nullptr, "RegisterMifareKey"}, - {18, nullptr, "ClearMifareKey"}, - {19, nullptr, "StartMifareRead"}, - {20, nullptr, "StartMifareWrite"}, - {101, nullptr, "GetAwakeTriggerReasonForLeftRail"}, - {102, nullptr, "GetAwakeTriggerReasonForRightRail"}, - {103, nullptr, "GetAwakeTriggerBatteryLevelTransitionForLeftRail"}, - {104, nullptr, "GetAwakeTriggerBatteryLevelTransitionForRightRail"}, - }; - // clang-format on - - RegisterHandlers(functions); } XCD_SYS::~XCD_SYS() = default; diff --git a/src/core/hle/service/hid/xcd.h b/src/core/hle/service/hid/xcd.h index fe0b91b919..dd2e78ff3f 100644 --- a/src/core/hle/service/hid/xcd.h +++ b/src/core/hle/service/hid/xcd.h @@ -15,6 +15,33 @@ class XCD_SYS final : public ServiceFramework { public: explicit XCD_SYS(Core::System& system_); ~XCD_SYS() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetDataFormat"}, + FunctionInfo{1, nullptr, "SetDataFormat"}, + FunctionInfo{2, nullptr, "GetMcuState"}, + FunctionInfo{3, nullptr, "SetMcuState"}, + FunctionInfo{4, nullptr, "GetMcuVersionForNfc"}, + FunctionInfo{5, nullptr, "CheckNfcDevicePower"}, + FunctionInfo{10, nullptr, "SetNfcEvent"}, + FunctionInfo{11, nullptr, "GetNfcInfo"}, + FunctionInfo{12, nullptr, "StartNfcDiscovery"}, + FunctionInfo{13, nullptr, "StopNfcDiscovery"}, + FunctionInfo{14, nullptr, "StartNtagRead"}, + FunctionInfo{15, nullptr, "StartNtagWrite"}, + FunctionInfo{16, nullptr, "SendNfcRawData"}, + FunctionInfo{17, nullptr, "RegisterMifareKey"}, + FunctionInfo{18, nullptr, "ClearMifareKey"}, + FunctionInfo{19, nullptr, "StartMifareRead"}, + FunctionInfo{20, nullptr, "StartMifareWrite"}, + FunctionInfo{101, nullptr, "GetAwakeTriggerReasonForLeftRail"}, + FunctionInfo{102, nullptr, "GetAwakeTriggerReasonForRightRail"}, + FunctionInfo{103, nullptr, "GetAwakeTriggerBatteryLevelTransitionForLeftRail"}, + FunctionInfo{104, nullptr, "GetAwakeTriggerBatteryLevelTransitionForRightRail"} + ); }; } // namespace Service::HID diff --git a/src/core/hle/service/ldn/monitor_service.cpp b/src/core/hle/service/ldn/monitor_service.cpp index ea6ac4d5dd..797a84006f 100644 --- a/src/core/hle/service/ldn/monitor_service.cpp +++ b/src/core/hle/service/ldn/monitor_service.cpp @@ -9,20 +9,6 @@ namespace Service::LDN { IMonitorService::IMonitorService(Core::System& system_) : ServiceFramework{system_, "IMonitorService"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, C<&IMonitorService::GetStateForMonitor>, "GetStateForMonitor"}, - {1, nullptr, "GetNetworkInfoForMonitor"}, - {2, nullptr, "GetIpv4AddressForMonitor"}, - {3, nullptr, "GetDisconnectReasonForMonitor"}, - {4, nullptr, "GetSecurityParameterForMonitor"}, - {5, nullptr, "GetNetworkConfigForMonitor"}, - {100, C<&IMonitorService::InitializeMonitor>, "InitializeMonitor"}, - {101, C<&IMonitorService::FinalizeMonitor>, "FinalizeMonitor"}, - }; - // clang-format on - - RegisterHandlers(functions); } IMonitorService::~IMonitorService() = default; diff --git a/src/core/hle/service/ldn/monitor_service.h b/src/core/hle/service/ldn/monitor_service.h index e663145b4f..431c665d46 100644 --- a/src/core/hle/service/ldn/monitor_service.h +++ b/src/core/hle/service/ldn/monitor_service.h @@ -23,6 +23,19 @@ private: Result InitializeMonitor(); Result FinalizeMonitor(); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&IMonitorService::GetStateForMonitor>, "GetStateForMonitor"}, + FunctionInfo{1, nullptr, "GetNetworkInfoForMonitor"}, + FunctionInfo{2, nullptr, "GetIpv4AddressForMonitor"}, + FunctionInfo{3, nullptr, "GetDisconnectReasonForMonitor"}, + FunctionInfo{4, nullptr, "GetSecurityParameterForMonitor"}, + FunctionInfo{5, nullptr, "GetNetworkConfigForMonitor"}, + FunctionInfo{100, C<&IMonitorService::InitializeMonitor>, "InitializeMonitor"}, + FunctionInfo{101, C<&IMonitorService::FinalizeMonitor>, "FinalizeMonitor"} + ); State state{State::None}; }; diff --git a/src/core/hle/service/ldn/sf_monitor_service.cpp b/src/core/hle/service/ldn/sf_monitor_service.cpp index ff064cdab6..7d929911d0 100644 --- a/src/core/hle/service/ldn/sf_monitor_service.cpp +++ b/src/core/hle/service/ldn/sf_monitor_service.cpp @@ -13,14 +13,14 @@ namespace Service::LDN { ISfMonitorService::ISfMonitorService(Core::System& system_) : ServiceFramework{system_, "ISfMonitorService"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&ISfMonitorService::Initialize>, "Initialize"}, FunctionInfo{288, C<&ISfMonitorService::GetGroupInfo>, "GetGroupInfo"}, FunctionInfo{320, nullptr, "GetLinkLevel"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } ISfMonitorService::~ISfMonitorService() = default; diff --git a/src/core/hle/service/ldn/sf_service.cpp b/src/core/hle/service/ldn/sf_service.cpp index 73ee6af29f..cb003d1a63 100644 --- a/src/core/hle/service/ldn/sf_service.cpp +++ b/src/core/hle/service/ldn/sf_service.cpp @@ -9,30 +9,6 @@ namespace Service::LDN { ISfService::ISfService(Core::System& system_) : ServiceFramework{system_, "ISfService"} { - // clang-format off - static const FunctionInfo functions[] = { - FunctionInfo{0, nullptr, "Initialize"}, - FunctionInfo{256, nullptr, "AttachNetworkInterfaceStateChangeEvent"}, - FunctionInfo{264, nullptr, "GetNetworkInterfaceLastError"}, - FunctionInfo{272, nullptr, "GetRole"}, - FunctionInfo{280, nullptr, "GetAdvertiseData"}, - FunctionInfo{288, nullptr, "GetGroupInfo"}, - FunctionInfo{296, nullptr, "GetGroupInfo2"}, - FunctionInfo{304, nullptr, "GetGroupOwner"}, - FunctionInfo{312, nullptr, "GetIpConfig"}, - FunctionInfo{320, nullptr, "GetLinkLevel"}, - FunctionInfo{512, nullptr, "Scan"}, - FunctionInfo{768, nullptr, "CreateGroup"}, - FunctionInfo{776, nullptr, "DestroyGroup"}, - FunctionInfo{784, nullptr, "SetAdvertiseData"}, - FunctionInfo{1536, nullptr, "SendToOtherGroup"}, - FunctionInfo{1544, nullptr, "RecvFromOtherGroup"}, - FunctionInfo{1552, nullptr, "AddAcceptableGroupId"}, - FunctionInfo{1560, nullptr, "ClearAcceptableGroupId"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISfService::~ISfService() = default; diff --git a/src/core/hle/service/ldn/sf_service.h b/src/core/hle/service/ldn/sf_service.h index 05534b5677..6ab335d56b 100644 --- a/src/core/hle/service/ldn/sf_service.h +++ b/src/core/hle/service/ldn/sf_service.h @@ -16,6 +16,30 @@ class ISfService final : public ServiceFramework { public: explicit ISfService(Core::System& system_); ~ISfService() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "Initialize"}, + FunctionInfo{256, nullptr, "AttachNetworkInterfaceStateChangeEvent"}, + FunctionInfo{264, nullptr, "GetNetworkInterfaceLastError"}, + FunctionInfo{272, nullptr, "GetRole"}, + FunctionInfo{280, nullptr, "GetAdvertiseData"}, + FunctionInfo{288, nullptr, "GetGroupInfo"}, + FunctionInfo{296, nullptr, "GetGroupInfo2"}, + FunctionInfo{304, nullptr, "GetGroupOwner"}, + FunctionInfo{312, nullptr, "GetIpConfig"}, + FunctionInfo{320, nullptr, "GetLinkLevel"}, + FunctionInfo{512, nullptr, "Scan"}, + FunctionInfo{768, nullptr, "CreateGroup"}, + FunctionInfo{776, nullptr, "DestroyGroup"}, + FunctionInfo{784, nullptr, "SetAdvertiseData"}, + FunctionInfo{1536, nullptr, "SendToOtherGroup"}, + FunctionInfo{1544, nullptr, "RecvFromOtherGroup"}, + FunctionInfo{1552, nullptr, "AddAcceptableGroupId"}, + FunctionInfo{1560, nullptr, "ClearAcceptableGroupId"} + ); }; } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_service_monitor.cpp b/src/core/hle/service/ldn/sf_service_monitor.cpp index 2f5f21ec23..4db73ff733 100644 --- a/src/core/hle/service/ldn/sf_service_monitor.cpp +++ b/src/core/hle/service/ldn/sf_service_monitor.cpp @@ -13,7 +13,10 @@ namespace Service::LDN { ISfServiceMonitor::ISfServiceMonitor(Core::System& system_) : ServiceFramework{system_, "ISfServiceMonitor"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&ISfServiceMonitor::Initialize>, "Initialize"}, FunctionInfo{256, nullptr, "AttachNetworkInterfaceStateChangeEvent"}, FunctionInfo{264, nullptr, "GetNetworkInterfaceLastError"}, @@ -27,10 +30,7 @@ ISfServiceMonitor::ISfServiceMonitor(Core::System& system_) FunctionInfo{320, nullptr, "GetLinkLevel"}, FunctionInfo{328, nullptr, "AttachJoinEvent"}, FunctionInfo{336, nullptr, "GetMembers"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } ISfServiceMonitor::~ISfServiceMonitor() = default; diff --git a/src/core/hle/service/ldn/system_local_communication_service.cpp b/src/core/hle/service/ldn/system_local_communication_service.cpp index 82923795b4..18d5ee6826 100644 --- a/src/core/hle/service/ldn/system_local_communication_service.cpp +++ b/src/core/hle/service/ldn/system_local_communication_service.cpp @@ -12,7 +12,10 @@ namespace Service::LDN { ISystemLocalCommunicationService::ISystemLocalCommunicationService(Core::System& system_) : ServiceFramework{system_, "ISystemLocalCommunicationService"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetState"}, FunctionInfo{1, nullptr, "GetNetworkInfo"}, FunctionInfo{2, nullptr, "GetIpv4Address"}, @@ -43,10 +46,7 @@ ISystemLocalCommunicationService::ISystemLocalCommunicationService(Core::System& FunctionInfo{401, nullptr, "FinalizeSystem"}, FunctionInfo{402, nullptr, "SetOperationMode"}, FunctionInfo{403, C<&ISystemLocalCommunicationService::InitializeSystem2>, "InitializeSystem2"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } ISystemLocalCommunicationService::~ISystemLocalCommunicationService() = default; diff --git a/src/core/hle/service/ldn/user_local_communication_service.cpp b/src/core/hle/service/ldn/user_local_communication_service.cpp index 097e3b2910..81048260a2 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.cpp +++ b/src/core/hle/service/ldn/user_local_communication_service.cpp @@ -26,7 +26,10 @@ IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& sys service_context{system, "IUserLocalCommunicationService"}, lan_discovery{} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IUserLocalCommunicationService::GetState>, "GetState"}, FunctionInfo{1, D<&IUserLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"}, FunctionInfo{2, D<&IUserLocalCommunicationService::GetIpv4Address>, "GetIpv4Address"}, @@ -57,10 +60,7 @@ IUserLocalCommunicationService::IUserLocalCommunicationService(Core::System& sys FunctionInfo{400, D<&IUserLocalCommunicationService::Initialize>, "Initialize"}, FunctionInfo{401, D<&IUserLocalCommunicationService::Finalize>, "Finalize"}, FunctionInfo{402, D<&IUserLocalCommunicationService::Initialize2>, "Initialize2"} - }; - // clang-format on - - RegisterHandlers(functions); + ); state_change_event = service_context.CreateEvent("IUserLocalCommunicationService:StateChangeEvent"); diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index aea67a971a..21cc9862b8 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp @@ -296,13 +296,6 @@ private: IStaticService::IStaticService(Core::System& system_, const char* name_, std::shared_ptr mii_manager, bool is_system_) : ServiceFramework{system_, name_}, manager{mii_manager}, is_system{is_system_} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IStaticService::GetDatabaseService>, "GetDatabaseService"}, - }; - // clang-format on - - RegisterHandlers(functions); } IStaticService::~IStaticService() = default; diff --git a/src/core/hle/service/mii/mii.h b/src/core/hle/service/mii/mii.h index 8683ac1a52..4c7e9415e3 100644 --- a/src/core/hle/service/mii/mii.h +++ b/src/core/hle/service/mii/mii.h @@ -24,6 +24,12 @@ public: private: Result GetDatabaseService(Out> out_database_service); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IStaticService::GetDatabaseService>, "GetDatabaseService"} + ); std::shared_ptr manager{nullptr}; bool is_system{}; }; diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index d28fd7890a..be34e143ae 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp @@ -20,28 +20,28 @@ class IUser final : public NfcInterface { public: explicit IUser(Core::System& system_) : NfcInterface(system_, "NFC::IUser", BackendType::Nfc) { static const FunctionInfoTyped functions[] = { - {0, &NfcInterface::Initialize, "InitializeOld"}, - {1, &NfcInterface::Finalize, "FinalizeOld"}, - {2, &NfcInterface::GetState, "GetStateOld"}, - {3, &NfcInterface::IsNfcEnabled, "IsNfcEnabledOld"}, - {400, &NfcInterface::Initialize, "Initialize"}, - {401, &NfcInterface::Finalize, "Finalize"}, - {402, &NfcInterface::GetState, "GetState"}, - {403, &NfcInterface::IsNfcEnabled, "IsNfcEnabled"}, - {404, &NfcInterface::ListDevices, "ListDevices"}, - {405, &NfcInterface::GetDeviceState, "GetDeviceState"}, - {406, &NfcInterface::GetNpadId, "GetNpadId"}, - {407, &NfcInterface::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, - {408, &NfcInterface::StartDetection, "StartDetection"}, - {409, &NfcInterface::StopDetection, "StopDetection"}, - {410, &NfcInterface::GetTagInfo, "GetTagInfo"}, - {411, &NfcInterface::AttachActivateEvent, "AttachActivateEvent"}, - {412, &NfcInterface::AttachDeactivateEvent, "AttachDeactivateEvent"}, - {1000, &NfcInterface::ReadMifare, "ReadMifare"}, - {1001, &NfcInterface::WriteMifare ,"WriteMifare"}, - {1300, &NfcInterface::SendCommandByPassThrough, "SendCommandByPassThrough"}, - {1301, nullptr, "KeepPassThroughSession"}, - {1302, nullptr, "ReleasePassThroughSession"} + FunctionInfo{0, &NfcInterface::Initialize, "InitializeOld"}, + FunctionInfo{1, &NfcInterface::Finalize, "FinalizeOld"}, + FunctionInfo{2, &NfcInterface::GetState, "GetStateOld"}, + FunctionInfo{3, &NfcInterface::IsNfcEnabled, "IsNfcEnabledOld"}, + FunctionInfo{400, &NfcInterface::Initialize, "Initialize"}, + FunctionInfo{401, &NfcInterface::Finalize, "Finalize"}, + FunctionInfo{402, &NfcInterface::GetState, "GetState"}, + FunctionInfo{403, &NfcInterface::IsNfcEnabled, "IsNfcEnabled"}, + FunctionInfo{404, &NfcInterface::ListDevices, "ListDevices"}, + FunctionInfo{405, &NfcInterface::GetDeviceState, "GetDeviceState"}, + FunctionInfo{406, &NfcInterface::GetNpadId, "GetNpadId"}, + FunctionInfo{407, &NfcInterface::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, + FunctionInfo{408, &NfcInterface::StartDetection, "StartDetection"}, + FunctionInfo{409, &NfcInterface::StopDetection, "StopDetection"}, + FunctionInfo{410, &NfcInterface::GetTagInfo, "GetTagInfo"}, + FunctionInfo{411, &NfcInterface::AttachActivateEvent, "AttachActivateEvent"}, + FunctionInfo{412, &NfcInterface::AttachDeactivateEvent, "AttachDeactivateEvent"}, + FunctionInfo{1000, &NfcInterface::ReadMifare, "ReadMifare"}, + FunctionInfo{1001, &NfcInterface::WriteMifare ,"WriteMifare"}, + FunctionInfo{1300, &NfcInterface::SendCommandByPassThrough, "SendCommandByPassThrough"}, + FunctionInfo{1301, nullptr, "KeepPassThroughSession"}, + FunctionInfo{1302, nullptr, "ReleasePassThroughSession"} }; RegisterHandlers(functions); } @@ -52,31 +52,31 @@ public: explicit ISystem(Core::System& system_) : NfcInterface{system_, "NFC::ISystem", BackendType::Nfc} { static const FunctionInfoTyped functions[] = { - {0, &NfcInterface::Initialize, "InitializeOld"}, - {1, &NfcInterface::Finalize, "FinalizeOld"}, - {2, &NfcInterface::GetState, "GetStateOld"}, - {3, &NfcInterface::IsNfcEnabled, "IsNfcEnabledOld"}, - {100, &NfcInterface::SetNfcEnabled, "SetNfcEnabledOld"}, - {400, &NfcInterface::Initialize, "Initialize"}, - {401, &NfcInterface::Finalize, "Finalize"}, - {402, &NfcInterface::GetState, "GetState"}, - {403, &NfcInterface::IsNfcEnabled, "IsNfcEnabled"}, - {404, &NfcInterface::ListDevices, "ListDevices"}, - {405, &NfcInterface::GetDeviceState, "GetDeviceState"}, - {406, &NfcInterface::GetNpadId, "GetNpadId"}, - {407, &NfcInterface::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, - {408, &NfcInterface::StartDetection, "StartDetection"}, - {409, &NfcInterface::StopDetection, "StopDetection"}, - {410, &NfcInterface::GetTagInfo, "GetTagInfo"}, - {411, &NfcInterface::AttachActivateEvent, "AttachActivateEvent"}, - {412, &NfcInterface::AttachDeactivateEvent, "AttachDeactivateEvent"}, - {500, &NfcInterface::SetNfcEnabled, "SetNfcEnabled"}, - {510, nullptr, "OutputTestWave"}, - {1000, &NfcInterface::ReadMifare, "ReadMifare"}, - {1001, &NfcInterface::WriteMifare, "WriteMifare"}, - {1300, &NfcInterface::SendCommandByPassThrough, "SendCommandByPassThrough"}, - {1301, nullptr, "KeepPassThroughSession"}, - {1302, nullptr, "ReleasePassThroughSession"} + FunctionInfo{0, &NfcInterface::Initialize, "InitializeOld"}, + FunctionInfo{1, &NfcInterface::Finalize, "FinalizeOld"}, + FunctionInfo{2, &NfcInterface::GetState, "GetStateOld"}, + FunctionInfo{3, &NfcInterface::IsNfcEnabled, "IsNfcEnabledOld"}, + FunctionInfo{100, &NfcInterface::SetNfcEnabled, "SetNfcEnabledOld"}, + FunctionInfo{400, &NfcInterface::Initialize, "Initialize"}, + FunctionInfo{401, &NfcInterface::Finalize, "Finalize"}, + FunctionInfo{402, &NfcInterface::GetState, "GetState"}, + FunctionInfo{403, &NfcInterface::IsNfcEnabled, "IsNfcEnabled"}, + FunctionInfo{404, &NfcInterface::ListDevices, "ListDevices"}, + FunctionInfo{405, &NfcInterface::GetDeviceState, "GetDeviceState"}, + FunctionInfo{406, &NfcInterface::GetNpadId, "GetNpadId"}, + FunctionInfo{407, &NfcInterface::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, + FunctionInfo{408, &NfcInterface::StartDetection, "StartDetection"}, + FunctionInfo{409, &NfcInterface::StopDetection, "StopDetection"}, + FunctionInfo{410, &NfcInterface::GetTagInfo, "GetTagInfo"}, + FunctionInfo{411, &NfcInterface::AttachActivateEvent, "AttachActivateEvent"}, + FunctionInfo{412, &NfcInterface::AttachDeactivateEvent, "AttachDeactivateEvent"}, + FunctionInfo{500, &NfcInterface::SetNfcEnabled, "SetNfcEnabled"}, + FunctionInfo{510, nullptr, "OutputTestWave"}, + FunctionInfo{1000, &NfcInterface::ReadMifare, "ReadMifare"}, + FunctionInfo{1001, &NfcInterface::WriteMifare, "WriteMifare"}, + FunctionInfo{1300, &NfcInterface::SendCommandByPassThrough, "SendCommandByPassThrough"}, + FunctionInfo{1301, nullptr, "KeepPassThroughSession"}, + FunctionInfo{1302, nullptr, "ReleasePassThroughSession"} }; RegisterHandlers(functions); } @@ -89,20 +89,20 @@ class MFIUser final : public MFInterface { public: explicit MFIUser(Core::System& system_) : MFInterface{system_, "NFC::MFInterface", BackendType::Mifare} { static const FunctionInfoTyped functions[] = { - {0, &MFIUser::Initialize, "Initialize"}, - {1, &MFIUser::Finalize, "Finalize"}, - {2, &MFIUser::ListDevices, "ListDevices"}, - {3, &MFIUser::StartDetection, "StartDetection"}, - {4, &MFIUser::StopDetection, "StopDetection"}, - {5, &MFIUser::ReadMifare, "Read"}, - {6, &MFIUser::WriteMifare, "Write"}, - {7, &MFIUser::GetTagInfo, "GetTagInfo"}, - {8, &MFIUser::AttachActivateEvent, "GetActivateEventHandle"}, - {9, &MFIUser::AttachDeactivateEvent, "GetDeactivateEventHandle"}, - {10, &MFIUser::GetState, "GetState"}, - {11, &MFIUser::GetDeviceState, "GetDeviceState"}, - {12, &MFIUser::GetNpadId, "GetNpadId"}, - {13, &MFIUser::AttachAvailabilityChangeEvent, "GetAvailabilityChangeEventHandle"} + FunctionInfo{0, &MFIUser::Initialize, "Initialize"}, + FunctionInfo{1, &MFIUser::Finalize, "Finalize"}, + FunctionInfo{2, &MFIUser::ListDevices, "ListDevices"}, + FunctionInfo{3, &MFIUser::StartDetection, "StartDetection"}, + FunctionInfo{4, &MFIUser::StopDetection, "StopDetection"}, + FunctionInfo{5, &MFIUser::ReadMifare, "Read"}, + FunctionInfo{6, &MFIUser::WriteMifare, "Write"}, + FunctionInfo{7, &MFIUser::GetTagInfo, "GetTagInfo"}, + FunctionInfo{8, &MFIUser::AttachActivateEvent, "GetActivateEventHandle"}, + FunctionInfo{9, &MFIUser::AttachDeactivateEvent, "GetDeactivateEventHandle"}, + FunctionInfo{10, &MFIUser::GetState, "GetState"}, + FunctionInfo{11, &MFIUser::GetDeviceState, "GetDeviceState"}, + FunctionInfo{12, &MFIUser::GetNpadId, "GetNpadId"}, + FunctionInfo{13, &MFIUser::AttachAvailabilityChangeEvent, "GetAvailabilityChangeEventHandle"} }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index fe7cbe583a..f0000e1b82 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -16,32 +16,32 @@ class IUser final : public Interface { public: explicit IUser(Core::System& system_) : Interface(system_, "NFP:IUser") { static const FunctionInfoTyped functions[] = { - {0, &IUser::Initialize, "Initialize"}, - {1, &IUser::Finalize, "Finalize"}, - {2, &IUser::ListDevices, "ListDevices"}, - {3, &IUser::StartDetection, "StartDetection"}, - {4, &IUser::StopDetection, "StopDetection"}, - {5, &IUser::Mount, "Mount"}, - {6, &IUser::Unmount, "Unmount"}, - {7, &IUser::OpenApplicationArea, "OpenApplicationArea"}, - {8, &IUser::GetApplicationArea, "GetApplicationArea"}, - {9, &IUser::SetApplicationArea, "SetApplicationArea"}, - {10, &IUser::Flush, "Flush"}, - {11, &IUser::Restore, "Restore"}, - {12, &IUser::CreateApplicationArea, "CreateApplicationArea"}, - {13, &IUser::GetTagInfo, "GetTagInfo"}, - {14, &IUser::GetRegisterInfo, "GetRegisterInfo"}, - {15, &IUser::GetCommonInfo, "GetCommonInfo"}, - {16, &IUser::GetModelInfo, "GetModelInfo"}, - {17, &IUser::AttachActivateEvent, "AttachActivateEvent"}, - {18, &IUser::AttachDeactivateEvent, "AttachDeactivateEvent"}, - {19, &IUser::GetState, "GetState"}, - {20, &IUser::GetDeviceState, "GetDeviceState"}, - {21, &IUser::GetNpadId, "GetNpadId"}, - {22, &IUser::GetApplicationAreaSize, "GetApplicationAreaSize"}, - {23, &IUser::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, - {24, &IUser::RecreateApplicationArea, "RecreateApplicationArea"}, - {25, &IUser::StartDetection, "StartDetectionWithFilter"} + FunctionInfo{0, &IUser::Initialize, "Initialize"}, + FunctionInfo{1, &IUser::Finalize, "Finalize"}, + FunctionInfo{2, &IUser::ListDevices, "ListDevices"}, + FunctionInfo{3, &IUser::StartDetection, "StartDetection"}, + FunctionInfo{4, &IUser::StopDetection, "StopDetection"}, + FunctionInfo{5, &IUser::Mount, "Mount"}, + FunctionInfo{6, &IUser::Unmount, "Unmount"}, + FunctionInfo{7, &IUser::OpenApplicationArea, "OpenApplicationArea"}, + FunctionInfo{8, &IUser::GetApplicationArea, "GetApplicationArea"}, + FunctionInfo{9, &IUser::SetApplicationArea, "SetApplicationArea"}, + FunctionInfo{10, &IUser::Flush, "Flush"}, + FunctionInfo{11, &IUser::Restore, "Restore"}, + FunctionInfo{12, &IUser::CreateApplicationArea, "CreateApplicationArea"}, + FunctionInfo{13, &IUser::GetTagInfo, "GetTagInfo"}, + FunctionInfo{14, &IUser::GetRegisterInfo, "GetRegisterInfo"}, + FunctionInfo{15, &IUser::GetCommonInfo, "GetCommonInfo"}, + FunctionInfo{16, &IUser::GetModelInfo, "GetModelInfo"}, + FunctionInfo{17, &IUser::AttachActivateEvent, "AttachActivateEvent"}, + FunctionInfo{18, &IUser::AttachDeactivateEvent, "AttachDeactivateEvent"}, + FunctionInfo{19, &IUser::GetState, "GetState"}, + FunctionInfo{20, &IUser::GetDeviceState, "GetDeviceState"}, + FunctionInfo{21, &IUser::GetNpadId, "GetNpadId"}, + FunctionInfo{22, &IUser::GetApplicationAreaSize, "GetApplicationAreaSize"}, + FunctionInfo{23, &IUser::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, + FunctionInfo{24, &IUser::RecreateApplicationArea, "RecreateApplicationArea"}, + FunctionInfo{25, &IUser::StartDetection, "StartDetectionWithFilter"} }; RegisterHandlers(functions); } @@ -51,34 +51,34 @@ class ISystem final : public Interface { public: explicit ISystem(Core::System& system_) : Interface(system_, "NFP:ISystem") { static const FunctionInfoTyped functions[] = { - {0, &ISystem::InitializeSystem, "InitializeSystem"}, - {1, &ISystem::FinalizeSystem, "FinalizeSystem"}, - {2, &ISystem::ListDevices, "ListDevices"}, - {3, &ISystem::StartDetection, "StartDetection"}, - {4, &ISystem::StopDetection, "StopDetection"}, - {5, &ISystem::Mount, "Mount"}, - {6, &ISystem::Unmount, "Unmount"}, - {10, &ISystem::Flush, "Flush"}, - {11, &ISystem::Restore, "Restore"}, - {12, &ISystem::CreateApplicationArea, "CreateApplicationArea"}, - {13, &ISystem::GetTagInfo, "GetTagInfo"}, - {14, &ISystem::GetRegisterInfo, "GetRegisterInfo"}, - {15, &ISystem::GetCommonInfo, "GetCommonInfo"}, - {16, &ISystem::GetModelInfo, "GetModelInfo"}, - {17, &ISystem::AttachActivateEvent, "AttachActivateEvent"}, - {18, &ISystem::AttachDeactivateEvent, "AttachDeactivateEvent"}, - {19, &ISystem::GetState, "GetState"}, - {20, &ISystem::GetDeviceState, "GetDeviceState"}, - {21, &ISystem::GetNpadId, "GetNpadId"}, - {23, &ISystem::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, - {25, &ISystem::StartDetection, "StartDetectionWithFilter"}, - {100, &ISystem::Format, "Format"}, - {101, &ISystem::GetAdminInfo, "GetAdminInfo"}, - {102, &ISystem::GetRegisterInfoPrivate, "GetRegisterInfoPrivate"}, - {103, &ISystem::SetRegisterInfoPrivate, "SetRegisterInfoPrivate"}, - {104, &ISystem::DeleteRegisterInfo, "DeleteRegisterInfo"}, - {105, &ISystem::DeleteApplicationArea, "DeleteApplicationArea"}, - {106, &ISystem::ExistsApplicationArea, "ExistsApplicationArea"} + FunctionInfo{0, &ISystem::InitializeSystem, "InitializeSystem"}, + FunctionInfo{1, &ISystem::FinalizeSystem, "FinalizeSystem"}, + FunctionInfo{2, &ISystem::ListDevices, "ListDevices"}, + FunctionInfo{3, &ISystem::StartDetection, "StartDetection"}, + FunctionInfo{4, &ISystem::StopDetection, "StopDetection"}, + FunctionInfo{5, &ISystem::Mount, "Mount"}, + FunctionInfo{6, &ISystem::Unmount, "Unmount"}, + FunctionInfo{10, &ISystem::Flush, "Flush"}, + FunctionInfo{11, &ISystem::Restore, "Restore"}, + FunctionInfo{12, &ISystem::CreateApplicationArea, "CreateApplicationArea"}, + FunctionInfo{13, &ISystem::GetTagInfo, "GetTagInfo"}, + FunctionInfo{14, &ISystem::GetRegisterInfo, "GetRegisterInfo"}, + FunctionInfo{15, &ISystem::GetCommonInfo, "GetCommonInfo"}, + FunctionInfo{16, &ISystem::GetModelInfo, "GetModelInfo"}, + FunctionInfo{17, &ISystem::AttachActivateEvent, "AttachActivateEvent"}, + FunctionInfo{18, &ISystem::AttachDeactivateEvent, "AttachDeactivateEvent"}, + FunctionInfo{19, &ISystem::GetState, "GetState"}, + FunctionInfo{20, &ISystem::GetDeviceState, "GetDeviceState"}, + FunctionInfo{21, &ISystem::GetNpadId, "GetNpadId"}, + FunctionInfo{23, &ISystem::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, + FunctionInfo{25, &ISystem::StartDetection, "StartDetectionWithFilter"}, + FunctionInfo{100, &ISystem::Format, "Format"}, + FunctionInfo{101, &ISystem::GetAdminInfo, "GetAdminInfo"}, + FunctionInfo{102, &ISystem::GetRegisterInfoPrivate, "GetRegisterInfoPrivate"}, + FunctionInfo{103, &ISystem::SetRegisterInfoPrivate, "SetRegisterInfoPrivate"}, + FunctionInfo{104, &ISystem::DeleteRegisterInfo, "DeleteRegisterInfo"}, + FunctionInfo{105, &ISystem::DeleteApplicationArea, "DeleteApplicationArea"}, + FunctionInfo{106, &ISystem::ExistsApplicationArea, "ExistsApplicationArea"} }; RegisterHandlers(functions); } @@ -88,46 +88,46 @@ class IDebug final : public Interface { public: explicit IDebug(Core::System& system_) : Interface(system_, "NFP:IDebug") { static const FunctionInfoTyped functions[] = { - {0, &IDebug::InitializeDebug, "InitializeDebug"}, - {1, &IDebug::FinalizeDebug, "FinalizeDebug"}, - {2, &IDebug::ListDevices, "ListDevices"}, - {3, &IDebug::StartDetection, "StartDetection"}, - {4, &IDebug::StopDetection, "StopDetection"}, - {5, &IDebug::Mount, "Mount"}, - {6, &IDebug::Unmount, "Unmount"}, - {7, &IDebug::OpenApplicationArea, "OpenApplicationArea"}, - {8, &IDebug::GetApplicationArea, "GetApplicationArea"}, - {9, &IDebug::SetApplicationArea, "SetApplicationArea"}, - {10, &IDebug::Flush, "Flush"}, - {11, &IDebug::Restore, "Restore"}, - {12, &IDebug::CreateApplicationArea, "CreateApplicationArea"}, - {13, &IDebug::GetTagInfo, "GetTagInfo"}, - {14, &IDebug::GetRegisterInfo, "GetRegisterInfo"}, - {15, &IDebug::GetCommonInfo, "GetCommonInfo"}, - {16, &IDebug::GetModelInfo, "GetModelInfo"}, - {17, &IDebug::AttachActivateEvent, "AttachActivateEvent"}, - {18, &IDebug::AttachDeactivateEvent, "AttachDeactivateEvent"}, - {19, &IDebug::GetState, "GetState"}, - {20, &IDebug::GetDeviceState, "GetDeviceState"}, - {21, &IDebug::GetNpadId, "GetNpadId"}, - {22, &IDebug::GetApplicationAreaSize, "GetApplicationAreaSize"}, - {23, &IDebug::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, - {24, &IDebug::RecreateApplicationArea, "RecreateApplicationArea"}, - {25, &IDebug::StartDetection, "StartDetectionWithFilter"}, - {100, &IDebug::Format, "Format"}, - {101, &IDebug::GetAdminInfo, "GetAdminInfo"}, - {102, &IDebug::GetRegisterInfoPrivate, "GetRegisterInfoPrivate"}, - {103, &IDebug::SetRegisterInfoPrivate, "SetRegisterInfoPrivate"}, - {104, &IDebug::DeleteRegisterInfo, "DeleteRegisterInfo"}, - {105, &IDebug::DeleteApplicationArea, "DeleteApplicationArea"}, - {106, &IDebug::ExistsApplicationArea, "ExistsApplicationArea"}, - {200, &IDebug::GetAll, "GetAll"}, - {201, &IDebug::SetAll, "SetAll"}, - {202, &IDebug::FlushDebug, "FlushDebug"}, - {203, &IDebug::BreakTag, "BreakTag"}, - {204, &IDebug::ReadBackupData, "ReadBackupData"}, - {205, &IDebug::WriteBackupData, "WriteBackupData"}, - {206, &IDebug::WriteNtf, "WriteNtf"} + FunctionInfo{0, &IDebug::InitializeDebug, "InitializeDebug"}, + FunctionInfo{1, &IDebug::FinalizeDebug, "FinalizeDebug"}, + FunctionInfo{2, &IDebug::ListDevices, "ListDevices"}, + FunctionInfo{3, &IDebug::StartDetection, "StartDetection"}, + FunctionInfo{4, &IDebug::StopDetection, "StopDetection"}, + FunctionInfo{5, &IDebug::Mount, "Mount"}, + FunctionInfo{6, &IDebug::Unmount, "Unmount"}, + FunctionInfo{7, &IDebug::OpenApplicationArea, "OpenApplicationArea"}, + FunctionInfo{8, &IDebug::GetApplicationArea, "GetApplicationArea"}, + FunctionInfo{9, &IDebug::SetApplicationArea, "SetApplicationArea"}, + FunctionInfo{10, &IDebug::Flush, "Flush"}, + FunctionInfo{11, &IDebug::Restore, "Restore"}, + FunctionInfo{12, &IDebug::CreateApplicationArea, "CreateApplicationArea"}, + FunctionInfo{13, &IDebug::GetTagInfo, "GetTagInfo"}, + FunctionInfo{14, &IDebug::GetRegisterInfo, "GetRegisterInfo"}, + FunctionInfo{15, &IDebug::GetCommonInfo, "GetCommonInfo"}, + FunctionInfo{16, &IDebug::GetModelInfo, "GetModelInfo"}, + FunctionInfo{17, &IDebug::AttachActivateEvent, "AttachActivateEvent"}, + FunctionInfo{18, &IDebug::AttachDeactivateEvent, "AttachDeactivateEvent"}, + FunctionInfo{19, &IDebug::GetState, "GetState"}, + FunctionInfo{20, &IDebug::GetDeviceState, "GetDeviceState"}, + FunctionInfo{21, &IDebug::GetNpadId, "GetNpadId"}, + FunctionInfo{22, &IDebug::GetApplicationAreaSize, "GetApplicationAreaSize"}, + FunctionInfo{23, &IDebug::AttachAvailabilityChangeEvent, "AttachAvailabilityChangeEvent"}, + FunctionInfo{24, &IDebug::RecreateApplicationArea, "RecreateApplicationArea"}, + FunctionInfo{25, &IDebug::StartDetection, "StartDetectionWithFilter"}, + FunctionInfo{100, &IDebug::Format, "Format"}, + FunctionInfo{101, &IDebug::GetAdminInfo, "GetAdminInfo"}, + FunctionInfo{102, &IDebug::GetRegisterInfoPrivate, "GetRegisterInfoPrivate"}, + FunctionInfo{103, &IDebug::SetRegisterInfoPrivate, "SetRegisterInfoPrivate"}, + FunctionInfo{104, &IDebug::DeleteRegisterInfo, "DeleteRegisterInfo"}, + FunctionInfo{105, &IDebug::DeleteApplicationArea, "DeleteApplicationArea"}, + FunctionInfo{106, &IDebug::ExistsApplicationArea, "ExistsApplicationArea"}, + FunctionInfo{200, &IDebug::GetAll, "GetAll"}, + FunctionInfo{201, &IDebug::SetAll, "SetAll"}, + FunctionInfo{202, &IDebug::FlushDebug, "FlushDebug"}, + FunctionInfo{203, &IDebug::BreakTag, "BreakTag"}, + FunctionInfo{204, &IDebug::ReadBackupData, "ReadBackupData"}, + FunctionInfo{205, &IDebug::WriteBackupData, "WriteBackupData"}, + FunctionInfo{206, &IDebug::WriteNtf, "WriteNtf"} }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index a25bba7cd5..b590dc1882 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -1054,60 +1054,60 @@ IGeneralService::IGeneralService(Core::System& system_) : ServiceFramework{system_, "IGeneralService"} { // clang-format off - static const FunctionInfo functions[] = { - {1, &IGeneralService::GetClientId, "GetClientId"}, - {2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, - {4, &IGeneralService::CreateRequest, "CreateRequest"}, - {5, &IGeneralService::GetCurrentNetworkProfile, "GetCurrentNetworkProfile"}, - {6, &IGeneralService::EnumerateNetworkInterfaces, "EnumerateNetworkInterfaces"}, - {7, &IGeneralService::EnumerateNetworkProfiles, "EnumerateNetworkProfiles"}, - {8, &IGeneralService::GetNetworkProfile, "GetNetworkProfile"}, - {9, &IGeneralService::SetNetworkProfile, "SetNetworkProfile"}, - {10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"}, - {11, &IGeneralService::GetScanData, "GetScanDataOld"}, - {12, &IGeneralService::GetCurrentIpAddress, "GetCurrentIpAddress"}, - {13, nullptr, "GetCurrentAccessPointOld"}, - {14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"}, - {15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"}, - {16, &IGeneralService::SetWirelessCommunicationEnabled, "SetWirelessCommunicationEnabled"}, - {17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"}, - {18, &IGeneralService::GetInternetConnectionStatus, "GetInternetConnectionStatus"}, - {19, &IGeneralService::SetEthernetCommunicationEnabled, "SetEthernetCommunicationEnabled"}, - {20, &IGeneralService::IsEthernetCommunicationEnabled, "IsEthernetCommunicationEnabled"}, - {21, &IGeneralService::IsAnyInternetRequestAccepted, "IsAnyInternetRequestAccepted"}, - {22, &IGeneralService::IsAnyForegroundRequestAccepted, "IsAnyForegroundRequestAccepted"}, - {23, nullptr, "PutToSleep"}, - {24, nullptr, "WakeUp"}, - {25, &IGeneralService::GetSsidListVersion, "GetSsidListVersion"}, - {26, nullptr, "SetExclusiveClient"}, - {27, nullptr, "GetDefaultIpSetting"}, - {28, nullptr, "SetDefaultIpSetting"}, - {29, nullptr, "SetWirelessCommunicationEnabledForTest"}, - {30, nullptr, "SetEthernetCommunicationEnabledForTest"}, - {31, nullptr, "GetTelemetorySystemEventReadableHandle"}, - {32, nullptr, "GetTelemetryInfo"}, - {33, &IGeneralService::ConfirmSystemAvailability, "ConfirmSystemAvailability"}, // 2.0.0+ - {34, &IGeneralService::SetBackgroundRequestEnabled, "SetBackgroundRequestEnabled"}, // 4.0.0+ - {35, &IGeneralService::GetScanDataV2, "GetScanData"}, - {36, &IGeneralService::GetCurrentAccessPoint, "GetCurrentAccessPoint"}, - {37, nullptr, "Shutdown"}, - {38, nullptr, "GetAllowedChannels"}, - {39, nullptr, "NotifyApplicationSuspended"}, - {40, nullptr, "SetAcceptableNetworkTypeFlag"}, - {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, &IGeneralService::GetScanDataV3, "GetScanData"}, // 19.0.0+ - {50, nullptr, "IsRewriteFeatureEnabled"}, // 18.0.0+ - {51, nullptr, "CreateRewriteRule"}, // 18.0.0+ - {52, nullptr, "DestroyRewriteRule"} // 18.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{1, &IGeneralService::GetClientId, "GetClientId"}, + FunctionInfo{2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, + FunctionInfo{4, &IGeneralService::CreateRequest, "CreateRequest"}, + FunctionInfo{5, &IGeneralService::GetCurrentNetworkProfile, "GetCurrentNetworkProfile"}, + FunctionInfo{6, &IGeneralService::EnumerateNetworkInterfaces, "EnumerateNetworkInterfaces"}, + FunctionInfo{7, &IGeneralService::EnumerateNetworkProfiles, "EnumerateNetworkProfiles"}, + FunctionInfo{8, &IGeneralService::GetNetworkProfile, "GetNetworkProfile"}, + FunctionInfo{9, &IGeneralService::SetNetworkProfile, "SetNetworkProfile"}, + FunctionInfo{10, &IGeneralService::RemoveNetworkProfile, "RemoveNetworkProfile"}, + FunctionInfo{11, &IGeneralService::GetScanData, "GetScanDataOld"}, + FunctionInfo{12, &IGeneralService::GetCurrentIpAddress, "GetCurrentIpAddress"}, + FunctionInfo{13, nullptr, "GetCurrentAccessPointOld"}, + FunctionInfo{14, &IGeneralService::CreateTemporaryNetworkProfile, "CreateTemporaryNetworkProfile"}, + FunctionInfo{15, &IGeneralService::GetCurrentIpConfigInfo, "GetCurrentIpConfigInfo"}, + FunctionInfo{16, &IGeneralService::SetWirelessCommunicationEnabled, "SetWirelessCommunicationEnabled"}, + FunctionInfo{17, &IGeneralService::IsWirelessCommunicationEnabled, "IsWirelessCommunicationEnabled"}, + FunctionInfo{18, &IGeneralService::GetInternetConnectionStatus, "GetInternetConnectionStatus"}, + FunctionInfo{19, &IGeneralService::SetEthernetCommunicationEnabled, "SetEthernetCommunicationEnabled"}, + FunctionInfo{20, &IGeneralService::IsEthernetCommunicationEnabled, "IsEthernetCommunicationEnabled"}, + FunctionInfo{21, &IGeneralService::IsAnyInternetRequestAccepted, "IsAnyInternetRequestAccepted"}, + FunctionInfo{22, &IGeneralService::IsAnyForegroundRequestAccepted, "IsAnyForegroundRequestAccepted"}, + FunctionInfo{23, nullptr, "PutToSleep"}, + FunctionInfo{24, nullptr, "WakeUp"}, + FunctionInfo{25, &IGeneralService::GetSsidListVersion, "GetSsidListVersion"}, + FunctionInfo{26, nullptr, "SetExclusiveClient"}, + FunctionInfo{27, nullptr, "GetDefaultIpSetting"}, + FunctionInfo{28, nullptr, "SetDefaultIpSetting"}, + FunctionInfo{29, nullptr, "SetWirelessCommunicationEnabledForTest"}, + FunctionInfo{30, nullptr, "SetEthernetCommunicationEnabledForTest"}, + FunctionInfo{31, nullptr, "GetTelemetorySystemEventReadableHandle"}, + FunctionInfo{32, nullptr, "GetTelemetryInfo"}, + FunctionInfo{33, &IGeneralService::ConfirmSystemAvailability, "ConfirmSystemAvailability"}, // 2.0.0+ + FunctionInfo{34, &IGeneralService::SetBackgroundRequestEnabled, "SetBackgroundRequestEnabled"}, // 4.0.0+ + FunctionInfo{35, &IGeneralService::GetScanDataV2, "GetScanData"}, + FunctionInfo{36, &IGeneralService::GetCurrentAccessPoint, "GetCurrentAccessPoint"}, + FunctionInfo{37, nullptr, "Shutdown"}, + FunctionInfo{38, nullptr, "GetAllowedChannels"}, + FunctionInfo{39, nullptr, "NotifyApplicationSuspended"}, + FunctionInfo{40, nullptr, "SetAcceptableNetworkTypeFlag"}, + FunctionInfo{41, nullptr, "GetAcceptableNetworkTypeFlag"}, + FunctionInfo{42, nullptr, "NotifyConnectionStateChanged"}, + FunctionInfo{43, nullptr, "SetWowlDelayedWakeTime"}, + FunctionInfo{44, nullptr, "IsWiredConnectionAvailable"}, // 18.0.0+ + FunctionInfo{45, nullptr, "IsNetworkEmulationFeatureEnabled"}, // 18.0.0+ + FunctionInfo{46, nullptr, "SelectActiveNetworkEmulationProfileIdForDebug"}, // 18.0.0+ + FunctionInfo{47, &IGeneralService::GetScanDataV3, "GetScanData"}, // 19.0.0+ + FunctionInfo{50, nullptr, "IsRewriteFeatureEnabled"}, // 18.0.0+ + FunctionInfo{51, nullptr, "CreateRewriteRule"}, // 18.0.0+ + FunctionInfo{52, nullptr, "DestroyRewriteRule"} // 18.0.0+ + ); } IGeneralService::~IGeneralService() = default; diff --git a/src/core/hle/service/ns/account_proxy_interface.cpp b/src/core/hle/service/ns/account_proxy_interface.cpp index e5041af66b..53dc8e3116 100644 --- a/src/core/hle/service/ns/account_proxy_interface.cpp +++ b/src/core/hle/service/ns/account_proxy_interface.cpp @@ -7,13 +7,6 @@ namespace Service::NS { IAccountProxyInterface::IAccountProxyInterface(Core::System& system_) : ServiceFramework{system_, "IAccountProxyInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "CreateUserAccount"}, - }; - // clang-format on - - RegisterHandlers(functions); } IAccountProxyInterface::~IAccountProxyInterface() = default; diff --git a/src/core/hle/service/ns/account_proxy_interface.h b/src/core/hle/service/ns/account_proxy_interface.h index e944d2a75f..13875a781e 100644 --- a/src/core/hle/service/ns/account_proxy_interface.h +++ b/src/core/hle/service/ns/account_proxy_interface.h @@ -11,6 +11,13 @@ class IAccountProxyInterface final : public ServiceFramework, "ListApplicationRecord"}, - {1, nullptr, "GenerateApplicationRecordCount"}, - {2, D<&IApplicationManagerInterface::GetApplicationRecordUpdateSystemEvent>, "GetApplicationRecordUpdateSystemEvent"}, - {3, nullptr, "GetApplicationViewDeprecated"}, - {4, D<&IApplicationManagerInterface::DeleteApplicationEntity>, "DeleteApplicationEntity"}, - {5, D<&IApplicationManagerInterface::DeleteApplicationCompletely>, "DeleteApplicationCompletely"}, - {6, nullptr, "IsAnyApplicationEntityRedundant"}, - {7, nullptr, "DeleteRedundantApplicationEntity"}, - {8, nullptr, "IsApplicationEntityMovable"}, - {9, nullptr, "MoveApplicationEntity"}, - {11, nullptr, "CalculateApplicationOccupiedSize"}, - {16, &IApplicationManagerInterface::PushApplicationRecord, "PushApplicationRecord"}, - {17, nullptr, "ListApplicationRecordContentMeta"}, - {19, nullptr, "LaunchApplicationOld"}, - {21, nullptr, "GetApplicationContentPath"}, - {22, nullptr, "TerminateApplication"}, - {23, nullptr, "ResolveApplicationContentPath"}, - {26, nullptr, "BeginInstallApplication"}, - {27, nullptr, "DeleteApplicationRecord"}, - {30, nullptr, "RequestApplicationUpdateInfo"}, - {31, nullptr, "RequestUpdateApplication"}, - {32, nullptr, "CancelApplicationDownload"}, - {33, nullptr, "ResumeApplicationDownload"}, - {35, nullptr, "UpdateVersionList"}, - {36, nullptr, "PushLaunchVersion"}, - {37, nullptr, "ListRequiredVersion"}, - {38, D<&IApplicationManagerInterface::CheckApplicationLaunchVersion>, "CheckApplicationLaunchVersion"}, - {39, nullptr, "CheckApplicationLaunchRights"}, - {40, D<&IApplicationManagerInterface::GetApplicationLogoData>, "GetApplicationLogoData"}, - {41, nullptr, "CalculateApplicationDownloadRequiredSize"}, - {42, nullptr, "CleanupSdCard"}, - {43, D<&IApplicationManagerInterface::CheckSdCardMountStatus>, "CheckSdCardMountStatus"}, - {44, D<&IApplicationManagerInterface::GetSdCardMountStatusChangedEvent>, "GetSdCardMountStatusChangedEvent"}, - {45, nullptr, "GetGameCardAttachmentEvent"}, - {46, nullptr, "GetGameCardAttachmentInfo"}, - {47, D<&IApplicationManagerInterface::GetTotalSpaceSize>, "GetTotalSpaceSize"}, - {48, D<&IApplicationManagerInterface::GetFreeSpaceSize>, "GetFreeSpaceSize"}, - {49, nullptr, "GetSdCardRemovedEvent"}, - {52, D<&IApplicationManagerInterface::GetGameCardUpdateDetectionEvent>, "GetGameCardUpdateDetectionEvent"}, - {53, nullptr, "DisableApplicationAutoDelete"}, - {54, nullptr, "EnableApplicationAutoDelete"}, - {55, D<&IApplicationManagerInterface::GetApplicationDesiredLanguage>, "GetApplicationDesiredLanguage"}, - {56, nullptr, "SetApplicationTerminateResult"}, - {57, nullptr, "ClearApplicationTerminateResult"}, - {58, nullptr, "GetLastSdCardMountUnexpectedResult"}, - {59, D<&IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"}, - {60, nullptr, "ConvertLanguageCodeToApplicationLanguage"}, - {61, nullptr, "GetBackgroundDownloadStressTaskInfo"}, - {62, nullptr, "GetGameCardStopper"}, - {63, nullptr, "IsSystemProgramInstalled"}, - {64, nullptr, "StartApplyDeltaTask"}, - {65, nullptr, "GetRequestServerStopper"}, - {66, nullptr, "GetBackgroundApplyDeltaStressTaskInfo"}, - {67, nullptr, "CancelApplicationApplyDelta"}, - {68, nullptr, "ResumeApplicationApplyDelta"}, - {69, nullptr, "CalculateApplicationApplyDeltaRequiredSize"}, - {70, D<&IApplicationManagerInterface::ResumeAll>, "ResumeAll"}, - {71, D<&IApplicationManagerInterface::GetStorageSize>, "GetStorageSize"}, - {80, nullptr, "RequestDownloadApplication"}, - {81, nullptr, "RequestDownloadAddOnContent"}, - {82, nullptr, "DownloadApplication"}, - {83, nullptr, "CheckApplicationResumeRights"}, - {84, nullptr, "GetDynamicCommitEvent"}, - {85, nullptr, "RequestUpdateApplication2"}, - {86, nullptr, "EnableApplicationCrashReport"}, - {87, nullptr, "IsApplicationCrashReportEnabled"}, - {90, nullptr, "BoostSystemMemoryResourceLimit"}, - {91, nullptr, "DeprecatedLaunchApplication"}, - {92, nullptr, "GetRunningApplicationProgramId"}, - {93, nullptr, "GetMainApplicationProgramIndex"}, - {94, nullptr, "LaunchApplication"}, - {95, nullptr, "GetApplicationLaunchInfo"}, - {96, nullptr, "AcquireApplicationLaunchInfo"}, - {97, nullptr, "GetMainApplicationProgramIndexByApplicationLaunchInfo"}, - {98, nullptr, "EnableApplicationAllThreadDumpOnCrash"}, - {99, nullptr, "LaunchDevMenu"}, - {100, nullptr, "ResetToFactorySettings"}, - {101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, - {102, nullptr, "ResetToFactorySettingsForRefurbishment"}, - {103, nullptr, "ResetToFactorySettingsWithPlatformRegion"}, - {104, nullptr, "ResetToFactorySettingsWithPlatformRegionAuthentication"}, - {105, nullptr, "RequestResetToFactorySettingsSecurely"}, - {106, nullptr, "RequestResetToFactorySettingsWithPlatformRegionAuthenticationSecurely"}, - {200, nullptr, "CalculateUserSaveDataStatistics"}, - {201, nullptr, "DeleteUserSaveDataAll"}, - {210, nullptr, "DeleteUserSystemSaveData"}, - {211, nullptr, "DeleteSaveData"}, - {220, nullptr, "UnregisterNetworkServiceAccount"}, - {221, D<&IApplicationManagerInterface::UnregisterNetworkServiceAccountWithUserSaveDataDeletion>, "UnregisterNetworkServiceAccountWithUserSaveDataDeletion"}, - {300, nullptr, "GetApplicationShellEvent"}, - {301, nullptr, "PopApplicationShellEventInfo"}, - {302, nullptr, "LaunchLibraryApplet"}, - {303, nullptr, "TerminateLibraryApplet"}, - {304, nullptr, "LaunchSystemApplet"}, - {305, nullptr, "TerminateSystemApplet"}, - {306, nullptr, "LaunchOverlayApplet"}, - {307, nullptr, "TerminateOverlayApplet"}, - {400, D<&IApplicationManagerInterface::GetApplicationControlData>, "GetApplicationControlData"}, - {401, nullptr, "InvalidateAllApplicationControlCache"}, - {402, nullptr, "RequestDownloadApplicationControlData"}, - {403, nullptr, "GetMaxApplicationControlCacheCount"}, - {404, nullptr, "InvalidateApplicationControlCache"}, - {405, nullptr, "ListApplicationControlCacheEntryInfo"}, - {406, nullptr, "GetApplicationControlProperty"}, - {407, &IApplicationManagerInterface::ListApplicationTitle, "ListApplicationTitle"}, - {408, &IApplicationManagerInterface::ListApplicationIcon, "ListApplicationIcon"}, - {411, nullptr, "Unknown411"}, //19.0.0+ - {412, nullptr, "Unknown412"}, //19.0.0+ - {413, nullptr, "Unknown413"}, //19.0.0+ - {414, nullptr, "Unknown414"}, //19.0.0+ - {415, nullptr, "Unknown415"}, //19.0.0+ - {416, nullptr, "Unknown416"}, //19.0.0+ - {417, nullptr, "InvalidateAllApplicationControlCacheOfTheStage"}, //19.0.0+ - {418, nullptr, "InvalidateApplicationControlCacheOfTheStage"}, //19.0.0+ - {419, D<&IApplicationManagerInterface::RequestDownloadApplicationControlDataInBackground>, "RequestDownloadApplicationControlDataInBackground"}, - {420, nullptr, "CloneApplicationControlDataCacheForDebug"}, - {421, nullptr, "Unknown421"}, //20.0.0+ - {422, nullptr, "Unknown422"}, //20.0.0+ - {423, nullptr, "Unknown423"}, //20.0.0+ - {424, nullptr, "Unknown424"}, //20.0.0+ - {425, nullptr, "Unknown425"}, //20.0.0+ - {426, nullptr, "Unknown426"}, //20.0.0+ - {427, nullptr, "Unknown427"}, //20.0.0+ - {428, nullptr, "Unknown428"}, //21.0.0+ - {429, nullptr, "Unknown429"}, //21.0.0+ - {430, nullptr, "Unknown430"}, //21.0.0+ - {502, nullptr, "RequestCheckGameCardRegistration"}, - {503, nullptr, "RequestGameCardRegistrationGoldPoint"}, - {504, nullptr, "RequestRegisterGameCard"}, - {505, D<&IApplicationManagerInterface::GetGameCardMountFailureEvent>, "GetGameCardMountFailureEvent"}, - {506, nullptr, "IsGameCardInserted"}, - {507, nullptr, "EnsureGameCardAccess"}, - {508, nullptr, "GetLastGameCardMountFailureResult"}, - {509, nullptr, "ListApplicationIdOnGameCard"}, - {510, nullptr, "GetGameCardPlatformRegion"}, - {511, D<&IApplicationManagerInterface::GetGameCardWakenReadyEvent>, "GetGameCardWakenReadyEvent"}, - {512, D<&IApplicationManagerInterface::IsGameCardApplicationRunning>, "IsGameCardApplicationRunning"}, - {513, nullptr, "Unknown513"}, //20.0.0+ - {514, nullptr, "Unknown514"}, //20.0.0+ - {515, nullptr, "Unknown515"}, //20.0.0+ - {516, nullptr, "Unknown516"}, //21.0.0+ - {517, nullptr, "Unknown517"}, //21.0.0+ - {518, nullptr, "Unknown518"}, //21.0.0+ - {519, nullptr, "Unknown519"}, //21.0.0+ - {600, nullptr, "CountApplicationContentMeta"}, - {601, nullptr, "ListApplicationContentMetaStatus"}, - {602, nullptr, "ListAvailableAddOnContent"}, - {603, nullptr, "GetOwnedApplicationContentMetaStatus"}, - {604, nullptr, "RegisterContentsExternalKey"}, - {605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"}, - {606, nullptr, "GetContentMetaStorage"}, - {607, nullptr, "ListAvailableAddOnContent"}, - {609, nullptr, "ListAvailabilityAssuredAddOnContent"}, - {610, nullptr, "GetInstalledContentMetaStorage"}, - {611, nullptr, "PrepareAddOnContent"}, - {700, nullptr, "PushDownloadTaskList"}, - {701, nullptr, "ClearTaskStatusList"}, - {702, nullptr, "RequestDownloadTaskList"}, - {703, nullptr, "RequestEnsureDownloadTask"}, - {704, nullptr, "ListDownloadTaskStatus"}, - {705, nullptr, "RequestDownloadTaskListData"}, - {800, nullptr, "RequestVersionList"}, - {801, nullptr, "ListVersionList"}, - {802, nullptr, "RequestVersionListData"}, - {900, nullptr, "GetApplicationRecord"}, - {901, nullptr, "GetApplicationRecordProperty"}, - {902, nullptr, "EnableApplicationAutoUpdate"}, - {903, nullptr, "DisableApplicationAutoUpdate"}, - {904, D<&IApplicationManagerInterface::TouchApplication>, "TouchApplication"}, - {905, nullptr, "RequestApplicationUpdate"}, - {906, D<&IApplicationManagerInterface::IsApplicationUpdateRequested>, "IsApplicationUpdateRequested"}, - {907, nullptr, "WithdrawApplicationUpdateRequest"}, - {908, nullptr, "ListApplicationRecordInstalledContentMeta"}, - {909, nullptr, "WithdrawCleanupAddOnContentsWithNoRightsRecommendation"}, - {910, nullptr, "HasApplicationRecord"}, - {911, nullptr, "SetPreInstalledApplication"}, - {912, nullptr, "ClearPreInstalledApplicationFlag"}, - {913, nullptr, "ListAllApplicationRecord"}, - {914, nullptr, "HideApplicationRecord"}, - {915, nullptr, "ShowApplicationRecord"}, - {916, nullptr, "IsApplicationAutoDeleteDisabled"}, - {916, nullptr, "Unknown916"}, //20.0.0+ - {917, nullptr, "Unknown917"}, //20.0.0+ - {918, nullptr, "Unknown918"}, //20.0.0+ - {919, nullptr, "Unknown919"}, //20.0.0+ - {920, nullptr, "Unknown920"}, //20.0.0+ - {921, nullptr, "Unknown921"}, //20.0.0+ - {922, nullptr, "Unknown922"}, //20.0.0+ - {923, nullptr, "Unknown923"}, //20.0.0+ - {928, nullptr, "Unknown928"}, //20.0.0+ - {929, nullptr, "Unknown929"}, //20.0.0+ - {930, nullptr, "Unknown930"}, //20.0.0+ - {931, nullptr, "Unknown931"}, //20.0.0+ - {933, nullptr, "Unknown933"}, //20.0.0+ - {934, nullptr, "Unknown934"}, //21.0.0+ - {935, nullptr, "Unknown935"}, //21.0.0+ - {936, D<&IApplicationManagerInterface::Unknown936>, "Unknown936"}, //21.0.0+ - {1000, nullptr, "RequestVerifyApplicationDeprecated"}, - {1001, nullptr, "CorruptApplicationForDebug"}, - {1002, nullptr, "RequestVerifyAddOnContentsRights"}, - {1003, nullptr, "RequestVerifyApplication"}, - {1004, nullptr, "CorruptContentForDebug"}, - {1200, nullptr, "NeedsUpdateVulnerability"}, - {1300, D<&IApplicationManagerInterface::IsAnyApplicationEntityInstalled>, "IsAnyApplicationEntityInstalled"}, - {1301, nullptr, "DeleteApplicationContentEntities"}, - {1302, nullptr, "CleanupUnrecordedApplicationEntity"}, - {1303, nullptr, "CleanupAddOnContentsWithNoRights"}, - {1304, nullptr, "DeleteApplicationContentEntity"}, - {1305, nullptr, "TryDeleteRunningApplicationEntity"}, - {1306, nullptr, "TryDeleteRunningApplicationCompletely"}, - {1307, nullptr, "TryDeleteRunningApplicationContentEntities"}, - {1308, nullptr, "DeleteApplicationCompletelyForDebug"}, - {1309, nullptr, "CleanupUnavailableAddOnContents"}, - {1310, nullptr, "RequestMoveApplicationEntity"}, - {1311, nullptr, "EstimateSizeToMove"}, - {1312, nullptr, "HasMovableEntity"}, - {1313, nullptr, "CleanupOrphanContents"}, - {1314, nullptr, "CheckPreconditionSatisfiedToMove"}, - {1400, nullptr, "PrepareShutdown"}, - {1500, nullptr, "FormatSdCard"}, - {1501, nullptr, "NeedsSystemUpdateToFormatSdCard"}, - {1502, nullptr, "GetLastSdCardFormatUnexpectedResult"}, - {1504, nullptr, "InsertSdCard"}, - {1505, nullptr, "RemoveSdCard"}, - {1506, nullptr, "GetSdCardStartupStatus"}, - {1508, nullptr, "Unknown1508"}, //20.0.0+ - {1509, nullptr, "Unknown1509"}, //20.0.0+ - {1510, nullptr, "Unknown1510"}, //20.0.0+ - {1511, nullptr, "Unknown1511"}, //20.0.0+ - {1512, nullptr, "Unknown1512"}, //20.0.0+ - {1600, nullptr, "GetSystemSeedForPseudoDeviceId"}, - {1601, nullptr, "ResetSystemSeedForPseudoDeviceId"}, - {1700, nullptr, "ListApplicationDownloadingContentMeta"}, - {1701, D<&IApplicationManagerInterface::GetApplicationViewDeprecated>, "GetApplicationViewDeprecated"}, - {1702, nullptr, "GetApplicationDownloadTaskStatus"}, - {1703, nullptr, "GetApplicationViewDownloadErrorContext"}, - {1704, D<&IApplicationManagerInterface::GetApplicationViewWithPromotionInfo>, "GetApplicationViewWithPromotionInfo"}, - {1705, nullptr, "IsPatchAutoDeletableApplication"}, - {1706, D<&IApplicationManagerInterface::GetApplicationView>, "GetApplicationView"}, - {1800, nullptr, "IsNotificationSetupCompleted"}, - {1801, nullptr, "GetLastNotificationInfoCount"}, - {1802, nullptr, "ListLastNotificationInfo"}, - {1803, nullptr, "ListNotificationTask"}, - {1900, nullptr, "IsActiveAccount"}, - {1901, nullptr, "RequestDownloadApplicationPrepurchasedRights"}, - {1902, nullptr, "GetApplicationTicketInfo"}, - {1903, nullptr, "RequestDownloadApplicationPrepurchasedRightsForAccount"}, - {2000, nullptr, "GetSystemDeliveryInfo"}, - {2001, nullptr, "SelectLatestSystemDeliveryInfo"}, - {2002, nullptr, "VerifyDeliveryProtocolVersion"}, - {2003, nullptr, "GetApplicationDeliveryInfo"}, - {2004, nullptr, "HasAllContentsToDeliver"}, - {2005, nullptr, "CompareApplicationDeliveryInfo"}, - {2006, nullptr, "CanDeliverApplication"}, - {2007, nullptr, "ListContentMetaKeyToDeliverApplication"}, - {2008, nullptr, "NeedsSystemUpdateToDeliverApplication"}, - {2009, nullptr, "EstimateRequiredSize"}, - {2010, nullptr, "RequestReceiveApplication"}, - {2011, nullptr, "CommitReceiveApplication"}, - {2012, nullptr, "GetReceiveApplicationProgress"}, - {2013, nullptr, "RequestSendApplication"}, - {2014, nullptr, "GetSendApplicationProgress"}, - {2015, nullptr, "CompareSystemDeliveryInfo"}, - {2016, nullptr, "ListNotCommittedContentMeta"}, - {2017, nullptr, "CreateDownloadTask"}, - {2018, nullptr, "GetApplicationDeliveryInfoHash"}, - {2019, nullptr, "Unknown2019"}, //20.0.0+ - {2050, D<&IApplicationManagerInterface::GetApplicationRightsOnClient>, "GetApplicationRightsOnClient"}, - {2051, nullptr, "InvalidateRightsIdCache"}, - {2052, nullptr, "Unknown2052"}, //20.0.0+ - {2053, nullptr, "Unknown2053"}, //20.0.0+ - {2100, D<&IApplicationManagerInterface::GetApplicationTerminateResult>, "GetApplicationTerminateResult"}, - {2101, nullptr, "GetRawApplicationTerminateResult"}, - {2150, nullptr, "CreateRightsEnvironment"}, - {2151, nullptr, "DestroyRightsEnvironment"}, - {2152, nullptr, "ActivateRightsEnvironment"}, - {2153, nullptr, "DeactivateRightsEnvironment"}, - {2154, nullptr, "ForceActivateRightsContextForExit"}, - {2155, nullptr, "UpdateRightsEnvironmentStatus"}, - {2156, nullptr, "CreateRightsEnvironmentForMicroApplication"}, - {2160, nullptr, "AddTargetApplicationToRightsEnvironment"}, - {2161, nullptr, "SetUsersToRightsEnvironment"}, - {2170, nullptr, "GetRightsEnvironmentStatus"}, - {2171, nullptr, "GetRightsEnvironmentStatusChangedEvent"}, - {2180, nullptr, "RequestExtendRightsInRightsEnvironment"}, - {2181, nullptr, "GetResultOfExtendRightsInRightsEnvironment"}, - {2182, nullptr, "SetActiveRightsContextUsingStateToRightsEnvironment"}, - {2183, nullptr, "Unknown2183"}, //20.1.0+ - {2190, nullptr, "GetRightsEnvironmentHandleForApplication"}, - {2199, nullptr, "GetRightsEnvironmentCountForDebug"}, - {2200, nullptr, "GetGameCardApplicationCopyIdentifier"}, - {2201, nullptr, "GetInstalledApplicationCopyIdentifier"}, - {2250, nullptr, "RequestReportActiveELicence"}, - {2300, nullptr, "ListEventLog"}, - {2350, nullptr, "PerformAutoUpdateByApplicationId"}, - {2351, nullptr, "RequestNoDownloadRightsErrorResolution"}, - {2352, nullptr, "RequestResolveNoDownloadRightsError"}, - {2353, nullptr, "GetApplicationDownloadTaskInfo"}, - {2354, nullptr, "PrioritizeApplicationBackgroundTask"}, - {2355, nullptr, "PreferStorageEfficientUpdate"}, - {2356, nullptr, "RequestStorageEfficientUpdatePreferable"}, - {2357, nullptr, "EnableMultiCoreDownload"}, - {2358, nullptr, "DisableMultiCoreDownload"}, - {2359, nullptr, "IsMultiCoreDownloadEnabled"}, - {2360, nullptr, "GetApplicationDownloadTaskCount"}, //19.0.0+ - {2361, nullptr, "GetMaxApplicationDownloadTaskCount"}, //19.0.0+ - {2362, nullptr, "Unknown2362"}, //20.0.0+ - {2363, nullptr, "Unknown2363"}, //20.0.0+ - {2364, nullptr, "Unknown2364"}, //20.0.0+ - {2365, nullptr, "Unknown2365"}, //20.0.0+ - {2366, nullptr, "Unknown2366"}, //20.0.0+ - {2367, nullptr, "Unknown2367"}, //20.0.0+ - {2368, nullptr, "Unknown2368"}, //20.0.0+ - {2369, nullptr, "Unknown2369"}, //21.0.0+ - {2400, nullptr, "GetPromotionInfo"}, - {2401, nullptr, "CountPromotionInfo"}, - {2402, nullptr, "ListPromotionInfo"}, - {2403, nullptr, "ImportPromotionJsonForDebug"}, - {2404, nullptr, "ClearPromotionInfoForDebug"}, - {2500, nullptr, "ConfirmAvailableTime"}, - {2510, nullptr, "CreateApplicationResource"}, - {2511, nullptr, "GetApplicationResource"}, - {2513, nullptr, "LaunchMicroApplication"}, - {2514, nullptr, "ClearTaskOfAsyncTaskManager"}, - {2515, nullptr, "CleanupAllPlaceHolderAndFragmentsIfNoTask"}, - {2516, nullptr, "EnsureApplicationCertificate"}, - {2517, nullptr, "CreateApplicationInstance"}, - {2518, nullptr, "UpdateQualificationForDebug"}, - {2519, nullptr, "IsQualificationTransitionSupported"}, - {2520, D<&IApplicationManagerInterface::IsQualificationTransitionSupportedByProcessId>, "IsQualificationTransitionSupportedByProcessId"}, - {2521, nullptr, "GetRightsUserChangedEvent"}, - {2522, nullptr, "IsRomRedirectionAvailable"}, - {2523, nullptr, "GetProgramId"}, //17.0.0+ - {2524, nullptr, "Unknown2524"}, //19.0.0+ - {2525, nullptr, "Unknown2525"}, //20.0.0+ - {2800, nullptr, "GetApplicationIdOfPreomia"}, - {3000, nullptr, "RegisterDeviceLockKey"}, - {3001, nullptr, "UnregisterDeviceLockKey"}, - {3002, nullptr, "VerifyDeviceLockKey"}, - {3003, nullptr, "HideApplicationIcon"}, - {3004, nullptr, "ShowApplicationIcon"}, - {3005, nullptr, "HideApplicationTitle"}, - {3006, nullptr, "ShowApplicationTitle"}, - {3007, nullptr, "EnableGameCard"}, - {3008, nullptr, "DisableGameCard"}, - {3009, nullptr, "EnableLocalContentShare"}, - {3010, nullptr, "DisableLocalContentShare"}, - {3011, nullptr, "IsApplicationIconHidden"}, - {3012, nullptr, "IsApplicationTitleHidden"}, - {3013, nullptr, "IsGameCardEnabled"}, - {3014, nullptr, "IsLocalContentShareEnabled"}, - {3050, nullptr, "ListAssignELicenseTaskResult"}, - {3104, nullptr, "GetApplicationNintendoLogo"}, //18.0.0+ - {3105, nullptr, "GetApplicationStartupMovie"}, //18.0.0+ - {4000, nullptr, "Unknown4000"}, //20.0.0+ - {4004, nullptr, "Unknown4004"}, //20.0.0+ - {4006, nullptr, "Unknown4006"}, //20.0.0+ - {4007, nullptr, "Unknown4007"}, //20.0.0+ - {4008, nullptr, "Unknown4008"}, //20.0.0+ - {4009, nullptr, "Unknown4009"}, //20.0.0+ - {4010, nullptr, "Unknown4010"}, //20.0.0+ - {4011, nullptr, "Unknown4011"}, //20.0.0+ - {4012, nullptr, "Unknown4012"}, //20.0.0+ - {4013, nullptr, "Unknown4013"}, //20.0.0+ - {4015, nullptr, "Unknown4015"}, //20.0.0+ - {4017, nullptr, "Unknown4017"}, //20.0.0+ - {4019, nullptr, "Unknown4019"}, //20.0.0+ - {4020, nullptr, "Unknown4020"}, //20.0.0+ - {4021, nullptr, "Unknown4021"}, //20.0.0+ - {4022, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4022"}, //20.0.0+ - {4023, D<&IApplicationManagerInterface::Unknown4023>, "Unknown4023"}, //20.0.0+ - {4024, nullptr, "Unknown4024"}, //20.0.0+ - {4025, nullptr, "Unknown4025"}, //20.0.0+ - {4026, nullptr, "Unknown4026"}, //20.0.0+ - {4027, nullptr, "Unknown4027"}, //20.0.0+ - {4028, nullptr, "Unknown4028"}, //20.0.0+ - {4029, nullptr, "Unknown4029"}, //20.0.0+ - {4030, nullptr, "Unknown4030"}, //20.0.0+ - {4031, nullptr, "Unknown4031"}, //20.0.0+ - {4032, nullptr, "Unknown4032"}, //20.0.0+ - {4033, nullptr, "Unknown4033"}, //20.0.0+ - {4034, nullptr, "Unknown4034"}, //20.0.0+ - {4035, nullptr, "Unknown4035"}, //20.0.0+ - {4037, nullptr, "Unknown4037"}, //20.0.0+ - {4038, nullptr, "Unknown4038"}, //20.0.0+ - {4039, nullptr, "Unknown4039"}, //20.0.0+ - {4040, nullptr, "Unknown4040"}, //20.0.0+ - {4041, nullptr, "Unknown4041"}, //20.0.0+ - {4042, D<&IApplicationManagerInterface::Unknown4042>, "Unknown4042"}, //20.0.0+ - {4043, nullptr, "Unknown4043"}, //20.0.0+ - {4044, nullptr, "Unknown4044"}, //20.0.0+ - {4045, nullptr, "Unknown4045"}, //20.0.0+ - {4046, nullptr, "Unknown4046"}, //20.0.0+ - {4049, nullptr, "Unknown4049"}, //20.0.0+ - {4050, nullptr, "Unknown4050"}, //20.0.0+ - {4051, nullptr, "Unknown4051"}, //20.0.0+ - {4052, nullptr, "Unknown4052"}, //20.0.0+ - {4053, D<&IApplicationManagerInterface::Unknown4053>, "Unknown4053"}, //20.0.0+ - {4054, nullptr, "Unknown4054"}, //20.0.0+ - {4055, nullptr, "Unknown4055"}, //20.0.0+ - {4056, nullptr, "Unknown4056"}, //20.0.0+ - {4057, nullptr, "Unknown4057"}, //20.0.0+ - {4058, nullptr, "Unknown4058"}, //20.0.0+ - {4059, nullptr, "Unknown4059"}, //20.0.0+ - {4060, nullptr, "Unknown4060"}, //20.0.0+ - {4061, nullptr, "Unknown4061"}, //20.0.0+ - {4062, nullptr, "Unknown4062"}, //20.0.0+ - {4063, nullptr, "Unknown4063"}, //20.0.0+ - {4064, nullptr, "Unknown4064"}, //20.0.0+ - {4065, nullptr, "Unknown4065"}, //20.0.0+ - {4066, nullptr, "Unknown4066"}, //20.0.0+ - {4067, nullptr, "Unknown4067"}, //20.0.0+ - {4068, nullptr, "Unknown4068"}, //20.0.0+ - {4069, nullptr, "Unknown4069"}, //20.0.0+ - {4070, nullptr, "Unknown4070"}, //20.0.0+ - {4071, nullptr, "Unknown4071"}, //20.0.0+ - {4072, nullptr, "Unknown4072"}, //20.0.0+ - {4073, nullptr, "Unknown4073"}, //20.0.0+ - {4074, nullptr, "Unknown4074"}, //20.0.0+ - {4075, nullptr, "Unknown4075"}, //20.0.0+ - {4076, nullptr, "Unknown4076"}, //20.0.0+ - {4077, nullptr, "Unknown4077"}, //20.0.0+ - {4078, nullptr, "Unknown4078"}, //20.0.0+ - {4079, nullptr, "Unknown4079"}, //20.0.0+ - {4080, nullptr, "Unknown4080"}, //20.0.0+ - {4081, nullptr, "Unknown4081"}, //20.0.0+ - {4083, nullptr, "Unknown4083"}, //20.0.0+ - {4084, nullptr, "Unknown4084"}, //20.0.0+ - {4085, nullptr, "Unknown4085"}, //20.0.0+ - {4086, nullptr, "Unknown4086"}, //20.0.0+ - {4087, nullptr, "Unknown4087"}, //20.0.0+ - {4088, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4088"}, //20.0.0+ - {4089, nullptr, "Unknown4089"}, //20.0.0+ - {4090, nullptr, "Unknown4090"}, //20.0.0+ - {4091, nullptr, "Unknown4091"}, //20.0.0+ - {4092, nullptr, "Unknown4092"}, //20.0.0+ - {4093, nullptr, "Unknown4093"}, //20.0.0+ - {4094, nullptr, "Unknown4094"}, //20.0.0+ - {4095, nullptr, "Unknown4095"}, //20.0.0+ - {4096, nullptr, "Unknown4096"}, //20.0.0+ - {4097, nullptr, "Unknown4097"}, //20.0.0+ - {4099, nullptr, "Unknown4099"}, //21.0.0+ - {4105, D<&IApplicationManagerInterface::Unknown4105>, "Unknown4105"}, //23.0.0+ - {5000, nullptr, "Unknown5000"}, //18.0.0+ - {5001, nullptr, "Unknown5001"}, //18.0.0+ - {9999, nullptr, "GetApplicationCertificate"}, //10.0.0-10.2.0 + FunctionInfo{0, D<&IApplicationManagerInterface::ListApplicationRecord>, "ListApplicationRecord"}, + FunctionInfo{1, nullptr, "GenerateApplicationRecordCount"}, + FunctionInfo{2, D<&IApplicationManagerInterface::GetApplicationRecordUpdateSystemEvent>, "GetApplicationRecordUpdateSystemEvent"}, + FunctionInfo{3, nullptr, "GetApplicationViewDeprecated"}, + FunctionInfo{4, D<&IApplicationManagerInterface::DeleteApplicationEntity>, "DeleteApplicationEntity"}, + FunctionInfo{5, D<&IApplicationManagerInterface::DeleteApplicationCompletely>, "DeleteApplicationCompletely"}, + FunctionInfo{6, nullptr, "IsAnyApplicationEntityRedundant"}, + FunctionInfo{7, nullptr, "DeleteRedundantApplicationEntity"}, + FunctionInfo{8, nullptr, "IsApplicationEntityMovable"}, + FunctionInfo{9, nullptr, "MoveApplicationEntity"}, + FunctionInfo{11, nullptr, "CalculateApplicationOccupiedSize"}, + FunctionInfo{16, &IApplicationManagerInterface::PushApplicationRecord, "PushApplicationRecord"}, + FunctionInfo{17, nullptr, "ListApplicationRecordContentMeta"}, + FunctionInfo{19, nullptr, "LaunchApplicationOld"}, + FunctionInfo{21, nullptr, "GetApplicationContentPath"}, + FunctionInfo{22, nullptr, "TerminateApplication"}, + FunctionInfo{23, nullptr, "ResolveApplicationContentPath"}, + FunctionInfo{26, nullptr, "BeginInstallApplication"}, + FunctionInfo{27, nullptr, "DeleteApplicationRecord"}, + FunctionInfo{30, nullptr, "RequestApplicationUpdateInfo"}, + FunctionInfo{31, nullptr, "RequestUpdateApplication"}, + FunctionInfo{32, nullptr, "CancelApplicationDownload"}, + FunctionInfo{33, nullptr, "ResumeApplicationDownload"}, + FunctionInfo{35, nullptr, "UpdateVersionList"}, + FunctionInfo{36, nullptr, "PushLaunchVersion"}, + FunctionInfo{37, nullptr, "ListRequiredVersion"}, + FunctionInfo{38, D<&IApplicationManagerInterface::CheckApplicationLaunchVersion>, "CheckApplicationLaunchVersion"}, + FunctionInfo{39, nullptr, "CheckApplicationLaunchRights"}, + FunctionInfo{40, D<&IApplicationManagerInterface::GetApplicationLogoData>, "GetApplicationLogoData"}, + FunctionInfo{41, nullptr, "CalculateApplicationDownloadRequiredSize"}, + FunctionInfo{42, nullptr, "CleanupSdCard"}, + FunctionInfo{43, D<&IApplicationManagerInterface::CheckSdCardMountStatus>, "CheckSdCardMountStatus"}, + FunctionInfo{44, D<&IApplicationManagerInterface::GetSdCardMountStatusChangedEvent>, "GetSdCardMountStatusChangedEvent"}, + FunctionInfo{45, nullptr, "GetGameCardAttachmentEvent"}, + FunctionInfo{46, nullptr, "GetGameCardAttachmentInfo"}, + FunctionInfo{47, D<&IApplicationManagerInterface::GetTotalSpaceSize>, "GetTotalSpaceSize"}, + FunctionInfo{48, D<&IApplicationManagerInterface::GetFreeSpaceSize>, "GetFreeSpaceSize"}, + FunctionInfo{49, nullptr, "GetSdCardRemovedEvent"}, + FunctionInfo{52, D<&IApplicationManagerInterface::GetGameCardUpdateDetectionEvent>, "GetGameCardUpdateDetectionEvent"}, + FunctionInfo{53, nullptr, "DisableApplicationAutoDelete"}, + FunctionInfo{54, nullptr, "EnableApplicationAutoDelete"}, + FunctionInfo{55, D<&IApplicationManagerInterface::GetApplicationDesiredLanguage>, "GetApplicationDesiredLanguage"}, + FunctionInfo{56, nullptr, "SetApplicationTerminateResult"}, + FunctionInfo{57, nullptr, "ClearApplicationTerminateResult"}, + FunctionInfo{58, nullptr, "GetLastSdCardMountUnexpectedResult"}, + FunctionInfo{59, D<&IApplicationManagerInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"}, + FunctionInfo{60, nullptr, "ConvertLanguageCodeToApplicationLanguage"}, + FunctionInfo{61, nullptr, "GetBackgroundDownloadStressTaskInfo"}, + FunctionInfo{62, nullptr, "GetGameCardStopper"}, + FunctionInfo{63, nullptr, "IsSystemProgramInstalled"}, + FunctionInfo{64, nullptr, "StartApplyDeltaTask"}, + FunctionInfo{65, nullptr, "GetRequestServerStopper"}, + FunctionInfo{66, nullptr, "GetBackgroundApplyDeltaStressTaskInfo"}, + FunctionInfo{67, nullptr, "CancelApplicationApplyDelta"}, + FunctionInfo{68, nullptr, "ResumeApplicationApplyDelta"}, + FunctionInfo{69, nullptr, "CalculateApplicationApplyDeltaRequiredSize"}, + FunctionInfo{70, D<&IApplicationManagerInterface::ResumeAll>, "ResumeAll"}, + FunctionInfo{71, D<&IApplicationManagerInterface::GetStorageSize>, "GetStorageSize"}, + FunctionInfo{80, nullptr, "RequestDownloadApplication"}, + FunctionInfo{81, nullptr, "RequestDownloadAddOnContent"}, + FunctionInfo{82, nullptr, "DownloadApplication"}, + FunctionInfo{83, nullptr, "CheckApplicationResumeRights"}, + FunctionInfo{84, nullptr, "GetDynamicCommitEvent"}, + FunctionInfo{85, nullptr, "RequestUpdateApplication2"}, + FunctionInfo{86, nullptr, "EnableApplicationCrashReport"}, + FunctionInfo{87, nullptr, "IsApplicationCrashReportEnabled"}, + FunctionInfo{90, nullptr, "BoostSystemMemoryResourceLimit"}, + FunctionInfo{91, nullptr, "DeprecatedLaunchApplication"}, + FunctionInfo{92, nullptr, "GetRunningApplicationProgramId"}, + FunctionInfo{93, nullptr, "GetMainApplicationProgramIndex"}, + FunctionInfo{94, nullptr, "LaunchApplication"}, + FunctionInfo{95, nullptr, "GetApplicationLaunchInfo"}, + FunctionInfo{96, nullptr, "AcquireApplicationLaunchInfo"}, + FunctionInfo{97, nullptr, "GetMainApplicationProgramIndexByApplicationLaunchInfo"}, + FunctionInfo{98, nullptr, "EnableApplicationAllThreadDumpOnCrash"}, + FunctionInfo{99, nullptr, "LaunchDevMenu"}, + FunctionInfo{100, nullptr, "ResetToFactorySettings"}, + FunctionInfo{101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, + FunctionInfo{102, nullptr, "ResetToFactorySettingsForRefurbishment"}, + FunctionInfo{103, nullptr, "ResetToFactorySettingsWithPlatformRegion"}, + FunctionInfo{104, nullptr, "ResetToFactorySettingsWithPlatformRegionAuthentication"}, + FunctionInfo{105, nullptr, "RequestResetToFactorySettingsSecurely"}, + FunctionInfo{106, nullptr, "RequestResetToFactorySettingsWithPlatformRegionAuthenticationSecurely"}, + FunctionInfo{200, nullptr, "CalculateUserSaveDataStatistics"}, + FunctionInfo{201, nullptr, "DeleteUserSaveDataAll"}, + FunctionInfo{210, nullptr, "DeleteUserSystemSaveData"}, + FunctionInfo{211, nullptr, "DeleteSaveData"}, + FunctionInfo{220, nullptr, "UnregisterNetworkServiceAccount"}, + FunctionInfo{221, D<&IApplicationManagerInterface::UnregisterNetworkServiceAccountWithUserSaveDataDeletion>, "UnregisterNetworkServiceAccountWithUserSaveDataDeletion"}, + FunctionInfo{300, nullptr, "GetApplicationShellEvent"}, + FunctionInfo{301, nullptr, "PopApplicationShellEventInfo"}, + FunctionInfo{302, nullptr, "LaunchLibraryApplet"}, + FunctionInfo{303, nullptr, "TerminateLibraryApplet"}, + FunctionInfo{304, nullptr, "LaunchSystemApplet"}, + FunctionInfo{305, nullptr, "TerminateSystemApplet"}, + FunctionInfo{306, nullptr, "LaunchOverlayApplet"}, + FunctionInfo{307, nullptr, "TerminateOverlayApplet"}, + FunctionInfo{400, D<&IApplicationManagerInterface::GetApplicationControlData>, "GetApplicationControlData"}, + FunctionInfo{401, nullptr, "InvalidateAllApplicationControlCache"}, + FunctionInfo{402, nullptr, "RequestDownloadApplicationControlData"}, + FunctionInfo{403, nullptr, "GetMaxApplicationControlCacheCount"}, + FunctionInfo{404, nullptr, "InvalidateApplicationControlCache"}, + FunctionInfo{405, nullptr, "ListApplicationControlCacheEntryInfo"}, + FunctionInfo{406, nullptr, "GetApplicationControlProperty"}, + FunctionInfo{407, &IApplicationManagerInterface::ListApplicationTitle, "ListApplicationTitle"}, + FunctionInfo{408, &IApplicationManagerInterface::ListApplicationIcon, "ListApplicationIcon"}, + FunctionInfo{411, nullptr, "Unknown411"}, //19.0.0+ + FunctionInfo{412, nullptr, "Unknown412"}, //19.0.0+ + FunctionInfo{413, nullptr, "Unknown413"}, //19.0.0+ + FunctionInfo{414, nullptr, "Unknown414"}, //19.0.0+ + FunctionInfo{415, nullptr, "Unknown415"}, //19.0.0+ + FunctionInfo{416, nullptr, "Unknown416"}, //19.0.0+ + FunctionInfo{417, nullptr, "InvalidateAllApplicationControlCacheOfTheStage"}, //19.0.0+ + FunctionInfo{418, nullptr, "InvalidateApplicationControlCacheOfTheStage"}, //19.0.0+ + FunctionInfo{419, D<&IApplicationManagerInterface::RequestDownloadApplicationControlDataInBackground>, "RequestDownloadApplicationControlDataInBackground"}, + FunctionInfo{420, nullptr, "CloneApplicationControlDataCacheForDebug"}, + FunctionInfo{421, nullptr, "Unknown421"}, //20.0.0+ + FunctionInfo{422, nullptr, "Unknown422"}, //20.0.0+ + FunctionInfo{423, nullptr, "Unknown423"}, //20.0.0+ + FunctionInfo{424, nullptr, "Unknown424"}, //20.0.0+ + FunctionInfo{425, nullptr, "Unknown425"}, //20.0.0+ + FunctionInfo{426, nullptr, "Unknown426"}, //20.0.0+ + FunctionInfo{427, nullptr, "Unknown427"}, //20.0.0+ + FunctionInfo{428, nullptr, "Unknown428"}, //21.0.0+ + FunctionInfo{429, nullptr, "Unknown429"}, //21.0.0+ + FunctionInfo{430, nullptr, "Unknown430"}, //21.0.0+ + FunctionInfo{502, nullptr, "RequestCheckGameCardRegistration"}, + FunctionInfo{503, nullptr, "RequestGameCardRegistrationGoldPoint"}, + FunctionInfo{504, nullptr, "RequestRegisterGameCard"}, + FunctionInfo{505, D<&IApplicationManagerInterface::GetGameCardMountFailureEvent>, "GetGameCardMountFailureEvent"}, + FunctionInfo{506, nullptr, "IsGameCardInserted"}, + FunctionInfo{507, nullptr, "EnsureGameCardAccess"}, + FunctionInfo{508, nullptr, "GetLastGameCardMountFailureResult"}, + FunctionInfo{509, nullptr, "ListApplicationIdOnGameCard"}, + FunctionInfo{510, nullptr, "GetGameCardPlatformRegion"}, + FunctionInfo{511, D<&IApplicationManagerInterface::GetGameCardWakenReadyEvent>, "GetGameCardWakenReadyEvent"}, + FunctionInfo{512, D<&IApplicationManagerInterface::IsGameCardApplicationRunning>, "IsGameCardApplicationRunning"}, + FunctionInfo{513, nullptr, "Unknown513"}, //20.0.0+ + FunctionInfo{514, nullptr, "Unknown514"}, //20.0.0+ + FunctionInfo{515, nullptr, "Unknown515"}, //20.0.0+ + FunctionInfo{516, nullptr, "Unknown516"}, //21.0.0+ + FunctionInfo{517, nullptr, "Unknown517"}, //21.0.0+ + FunctionInfo{518, nullptr, "Unknown518"}, //21.0.0+ + FunctionInfo{519, nullptr, "Unknown519"}, //21.0.0+ + FunctionInfo{600, nullptr, "CountApplicationContentMeta"}, + FunctionInfo{601, nullptr, "ListApplicationContentMetaStatus"}, + FunctionInfo{602, nullptr, "ListAvailableAddOnContent"}, + FunctionInfo{603, nullptr, "GetOwnedApplicationContentMetaStatus"}, + FunctionInfo{604, nullptr, "RegisterContentsExternalKey"}, + FunctionInfo{605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"}, + FunctionInfo{606, nullptr, "GetContentMetaStorage"}, + FunctionInfo{607, nullptr, "ListAvailableAddOnContent"}, + FunctionInfo{609, nullptr, "ListAvailabilityAssuredAddOnContent"}, + FunctionInfo{610, nullptr, "GetInstalledContentMetaStorage"}, + FunctionInfo{611, nullptr, "PrepareAddOnContent"}, + FunctionInfo{700, nullptr, "PushDownloadTaskList"}, + FunctionInfo{701, nullptr, "ClearTaskStatusList"}, + FunctionInfo{702, nullptr, "RequestDownloadTaskList"}, + FunctionInfo{703, nullptr, "RequestEnsureDownloadTask"}, + FunctionInfo{704, nullptr, "ListDownloadTaskStatus"}, + FunctionInfo{705, nullptr, "RequestDownloadTaskListData"}, + FunctionInfo{800, nullptr, "RequestVersionList"}, + FunctionInfo{801, nullptr, "ListVersionList"}, + FunctionInfo{802, nullptr, "RequestVersionListData"}, + FunctionInfo{900, nullptr, "GetApplicationRecord"}, + FunctionInfo{901, nullptr, "GetApplicationRecordProperty"}, + FunctionInfo{902, nullptr, "EnableApplicationAutoUpdate"}, + FunctionInfo{903, nullptr, "DisableApplicationAutoUpdate"}, + FunctionInfo{904, D<&IApplicationManagerInterface::TouchApplication>, "TouchApplication"}, + FunctionInfo{905, nullptr, "RequestApplicationUpdate"}, + FunctionInfo{906, D<&IApplicationManagerInterface::IsApplicationUpdateRequested>, "IsApplicationUpdateRequested"}, + FunctionInfo{907, nullptr, "WithdrawApplicationUpdateRequest"}, + FunctionInfo{908, nullptr, "ListApplicationRecordInstalledContentMeta"}, + FunctionInfo{909, nullptr, "WithdrawCleanupAddOnContentsWithNoRightsRecommendation"}, + FunctionInfo{910, nullptr, "HasApplicationRecord"}, + FunctionInfo{911, nullptr, "SetPreInstalledApplication"}, + FunctionInfo{912, nullptr, "ClearPreInstalledApplicationFlag"}, + FunctionInfo{913, nullptr, "ListAllApplicationRecord"}, + FunctionInfo{914, nullptr, "HideApplicationRecord"}, + FunctionInfo{915, nullptr, "ShowApplicationRecord"}, + FunctionInfo{916, nullptr, "IsApplicationAutoDeleteDisabled"}, + FunctionInfo{916, nullptr, "Unknown916"}, //20.0.0+ + FunctionInfo{917, nullptr, "Unknown917"}, //20.0.0+ + FunctionInfo{918, nullptr, "Unknown918"}, //20.0.0+ + FunctionInfo{919, nullptr, "Unknown919"}, //20.0.0+ + FunctionInfo{920, nullptr, "Unknown920"}, //20.0.0+ + FunctionInfo{921, nullptr, "Unknown921"}, //20.0.0+ + FunctionInfo{922, nullptr, "Unknown922"}, //20.0.0+ + FunctionInfo{923, nullptr, "Unknown923"}, //20.0.0+ + FunctionInfo{928, nullptr, "Unknown928"}, //20.0.0+ + FunctionInfo{929, nullptr, "Unknown929"}, //20.0.0+ + FunctionInfo{930, nullptr, "Unknown930"}, //20.0.0+ + FunctionInfo{931, nullptr, "Unknown931"}, //20.0.0+ + FunctionInfo{933, nullptr, "Unknown933"}, //20.0.0+ + FunctionInfo{934, nullptr, "Unknown934"}, //21.0.0+ + FunctionInfo{935, nullptr, "Unknown935"}, //21.0.0+ + FunctionInfo{936, D<&IApplicationManagerInterface::Unknown936>, "Unknown936"}, //21.0.0+ + FunctionInfo{1000, nullptr, "RequestVerifyApplicationDeprecated"}, + FunctionInfo{1001, nullptr, "CorruptApplicationForDebug"}, + FunctionInfo{1002, nullptr, "RequestVerifyAddOnContentsRights"}, + FunctionInfo{1003, nullptr, "RequestVerifyApplication"}, + FunctionInfo{1004, nullptr, "CorruptContentForDebug"}, + FunctionInfo{1200, nullptr, "NeedsUpdateVulnerability"}, + FunctionInfo{1300, D<&IApplicationManagerInterface::IsAnyApplicationEntityInstalled>, "IsAnyApplicationEntityInstalled"}, + FunctionInfo{1301, nullptr, "DeleteApplicationContentEntities"}, + FunctionInfo{1302, nullptr, "CleanupUnrecordedApplicationEntity"}, + FunctionInfo{1303, nullptr, "CleanupAddOnContentsWithNoRights"}, + FunctionInfo{1304, nullptr, "DeleteApplicationContentEntity"}, + FunctionInfo{1305, nullptr, "TryDeleteRunningApplicationEntity"}, + FunctionInfo{1306, nullptr, "TryDeleteRunningApplicationCompletely"}, + FunctionInfo{1307, nullptr, "TryDeleteRunningApplicationContentEntities"}, + FunctionInfo{1308, nullptr, "DeleteApplicationCompletelyForDebug"}, + FunctionInfo{1309, nullptr, "CleanupUnavailableAddOnContents"}, + FunctionInfo{1310, nullptr, "RequestMoveApplicationEntity"}, + FunctionInfo{1311, nullptr, "EstimateSizeToMove"}, + FunctionInfo{1312, nullptr, "HasMovableEntity"}, + FunctionInfo{1313, nullptr, "CleanupOrphanContents"}, + FunctionInfo{1314, nullptr, "CheckPreconditionSatisfiedToMove"}, + FunctionInfo{1400, nullptr, "PrepareShutdown"}, + FunctionInfo{1500, nullptr, "FormatSdCard"}, + FunctionInfo{1501, nullptr, "NeedsSystemUpdateToFormatSdCard"}, + FunctionInfo{1502, nullptr, "GetLastSdCardFormatUnexpectedResult"}, + FunctionInfo{1504, nullptr, "InsertSdCard"}, + FunctionInfo{1505, nullptr, "RemoveSdCard"}, + FunctionInfo{1506, nullptr, "GetSdCardStartupStatus"}, + FunctionInfo{1508, nullptr, "Unknown1508"}, //20.0.0+ + FunctionInfo{1509, nullptr, "Unknown1509"}, //20.0.0+ + FunctionInfo{1510, nullptr, "Unknown1510"}, //20.0.0+ + FunctionInfo{1511, nullptr, "Unknown1511"}, //20.0.0+ + FunctionInfo{1512, nullptr, "Unknown1512"}, //20.0.0+ + FunctionInfo{1600, nullptr, "GetSystemSeedForPseudoDeviceId"}, + FunctionInfo{1601, nullptr, "ResetSystemSeedForPseudoDeviceId"}, + FunctionInfo{1700, nullptr, "ListApplicationDownloadingContentMeta"}, + FunctionInfo{1701, D<&IApplicationManagerInterface::GetApplicationViewDeprecated>, "GetApplicationViewDeprecated"}, + FunctionInfo{1702, nullptr, "GetApplicationDownloadTaskStatus"}, + FunctionInfo{1703, nullptr, "GetApplicationViewDownloadErrorContext"}, + FunctionInfo{1704, D<&IApplicationManagerInterface::GetApplicationViewWithPromotionInfo>, "GetApplicationViewWithPromotionInfo"}, + FunctionInfo{1705, nullptr, "IsPatchAutoDeletableApplication"}, + FunctionInfo{1706, D<&IApplicationManagerInterface::GetApplicationView>, "GetApplicationView"}, + FunctionInfo{1800, nullptr, "IsNotificationSetupCompleted"}, + FunctionInfo{1801, nullptr, "GetLastNotificationInfoCount"}, + FunctionInfo{1802, nullptr, "ListLastNotificationInfo"}, + FunctionInfo{1803, nullptr, "ListNotificationTask"}, + FunctionInfo{1900, nullptr, "IsActiveAccount"}, + FunctionInfo{1901, nullptr, "RequestDownloadApplicationPrepurchasedRights"}, + FunctionInfo{1902, nullptr, "GetApplicationTicketInfo"}, + FunctionInfo{1903, nullptr, "RequestDownloadApplicationPrepurchasedRightsForAccount"}, + FunctionInfo{2000, nullptr, "GetSystemDeliveryInfo"}, + FunctionInfo{2001, nullptr, "SelectLatestSystemDeliveryInfo"}, + FunctionInfo{2002, nullptr, "VerifyDeliveryProtocolVersion"}, + FunctionInfo{2003, nullptr, "GetApplicationDeliveryInfo"}, + FunctionInfo{2004, nullptr, "HasAllContentsToDeliver"}, + FunctionInfo{2005, nullptr, "CompareApplicationDeliveryInfo"}, + FunctionInfo{2006, nullptr, "CanDeliverApplication"}, + FunctionInfo{2007, nullptr, "ListContentMetaKeyToDeliverApplication"}, + FunctionInfo{2008, nullptr, "NeedsSystemUpdateToDeliverApplication"}, + FunctionInfo{2009, nullptr, "EstimateRequiredSize"}, + FunctionInfo{2010, nullptr, "RequestReceiveApplication"}, + FunctionInfo{2011, nullptr, "CommitReceiveApplication"}, + FunctionInfo{2012, nullptr, "GetReceiveApplicationProgress"}, + FunctionInfo{2013, nullptr, "RequestSendApplication"}, + FunctionInfo{2014, nullptr, "GetSendApplicationProgress"}, + FunctionInfo{2015, nullptr, "CompareSystemDeliveryInfo"}, + FunctionInfo{2016, nullptr, "ListNotCommittedContentMeta"}, + FunctionInfo{2017, nullptr, "CreateDownloadTask"}, + FunctionInfo{2018, nullptr, "GetApplicationDeliveryInfoHash"}, + FunctionInfo{2019, nullptr, "Unknown2019"}, //20.0.0+ + FunctionInfo{2050, D<&IApplicationManagerInterface::GetApplicationRightsOnClient>, "GetApplicationRightsOnClient"}, + FunctionInfo{2051, nullptr, "InvalidateRightsIdCache"}, + FunctionInfo{2052, nullptr, "Unknown2052"}, //20.0.0+ + FunctionInfo{2053, nullptr, "Unknown2053"}, //20.0.0+ + FunctionInfo{2100, D<&IApplicationManagerInterface::GetApplicationTerminateResult>, "GetApplicationTerminateResult"}, + FunctionInfo{2101, nullptr, "GetRawApplicationTerminateResult"}, + FunctionInfo{2150, nullptr, "CreateRightsEnvironment"}, + FunctionInfo{2151, nullptr, "DestroyRightsEnvironment"}, + FunctionInfo{2152, nullptr, "ActivateRightsEnvironment"}, + FunctionInfo{2153, nullptr, "DeactivateRightsEnvironment"}, + FunctionInfo{2154, nullptr, "ForceActivateRightsContextForExit"}, + FunctionInfo{2155, nullptr, "UpdateRightsEnvironmentStatus"}, + FunctionInfo{2156, nullptr, "CreateRightsEnvironmentForMicroApplication"}, + FunctionInfo{2160, nullptr, "AddTargetApplicationToRightsEnvironment"}, + FunctionInfo{2161, nullptr, "SetUsersToRightsEnvironment"}, + FunctionInfo{2170, nullptr, "GetRightsEnvironmentStatus"}, + FunctionInfo{2171, nullptr, "GetRightsEnvironmentStatusChangedEvent"}, + FunctionInfo{2180, nullptr, "RequestExtendRightsInRightsEnvironment"}, + FunctionInfo{2181, nullptr, "GetResultOfExtendRightsInRightsEnvironment"}, + FunctionInfo{2182, nullptr, "SetActiveRightsContextUsingStateToRightsEnvironment"}, + FunctionInfo{2183, nullptr, "Unknown2183"}, //20.1.0+ + FunctionInfo{2190, nullptr, "GetRightsEnvironmentHandleForApplication"}, + FunctionInfo{2199, nullptr, "GetRightsEnvironmentCountForDebug"}, + FunctionInfo{2200, nullptr, "GetGameCardApplicationCopyIdentifier"}, + FunctionInfo{2201, nullptr, "GetInstalledApplicationCopyIdentifier"}, + FunctionInfo{2250, nullptr, "RequestReportActiveELicence"}, + FunctionInfo{2300, nullptr, "ListEventLog"}, + FunctionInfo{2350, nullptr, "PerformAutoUpdateByApplicationId"}, + FunctionInfo{2351, nullptr, "RequestNoDownloadRightsErrorResolution"}, + FunctionInfo{2352, nullptr, "RequestResolveNoDownloadRightsError"}, + FunctionInfo{2353, nullptr, "GetApplicationDownloadTaskInfo"}, + FunctionInfo{2354, nullptr, "PrioritizeApplicationBackgroundTask"}, + FunctionInfo{2355, nullptr, "PreferStorageEfficientUpdate"}, + FunctionInfo{2356, nullptr, "RequestStorageEfficientUpdatePreferable"}, + FunctionInfo{2357, nullptr, "EnableMultiCoreDownload"}, + FunctionInfo{2358, nullptr, "DisableMultiCoreDownload"}, + FunctionInfo{2359, nullptr, "IsMultiCoreDownloadEnabled"}, + FunctionInfo{2360, nullptr, "GetApplicationDownloadTaskCount"}, //19.0.0+ + FunctionInfo{2361, nullptr, "GetMaxApplicationDownloadTaskCount"}, //19.0.0+ + FunctionInfo{2362, nullptr, "Unknown2362"}, //20.0.0+ + FunctionInfo{2363, nullptr, "Unknown2363"}, //20.0.0+ + FunctionInfo{2364, nullptr, "Unknown2364"}, //20.0.0+ + FunctionInfo{2365, nullptr, "Unknown2365"}, //20.0.0+ + FunctionInfo{2366, nullptr, "Unknown2366"}, //20.0.0+ + FunctionInfo{2367, nullptr, "Unknown2367"}, //20.0.0+ + FunctionInfo{2368, nullptr, "Unknown2368"}, //20.0.0+ + FunctionInfo{2369, nullptr, "Unknown2369"}, //21.0.0+ + FunctionInfo{2400, nullptr, "GetPromotionInfo"}, + FunctionInfo{2401, nullptr, "CountPromotionInfo"}, + FunctionInfo{2402, nullptr, "ListPromotionInfo"}, + FunctionInfo{2403, nullptr, "ImportPromotionJsonForDebug"}, + FunctionInfo{2404, nullptr, "ClearPromotionInfoForDebug"}, + FunctionInfo{2500, nullptr, "ConfirmAvailableTime"}, + FunctionInfo{2510, nullptr, "CreateApplicationResource"}, + FunctionInfo{2511, nullptr, "GetApplicationResource"}, + FunctionInfo{2513, nullptr, "LaunchMicroApplication"}, + FunctionInfo{2514, nullptr, "ClearTaskOfAsyncTaskManager"}, + FunctionInfo{2515, nullptr, "CleanupAllPlaceHolderAndFragmentsIfNoTask"}, + FunctionInfo{2516, nullptr, "EnsureApplicationCertificate"}, + FunctionInfo{2517, nullptr, "CreateApplicationInstance"}, + FunctionInfo{2518, nullptr, "UpdateQualificationForDebug"}, + FunctionInfo{2519, nullptr, "IsQualificationTransitionSupported"}, + FunctionInfo{2520, D<&IApplicationManagerInterface::IsQualificationTransitionSupportedByProcessId>, "IsQualificationTransitionSupportedByProcessId"}, + FunctionInfo{2521, nullptr, "GetRightsUserChangedEvent"}, + FunctionInfo{2522, nullptr, "IsRomRedirectionAvailable"}, + FunctionInfo{2523, nullptr, "GetProgramId"}, //17.0.0+ + FunctionInfo{2524, nullptr, "Unknown2524"}, //19.0.0+ + FunctionInfo{2525, nullptr, "Unknown2525"}, //20.0.0+ + FunctionInfo{2800, nullptr, "GetApplicationIdOfPreomia"}, + FunctionInfo{3000, nullptr, "RegisterDeviceLockKey"}, + FunctionInfo{3001, nullptr, "UnregisterDeviceLockKey"}, + FunctionInfo{3002, nullptr, "VerifyDeviceLockKey"}, + FunctionInfo{3003, nullptr, "HideApplicationIcon"}, + FunctionInfo{3004, nullptr, "ShowApplicationIcon"}, + FunctionInfo{3005, nullptr, "HideApplicationTitle"}, + FunctionInfo{3006, nullptr, "ShowApplicationTitle"}, + FunctionInfo{3007, nullptr, "EnableGameCard"}, + FunctionInfo{3008, nullptr, "DisableGameCard"}, + FunctionInfo{3009, nullptr, "EnableLocalContentShare"}, + FunctionInfo{3010, nullptr, "DisableLocalContentShare"}, + FunctionInfo{3011, nullptr, "IsApplicationIconHidden"}, + FunctionInfo{3012, nullptr, "IsApplicationTitleHidden"}, + FunctionInfo{3013, nullptr, "IsGameCardEnabled"}, + FunctionInfo{3014, nullptr, "IsLocalContentShareEnabled"}, + FunctionInfo{3050, nullptr, "ListAssignELicenseTaskResult"}, + FunctionInfo{3104, nullptr, "GetApplicationNintendoLogo"}, //18.0.0+ + FunctionInfo{3105, nullptr, "GetApplicationStartupMovie"}, //18.0.0+ + FunctionInfo{4000, nullptr, "Unknown4000"}, //20.0.0+ + FunctionInfo{4004, nullptr, "Unknown4004"}, //20.0.0+ + FunctionInfo{4006, nullptr, "Unknown4006"}, //20.0.0+ + FunctionInfo{4007, nullptr, "Unknown4007"}, //20.0.0+ + FunctionInfo{4008, nullptr, "Unknown4008"}, //20.0.0+ + FunctionInfo{4009, nullptr, "Unknown4009"}, //20.0.0+ + FunctionInfo{4010, nullptr, "Unknown4010"}, //20.0.0+ + FunctionInfo{4011, nullptr, "Unknown4011"}, //20.0.0+ + FunctionInfo{4012, nullptr, "Unknown4012"}, //20.0.0+ + FunctionInfo{4013, nullptr, "Unknown4013"}, //20.0.0+ + FunctionInfo{4015, nullptr, "Unknown4015"}, //20.0.0+ + FunctionInfo{4017, nullptr, "Unknown4017"}, //20.0.0+ + FunctionInfo{4019, nullptr, "Unknown4019"}, //20.0.0+ + FunctionInfo{4020, nullptr, "Unknown4020"}, //20.0.0+ + FunctionInfo{4021, nullptr, "Unknown4021"}, //20.0.0+ + FunctionInfo{4022, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4022"}, //20.0.0+ + FunctionInfo{4023, D<&IApplicationManagerInterface::Unknown4023>, "Unknown4023"}, //20.0.0+ + FunctionInfo{4024, nullptr, "Unknown4024"}, //20.0.0+ + FunctionInfo{4025, nullptr, "Unknown4025"}, //20.0.0+ + FunctionInfo{4026, nullptr, "Unknown4026"}, //20.0.0+ + FunctionInfo{4027, nullptr, "Unknown4027"}, //20.0.0+ + FunctionInfo{4028, nullptr, "Unknown4028"}, //20.0.0+ + FunctionInfo{4029, nullptr, "Unknown4029"}, //20.0.0+ + FunctionInfo{4030, nullptr, "Unknown4030"}, //20.0.0+ + FunctionInfo{4031, nullptr, "Unknown4031"}, //20.0.0+ + FunctionInfo{4032, nullptr, "Unknown4032"}, //20.0.0+ + FunctionInfo{4033, nullptr, "Unknown4033"}, //20.0.0+ + FunctionInfo{4034, nullptr, "Unknown4034"}, //20.0.0+ + FunctionInfo{4035, nullptr, "Unknown4035"}, //20.0.0+ + FunctionInfo{4037, nullptr, "Unknown4037"}, //20.0.0+ + FunctionInfo{4038, nullptr, "Unknown4038"}, //20.0.0+ + FunctionInfo{4039, nullptr, "Unknown4039"}, //20.0.0+ + FunctionInfo{4040, nullptr, "Unknown4040"}, //20.0.0+ + FunctionInfo{4041, nullptr, "Unknown4041"}, //20.0.0+ + FunctionInfo{4042, D<&IApplicationManagerInterface::Unknown4042>, "Unknown4042"}, //20.0.0+ + FunctionInfo{4043, nullptr, "Unknown4043"}, //20.0.0+ + FunctionInfo{4044, nullptr, "Unknown4044"}, //20.0.0+ + FunctionInfo{4045, nullptr, "Unknown4045"}, //20.0.0+ + FunctionInfo{4046, nullptr, "Unknown4046"}, //20.0.0+ + FunctionInfo{4049, nullptr, "Unknown4049"}, //20.0.0+ + FunctionInfo{4050, nullptr, "Unknown4050"}, //20.0.0+ + FunctionInfo{4051, nullptr, "Unknown4051"}, //20.0.0+ + FunctionInfo{4052, nullptr, "Unknown4052"}, //20.0.0+ + FunctionInfo{4053, D<&IApplicationManagerInterface::Unknown4053>, "Unknown4053"}, //20.0.0+ + FunctionInfo{4054, nullptr, "Unknown4054"}, //20.0.0+ + FunctionInfo{4055, nullptr, "Unknown4055"}, //20.0.0+ + FunctionInfo{4056, nullptr, "Unknown4056"}, //20.0.0+ + FunctionInfo{4057, nullptr, "Unknown4057"}, //20.0.0+ + FunctionInfo{4058, nullptr, "Unknown4058"}, //20.0.0+ + FunctionInfo{4059, nullptr, "Unknown4059"}, //20.0.0+ + FunctionInfo{4060, nullptr, "Unknown4060"}, //20.0.0+ + FunctionInfo{4061, nullptr, "Unknown4061"}, //20.0.0+ + FunctionInfo{4062, nullptr, "Unknown4062"}, //20.0.0+ + FunctionInfo{4063, nullptr, "Unknown4063"}, //20.0.0+ + FunctionInfo{4064, nullptr, "Unknown4064"}, //20.0.0+ + FunctionInfo{4065, nullptr, "Unknown4065"}, //20.0.0+ + FunctionInfo{4066, nullptr, "Unknown4066"}, //20.0.0+ + FunctionInfo{4067, nullptr, "Unknown4067"}, //20.0.0+ + FunctionInfo{4068, nullptr, "Unknown4068"}, //20.0.0+ + FunctionInfo{4069, nullptr, "Unknown4069"}, //20.0.0+ + FunctionInfo{4070, nullptr, "Unknown4070"}, //20.0.0+ + FunctionInfo{4071, nullptr, "Unknown4071"}, //20.0.0+ + FunctionInfo{4072, nullptr, "Unknown4072"}, //20.0.0+ + FunctionInfo{4073, nullptr, "Unknown4073"}, //20.0.0+ + FunctionInfo{4074, nullptr, "Unknown4074"}, //20.0.0+ + FunctionInfo{4075, nullptr, "Unknown4075"}, //20.0.0+ + FunctionInfo{4076, nullptr, "Unknown4076"}, //20.0.0+ + FunctionInfo{4077, nullptr, "Unknown4077"}, //20.0.0+ + FunctionInfo{4078, nullptr, "Unknown4078"}, //20.0.0+ + FunctionInfo{4079, nullptr, "Unknown4079"}, //20.0.0+ + FunctionInfo{4080, nullptr, "Unknown4080"}, //20.0.0+ + FunctionInfo{4081, nullptr, "Unknown4081"}, //20.0.0+ + FunctionInfo{4083, nullptr, "Unknown4083"}, //20.0.0+ + FunctionInfo{4084, nullptr, "Unknown4084"}, //20.0.0+ + FunctionInfo{4085, nullptr, "Unknown4085"}, //20.0.0+ + FunctionInfo{4086, nullptr, "Unknown4086"}, //20.0.0+ + FunctionInfo{4087, nullptr, "Unknown4087"}, //20.0.0+ + FunctionInfo{4088, D<&IApplicationManagerInterface::Unknown4022>, "Unknown4088"}, //20.0.0+ + FunctionInfo{4089, nullptr, "Unknown4089"}, //20.0.0+ + FunctionInfo{4090, nullptr, "Unknown4090"}, //20.0.0+ + FunctionInfo{4091, nullptr, "Unknown4091"}, //20.0.0+ + FunctionInfo{4092, nullptr, "Unknown4092"}, //20.0.0+ + FunctionInfo{4093, nullptr, "Unknown4093"}, //20.0.0+ + FunctionInfo{4094, nullptr, "Unknown4094"}, //20.0.0+ + FunctionInfo{4095, nullptr, "Unknown4095"}, //20.0.0+ + FunctionInfo{4096, nullptr, "Unknown4096"}, //20.0.0+ + FunctionInfo{4097, nullptr, "Unknown4097"}, //20.0.0+ + FunctionInfo{4099, nullptr, "Unknown4099"}, //21.0.0+ + FunctionInfo{4105, D<&IApplicationManagerInterface::Unknown4105>, "Unknown4105"}, //23.0.0+ + FunctionInfo{5000, nullptr, "Unknown5000"}, //18.0.0+ + FunctionInfo{5001, nullptr, "Unknown5001"}, //18.0.0+ + FunctionInfo{9999, nullptr, "GetApplicationCertificate"}, //10.0.0-10.2.0 }; // clang-format on diff --git a/src/core/hle/service/ns/application_version_interface.cpp b/src/core/hle/service/ns/application_version_interface.cpp index b89e127dbe..b12dbd5d9b 100644 --- a/src/core/hle/service/ns/application_version_interface.cpp +++ b/src/core/hle/service/ns/application_version_interface.cpp @@ -7,25 +7,6 @@ namespace Service::NS { IApplicationVersionInterface::IApplicationVersionInterface(Core::System& system_) : ServiceFramework{system_, "IApplicationVersionInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetLaunchRequiredVersion"}, - {1, nullptr, "UpgradeLaunchRequiredVersion"}, - {35, nullptr, "UpdateVersionList"}, - {36, nullptr, "PushLaunchVersion"}, - {37, nullptr, "ListRequiredVersion"}, - {800, nullptr, "RequestVersionList"}, - {801, nullptr, "ListVersionList"}, - {802, nullptr, "RequestVersionListData"}, - {900, nullptr, "ImportAutoUpdatePolicyJsonForDebug"}, - {901, nullptr, "ListDefaultAutoUpdatePolicy"}, - {902, nullptr, "ListAutoUpdatePolicyForSpecificApplication"}, - {1000, nullptr, "PerformAutoUpdate"}, - {1001, nullptr, "ListAutoUpdateSchedule"}, - }; - // clang-format on - - RegisterHandlers(functions); } IApplicationVersionInterface::~IApplicationVersionInterface() = default; diff --git a/src/core/hle/service/ns/application_version_interface.h b/src/core/hle/service/ns/application_version_interface.h index b288cff1be..e9790e0519 100644 --- a/src/core/hle/service/ns/application_version_interface.h +++ b/src/core/hle/service/ns/application_version_interface.h @@ -11,6 +11,25 @@ class IApplicationVersionInterface final : public ServiceFramework, "Cancel"}, - {2, nullptr, "GetErrorContext"}, // 4.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IAsyncResult::~IAsyncResult() = default; diff --git a/src/core/hle/service/ns/async_result.h b/src/core/hle/service/ns/async_result.h index 914ea5a42c..3f2d5b349f 100644 --- a/src/core/hle/service/ns/async_result.h +++ b/src/core/hle/service/ns/async_result.h @@ -13,6 +13,14 @@ public: private: Result Cancel(); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "Get"}, + FunctionInfo{1, D<&IAsyncResult::Cancel>, "Cancel"}, + FunctionInfo{2, nullptr, "GetErrorContext"}, // 4.0.0+ + ); Service::Event* event{}; }; diff --git a/src/core/hle/service/ns/content_management_interface.cpp b/src/core/hle/service/ns/content_management_interface.cpp index 39b9cb6f70..45922ffab3 100644 --- a/src/core/hle/service/ns/content_management_interface.cpp +++ b/src/core/hle/service/ns/content_management_interface.cpp @@ -15,22 +15,6 @@ namespace Service::NS { IContentManagementInterface::IContentManagementInterface(Core::System& system_) : ServiceFramework{system_, "IContentManagementInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {11, D<&IContentManagementInterface::CalculateApplicationOccupiedSize>, "CalculateApplicationOccupiedSize"}, - {43, D<&IContentManagementInterface::CheckSdCardMountStatus>, "CheckSdCardMountStatus"}, - {47, D<&IContentManagementInterface::GetTotalSpaceSize>, "GetTotalSpaceSize"}, - {48, D<&IContentManagementInterface::GetFreeSpaceSize>, "GetFreeSpaceSize"}, - {71, D<&IContentManagementInterface::GetUnknown71>, "Unknown71"}, - {600, nullptr, "CountApplicationContentMeta"}, - {601, nullptr, "ListApplicationContentMetaStatus"}, - {605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"}, - {607, nullptr, "IsAnyApplicationRunning"}, - {608, nullptr, "Unknown608"}, //21.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IContentManagementInterface::~IContentManagementInterface() = default; diff --git a/src/core/hle/service/ns/content_management_interface.h b/src/core/hle/service/ns/content_management_interface.h index df0c51a184..6670bbf754 100644 --- a/src/core/hle/service/ns/content_management_interface.h +++ b/src/core/hle/service/ns/content_management_interface.h @@ -24,6 +24,22 @@ public: Result GetTotalSpaceSize(Out out_total_space_size, FileSys::StorageId storage_id); Result GetFreeSpaceSize(Out out_free_space_size, FileSys::StorageId storage_id); Result GetUnknown71(Out out_value_a, Out out_value_b, u8 flag); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{11, D<&IContentManagementInterface::CalculateApplicationOccupiedSize>, "CalculateApplicationOccupiedSize"}, + FunctionInfo{43, D<&IContentManagementInterface::CheckSdCardMountStatus>, "CheckSdCardMountStatus"}, + FunctionInfo{47, D<&IContentManagementInterface::GetTotalSpaceSize>, "GetTotalSpaceSize"}, + FunctionInfo{48, D<&IContentManagementInterface::GetFreeSpaceSize>, "GetFreeSpaceSize"}, + FunctionInfo{71, D<&IContentManagementInterface::GetUnknown71>, "Unknown71"}, + FunctionInfo{600, nullptr, "CountApplicationContentMeta"}, + FunctionInfo{601, nullptr, "ListApplicationContentMetaStatus"}, + FunctionInfo{605, nullptr, "ListApplicationContentMetaStatusWithRightsCheck"}, + FunctionInfo{607, nullptr, "IsAnyApplicationRunning"}, + FunctionInfo{608, nullptr, "Unknown608"}, //21.0.0+ + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/develop_interface.cpp b/src/core/hle/service/ns/develop_interface.cpp index 880bdbebbf..68e5282dd3 100644 --- a/src/core/hle/service/ns/develop_interface.cpp +++ b/src/core/hle/service/ns/develop_interface.cpp @@ -6,31 +6,6 @@ namespace Service::NS { IDevelopInterface::IDevelopInterface(Core::System& system_) : ServiceFramework{system_, "ns:dev"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "LaunchProgram"}, - {1, nullptr, "TerminateProcess"}, - {2, nullptr, "TerminateProgram"}, - {4, nullptr, "GetShellEvent"}, - {5, nullptr, "GetShellEventInfo"}, - {6, nullptr, "TerminateApplication"}, - {7, nullptr, "PrepareLaunchProgramFromHost"}, - {8, nullptr, "LaunchApplicationFromHost"}, - {9, nullptr, "LaunchApplicationWithStorageIdForDevelop"}, - {10, nullptr, "IsSystemMemoryResourceLimitBoosted"}, - {11, nullptr, "GetRunningApplicationProcessIdForDevelop"}, - {12, nullptr, "SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop"}, - {13, nullptr, "CreateApplicationResourceForDevelop"}, - {14, nullptr, "IsPreomiaForDevelop"}, - {15, nullptr, "GetApplicationProgramIdFromHost"}, - {16, nullptr, "RefreshCachedDebugValues"}, - {17, nullptr, "PrepareLaunchApplicationFromHost"}, - {18, nullptr, "GetLaunchEvent"}, - {19, nullptr, "GetLaunchResult"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDevelopInterface::~IDevelopInterface() = default; diff --git a/src/core/hle/service/ns/develop_interface.h b/src/core/hle/service/ns/develop_interface.h index a9f81ccd60..51e71b9d2c 100644 --- a/src/core/hle/service/ns/develop_interface.h +++ b/src/core/hle/service/ns/develop_interface.h @@ -11,6 +11,31 @@ class IDevelopInterface final : public ServiceFramework { public: explicit IDevelopInterface(Core::System& system_); ~IDevelopInterface() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "LaunchProgram"}, + FunctionInfo{1, nullptr, "TerminateProcess"}, + FunctionInfo{2, nullptr, "TerminateProgram"}, + FunctionInfo{4, nullptr, "GetShellEvent"}, + FunctionInfo{5, nullptr, "GetShellEventInfo"}, + FunctionInfo{6, nullptr, "TerminateApplication"}, + FunctionInfo{7, nullptr, "PrepareLaunchProgramFromHost"}, + FunctionInfo{8, nullptr, "LaunchApplicationFromHost"}, + FunctionInfo{9, nullptr, "LaunchApplicationWithStorageIdForDevelop"}, + FunctionInfo{10, nullptr, "IsSystemMemoryResourceLimitBoosted"}, + FunctionInfo{11, nullptr, "GetRunningApplicationProcessIdForDevelop"}, + FunctionInfo{12, nullptr, "SetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop"}, + FunctionInfo{13, nullptr, "CreateApplicationResourceForDevelop"}, + FunctionInfo{14, nullptr, "IsPreomiaForDevelop"}, + FunctionInfo{15, nullptr, "GetApplicationProgramIdFromHost"}, + FunctionInfo{16, nullptr, "RefreshCachedDebugValues"}, + FunctionInfo{17, nullptr, "PrepareLaunchApplicationFromHost"}, + FunctionInfo{18, nullptr, "GetLaunchEvent"}, + FunctionInfo{19, nullptr, "GetLaunchResult"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/document_interface.cpp b/src/core/hle/service/ns/document_interface.cpp index 51a1e46c0d..4bc3441ff0 100644 --- a/src/core/hle/service/ns/document_interface.cpp +++ b/src/core/hle/service/ns/document_interface.cpp @@ -9,15 +9,6 @@ namespace Service::NS { IDocumentInterface::IDocumentInterface(Core::System& system_) : ServiceFramework{system_, "IDocumentInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {21, nullptr, "GetApplicationContentPath"}, - {23, D<&IDocumentInterface::ResolveApplicationContentPath>, "ResolveApplicationContentPath"}, - {92, D<&IDocumentInterface::GetRunningApplicationProgramId>, "GetRunningApplicationProgramId"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDocumentInterface::~IDocumentInterface() = default; diff --git a/src/core/hle/service/ns/document_interface.h b/src/core/hle/service/ns/document_interface.h index cd461652cf..81164a8b09 100644 --- a/src/core/hle/service/ns/document_interface.h +++ b/src/core/hle/service/ns/document_interface.h @@ -17,6 +17,15 @@ public: private: Result ResolveApplicationContentPath(ContentPath content_path); Result GetRunningApplicationProgramId(Out out_program_id, u64 caller_program_id); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{21, nullptr, "GetApplicationContentPath"}, + FunctionInfo{23, D<&IDocumentInterface::ResolveApplicationContentPath>, "ResolveApplicationContentPath"}, + FunctionInfo{92, D<&IDocumentInterface::GetRunningApplicationProgramId>, "GetRunningApplicationProgramId"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/download_task_interface.cpp b/src/core/hle/service/ns/download_task_interface.cpp index 62dc7f1874..a6bca3ed02 100644 --- a/src/core/hle/service/ns/download_task_interface.cpp +++ b/src/core/hle/service/ns/download_task_interface.cpp @@ -8,21 +8,6 @@ namespace Service::NS { IDownloadTaskInterface::IDownloadTaskInterface(Core::System& system_) : ServiceFramework{system_, "IDownloadTaskInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {701, nullptr, "ClearTaskStatusList"}, - {702, nullptr, "RequestDownloadTaskList"}, - {703, nullptr, "RequestEnsureDownloadTask"}, - {704, nullptr, "ListDownloadTaskStatus"}, - {705, nullptr, "RequestDownloadTaskListData"}, - {706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, - {707, D<&IDownloadTaskInterface::EnableAutoCommit>, "EnableAutoCommit"}, - {708, D<&IDownloadTaskInterface::DisableAutoCommit>, "DisableAutoCommit"}, - {709, nullptr, "TriggerDynamicCommitEvent"}, - }; - // clang-format on - - RegisterHandlers(functions); } IDownloadTaskInterface::~IDownloadTaskInterface() = default; diff --git a/src/core/hle/service/ns/download_task_interface.h b/src/core/hle/service/ns/download_task_interface.h index b1cb69cb86..ea11b68cf3 100644 --- a/src/core/hle/service/ns/download_task_interface.h +++ b/src/core/hle/service/ns/download_task_interface.h @@ -15,6 +15,21 @@ public: private: Result EnableAutoCommit(); Result DisableAutoCommit(); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{701, nullptr, "ClearTaskStatusList"}, + FunctionInfo{702, nullptr, "RequestDownloadTaskList"}, + FunctionInfo{703, nullptr, "RequestEnsureDownloadTask"}, + FunctionInfo{704, nullptr, "ListDownloadTaskStatus"}, + FunctionInfo{705, nullptr, "RequestDownloadTaskListData"}, + FunctionInfo{706, nullptr, "TryCommitCurrentApplicationDownloadTask"}, + FunctionInfo{707, D<&IDownloadTaskInterface::EnableAutoCommit>, "EnableAutoCommit"}, + FunctionInfo{708, D<&IDownloadTaskInterface::DisableAutoCommit>, "DisableAutoCommit"}, + FunctionInfo{709, nullptr, "TriggerDynamicCommitEvent"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/dynamic_rights_interface.cpp b/src/core/hle/service/ns/dynamic_rights_interface.cpp index 0301085670..34d607835d 100644 --- a/src/core/hle/service/ns/dynamic_rights_interface.cpp +++ b/src/core/hle/service/ns/dynamic_rights_interface.cpp @@ -11,41 +11,6 @@ namespace Service::NS { IDynamicRightsInterface::IDynamicRightsInterface(Core::System& system_) : ServiceFramework{system_, "DynamicRightsInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestApplicationRightsOnServer"}, - {1, nullptr, "RequestAssignRights"}, - {4, nullptr, "DeprecatedRequestAssignRightsToResume"}, - {5, D<&IDynamicRightsInterface::VerifyActivatedRightsOwners>, "VerifyActivatedRightsOwners"}, - {6, nullptr, "DeprecatedGetApplicationRightsStatus"}, - {7, nullptr, "RequestPrefetchForDynamicRights"}, - {8, nullptr, "GetDynamicRightsState"}, - {9, nullptr, "RequestApplicationRightsOnServerToResume"}, - {10, nullptr, "RequestAssignRightsToResume"}, - {11, nullptr, "GetActivatedRightsUsers"}, - {12, nullptr, "GetApplicationRightsStatus"}, - {13, D<&IDynamicRightsInterface::GetRunningApplicationStatus>, "GetRunningApplicationStatus"}, - {14, nullptr, "SelectApplicationLicense"}, - {15, nullptr, "RequestContentsAuthorizationToken"}, - {16, nullptr, "QualifyUser"}, - {17, nullptr, "QualifyUserWithProcessId"}, - {18, D<&IDynamicRightsInterface::NotifyApplicationRightsCheckStart>, "NotifyApplicationRightsCheckStart"}, - {19, nullptr, "UpdateUserList"}, - {20, nullptr, "IsRightsLostUser"}, - {21, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"}, - {22, nullptr, "GetLimitedApplicationLicense"}, - {23, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, - {24, nullptr, "NotifyLimitedApplicationLicenseUpgradableEventForDebug"}, - {25, nullptr, "RequestProceedDynamicRightsState"}, - {26, D<&IDynamicRightsInterface::HasAccountRestrictedRightsInRunningApplications>, "HasAccountRestrictedRightsInRunningApplications"}, - {27, nullptr, "Unknown27"}, //20.0.0+ - {28, nullptr, "Unknown28"}, //20.0.0+ - {29, nullptr, "Unknown29"}, //21.0.0+ - {30, nullptr, "Unknown30"}, //21.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IDynamicRightsInterface::~IDynamicRightsInterface() = default; diff --git a/src/core/hle/service/ns/dynamic_rights_interface.h b/src/core/hle/service/ns/dynamic_rights_interface.h index c3270aee05..793e2c3586 100644 --- a/src/core/hle/service/ns/dynamic_rights_interface.h +++ b/src/core/hle/service/ns/dynamic_rights_interface.h @@ -21,6 +21,41 @@ private: Result GetRunningApplicationStatus(Out out_status, u64 rights_handle); Result VerifyActivatedRightsOwners(u64 rights_handle); Result HasAccountRestrictedRightsInRunningApplications(Out out_is_restricted); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "RequestApplicationRightsOnServer"}, + FunctionInfo{1, nullptr, "RequestAssignRights"}, + FunctionInfo{4, nullptr, "DeprecatedRequestAssignRightsToResume"}, + FunctionInfo{5, D<&IDynamicRightsInterface::VerifyActivatedRightsOwners>, "VerifyActivatedRightsOwners"}, + FunctionInfo{6, nullptr, "DeprecatedGetApplicationRightsStatus"}, + FunctionInfo{7, nullptr, "RequestPrefetchForDynamicRights"}, + FunctionInfo{8, nullptr, "GetDynamicRightsState"}, + FunctionInfo{9, nullptr, "RequestApplicationRightsOnServerToResume"}, + FunctionInfo{10, nullptr, "RequestAssignRightsToResume"}, + FunctionInfo{11, nullptr, "GetActivatedRightsUsers"}, + FunctionInfo{12, nullptr, "GetApplicationRightsStatus"}, + FunctionInfo{13, D<&IDynamicRightsInterface::GetRunningApplicationStatus>, "GetRunningApplicationStatus"}, + FunctionInfo{14, nullptr, "SelectApplicationLicense"}, + FunctionInfo{15, nullptr, "RequestContentsAuthorizationToken"}, + FunctionInfo{16, nullptr, "QualifyUser"}, + FunctionInfo{17, nullptr, "QualifyUserWithProcessId"}, + FunctionInfo{18, D<&IDynamicRightsInterface::NotifyApplicationRightsCheckStart>, "NotifyApplicationRightsCheckStart"}, + FunctionInfo{19, nullptr, "UpdateUserList"}, + FunctionInfo{20, nullptr, "IsRightsLostUser"}, + FunctionInfo{21, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"}, + FunctionInfo{22, nullptr, "GetLimitedApplicationLicense"}, + FunctionInfo{23, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"}, + FunctionInfo{24, nullptr, "NotifyLimitedApplicationLicenseUpgradableEventForDebug"}, + FunctionInfo{25, nullptr, "RequestProceedDynamicRightsState"}, + FunctionInfo{26, D<&IDynamicRightsInterface::HasAccountRestrictedRightsInRunningApplications>, "HasAccountRestrictedRightsInRunningApplications"}, + FunctionInfo{27, nullptr, "Unknown27"}, //20.0.0+ + FunctionInfo{28, nullptr, "Unknown28"}, //20.0.0+ + FunctionInfo{29, nullptr, "Unknown29"}, //21.0.0+ + FunctionInfo{30, nullptr, "Unknown30"}, //21.0.0+ + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/ecommerce_interface.cpp b/src/core/hle/service/ns/ecommerce_interface.cpp index 76fc425f0c..1cfa944643 100644 --- a/src/core/hle/service/ns/ecommerce_interface.cpp +++ b/src/core/hle/service/ns/ecommerce_interface.cpp @@ -7,19 +7,6 @@ namespace Service::NS { IECommerceInterface::IECommerceInterface(Core::System& system_) : ServiceFramework{system_, "IECommerceInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "RequestLinkDevice"}, - {1, nullptr, "RequestCleanupAllPreInstalledApplications"}, - {2, nullptr, "RequestCleanupPreInstalledApplication"}, - {3, nullptr, "RequestSyncRights"}, - {4, nullptr, "RequestUnlinkDevice"}, - {5, nullptr, "RequestRevokeAllELicense"}, - {6, nullptr, "RequestSyncRightsBasedOnAssignedELicenses"}, - }; - // clang-format on - - RegisterHandlers(functions); } IECommerceInterface::~IECommerceInterface() = default; diff --git a/src/core/hle/service/ns/ecommerce_interface.h b/src/core/hle/service/ns/ecommerce_interface.h index 4352101f4a..52ed934c57 100644 --- a/src/core/hle/service/ns/ecommerce_interface.h +++ b/src/core/hle/service/ns/ecommerce_interface.h @@ -11,6 +11,19 @@ class IECommerceInterface final : public ServiceFramework { public: explicit IECommerceInterface(Core::System& system_); ~IECommerceInterface() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "RequestLinkDevice"}, + FunctionInfo{1, nullptr, "RequestCleanupAllPreInstalledApplications"}, + FunctionInfo{2, nullptr, "RequestCleanupPreInstalledApplication"}, + FunctionInfo{3, nullptr, "RequestSyncRights"}, + FunctionInfo{4, nullptr, "RequestUnlinkDevice"}, + FunctionInfo{5, nullptr, "RequestRevokeAllELicense"}, + FunctionInfo{6, nullptr, "RequestSyncRightsBasedOnAssignedELicenses"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/factory_reset_interface.cpp b/src/core/hle/service/ns/factory_reset_interface.cpp index 97fa9a5cfb..e724bdbb23 100644 --- a/src/core/hle/service/ns/factory_reset_interface.cpp +++ b/src/core/hle/service/ns/factory_reset_interface.cpp @@ -11,7 +11,10 @@ namespace Service::NS { IFactoryResetInterface::IFactoryResetInterface(Core::System& system_) : ServiceFramework{system_, "IFactoryResetInterface"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{100, nullptr, "ResetToFactorySettings"}, FunctionInfo{101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, FunctionInfo{102, nullptr, "ResetToFactorySettingsForRefurbishment"}, @@ -19,10 +22,7 @@ IFactoryResetInterface::IFactoryResetInterface(Core::System& system_) FunctionInfo{104, nullptr, "ResetToFactorySettingsWithPlatformRegionAuthentication"}, FunctionInfo{105, nullptr, "RequestResetToFactorySettingsSecurely"}, FunctionInfo{106, nullptr, "RequestResetToFactorySettingsWithPlatformRegionAuthenticationSecurely"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } IFactoryResetInterface::~IFactoryResetInterface() = default; diff --git a/src/core/hle/service/ns/platform_service_manager.cpp b/src/core/hle/service/ns/platform_service_manager.cpp index bf93a2edfa..7f59f79244 100644 --- a/src/core/hle/service/ns/platform_service_manager.cpp +++ b/src/core/hle/service/ns/platform_service_manager.cpp @@ -89,28 +89,6 @@ struct IPlatformServiceManager::Impl { IPlatformServiceManager::IPlatformServiceManager(Core::System& system_, const char* service_name_) : ServiceFramework{system_, service_name_}, impl{std::make_unique()} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IPlatformServiceManager::RequestLoad>, "RequestLoad"}, - {1, D<&IPlatformServiceManager::GetLoadState>, "GetLoadState"}, - {2, D<&IPlatformServiceManager::GetSize>, "GetSize"}, - {3, D<&IPlatformServiceManager::GetSharedMemoryAddressOffset>, "GetSharedMemoryAddressOffset"}, - {4, D<&IPlatformServiceManager::GetSharedMemoryNativeHandle>, "GetSharedMemoryNativeHandle"}, - {5, D<&IPlatformServiceManager::GetSharedFontInOrderOfPriority>, "GetSharedFontInOrderOfPriority"}, - {6, D<&IPlatformServiceManager::GetSharedFontInOrderOfPriority>, "GetSharedFontInOrderOfPriorityForSystem"}, - {100, nullptr, "RequestApplicationFunctionAuthorization"}, - {101, nullptr, "RequestApplicationFunctionAuthorizationByProcessId"}, - {102, nullptr, "RequestApplicationFunctionAuthorizationByApplicationId"}, - {103, nullptr, "RefreshApplicationFunctionBlackListDebugRecord"}, - {104, nullptr, "RequestApplicationFunctionAuthorizationByProgramId"}, - {105, nullptr, "GetFunctionBlackListSystemVersionToAuthorize"}, - {106, nullptr, "GetFunctionBlackListVersion"}, - {1000, nullptr, "LoadNgWordDataForPlatformRegionChina"}, - {1001, nullptr, "GetNgWordDataSizeForPlatformRegionChina"}, - }; - // clang-format on - RegisterHandlers(functions); - auto& fsc = system.GetFileSystemController(); // Attempt to load shared font data from disk diff --git a/src/core/hle/service/ns/platform_service_manager.h b/src/core/hle/service/ns/platform_service_manager.h index b82c385a6c..d9760a0bfa 100644 --- a/src/core/hle/service/ns/platform_service_manager.h +++ b/src/core/hle/service/ns/platform_service_manager.h @@ -65,11 +65,32 @@ private: Result GetSharedMemoryNativeHandle( OutCopyHandle out_shared_memory_native_handle); Result GetSharedFontInOrderOfPriority(OutArray out_font_codes, - OutArray out_font_offsets, - OutArray out_font_sizes, - Out out_fonts_are_loaded, Out out_font_count, - Set::LanguageCode language_code); + OutArray out_font_offsets, + OutArray out_font_sizes, + Out out_fonts_are_loaded, Out out_font_count, + Set::LanguageCode language_code); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IPlatformServiceManager::RequestLoad>, "RequestLoad"}, + FunctionInfo{1, D<&IPlatformServiceManager::GetLoadState>, "GetLoadState"}, + FunctionInfo{2, D<&IPlatformServiceManager::GetSize>, "GetSize"}, + FunctionInfo{3, D<&IPlatformServiceManager::GetSharedMemoryAddressOffset>, "GetSharedMemoryAddressOffset"}, + FunctionInfo{4, D<&IPlatformServiceManager::GetSharedMemoryNativeHandle>, "GetSharedMemoryNativeHandle"}, + FunctionInfo{5, D<&IPlatformServiceManager::GetSharedFontInOrderOfPriority>, "GetSharedFontInOrderOfPriority"}, + FunctionInfo{6, D<&IPlatformServiceManager::GetSharedFontInOrderOfPriority>, "GetSharedFontInOrderOfPriorityForSystem"}, + FunctionInfo{100, nullptr, "RequestApplicationFunctionAuthorization"}, + FunctionInfo{101, nullptr, "RequestApplicationFunctionAuthorizationByProcessId"}, + FunctionInfo{102, nullptr, "RequestApplicationFunctionAuthorizationByApplicationId"}, + FunctionInfo{103, nullptr, "RefreshApplicationFunctionBlackListDebugRecord"}, + FunctionInfo{104, nullptr, "RequestApplicationFunctionAuthorizationByProgramId"}, + FunctionInfo{105, nullptr, "GetFunctionBlackListSystemVersionToAuthorize"}, + FunctionInfo{106, nullptr, "GetFunctionBlackListVersion"}, + FunctionInfo{1000, nullptr, "LoadNgWordDataForPlatformRegionChina"}, + FunctionInfo{1001, nullptr, "GetNgWordDataSizeForPlatformRegionChina"} + ); struct Impl; std::unique_ptr impl; }; diff --git a/src/core/hle/service/ns/query_service.cpp b/src/core/hle/service/ns/query_service.cpp index f5337d8663..963f24853f 100644 --- a/src/core/hle/service/ns/query_service.cpp +++ b/src/core/hle/service/ns/query_service.cpp @@ -16,38 +16,6 @@ namespace Service::NS { IQueryService::IQueryService(Core::System& system_) : ServiceFramework{system_, "pdm:qry"}, play_time_manager{std::make_unique()} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "QueryAppletEvent"}, - {1, nullptr, "QueryPlayStatistics"}, - {2, nullptr, "QueryPlayStatisticsByUserAccountId"}, - {3, nullptr, "QueryPlayStatisticsByNetworkServiceAccountId"}, - {4, nullptr, "QueryPlayStatisticsByApplicationId"}, - {5, D<&IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId>, "QueryPlayStatisticsByApplicationIdAndUserAccountId"}, - {6, nullptr, "QueryPlayStatisticsByApplicationIdAndNetworkServiceAccountId"}, - {7, nullptr, "QueryLastPlayTimeV0"}, - {8, nullptr, "QueryPlayEvent"}, - {9, nullptr, "GetAvailablePlayEventRange"}, - {10, nullptr, "QueryAccountEvent"}, - {11, nullptr, "QueryAccountPlayEvent"}, - {12, nullptr, "GetAvailableAccountPlayEventRange"}, - {13, nullptr, "QueryApplicationPlayStatisticsForSystemV0"}, - {14, nullptr, "QueryRecentlyPlayedApplication"}, - {15, nullptr, "GetRecentlyPlayedApplicationUpdateEvent"}, - {16, nullptr, "QueryApplicationPlayStatisticsByUserAccountIdForSystemV0"}, - {17, D<&IQueryService::QueryLastPlayTime>, "QueryLastPlayTime"}, - {18, D<&IQueryService::QueryApplicationPlayStatisticsForSystem>, "QueryApplicationPlayStatisticsForSystem"}, - {19, D<&IQueryService::QueryApplicationPlayStatisticsByUserAccountIdForSystem>, "QueryApplicationPlayStatisticsByUserAccountIdForSystem"}, - FunctionInfo{30, nullptr, "Cmd30" }, - FunctionInfo{31, nullptr, "Cmd31" }, - FunctionInfo{100, nullptr, "Cmd100" }, - FunctionInfo{110, nullptr, "Cmd110" }, - FunctionInfo{118, nullptr, "Cmd118" }, - FunctionInfo{119, nullptr, "Cmd119" }, - }; - // clang-format on - - RegisterHandlers(functions); } IQueryService::~IQueryService() = default; diff --git a/src/core/hle/service/ns/query_service.h b/src/core/hle/service/ns/query_service.h index f5c0ae1058..63dbe89b20 100644 --- a/src/core/hle/service/ns/query_service.h +++ b/src/core/hle/service/ns/query_service.h @@ -62,6 +62,37 @@ private: OutArray out_stats, InArray application_ids); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "QueryAppletEvent"}, + FunctionInfo{1, nullptr, "QueryPlayStatistics"}, + FunctionInfo{2, nullptr, "QueryPlayStatisticsByUserAccountId"}, + FunctionInfo{3, nullptr, "QueryPlayStatisticsByNetworkServiceAccountId"}, + FunctionInfo{4, nullptr, "QueryPlayStatisticsByApplicationId"}, + FunctionInfo{5, D<&IQueryService::QueryPlayStatisticsByApplicationIdAndUserAccountId>, "QueryPlayStatisticsByApplicationIdAndUserAccountId"}, + FunctionInfo{6, nullptr, "QueryPlayStatisticsByApplicationIdAndNetworkServiceAccountId"}, + FunctionInfo{7, nullptr, "QueryLastPlayTimeV0"}, + FunctionInfo{8, nullptr, "QueryPlayEvent"}, + FunctionInfo{9, nullptr, "GetAvailablePlayEventRange"}, + FunctionInfo{10, nullptr, "QueryAccountEvent"}, + FunctionInfo{11, nullptr, "QueryAccountPlayEvent"}, + FunctionInfo{12, nullptr, "GetAvailableAccountPlayEventRange"}, + FunctionInfo{13, nullptr, "QueryApplicationPlayStatisticsForSystemV0"}, + FunctionInfo{14, nullptr, "QueryRecentlyPlayedApplication"}, + FunctionInfo{15, nullptr, "GetRecentlyPlayedApplicationUpdateEvent"}, + FunctionInfo{16, nullptr, "QueryApplicationPlayStatisticsByUserAccountIdForSystemV0"}, + FunctionInfo{17, D<&IQueryService::QueryLastPlayTime>, "QueryLastPlayTime"}, + FunctionInfo{18, D<&IQueryService::QueryApplicationPlayStatisticsForSystem>, "QueryApplicationPlayStatisticsForSystem"}, + FunctionInfo{19, D<&IQueryService::QueryApplicationPlayStatisticsByUserAccountIdForSystem>, "QueryApplicationPlayStatisticsByUserAccountIdForSystem"}, + FunctionInfo{30, nullptr, "Cmd30" }, + FunctionInfo{31, nullptr, "Cmd31" }, + FunctionInfo{100, nullptr, "Cmd100" }, + FunctionInfo{110, nullptr, "Cmd110" }, + FunctionInfo{118, nullptr, "Cmd118" }, + FunctionInfo{119, nullptr, "Cmd119" }, + ); std::unique_ptr play_time_manager; }; diff --git a/src/core/hle/service/ns/read_only_application_control_data_interface.cpp b/src/core/hle/service/ns/read_only_application_control_data_interface.cpp index 85c2a74e54..ab35f0c888 100644 --- a/src/core/hle/service/ns/read_only_application_control_data_interface.cpp +++ b/src/core/hle/service/ns/read_only_application_control_data_interface.cpp @@ -131,22 +131,6 @@ private: IReadOnlyApplicationControlDataInterface::IReadOnlyApplicationControlDataInterface( Core::System& system_) : ServiceFramework{system_, "IReadOnlyApplicationControlDataInterface"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData>, "GetApplicationControlData"}, - {1, D<&IReadOnlyApplicationControlDataInterface::GetApplicationDesiredLanguage>, "GetApplicationDesiredLanguage"}, - {2, D<&IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"}, - {3, nullptr, "ConvertLanguageCodeToApplicationLanguage"}, - {4, nullptr, "SelectApplicationDesiredLanguage"}, - {5, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData2>, "GetApplicationControlData"}, - {10, &IReadOnlyApplicationControlDataInterface::ListApplicationIcon, "ListApplicationIcon"}, - {13, &IReadOnlyApplicationControlDataInterface::ListApplicationTitle, "ListApplicationTitle"}, - {19, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData3>, "GetApplicationControlData"}, - {23, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData3>, "GetApplicationControlData"}, //23.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IReadOnlyApplicationControlDataInterface::~IReadOnlyApplicationControlDataInterface() = default; diff --git a/src/core/hle/service/ns/read_only_application_control_data_interface.h b/src/core/hle/service/ns/read_only_application_control_data_interface.h index a4a285151a..753677a731 100644 --- a/src/core/hle/service/ns/read_only_application_control_data_interface.h +++ b/src/core/hle/service/ns/read_only_application_control_data_interface.h @@ -45,6 +45,22 @@ public: u8 flag1, u8 flag2, u64 application_id); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData>, "GetApplicationControlData"}, + FunctionInfo{1, D<&IReadOnlyApplicationControlDataInterface::GetApplicationDesiredLanguage>, "GetApplicationDesiredLanguage"}, + FunctionInfo{2, D<&IReadOnlyApplicationControlDataInterface::ConvertApplicationLanguageToLanguageCode>, "ConvertApplicationLanguageToLanguageCode"}, + FunctionInfo{3, nullptr, "ConvertLanguageCodeToApplicationLanguage"}, + FunctionInfo{4, nullptr, "SelectApplicationDesiredLanguage"}, + FunctionInfo{5, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData2>, "GetApplicationControlData"}, + FunctionInfo{10, &IReadOnlyApplicationControlDataInterface::ListApplicationIcon, "ListApplicationIcon"}, + FunctionInfo{13, &IReadOnlyApplicationControlDataInterface::ListApplicationTitle, "ListApplicationTitle"}, + FunctionInfo{19, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData3>, "GetApplicationControlData"}, + FunctionInfo{23, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData3>, "GetApplicationControlData"}, //23.0.0+ + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/read_only_application_record_interface.cpp b/src/core/hle/service/ns/read_only_application_record_interface.cpp index 8ce7851ae2..1b2de026cc 100644 --- a/src/core/hle/service/ns/read_only_application_record_interface.cpp +++ b/src/core/hle/service/ns/read_only_application_record_interface.cpp @@ -13,15 +13,6 @@ namespace Service::NS { IReadOnlyApplicationRecordInterface::IReadOnlyApplicationRecordInterface(Core::System& system_) : ServiceFramework{system_, "IReadOnlyApplicationRecordInterface"} { - static const FunctionInfo functions[] = { - {0, D<&IReadOnlyApplicationRecordInterface::HasApplicationRecord>, "HasApplicationRecord"}, - {1, nullptr, "NotifyApplicationFailure"}, - {2, D<&IReadOnlyApplicationRecordInterface::IsDataCorruptedResult>, "IsDataCorruptedResult"}, - {3, D<&IReadOnlyApplicationRecordInterface::ListApplicationRecord>, "ListApplicationRecord"}, - }; - // clang-format on - - RegisterHandlers(functions); } IReadOnlyApplicationRecordInterface::~IReadOnlyApplicationRecordInterface() = default; diff --git a/src/core/hle/service/ns/read_only_application_record_interface.h b/src/core/hle/service/ns/read_only_application_record_interface.h index fc43c768ba..248e39ce2f 100644 --- a/src/core/hle/service/ns/read_only_application_record_interface.h +++ b/src/core/hle/service/ns/read_only_application_record_interface.h @@ -24,6 +24,16 @@ private: Result ListApplicationRecord( OutArray out_records, Out out_count, s32 entry_offset); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IReadOnlyApplicationRecordInterface::HasApplicationRecord>, "HasApplicationRecord"}, + FunctionInfo{1, nullptr, "NotifyApplicationFailure"}, + FunctionInfo{2, D<&IReadOnlyApplicationRecordInterface::IsDataCorruptedResult>, "IsDataCorruptedResult"}, + FunctionInfo{3, D<&IReadOnlyApplicationRecordInterface::ListApplicationRecord>, "ListApplicationRecord"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/service_getter_interface.cpp b/src/core/hle/service/ns/service_getter_interface.cpp index 1a3dd7166c..c5fa04d9e4 100644 --- a/src/core/hle/service/ns/service_getter_interface.cpp +++ b/src/core/hle/service/ns/service_getter_interface.cpp @@ -19,23 +19,6 @@ namespace Service::NS { IServiceGetterInterface::IServiceGetterInterface(Core::System& system_, const char* name) : ServiceFramework{system_, name} { - // clang-format off - static const FunctionInfo functions[] = { - {7988, D<&IServiceGetterInterface::GetDynamicRightsInterface>, "GetDynamicRightsInterface"}, - {7989, D<&IServiceGetterInterface::GetReadOnlyApplicationControlDataInterface>, "GetReadOnlyApplicationControlDataInterface"}, - {7991, D<&IServiceGetterInterface::GetReadOnlyApplicationRecordInterface>, "GetReadOnlyApplicationRecordInterface"}, - {7992, D<&IServiceGetterInterface::GetECommerceInterface>, "GetECommerceInterface"}, - {7993, D<&IServiceGetterInterface::GetApplicationVersionInterface>, "GetApplicationVersionInterface"}, - {7994, D<&IServiceGetterInterface::GetFactoryResetInterface>, "GetFactoryResetInterface"}, - {7995, D<&IServiceGetterInterface::GetAccountProxyInterface>, "GetAccountProxyInterface"}, - {7996, D<&IServiceGetterInterface::GetApplicationManagerInterface>, "GetApplicationManagerInterface"}, - {7997, D<&IServiceGetterInterface::GetDownloadTaskInterface>, "GetDownloadTaskInterface"}, - {7998, D<&IServiceGetterInterface::GetContentManagementInterface>, "GetContentManagementInterface"}, - {7999, D<&IServiceGetterInterface::GetDocumentInterface>, "GetDocumentInterface"}, - }; - // clang-format on - - RegisterHandlers(functions); } IServiceGetterInterface::~IServiceGetterInterface() = default; diff --git a/src/core/hle/service/ns/service_getter_interface.h b/src/core/hle/service/ns/service_getter_interface.h index bbc18d4445..29c1adcb47 100644 --- a/src/core/hle/service/ns/service_getter_interface.h +++ b/src/core/hle/service/ns/service_getter_interface.h @@ -42,6 +42,23 @@ public: Result GetContentManagementInterface( Out> out_interface); Result GetDocumentInterface(Out> out_interface); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{7988, D<&IServiceGetterInterface::GetDynamicRightsInterface>, "GetDynamicRightsInterface"}, + FunctionInfo{7989, D<&IServiceGetterInterface::GetReadOnlyApplicationControlDataInterface>, "GetReadOnlyApplicationControlDataInterface"}, + FunctionInfo{7991, D<&IServiceGetterInterface::GetReadOnlyApplicationRecordInterface>, "GetReadOnlyApplicationRecordInterface"}, + FunctionInfo{7992, D<&IServiceGetterInterface::GetECommerceInterface>, "GetECommerceInterface"}, + FunctionInfo{7993, D<&IServiceGetterInterface::GetApplicationVersionInterface>, "GetApplicationVersionInterface"}, + FunctionInfo{7994, D<&IServiceGetterInterface::GetFactoryResetInterface>, "GetFactoryResetInterface"}, + FunctionInfo{7995, D<&IServiceGetterInterface::GetAccountProxyInterface>, "GetAccountProxyInterface"}, + FunctionInfo{7996, D<&IServiceGetterInterface::GetApplicationManagerInterface>, "GetApplicationManagerInterface"}, + FunctionInfo{7997, D<&IServiceGetterInterface::GetDownloadTaskInterface>, "GetDownloadTaskInterface"}, + FunctionInfo{7998, D<&IServiceGetterInterface::GetContentManagementInterface>, "GetContentManagementInterface"}, + FunctionInfo{7999, D<&IServiceGetterInterface::GetDocumentInterface>, "GetDocumentInterface"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/system_update_control.cpp b/src/core/hle/service/ns/system_update_control.cpp index f5f5cfd909..fbf3483954 100644 --- a/src/core/hle/service/ns/system_update_control.cpp +++ b/src/core/hle/service/ns/system_update_control.cpp @@ -8,35 +8,6 @@ namespace Service::NS { ISystemUpdateControl::ISystemUpdateControl(Core::System& system_) : ServiceFramework{system_, "ISystemUpdateControl"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "HasDownloaded"}, - {1, nullptr, "RequestCheckLatestUpdate"}, - {2, nullptr, "RequestDownloadLatestUpdate"}, - {3, nullptr, "GetDownloadProgress"}, - {4, nullptr, "ApplyDownloadedUpdate"}, - {5, nullptr, "RequestPrepareCardUpdate"}, - {6, nullptr, "GetPrepareCardUpdateProgress"}, - {7, nullptr, "HasPreparedCardUpdate"}, - {8, nullptr, "ApplyCardUpdate"}, - {9, nullptr, "GetDownloadedEulaDataSize"}, - {10, nullptr, "GetDownloadedEulaData"}, - {11, nullptr, "SetupCardUpdate"}, - {12, nullptr, "GetPreparedCardUpdateEulaDataSize"}, - {13, nullptr, "GetPreparedCardUpdateEulaData"}, - {14, nullptr, "SetupCardUpdateViaSystemUpdater"}, - {15, nullptr, "HasReceived"}, - {16, nullptr, "RequestReceiveSystemUpdate"}, - {17, nullptr, "GetReceiveProgress"}, - {18, nullptr, "ApplyReceivedUpdate"}, - {19, nullptr, "GetReceivedEulaDataSize"}, - {20, nullptr, "GetReceivedEulaData"}, - {21, nullptr, "SetupToReceiveSystemUpdate"}, - {22, nullptr, "RequestCheckLatestUpdateIncludesRebootlessUpdate"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISystemUpdateControl::~ISystemUpdateControl() = default; diff --git a/src/core/hle/service/ns/system_update_control.h b/src/core/hle/service/ns/system_update_control.h index a30a090000..91261ff6b6 100644 --- a/src/core/hle/service/ns/system_update_control.h +++ b/src/core/hle/service/ns/system_update_control.h @@ -11,6 +11,35 @@ class ISystemUpdateControl final : public ServiceFramework public: explicit ISystemUpdateControl(Core::System& system_); ~ISystemUpdateControl() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "HasDownloaded"}, + FunctionInfo{1, nullptr, "RequestCheckLatestUpdate"}, + FunctionInfo{2, nullptr, "RequestDownloadLatestUpdate"}, + FunctionInfo{3, nullptr, "GetDownloadProgress"}, + FunctionInfo{4, nullptr, "ApplyDownloadedUpdate"}, + FunctionInfo{5, nullptr, "RequestPrepareCardUpdate"}, + FunctionInfo{6, nullptr, "GetPrepareCardUpdateProgress"}, + FunctionInfo{7, nullptr, "HasPreparedCardUpdate"}, + FunctionInfo{8, nullptr, "ApplyCardUpdate"}, + FunctionInfo{9, nullptr, "GetDownloadedEulaDataSize"}, + FunctionInfo{10, nullptr, "GetDownloadedEulaData"}, + FunctionInfo{11, nullptr, "SetupCardUpdate"}, + FunctionInfo{12, nullptr, "GetPreparedCardUpdateEulaDataSize"}, + FunctionInfo{13, nullptr, "GetPreparedCardUpdateEulaData"}, + FunctionInfo{14, nullptr, "SetupCardUpdateViaSystemUpdater"}, + FunctionInfo{15, nullptr, "HasReceived"}, + FunctionInfo{16, nullptr, "RequestReceiveSystemUpdate"}, + FunctionInfo{17, nullptr, "GetReceiveProgress"}, + FunctionInfo{18, nullptr, "ApplyReceivedUpdate"}, + FunctionInfo{19, nullptr, "GetReceivedEulaDataSize"}, + FunctionInfo{20, nullptr, "GetReceivedEulaData"}, + FunctionInfo{21, nullptr, "SetupToReceiveSystemUpdate"}, + FunctionInfo{22, nullptr, "RequestCheckLatestUpdateIncludesRebootlessUpdate"} + ); }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/system_update_interface.cpp b/src/core/hle/service/ns/system_update_interface.cpp index 7e22ca3db0..df3fa0a7ac 100644 --- a/src/core/hle/service/ns/system_update_interface.cpp +++ b/src/core/hle/service/ns/system_update_interface.cpp @@ -10,29 +10,6 @@ namespace Service::NS { ISystemUpdateInterface::ISystemUpdateInterface(Core::System& system_) : ServiceFramework{system_, "ns:su"}, service_context{system_, "ns:su"}, update_notification_event{service_context} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ISystemUpdateInterface::GetBackgroundNetworkUpdateState>, "GetBackgroundNetworkUpdateState"}, - {1, D<&ISystemUpdateInterface::OpenSystemUpdateControl>, "OpenSystemUpdateControl"}, - {2, nullptr, "NotifyExFatDriverRequired"}, - {3, nullptr, "ClearExFatDriverStatusForDebug"}, - {4, nullptr, "RequestBackgroundNetworkUpdate"}, - {5, nullptr, "NotifyBackgroundNetworkUpdate"}, - {6, nullptr, "NotifyExFatDriverDownloadedForDebug"}, - {9, D<&ISystemUpdateInterface::GetSystemUpdateNotificationEventForContentDelivery>, "GetSystemUpdateNotificationEventForContentDelivery"}, - {10, nullptr, "NotifySystemUpdateForContentDelivery"}, - {11, nullptr, "PrepareShutdown"}, - {12, nullptr, "Unknown12"}, - {13, nullptr, "Unknown13"}, - {14, nullptr, "Unknown14"}, - {15, nullptr, "Unknown15"}, - {16, nullptr, "DestroySystemUpdateTask"}, - {17, nullptr, "RequestSendSystemUpdate"}, - {18, nullptr, "GetSendSystemUpdateProgress"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISystemUpdateInterface::~ISystemUpdateInterface() = default; diff --git a/src/core/hle/service/ns/system_update_interface.h b/src/core/hle/service/ns/system_update_interface.h index 36a2880ec9..04493bbed5 100644 --- a/src/core/hle/service/ns/system_update_interface.h +++ b/src/core/hle/service/ns/system_update_interface.h @@ -31,6 +31,28 @@ private: OutCopyHandle out_event); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ISystemUpdateInterface::GetBackgroundNetworkUpdateState>, "GetBackgroundNetworkUpdateState"}, + FunctionInfo{1, D<&ISystemUpdateInterface::OpenSystemUpdateControl>, "OpenSystemUpdateControl"}, + FunctionInfo{2, nullptr, "NotifyExFatDriverRequired"}, + FunctionInfo{3, nullptr, "ClearExFatDriverStatusForDebug"}, + FunctionInfo{4, nullptr, "RequestBackgroundNetworkUpdate"}, + FunctionInfo{5, nullptr, "NotifyBackgroundNetworkUpdate"}, + FunctionInfo{6, nullptr, "NotifyExFatDriverDownloadedForDebug"}, + FunctionInfo{9, D<&ISystemUpdateInterface::GetSystemUpdateNotificationEventForContentDelivery>, "GetSystemUpdateNotificationEventForContentDelivery"}, + FunctionInfo{10, nullptr, "NotifySystemUpdateForContentDelivery"}, + FunctionInfo{11, nullptr, "PrepareShutdown"}, + FunctionInfo{12, nullptr, "Unknown12"}, + FunctionInfo{13, nullptr, "Unknown13"}, + FunctionInfo{14, nullptr, "Unknown14"}, + FunctionInfo{15, nullptr, "Unknown15"}, + FunctionInfo{16, nullptr, "DestroySystemUpdateTask"}, + FunctionInfo{17, nullptr, "RequestSendSystemUpdate"}, + FunctionInfo{18, nullptr, "GetSendSystemUpdateProgress"} + ); KernelHelpers::ServiceContext service_context; Event update_notification_event; }; diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.h b/src/core/hle/service/nvdrv/nvdrv_interface.h index 69f4ed7854..7eb79f11bf 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.h +++ b/src/core/hle/service/nvdrv/nvdrv_interface.h @@ -39,20 +39,20 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, &NVDRV::Open, "Open"}, - {1, &NVDRV::Ioctl1, "Ioctl"}, - {2, &NVDRV::Close, "Close"}, - {3, &NVDRV::Initialize, "Initialize"}, - {4, &NVDRV::QueryEvent, "QueryEvent"}, - {5, nullptr, "MapSharedMem"}, - {6, &NVDRV::GetStatus, "GetStatus"}, - {7, nullptr, "SetAruidForTest"}, - {8, &NVDRV::SetAruid, "SetAruid"}, - {9, &NVDRV::DumpGraphicsMemoryInfo, "DumpGraphicsMemoryInfo"}, - {10, nullptr, "InitializeDevtools"}, - {11, &NVDRV::Ioctl2, "Ioctl2"}, - {12, &NVDRV::Ioctl3, "Ioctl3"}, - {13, &NVDRV::SetGraphicsFirmwareMemoryMarginEnabled, + FunctionInfo{0, &NVDRV::Open, "Open"}, + FunctionInfo{1, &NVDRV::Ioctl1, "Ioctl"}, + FunctionInfo{2, &NVDRV::Close, "Close"}, + FunctionInfo{3, &NVDRV::Initialize, "Initialize"}, + FunctionInfo{4, &NVDRV::QueryEvent, "QueryEvent"}, + FunctionInfo{5, nullptr, "MapSharedMem"}, + FunctionInfo{6, &NVDRV::GetStatus, "GetStatus"}, + FunctionInfo{7, nullptr, "SetAruidForTest"}, + FunctionInfo{8, &NVDRV::SetAruid, "SetAruid"}, + FunctionInfo{9, &NVDRV::DumpGraphicsMemoryInfo, "DumpGraphicsMemoryInfo"}, + FunctionInfo{10, nullptr, "InitializeDevtools"}, + FunctionInfo{11, &NVDRV::Ioctl2, "Ioctl2"}, + FunctionInfo{12, &NVDRV::Ioctl3, "Ioctl3"}, + FunctionInfo{13, &NVDRV::SetGraphicsFirmwareMemoryMarginEnabled, "SetGraphicsFirmwareMemoryMarginEnabled"} ); std::shared_ptr nvdrv; diff --git a/src/core/hle/service/nvdrv/nvmemp.h b/src/core/hle/service/nvdrv/nvmemp.h index f5a866e181..fe5065d20d 100644 --- a/src/core/hle/service/nvdrv/nvmemp.h +++ b/src/core/hle/service/nvdrv/nvmemp.h @@ -24,8 +24,8 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, &NVMEMP::Open, "Open"}, - {1, &NVMEMP::GetAruid, "GetAruid"} + FunctionInfo{0, &NVMEMP::Open, "Open"}, + FunctionInfo{1, &NVMEMP::GetAruid, "GetAruid"} ); }; diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver.h b/src/core/hle/service/nvnflinger/hos_binder_driver.h index 2b0d6735fc..95b7105cd3 100644 --- a/src/core/hle/service/nvnflinger/hos_binder_driver.h +++ b/src/core/hle/service/nvnflinger/hos_binder_driver.h @@ -48,10 +48,10 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, C<&IHOSBinderDriver::TransactParcel>, "TransactParcel"}, - {1, C<&IHOSBinderDriver::AdjustRefcount>, "AdjustRefcount"}, - {2, C<&IHOSBinderDriver::GetNativeHandle>, "GetNativeHandle"}, - {3, C<&IHOSBinderDriver::TransactParcelAuto>, "TransactParcelAuto"} + FunctionInfo{0, C<&IHOSBinderDriver::TransactParcel>, "TransactParcel"}, + FunctionInfo{1, C<&IHOSBinderDriver::AdjustRefcount>, "AdjustRefcount"}, + FunctionInfo{2, C<&IHOSBinderDriver::GetNativeHandle>, "GetNativeHandle"}, + FunctionInfo{3, C<&IHOSBinderDriver::TransactParcelAuto>, "TransactParcelAuto"} ); const std::shared_ptr m_server; const std::shared_ptr m_surface_flinger; diff --git a/src/core/hle/service/olsc/daemon_controller.cpp b/src/core/hle/service/olsc/daemon_controller.cpp index c449c6ff31..9678dbc8de 100644 --- a/src/core/hle/service/olsc/daemon_controller.cpp +++ b/src/core/hle/service/olsc/daemon_controller.cpp @@ -13,17 +13,17 @@ IDaemonController::IDaemonController(Core::System& system_) : ServiceFramework{system_, "IDaemonController"} { // clang-format off static const FunctionInfo functions[] = { - {0, D<&IDaemonController::GetApplicationAutoTransferSetting>, "GetApplicationAutoTransferSetting"}, - {1, D<&IDaemonController::SetApplicationAutoTransferSetting>, "SetApplicationAutoTransferSetting"}, - {2, D<&IDaemonController::GetGlobalAutoUploadSetting>, "GetGlobalAutoUploadSetting"}, - {3, D<&IDaemonController::SetGlobalAutoUploadSetting>, "SetGlobalAutoUploadSetting"}, - {4, D<&IDaemonController::RunTransferTaskAutonomyRegistration>, "RunTransferTaskAutonomyRegistration"}, - {5, D<&IDaemonController::GetGlobalAutoDownloadSetting>, "GetGlobalAutoDownloadSetting"}, // 11.0.0+ - {6, D<&IDaemonController::SetGlobalAutoDownloadSetting>, "SetGlobalAutoDownloadSetting"}, // 11.0.0+ - {10, nullptr, "CreateForbiddenSaveDataInidication"}, - {11, D<&IDaemonController::StopAutonomyTaskExecution>, "StopAutonomyTaskExecution"}, - {12, D<&IDaemonController::GetAutonomyTaskStatus>, "GetAutonomyTaskStatus"}, - {13, nullptr, "Unknown13_20_0_0_Plus"}, // 20.0.0+ + FunctionInfo{0, D<&IDaemonController::GetApplicationAutoTransferSetting>, "GetApplicationAutoTransferSetting"}, + FunctionInfo{1, D<&IDaemonController::SetApplicationAutoTransferSetting>, "SetApplicationAutoTransferSetting"}, + FunctionInfo{2, D<&IDaemonController::GetGlobalAutoUploadSetting>, "GetGlobalAutoUploadSetting"}, + FunctionInfo{3, D<&IDaemonController::SetGlobalAutoUploadSetting>, "SetGlobalAutoUploadSetting"}, + FunctionInfo{4, D<&IDaemonController::RunTransferTaskAutonomyRegistration>, "RunTransferTaskAutonomyRegistration"}, + FunctionInfo{5, D<&IDaemonController::GetGlobalAutoDownloadSetting>, "GetGlobalAutoDownloadSetting"}, // 11.0.0+ + FunctionInfo{6, D<&IDaemonController::SetGlobalAutoDownloadSetting>, "SetGlobalAutoDownloadSetting"}, // 11.0.0+ + FunctionInfo{10, nullptr, "CreateForbiddenSaveDataInidication"}, + FunctionInfo{11, D<&IDaemonController::StopAutonomyTaskExecution>, "StopAutonomyTaskExecution"}, + FunctionInfo{12, D<&IDaemonController::GetAutonomyTaskStatus>, "GetAutonomyTaskStatus"}, + FunctionInfo{13, nullptr, "Unknown13_20_0_0_Plus"}, // 20.0.0+ }; // clang-format on diff --git a/src/core/hle/service/olsc/native_handle_holder.cpp b/src/core/hle/service/olsc/native_handle_holder.cpp index 1e50195539..b40d4bf154 100644 --- a/src/core/hle/service/olsc/native_handle_holder.cpp +++ b/src/core/hle/service/olsc/native_handle_holder.cpp @@ -16,12 +16,12 @@ INativeHandleHolder::INativeHandleHolder(Core::System& system_) : ServiceFramework{system_, "INativeHandleHolder"}, service_context{system_, "OLSC"} { event = service_context.CreateEvent("OLSC::INativeHandleHolder"); // clang-format off - static const FunctionInfo functions[] = { - {0, D<&INativeHandleHolder::GetNativeHandle>, "GetNativeHandle"}, - }; - // clang-format on - - RegisterHandlers(functions); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&INativeHandleHolder::GetNativeHandle>, "GetNativeHandle"} + ); } INativeHandleHolder::~INativeHandleHolder() { diff --git a/src/core/hle/service/olsc/olsc_service_for_application.cpp b/src/core/hle/service/olsc/olsc_service_for_application.cpp index eec9ce0d0f..bce0e47c68 100644 --- a/src/core/hle/service/olsc/olsc_service_for_application.cpp +++ b/src/core/hle/service/olsc/olsc_service_for_application.cpp @@ -12,7 +12,10 @@ namespace Service::OLSC { IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_) : ServiceFramework{system_, "olsc:u"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IOlscServiceForApplication::Initialize>, "Initialize"}, FunctionInfo{10, nullptr, "VerifySaveDataBackupLicenseAsync"}, FunctionInfo{13, D<&IOlscServiceForApplication::GetSaveDataBackupSetting>, "GetSaveDataBackupSetting"}, @@ -35,10 +38,7 @@ IOlscServiceForApplication::IOlscServiceForApplication(Core::System& system_) FunctionInfo{9022, nullptr, "DeleteSaveDataBackupAsyncForDebug"}, FunctionInfo{9025, nullptr, "ListDownloadableSaveDataBackupInfoAsyncForDebug"}, FunctionInfo{9026, nullptr, "DownloadSaveDataBackupAsyncForDebug"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } IOlscServiceForApplication::~IOlscServiceForApplication() = default; diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.cpp b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp index 245bbd5c6b..788019ea5a 100644 --- a/src/core/hle/service/olsc/olsc_service_for_system_service.cpp +++ b/src/core/hle/service/olsc/olsc_service_for_system_service.cpp @@ -14,73 +14,6 @@ namespace Service::OLSC { IOlscServiceForSystemService::IOlscServiceForSystemService(Core::System& system_) : ServiceFramework{system_, "olsc:s"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IOlscServiceForSystemService::GetTransferTaskListController>, "GetTransferTaskListController"}, - {1, D<&IOlscServiceForSystemService::GetRemoteStorageController>, "GetRemoteStorageController"}, - {2, D<&IOlscServiceForSystemService::GetDaemonController>, "GetDaemonController"}, - {10, nullptr, "PrepareDeleteUserProperty"}, - {11, nullptr, "DeleteUserSaveDataProperty"}, - {12, nullptr, "InvalidateMountCache"}, - {13, nullptr, "DeleteDeviceSaveDataProperty"}, - {100, nullptr, "ListLastTransferTaskErrorInfo"}, - {101, nullptr, "GetLastErrorInfoCount"}, - {102, nullptr, "RemoveLastErrorInfoOld"}, - {103, nullptr, "GetLastErrorInfo"}, - {104, nullptr, "GetLastErrorEventHolder"}, - {105, D<&IOlscServiceForSystemService::GetTransferTaskErrorInfo>, "GetTransferTaskErrorInfo"}, - {200, D<&IOlscServiceForSystemService::GetDataTransferPolicy>, "GetDataTransferPolicy"}, - {201, nullptr, "DeleteDataTransferPolicyCache"}, - {202, nullptr, "Unknown202"}, - {203, nullptr, "RequestUpdateDataTransferPolicyCacheAsync"}, - {204, nullptr, "ClearDataTransferPolicyCache"}, - {205, nullptr, "RequestGetDataTransferPolicyAsync"}, - {206, nullptr, "Unknown206"}, //21.0.0+ - {300, nullptr, "GetUserSaveDataProperty"}, - {301, nullptr, "SetUserSaveDataProperty"}, - {302, nullptr, "Unknown302"}, //21.0.0+ - {400, nullptr, "CleanupSaveDataBackupContextForSpecificApplications"}, - {900, nullptr, "DeleteAllTransferTask"}, - {902, nullptr, "DeleteAllSeriesInfo"}, - {903, nullptr, "DeleteAllSdaInfoCache"}, - {904, nullptr, "DeleteAllApplicationSetting"}, - {905, nullptr, "DeleteAllTransferTaskErrorInfo"}, - {906, nullptr, "RegisterTransferTaskErrorInfo"}, - {907, nullptr, "AddSaveDataArchiveInfoCache"}, - {908, nullptr, "DeleteSeriesInfo"}, - {909, nullptr, "GetSeriesInfo"}, - {910, nullptr, "RemoveTransferTaskErrorInfo"}, - {911, nullptr, "DeleteAllSeriesInfoForSaveDataBackup"}, - {912, nullptr, "DeleteSeriesInfoForSaveDataBackup"}, - {913, nullptr, "GetSeriesInfoForSaveDataBackup"}, - {914, nullptr, "Unknown914"}, //20.2.0+ - {1000, nullptr, "UpdateIssueOld"}, - {1010, nullptr, "Unknown1010"}, - {1011, nullptr, "Unknown1011"}, - {1012, nullptr, "Unknown1012"}, - {1013, nullptr, "Unkown1013"}, - {1014, nullptr, "Unknown1014"}, - {1020, nullptr, "Unknown1020"}, - {1021, nullptr, "Unknown1021"}, - {1022, nullptr, "Unknown1022"}, - {1023, nullptr, "Unknown1023"}, - {1024, nullptr, "Unknown1024"}, - {1100, nullptr, "RepairUpdateIssueInfoCacheAync"}, - {1110, nullptr, "RepairGetIssueInfo"}, - {1111, nullptr, "RepairListIssueInfo"}, - {1112, nullptr, "RepairListOperationPermissionInfo"}, - {1113, nullptr, "RepairListDataInfoForRepairedSaveDataDownload"}, - {1114, nullptr, "RepairListDataInfoForOriginalSaveDataDownload"}, - {1120, nullptr, "RepairUploadSaveDataAsync"}, - {1121, nullptr, "RepairUploadSaveDataAsync1"}, - {1122, nullptr, "RepairDownloadRepairedSaveDataAsync"}, - {1123, nullptr, "RepairDownloadOriginalSaveDataAsync"}, - {1124, nullptr, "RepairGetOperationProgressInfo"}, - {10000, D<&IOlscServiceForSystemService::GetOlscServiceForSystemService>, "GetOlscServiceForSystemService"}, - }; - // clang-format on - - RegisterHandlers(functions); } IOlscServiceForSystemService::~IOlscServiceForSystemService() = default; diff --git a/src/core/hle/service/olsc/olsc_service_for_system_service.h b/src/core/hle/service/olsc/olsc_service_for_system_service.h index d16c8b979b..77169cd9e2 100644 --- a/src/core/hle/service/olsc/olsc_service_for_system_service.h +++ b/src/core/hle/service/olsc/olsc_service_for_system_service.h @@ -46,8 +46,74 @@ private: Result GetDaemonController(Out> out_interface); Result GetDataTransferPolicy(Out out_policy, u64 application_id); Result GetTransferTaskErrorInfo(Out out_info, Common::UUID uid, u64 application_id); - Result GetOlscServiceForSystemService( - Out> out_interface); + Result GetOlscServiceForSystemService(Out> out_interface); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IOlscServiceForSystemService::GetTransferTaskListController>, "GetTransferTaskListController"}, + FunctionInfo{1, D<&IOlscServiceForSystemService::GetRemoteStorageController>, "GetRemoteStorageController"}, + FunctionInfo{2, D<&IOlscServiceForSystemService::GetDaemonController>, "GetDaemonController"}, + FunctionInfo{10, nullptr, "PrepareDeleteUserProperty"}, + FunctionInfo{11, nullptr, "DeleteUserSaveDataProperty"}, + FunctionInfo{12, nullptr, "InvalidateMountCache"}, + FunctionInfo{13, nullptr, "DeleteDeviceSaveDataProperty"}, + FunctionInfo{100, nullptr, "ListLastTransferTaskErrorInfo"}, + FunctionInfo{101, nullptr, "GetLastErrorInfoCount"}, + FunctionInfo{102, nullptr, "RemoveLastErrorInfoOld"}, + FunctionInfo{103, nullptr, "GetLastErrorInfo"}, + FunctionInfo{104, nullptr, "GetLastErrorEventHolder"}, + FunctionInfo{105, D<&IOlscServiceForSystemService::GetTransferTaskErrorInfo>, "GetTransferTaskErrorInfo"}, + FunctionInfo{200, D<&IOlscServiceForSystemService::GetDataTransferPolicy>, "GetDataTransferPolicy"}, + FunctionInfo{201, nullptr, "DeleteDataTransferPolicyCache"}, + FunctionInfo{202, nullptr, "Unknown202"}, + FunctionInfo{203, nullptr, "RequestUpdateDataTransferPolicyCacheAsync"}, + FunctionInfo{204, nullptr, "ClearDataTransferPolicyCache"}, + FunctionInfo{205, nullptr, "RequestGetDataTransferPolicyAsync"}, + FunctionInfo{206, nullptr, "Unknown206"}, //21.0.0+ + FunctionInfo{300, nullptr, "GetUserSaveDataProperty"}, + FunctionInfo{301, nullptr, "SetUserSaveDataProperty"}, + FunctionInfo{302, nullptr, "Unknown302"}, //21.0.0+ + FunctionInfo{400, nullptr, "CleanupSaveDataBackupContextForSpecificApplications"}, + FunctionInfo{900, nullptr, "DeleteAllTransferTask"}, + FunctionInfo{902, nullptr, "DeleteAllSeriesInfo"}, + FunctionInfo{903, nullptr, "DeleteAllSdaInfoCache"}, + FunctionInfo{904, nullptr, "DeleteAllApplicationSetting"}, + FunctionInfo{905, nullptr, "DeleteAllTransferTaskErrorInfo"}, + FunctionInfo{906, nullptr, "RegisterTransferTaskErrorInfo"}, + FunctionInfo{907, nullptr, "AddSaveDataArchiveInfoCache"}, + FunctionInfo{908, nullptr, "DeleteSeriesInfo"}, + FunctionInfo{909, nullptr, "GetSeriesInfo"}, + FunctionInfo{910, nullptr, "RemoveTransferTaskErrorInfo"}, + FunctionInfo{911, nullptr, "DeleteAllSeriesInfoForSaveDataBackup"}, + FunctionInfo{912, nullptr, "DeleteSeriesInfoForSaveDataBackup"}, + FunctionInfo{913, nullptr, "GetSeriesInfoForSaveDataBackup"}, + FunctionInfo{914, nullptr, "Unknown914"}, //20.2.0+ + FunctionInfo{1000, nullptr, "UpdateIssueOld"}, + FunctionInfo{1010, nullptr, "Unknown1010"}, + FunctionInfo{1011, nullptr, "Unknown1011"}, + FunctionInfo{1012, nullptr, "Unknown1012"}, + FunctionInfo{1013, nullptr, "Unkown1013"}, + FunctionInfo{1014, nullptr, "Unknown1014"}, + FunctionInfo{1020, nullptr, "Unknown1020"}, + FunctionInfo{1021, nullptr, "Unknown1021"}, + FunctionInfo{1022, nullptr, "Unknown1022"}, + FunctionInfo{1023, nullptr, "Unknown1023"}, + FunctionInfo{1024, nullptr, "Unknown1024"}, + FunctionInfo{1100, nullptr, "RepairUpdateIssueInfoCacheAync"}, + FunctionInfo{1110, nullptr, "RepairGetIssueInfo"}, + FunctionInfo{1111, nullptr, "RepairListIssueInfo"}, + FunctionInfo{1112, nullptr, "RepairListOperationPermissionInfo"}, + FunctionInfo{1113, nullptr, "RepairListDataInfoForRepairedSaveDataDownload"}, + FunctionInfo{1114, nullptr, "RepairListDataInfoForOriginalSaveDataDownload"}, + FunctionInfo{1120, nullptr, "RepairUploadSaveDataAsync"}, + FunctionInfo{1121, nullptr, "RepairUploadSaveDataAsync1"}, + FunctionInfo{1122, nullptr, "RepairDownloadRepairedSaveDataAsync"}, + FunctionInfo{1123, nullptr, "RepairDownloadOriginalSaveDataAsync"}, + FunctionInfo{1124, nullptr, "RepairGetOperationProgressInfo"}, + FunctionInfo{10000, D<&IOlscServiceForSystemService::GetOlscServiceForSystemService>, "GetOlscServiceForSystemService"} + ); }; } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/remote_storage_controller.cpp b/src/core/hle/service/olsc/remote_storage_controller.cpp index 817097b426..a8a903d4ae 100644 --- a/src/core/hle/service/olsc/remote_storage_controller.cpp +++ b/src/core/hle/service/olsc/remote_storage_controller.cpp @@ -11,42 +11,6 @@ namespace Service::OLSC { IRemoteStorageController::IRemoteStorageController(Core::System& system_) : ServiceFramework{system_, "IRemoteStorageController"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetSaveDataArchiveInfoBySaveDataId"}, - {1, nullptr, "GetSaveDataArchiveInfoByApplicationId"}, - {3, nullptr, "GetSaveDataArchiveCount"}, - {6, nullptr, "CleanupSaveDataArchives"}, - {7, nullptr, "CreateSaveDataArchiveCacheUpdationTask"}, - {8, nullptr, "CreateSaveDataArchiveCacheUpdationForSpecifiedApplicationTask"}, - {9, nullptr, "Delete"}, - {10, nullptr, "GetSeriesInfo"}, - {11, nullptr, "CreateDeleteDataTask"}, - {12, nullptr, "DeleteSeriesInfo"}, - {13, nullptr, "CreateRegisterNotificationTokenTask"}, - {14, D<&IRemoteStorageController::GetDataNewnessByApplicationId>, "GetDataNewnessByApplicationId"}, - {15, nullptr, "RegisterUploadSaveDataTransferTaskForAutonomyRegistration"}, - {16, nullptr, "CreateCleanupToDeleteSaveDataArchiveInfoTask"}, - {17, nullptr, "ListDataInfo"}, - {18, D<&IRemoteStorageController::GetDataInfo>, "GetDataInfoV1"}, - {19, nullptr, "GetDataInfoCacheUpdateNativeHandleHolder"}, - {20, nullptr, "CreateSaveDataArchiveInfoCacheForSaveDataBackupUpdationTask"}, - {21, nullptr, "ListSecondarySaves"}, - {22, D<&IRemoteStorageController::GetSecondarySave>, "GetSecondarySave"}, - {23, nullptr, "TouchSecondarySave"}, - {24, nullptr, "GetSecondarySaveDataInfo"}, - {25, nullptr, "RegisterDownloadSaveDataTransferTaskForAutonomyRegistration"}, - {26, nullptr, "Unknown26"}, //20.0.0+ - {27, D<&IRemoteStorageController::GetDataInfo>, "GetDataInfoV2"}, //20.0.0+ - {28, nullptr, "Unknown28"}, //20.0.0+ - {29, nullptr, "Unknown29"}, //21.0.0+ - {800, nullptr, "Unknown800"}, //20.0.0+ - {900, nullptr, "SetLoadedDataMissing"}, - {901, nullptr, "Unknown901"}, //20.2.0+ - }; - // clang-format on - - RegisterHandlers(functions); } IRemoteStorageController::~IRemoteStorageController() = default; diff --git a/src/core/hle/service/olsc/remote_storage_controller.h b/src/core/hle/service/olsc/remote_storage_controller.h index 21b439013a..637296430f 100644 --- a/src/core/hle/service/olsc/remote_storage_controller.h +++ b/src/core/hle/service/olsc/remote_storage_controller.h @@ -21,6 +21,42 @@ private: u64 application_id); Result GetDataNewnessByApplicationId(Out out_newness, u64 application_id); Result GetDataInfo(Out> out_data, u64 application_id); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetSaveDataArchiveInfoBySaveDataId"}, + FunctionInfo{1, nullptr, "GetSaveDataArchiveInfoByApplicationId"}, + FunctionInfo{3, nullptr, "GetSaveDataArchiveCount"}, + FunctionInfo{6, nullptr, "CleanupSaveDataArchives"}, + FunctionInfo{7, nullptr, "CreateSaveDataArchiveCacheUpdationTask"}, + FunctionInfo{8, nullptr, "CreateSaveDataArchiveCacheUpdationForSpecifiedApplicationTask"}, + FunctionInfo{9, nullptr, "Delete"}, + FunctionInfo{10, nullptr, "GetSeriesInfo"}, + FunctionInfo{11, nullptr, "CreateDeleteDataTask"}, + FunctionInfo{12, nullptr, "DeleteSeriesInfo"}, + FunctionInfo{13, nullptr, "CreateRegisterNotificationTokenTask"}, + FunctionInfo{14, D<&IRemoteStorageController::GetDataNewnessByApplicationId>, "GetDataNewnessByApplicationId"}, + FunctionInfo{15, nullptr, "RegisterUploadSaveDataTransferTaskForAutonomyRegistration"}, + FunctionInfo{16, nullptr, "CreateCleanupToDeleteSaveDataArchiveInfoTask"}, + FunctionInfo{17, nullptr, "ListDataInfo"}, + FunctionInfo{18, D<&IRemoteStorageController::GetDataInfo>, "GetDataInfoV1"}, + FunctionInfo{19, nullptr, "GetDataInfoCacheUpdateNativeHandleHolder"}, + FunctionInfo{20, nullptr, "CreateSaveDataArchiveInfoCacheForSaveDataBackupUpdationTask"}, + FunctionInfo{21, nullptr, "ListSecondarySaves"}, + FunctionInfo{22, D<&IRemoteStorageController::GetSecondarySave>, "GetSecondarySave"}, + FunctionInfo{23, nullptr, "TouchSecondarySave"}, + FunctionInfo{24, nullptr, "GetSecondarySaveDataInfo"}, + FunctionInfo{25, nullptr, "RegisterDownloadSaveDataTransferTaskForAutonomyRegistration"}, + FunctionInfo{26, nullptr, "Unknown26"}, //20.0.0+ + FunctionInfo{27, D<&IRemoteStorageController::GetDataInfo>, "GetDataInfoV2"}, //20.0.0+ + FunctionInfo{28, nullptr, "Unknown28"}, //20.0.0+ + FunctionInfo{29, nullptr, "Unknown29"}, //21.0.0+ + FunctionInfo{800, nullptr, "Unknown800"}, //20.0.0+ + FunctionInfo{900, nullptr, "SetLoadedDataMissing"}, + FunctionInfo{901, nullptr, "Unknown901"}, //20.2.0+ + ); }; } // namespace Service::OLSC diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.cpp b/src/core/hle/service/olsc/transfer_task_list_controller.cpp index 95e41cdb51..a27ca68d2d 100644 --- a/src/core/hle/service/olsc/transfer_task_list_controller.cpp +++ b/src/core/hle/service/olsc/transfer_task_list_controller.cpp @@ -13,43 +13,6 @@ namespace Service::OLSC { ITransferTaskListController::ITransferTaskListController(Core::System& system_) : ServiceFramework{system_, "ITransferTaskListController"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetTransferTaskCountForOcean"}, - {1, nullptr, "GetTransferTaskInfoForOcean"}, - {2, nullptr, "ListTransferTaskInfoForOcean"}, - {3, nullptr, "DeleteTransferTaskForOcean"}, - {4, nullptr, "RaiseTransferTaskPriorityForOcean"}, - {5, D<&ITransferTaskListController::GetTransferTaskEndEventNativeHandleHolder>, "GetTransferTaskEndEventNativeHandleHolder"}, - {6, nullptr, "GetTransferTaskProgressForOcean"}, - {7, nullptr, "GetTransferTaskLastResultForOcean"}, - {8, D<&ITransferTaskListController::StopNextTransferTaskExecution>, "StopNextTransferTaskExecution"}, - {9, D<&ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder>, "GetTransferTaskStartEventNativeHandleHolder"}, - {10, nullptr, "SuspendTransferTaskForOcean"}, - {11, nullptr, "GetCurrentTransferTaskInfoForOcean"}, - {12, nullptr, "FindTransferTaskInfoForOcean"}, - {13, nullptr, "CancelCurrentRepairTransferTask"}, - {14, nullptr, "GetRepairTransferTaskProgress"}, - {15, nullptr, "EnsureExecutableForRepairTransferTask"}, - {16, D<&ITransferTaskListController::GetTransferTaskCount>, "GetTransferTaskCount"}, - {17, nullptr, "GetTransferTaskInfo"}, - {18, nullptr, "ListTransferTaskInfo"}, - {19, nullptr, "DeleteTransferTask"}, - {20, nullptr, "RaiseTransferTaskPriority"}, - {21, D<&ITransferTaskListController::GetTransferTaskProgress>, "GetTransferTaskProgress"}, //10.1.0+ - {22, nullptr, "GetTransferTaskLastResult"}, - {23, nullptr, "SuspendTransferTask"}, - {24, D<&ITransferTaskListController::GetCurrentTransferTaskInfo>, "GetCurrentTransferTaskInfo"}, - {25, D<&ITransferTaskListController::FindTransferTaskInfo>, "FindTransferTaskInfo"}, - {26, nullptr, "Unknown26"}, //20.1.0+ - {27, nullptr, "Unknown27"}, //20.1.0+ - {28, nullptr, "Unknown28"}, //20.1.0+ - {29, nullptr, "Unknown29"}, //20.1.0+ - {30, nullptr, "Unknown30"}, //20.1.0+ - }; - // clang-format on - - RegisterHandlers(functions); } ITransferTaskListController::~ITransferTaskListController() = default; diff --git a/src/core/hle/service/olsc/transfer_task_list_controller.h b/src/core/hle/service/olsc/transfer_task_list_controller.h index 5f3429879a..207e469117 100644 --- a/src/core/hle/service/olsc/transfer_task_list_controller.h +++ b/src/core/hle/service/olsc/transfer_task_list_controller.h @@ -27,6 +27,43 @@ private: Result GetTransferTaskProgress(); Result GetCurrentTransferTaskInfo(Out> out_info, u8 unknown); Result FindTransferTaskInfo(Out> out_info, InBuffer in); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetTransferTaskCountForOcean"}, + FunctionInfo{1, nullptr, "GetTransferTaskInfoForOcean"}, + FunctionInfo{2, nullptr, "ListTransferTaskInfoForOcean"}, + FunctionInfo{3, nullptr, "DeleteTransferTaskForOcean"}, + FunctionInfo{4, nullptr, "RaiseTransferTaskPriorityForOcean"}, + FunctionInfo{5, D<&ITransferTaskListController::GetTransferTaskEndEventNativeHandleHolder>, "GetTransferTaskEndEventNativeHandleHolder"}, + FunctionInfo{6, nullptr, "GetTransferTaskProgressForOcean"}, + FunctionInfo{7, nullptr, "GetTransferTaskLastResultForOcean"}, + FunctionInfo{8, D<&ITransferTaskListController::StopNextTransferTaskExecution>, "StopNextTransferTaskExecution"}, + FunctionInfo{9, D<&ITransferTaskListController::GetTransferTaskStartEventNativeHandleHolder>, "GetTransferTaskStartEventNativeHandleHolder"}, + FunctionInfo{10, nullptr, "SuspendTransferTaskForOcean"}, + FunctionInfo{11, nullptr, "GetCurrentTransferTaskInfoForOcean"}, + FunctionInfo{12, nullptr, "FindTransferTaskInfoForOcean"}, + FunctionInfo{13, nullptr, "CancelCurrentRepairTransferTask"}, + FunctionInfo{14, nullptr, "GetRepairTransferTaskProgress"}, + FunctionInfo{15, nullptr, "EnsureExecutableForRepairTransferTask"}, + FunctionInfo{16, D<&ITransferTaskListController::GetTransferTaskCount>, "GetTransferTaskCount"}, + FunctionInfo{17, nullptr, "GetTransferTaskInfo"}, + FunctionInfo{18, nullptr, "ListTransferTaskInfo"}, + FunctionInfo{19, nullptr, "DeleteTransferTask"}, + FunctionInfo{20, nullptr, "RaiseTransferTaskPriority"}, + FunctionInfo{21, D<&ITransferTaskListController::GetTransferTaskProgress>, "GetTransferTaskProgress"}, //10.1.0+ + FunctionInfo{22, nullptr, "GetTransferTaskLastResult"}, + FunctionInfo{23, nullptr, "SuspendTransferTask"}, + FunctionInfo{24, D<&ITransferTaskListController::GetCurrentTransferTaskInfo>, "GetCurrentTransferTaskInfo"}, + FunctionInfo{25, D<&ITransferTaskListController::FindTransferTaskInfo>, "FindTransferTaskInfo"}, + FunctionInfo{26, nullptr, "Unknown26"}, //20.1.0+ + FunctionInfo{27, nullptr, "Unknown27"}, //20.1.0+ + FunctionInfo{28, nullptr, "Unknown28"}, //20.1.0+ + FunctionInfo{29, nullptr, "Unknown29"}, //20.1.0+ + FunctionInfo{30, nullptr, "Unknown30"}, //20.1.0+ + ); }; } // namespace Service::OLSC diff --git a/src/core/hle/service/omm/operation_mode_manager.cpp b/src/core/hle/service/omm/operation_mode_manager.cpp index fe7ed84a7f..0cde17726e 100644 --- a/src/core/hle/service/omm/operation_mode_manager.cpp +++ b/src/core/hle/service/omm/operation_mode_manager.cpp @@ -7,41 +7,6 @@ namespace Service::OMM { IOperationModeManager::IOperationModeManager(Core::System& system_) : ServiceFramework{system_, "omm"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetOperationMode"}, - {1, nullptr, "GetOperationModeChangeEvent"}, - {2, nullptr, "EnableAudioVisual"}, - {3, nullptr, "DisableAudioVisual"}, - {4, nullptr, "EnterSleepAndWait"}, - {5, nullptr, "GetCradleStatus"}, - {6, nullptr, "FadeInDisplay"}, - {7, nullptr, "FadeOutDisplay"}, - {8, nullptr, "GetCradleFwVersion"}, - {9, nullptr, "NotifyCecSettingsChanged"}, - {10, nullptr, "SetOperationModePolicy"}, - {11, nullptr, "GetDefaultDisplayResolution"}, - {12, nullptr, "GetDefaultDisplayResolutionChangeEvent"}, - {13, nullptr, "UpdateDefaultDisplayResolution"}, - {14, nullptr, "ShouldSleepOnBoot"}, - {15, nullptr, "NotifyHdcpApplicationExecutionStarted"}, - {16, nullptr, "NotifyHdcpApplicationExecutionFinished"}, - {17, nullptr, "NotifyHdcpApplicationDrawingStarted"}, - {18, nullptr, "NotifyHdcpApplicationDrawingFinished"}, - {19, nullptr, "GetHdcpAuthenticationFailedEvent"}, - {20, nullptr, "GetHdcpAuthenticationFailedEmulationEnabled"}, - {21, nullptr, "SetHdcpAuthenticationFailedEmulation"}, - {22, nullptr, "GetHdcpStateChangeEvent"}, - {23, nullptr, "GetHdcpState"}, - {24, nullptr, "ShowCardUpdateProcessing"}, - {25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"}, - {26, nullptr, "GetOperationModeSystemInfo"}, - {27, nullptr, "GetAppletFullAwakingSystemEvent"}, - {28, nullptr, "CreateCradleFirmwareUpdater"}, - }; - // clang-format on - - RegisterHandlers(functions); } IOperationModeManager::~IOperationModeManager() = default; diff --git a/src/core/hle/service/omm/operation_mode_manager.h b/src/core/hle/service/omm/operation_mode_manager.h index 32bc7b2f93..ac520842b5 100644 --- a/src/core/hle/service/omm/operation_mode_manager.h +++ b/src/core/hle/service/omm/operation_mode_manager.h @@ -15,6 +15,41 @@ class IOperationModeManager final : public ServiceFramework public: explicit IPolicyManagerSystem(Core::System& system_); ~IPolicyManagerSystem() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetAutoPowerDownEvent"}, + FunctionInfo{1, nullptr, "IsAutoPowerDownRequested"}, + FunctionInfo{2, nullptr, "Unknown2"}, + FunctionInfo{3, nullptr, "SetHandlingContext"}, + FunctionInfo{4, nullptr, "LoadAndApplySettings"}, + FunctionInfo{5, nullptr, "ReportUserIsActive"} + ); }; } // namespace Service::OMM diff --git a/src/core/hle/service/omm/power_state_interface.cpp b/src/core/hle/service/omm/power_state_interface.cpp index 22cac82595..0d29924f69 100644 --- a/src/core/hle/service/omm/power_state_interface.cpp +++ b/src/core/hle/service/omm/power_state_interface.cpp @@ -7,24 +7,6 @@ namespace Service::OMM { IPowerStateInterface::IPowerStateInterface(Core::System& system_) : ServiceFramework{system_, "spsm"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetState"}, - {1, nullptr, "EnterSleep"}, - {2, nullptr, "GetLastWakeReason"}, - {3, nullptr, "Shutdown"}, - {4, nullptr, "GetNotificationMessageEventHandle"}, - {5, nullptr, "ReceiveNotificationMessage"}, - {6, nullptr, "AnalyzeLogForLastSleepWakeSequence"}, - {7, nullptr, "ResetEventLog"}, - {8, nullptr, "AnalyzePerformanceLogForLastSleepWakeSequence"}, - {9, nullptr, "ChangeHomeButtonLongPressingTime"}, - {10, nullptr, "PutErrorState"}, - {11, nullptr, "InvalidateCurrentHomeButtonPressing"}, - }; - // clang-format on - - RegisterHandlers(functions); } IPowerStateInterface::~IPowerStateInterface() = default; diff --git a/src/core/hle/service/omm/power_state_interface.h b/src/core/hle/service/omm/power_state_interface.h index 825a6512d9..b538b732a6 100644 --- a/src/core/hle/service/omm/power_state_interface.h +++ b/src/core/hle/service/omm/power_state_interface.h @@ -15,6 +15,24 @@ class IPowerStateInterface final : public ServiceFramework public: explicit IPowerStateInterface(Core::System& system_); ~IPowerStateInterface() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetState"}, + FunctionInfo{1, nullptr, "EnterSleep"}, + FunctionInfo{2, nullptr, "GetLastWakeReason"}, + FunctionInfo{3, nullptr, "Shutdown"}, + FunctionInfo{4, nullptr, "GetNotificationMessageEventHandle"}, + FunctionInfo{5, nullptr, "ReceiveNotificationMessage"}, + FunctionInfo{6, nullptr, "AnalyzeLogForLastSleepWakeSequence"}, + FunctionInfo{7, nullptr, "ResetEventLog"}, + FunctionInfo{8, nullptr, "AnalyzePerformanceLogForLastSleepWakeSequence"}, + FunctionInfo{9, nullptr, "ChangeHomeButtonLongPressingTime"}, + FunctionInfo{10, nullptr, "PutErrorState"}, + FunctionInfo{11, nullptr, "InvalidateCurrentHomeButtonPressing"} + ); }; } // namespace Service::OMM diff --git a/src/core/hle/service/pctl/parental_control_service.cpp b/src/core/hle/service/pctl/parental_control_service.cpp index 51953c2657..e524ce4469 100644 --- a/src/core/hle/service/pctl/parental_control_service.cpp +++ b/src/core/hle/service/pctl/parental_control_service.cpp @@ -21,135 +21,6 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili program_id{program_id_}, service_context{system_, "IParentalControlService"}, synchronization_event{service_context}, unlinked_event{service_context}, request_suspension_event{service_context} { - // clang-format off - static const FunctionInfo functions[] = { - {1, D<&IParentalControlService::Initialize>, "Initialize"}, - {1001, D<&IParentalControlService::CheckFreeCommunicationPermission>, "CheckFreeCommunicationPermission"}, - {1002, D<&IParentalControlService::ConfirmLaunchApplicationPermission>, "ConfirmLaunchApplicationPermission"}, - {1003, D<&IParentalControlService::ConfirmResumeApplicationPermission>, "ConfirmResumeApplicationPermission"}, - {1004, D<&IParentalControlService::ConfirmSnsPostPermission>, "ConfirmSnsPostPermission"}, - {1005, D<&IParentalControlService::ConfirmSystemSettingsPermission>, "ConfirmSystemSettingsPermission"}, - {1006, D<&IParentalControlService::IsRestrictionTemporaryUnlocked>, "IsRestrictionTemporaryUnlocked"}, - {1007, nullptr, "RevertRestrictionTemporaryUnlocked"}, - {1008, nullptr, "EnterRestrictedSystemSettings"}, - {1009, nullptr, "LeaveRestrictedSystemSettings"}, - {1010, D<&IParentalControlService::IsRestrictedSystemSettingsEntered>, "IsRestrictedSystemSettingsEntered"}, - {1011, nullptr, "RevertRestrictedSystemSettingsEntered"}, - {1012, nullptr, "GetRestrictedFeatures"}, - {1013, D<&IParentalControlService::ConfirmStereoVisionPermission>, "ConfirmStereoVisionPermission"}, - {1014, nullptr, "ConfirmPlayableApplicationVideoOld"}, - {1015, nullptr, "ConfirmPlayableApplicationVideo"}, - {1016, nullptr, "ConfirmShowNewsPermission"}, - {1017, D<&IParentalControlService::EndFreeCommunication>, "EndFreeCommunication"}, - {1018, D<&IParentalControlService::IsFreeCommunicationAvailable>, "IsFreeCommunicationAvailable"}, - {1019, D<&IParentalControlService::ConfirmLaunchApplicationPermission>, "ConfirmLaunchApplicationPermission"}, - {1020, nullptr, "ConfirmLaunchSharedApplicationPermission"}, //20.0.0+ - {1021, nullptr, "TryBeginFreeCommunicationForStreamPlay"}, //21.0.0+ - {1022, nullptr, "EndFreeCommunicationForStreamPlay"}, //21.0.0+ - {1031, D<&IParentalControlService::IsRestrictionEnabled>, "IsRestrictionEnabled"}, - {1032, D<&IParentalControlService::GetSafetyLevel>, "GetSafetyLevel"}, - {1033, nullptr, "SetSafetyLevel"}, - {1034, nullptr, "GetSafetyLevelSettings"}, - {1035, D<&IParentalControlService::GetCurrentSettings>, "GetCurrentSettings"}, - {1036, nullptr, "SetCustomSafetyLevelSettings"}, - {1037, nullptr, "GetDefaultRatingOrganization"}, - {1038, nullptr, "SetDefaultRatingOrganization"}, - {1039, D<&IParentalControlService::GetFreeCommunicationApplicationListCount>, "GetFreeCommunicationApplicationListCount"}, - {1042, nullptr, "AddToFreeCommunicationApplicationList"}, - {1043, nullptr, "DeleteSettings"}, - {1044, nullptr, "GetFreeCommunicationApplicationList"}, - {1045, nullptr, "UpdateFreeCommunicationApplicationList"}, - {1046, nullptr, "DisableFeaturesForReset"}, - {1047, nullptr, "NotifyApplicationDownloadStarted"}, - {1048, nullptr, "NotifyNetworkProfileCreated"}, - {1049, nullptr, "ResetFreeCommunicationApplicationList"}, - {1050, nullptr, "AddToFreeCommunicationApplicationList"}, //20.0.0+ - {1051, nullptr, "NotifyApplicationDownloadStarted"}, //20.0.0+ - {1061, D<&IParentalControlService::ConfirmStereoVisionRestrictionConfigurable>, "ConfirmStereoVisionRestrictionConfigurable"}, - {1062, D<&IParentalControlService::GetStereoVisionRestriction>, "GetStereoVisionRestriction"}, - {1063, D<&IParentalControlService::SetStereoVisionRestriction>, "SetStereoVisionRestriction"}, - {1064, D<&IParentalControlService::ResetConfirmedStereoVisionPermission>, "ResetConfirmedStereoVisionPermission"}, - {1065, D<&IParentalControlService::IsStereoVisionPermitted>, "IsStereoVisionPermitted"}, - {1201, nullptr, "UnlockRestrictionTemporarily"}, - {1202, nullptr, "UnlockSystemSettingsRestriction"}, - {1203, nullptr, "SetPinCode"}, - {1204, nullptr, "GenerateInquiryCode"}, - {1205, nullptr, "CheckMasterKey"}, - {1206, D<&IParentalControlService::GetPinCodeLength>, "GetPinCodeLength"}, - {1207, nullptr, "GetPinCodeChangedEvent"}, - {1208, nullptr, "GetPinCode"}, - {1403, D<&IParentalControlService::IsPairingActive>, "IsPairingActive"}, - {1406, nullptr, "GetSettingsLastUpdated"}, - {1411, nullptr, "GetPairingAccountInfo"}, - {1421, nullptr, "GetAccountNickname"}, - {1424, nullptr, "GetAccountState"}, - {1425, nullptr, "RequestPostEvents"}, - {1426, nullptr, "GetPostEventInterval"}, - {1427, nullptr, "SetPostEventInterval"}, - {1432, D<&IParentalControlService::GetSynchronizationEvent>, "GetSynchronizationEvent"}, - {1451, D<&IParentalControlService::StartPlayTimer>, "StartPlayTimer"}, - {1452, D<&IParentalControlService::StopPlayTimer>, "StopPlayTimer"}, - {1453, D<&IParentalControlService::IsPlayTimerEnabled>, "IsPlayTimerEnabled"}, - {1454, D<&IParentalControlService::GetPlayTimerRemainingTime>, "GetPlayTimerRemainingTime"}, - {1455, D<&IParentalControlService::IsRestrictedByPlayTimer>, "IsRestrictedByPlayTimer"}, - {1456, D<&IParentalControlService::GetPlayTimerSettingsOld>, "GetPlayTimerSettingsOld"}, - {1457, D<&IParentalControlService::GetPlayTimerEventToRequestSuspension>, "GetPlayTimerEventToRequestSuspension"}, - {1458, D<&IParentalControlService::IsPlayTimerAlarmDisabled>, "IsPlayTimerAlarmDisabled"}, - {1459, D<&IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo>, "GetPlayTimerRemainingTimeDisplayInfo"}, - {1460, D<&IParentalControlService::Unknown1460>, "Unknown1460"}, - {1471, nullptr, "NotifyWrongPinCodeInputManyTimes"}, - {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"}, - {1901, nullptr, "DeleteFromFreeCommunicationApplicationListForDebug"}, - {1902, nullptr, "ClearFreeCommunicationApplicationListForDebug"}, - {1903, nullptr, "GetExemptApplicationListCountForDebug"}, - {1904, nullptr, "GetExemptApplicationListForDebug"}, - {1905, nullptr, "UpdateExemptApplicationListForDebug"}, - {1906, nullptr, "AddToExemptApplicationListForDebug"}, - {1907, nullptr, "DeleteFromExemptApplicationListForDebug"}, - {1908, nullptr, "ClearExemptApplicationListForDebug"}, - {1941, nullptr, "DeletePairing"}, - {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"}, - {2004, nullptr, "FinishAuthorizePairing"}, - {2005, nullptr, "RetrievePairingInfoAsync"}, - {2006, nullptr, "FinishRetrievePairingInfo"}, - {2007, nullptr, "UnlinkPairingAsync"}, - {2008, nullptr, "FinishUnlinkPairing"}, - {2009, nullptr, "GetAccountMiiImageAsync"}, - {2010, nullptr, "FinishGetAccountMiiImage"}, - {2011, nullptr, "GetAccountMiiImageContentTypeAsync"}, - {2012, nullptr, "FinishGetAccountMiiImageContentType"}, - {2013, nullptr, "SynchronizeParentalControlSettingsAsync"}, - {2014, nullptr, "FinishSynchronizeParentalControlSettings"}, - {2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"}, - {2016, nullptr, "RequestUpdateExemptionListAsync"}, //5.0.0+ - {145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+ - {2017, nullptr, "AuthorizePairingAsync"}, //19.0.0+ - {2019, nullptr, "RequestUpdateDeviceUsersBackground"}, //19.0.0+ - {2021, nullptr, "RequestCopyPairingAsync"}, //20.0.0+ - {2022, nullptr, "FinishRequestCopyPairing"}, //20.0.0+ - {2023, nullptr, "IsFromPairingActiveDevice"}, //20.0.0+ - {2024, nullptr, "RollbackCopyPairing"}, //21.0.0+ - {3001, nullptr, "GetErrorContextChangedEvent"}, //20.0.0+ - {145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+ - {195101, D<&IParentalControlService::SetPlayTimerSettings>, "SetPlayTimerSettingsForDebug"}, //18.0.0+ - }; - // clang-format on - RegisterHandlers(functions); } IParentalControlService::~IParentalControlService() = default; diff --git a/src/core/hle/service/pctl/parental_control_service.h b/src/core/hle/service/pctl/parental_control_service.h index 9dabe3d059..7396537939 100644 --- a/src/core/hle/service/pctl/parental_control_service.h +++ b/src/core/hle/service/pctl/parental_control_service.h @@ -81,6 +81,135 @@ private: bool disabled{}; }; + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{1, D<&IParentalControlService::Initialize>, "Initialize"}, + FunctionInfo{1001, D<&IParentalControlService::CheckFreeCommunicationPermission>, "CheckFreeCommunicationPermission"}, + FunctionInfo{1002, D<&IParentalControlService::ConfirmLaunchApplicationPermission>, "ConfirmLaunchApplicationPermission"}, + FunctionInfo{1003, D<&IParentalControlService::ConfirmResumeApplicationPermission>, "ConfirmResumeApplicationPermission"}, + FunctionInfo{1004, D<&IParentalControlService::ConfirmSnsPostPermission>, "ConfirmSnsPostPermission"}, + FunctionInfo{1005, D<&IParentalControlService::ConfirmSystemSettingsPermission>, "ConfirmSystemSettingsPermission"}, + FunctionInfo{1006, D<&IParentalControlService::IsRestrictionTemporaryUnlocked>, "IsRestrictionTemporaryUnlocked"}, + FunctionInfo{1007, nullptr, "RevertRestrictionTemporaryUnlocked"}, + FunctionInfo{1008, nullptr, "EnterRestrictedSystemSettings"}, + FunctionInfo{1009, nullptr, "LeaveRestrictedSystemSettings"}, + FunctionInfo{1010, D<&IParentalControlService::IsRestrictedSystemSettingsEntered>, "IsRestrictedSystemSettingsEntered"}, + FunctionInfo{1011, nullptr, "RevertRestrictedSystemSettingsEntered"}, + FunctionInfo{1012, nullptr, "GetRestrictedFeatures"}, + FunctionInfo{1013, D<&IParentalControlService::ConfirmStereoVisionPermission>, "ConfirmStereoVisionPermission"}, + FunctionInfo{1014, nullptr, "ConfirmPlayableApplicationVideoOld"}, + FunctionInfo{1015, nullptr, "ConfirmPlayableApplicationVideo"}, + FunctionInfo{1016, nullptr, "ConfirmShowNewsPermission"}, + FunctionInfo{1017, D<&IParentalControlService::EndFreeCommunication>, "EndFreeCommunication"}, + FunctionInfo{1018, D<&IParentalControlService::IsFreeCommunicationAvailable>, "IsFreeCommunicationAvailable"}, + FunctionInfo{1019, D<&IParentalControlService::ConfirmLaunchApplicationPermission>, "ConfirmLaunchApplicationPermission"}, + FunctionInfo{1020, nullptr, "ConfirmLaunchSharedApplicationPermission"}, //20.0.0+ + FunctionInfo{1021, nullptr, "TryBeginFreeCommunicationForStreamPlay"}, //21.0.0+ + FunctionInfo{1022, nullptr, "EndFreeCommunicationForStreamPlay"}, //21.0.0+ + FunctionInfo{1031, D<&IParentalControlService::IsRestrictionEnabled>, "IsRestrictionEnabled"}, + FunctionInfo{1032, D<&IParentalControlService::GetSafetyLevel>, "GetSafetyLevel"}, + FunctionInfo{1033, nullptr, "SetSafetyLevel"}, + FunctionInfo{1034, nullptr, "GetSafetyLevelSettings"}, + FunctionInfo{1035, D<&IParentalControlService::GetCurrentSettings>, "GetCurrentSettings"}, + FunctionInfo{1036, nullptr, "SetCustomSafetyLevelSettings"}, + FunctionInfo{1037, nullptr, "GetDefaultRatingOrganization"}, + FunctionInfo{1038, nullptr, "SetDefaultRatingOrganization"}, + FunctionInfo{1039, D<&IParentalControlService::GetFreeCommunicationApplicationListCount>, "GetFreeCommunicationApplicationListCount"}, + FunctionInfo{1042, nullptr, "AddToFreeCommunicationApplicationList"}, + FunctionInfo{1043, nullptr, "DeleteSettings"}, + FunctionInfo{1044, nullptr, "GetFreeCommunicationApplicationList"}, + FunctionInfo{1045, nullptr, "UpdateFreeCommunicationApplicationList"}, + FunctionInfo{1046, nullptr, "DisableFeaturesForReset"}, + FunctionInfo{1047, nullptr, "NotifyApplicationDownloadStarted"}, + FunctionInfo{1048, nullptr, "NotifyNetworkProfileCreated"}, + FunctionInfo{1049, nullptr, "ResetFreeCommunicationApplicationList"}, + FunctionInfo{1050, nullptr, "AddToFreeCommunicationApplicationList"}, //20.0.0+ + FunctionInfo{1051, nullptr, "NotifyApplicationDownloadStarted"}, //20.0.0+ + FunctionInfo{1061, D<&IParentalControlService::ConfirmStereoVisionRestrictionConfigurable>, "ConfirmStereoVisionRestrictionConfigurable"}, + FunctionInfo{1062, D<&IParentalControlService::GetStereoVisionRestriction>, "GetStereoVisionRestriction"}, + FunctionInfo{1063, D<&IParentalControlService::SetStereoVisionRestriction>, "SetStereoVisionRestriction"}, + FunctionInfo{1064, D<&IParentalControlService::ResetConfirmedStereoVisionPermission>, "ResetConfirmedStereoVisionPermission"}, + FunctionInfo{1065, D<&IParentalControlService::IsStereoVisionPermitted>, "IsStereoVisionPermitted"}, + FunctionInfo{1201, nullptr, "UnlockRestrictionTemporarily"}, + FunctionInfo{1202, nullptr, "UnlockSystemSettingsRestriction"}, + FunctionInfo{1203, nullptr, "SetPinCode"}, + FunctionInfo{1204, nullptr, "GenerateInquiryCode"}, + FunctionInfo{1205, nullptr, "CheckMasterKey"}, + FunctionInfo{1206, D<&IParentalControlService::GetPinCodeLength>, "GetPinCodeLength"}, + FunctionInfo{1207, nullptr, "GetPinCodeChangedEvent"}, + FunctionInfo{1208, nullptr, "GetPinCode"}, + FunctionInfo{1403, D<&IParentalControlService::IsPairingActive>, "IsPairingActive"}, + FunctionInfo{1406, nullptr, "GetSettingsLastUpdated"}, + FunctionInfo{1411, nullptr, "GetPairingAccountInfo"}, + FunctionInfo{1421, nullptr, "GetAccountNickname"}, + FunctionInfo{1424, nullptr, "GetAccountState"}, + FunctionInfo{1425, nullptr, "RequestPostEvents"}, + FunctionInfo{1426, nullptr, "GetPostEventInterval"}, + FunctionInfo{1427, nullptr, "SetPostEventInterval"}, + FunctionInfo{1432, D<&IParentalControlService::GetSynchronizationEvent>, "GetSynchronizationEvent"}, + FunctionInfo{1451, D<&IParentalControlService::StartPlayTimer>, "StartPlayTimer"}, + FunctionInfo{1452, D<&IParentalControlService::StopPlayTimer>, "StopPlayTimer"}, + FunctionInfo{1453, D<&IParentalControlService::IsPlayTimerEnabled>, "IsPlayTimerEnabled"}, + FunctionInfo{1454, D<&IParentalControlService::GetPlayTimerRemainingTime>, "GetPlayTimerRemainingTime"}, + FunctionInfo{1455, D<&IParentalControlService::IsRestrictedByPlayTimer>, "IsRestrictedByPlayTimer"}, + FunctionInfo{1456, D<&IParentalControlService::GetPlayTimerSettingsOld>, "GetPlayTimerSettingsOld"}, + FunctionInfo{1457, D<&IParentalControlService::GetPlayTimerEventToRequestSuspension>, "GetPlayTimerEventToRequestSuspension"}, + FunctionInfo{1458, D<&IParentalControlService::IsPlayTimerAlarmDisabled>, "IsPlayTimerAlarmDisabled"}, + FunctionInfo{1459, D<&IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo>, "GetPlayTimerRemainingTimeDisplayInfo"}, + FunctionInfo{1460, D<&IParentalControlService::Unknown1460>, "Unknown1460"}, + FunctionInfo{1471, nullptr, "NotifyWrongPinCodeInputManyTimes"}, + FunctionInfo{1472, nullptr, "CancelNetworkRequest"}, + FunctionInfo{1473, D<&IParentalControlService::GetUnlinkedEvent>, "GetUnlinkedEvent"}, + FunctionInfo{1474, nullptr, "ClearUnlinkedEvent"}, + FunctionInfo{1475, nullptr, "GetExtendedPlayTimerEvent"}, // 18.0.0+ + FunctionInfo{1601, nullptr, "DisableAllFeatures"}, + FunctionInfo{1602, nullptr, "PostEnableAllFeatures"}, + FunctionInfo{1603, nullptr, "IsAllFeaturesDisabled"}, + FunctionInfo{1901, nullptr, "DeleteFromFreeCommunicationApplicationListForDebug"}, + FunctionInfo{1902, nullptr, "ClearFreeCommunicationApplicationListForDebug"}, + FunctionInfo{1903, nullptr, "GetExemptApplicationListCountForDebug"}, + FunctionInfo{1904, nullptr, "GetExemptApplicationListForDebug"}, + FunctionInfo{1905, nullptr, "UpdateExemptApplicationListForDebug"}, + FunctionInfo{1906, nullptr, "AddToExemptApplicationListForDebug"}, + FunctionInfo{1907, nullptr, "DeleteFromExemptApplicationListForDebug"}, + FunctionInfo{1908, nullptr, "ClearExemptApplicationListForDebug"}, + FunctionInfo{1941, nullptr, "DeletePairing"}, + FunctionInfo{1951, nullptr, "SetPlayTimerSettingsForDebug"}, + FunctionInfo{1952, nullptr, "GetPlayTimerSpentTimeForTest"}, + FunctionInfo{1953, nullptr, "SetPlayTimerAlarmDisabledForDebug"}, + FunctionInfo{1954, nullptr, "IsBedtimeAlarmEnabled"}, // 18.0.0+ + FunctionInfo{1955, nullptr, "GetBedtimeAlarmTime"}, // 18.0.0+ + FunctionInfo{1956, nullptr, "GetBedtimeAlarmTimeHour"}, // 18.0.0+ + FunctionInfo{1957, nullptr, "GetBedtimeAlarmTimeMinute"}, // 18.0.0+ + FunctionInfo{2001, nullptr, "RequestPairingAsync"}, + FunctionInfo{2002, nullptr, "FinishRequestPairing"}, + FunctionInfo{2003, nullptr, "AuthorizePairingAsync"}, + FunctionInfo{2004, nullptr, "FinishAuthorizePairing"}, + FunctionInfo{2005, nullptr, "RetrievePairingInfoAsync"}, + FunctionInfo{2006, nullptr, "FinishRetrievePairingInfo"}, + FunctionInfo{2007, nullptr, "UnlinkPairingAsync"}, + FunctionInfo{2008, nullptr, "FinishUnlinkPairing"}, + FunctionInfo{2009, nullptr, "GetAccountMiiImageAsync"}, + FunctionInfo{2010, nullptr, "FinishGetAccountMiiImage"}, + FunctionInfo{2011, nullptr, "GetAccountMiiImageContentTypeAsync"}, + FunctionInfo{2012, nullptr, "FinishGetAccountMiiImageContentType"}, + FunctionInfo{2013, nullptr, "SynchronizeParentalControlSettingsAsync"}, + FunctionInfo{2014, nullptr, "FinishSynchronizeParentalControlSettings"}, + FunctionInfo{2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"}, + FunctionInfo{2016, nullptr, "RequestUpdateExemptionListAsync"}, //5.0.0+ + FunctionInfo{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+ + FunctionInfo{2017, nullptr, "AuthorizePairingAsync"}, //19.0.0+ + FunctionInfo{2019, nullptr, "RequestUpdateDeviceUsersBackground"}, //19.0.0+ + FunctionInfo{2021, nullptr, "RequestCopyPairingAsync"}, //20.0.0+ + FunctionInfo{2022, nullptr, "FinishRequestCopyPairing"}, //20.0.0+ + FunctionInfo{2023, nullptr, "IsFromPairingActiveDevice"}, //20.0.0+ + FunctionInfo{2024, nullptr, "RollbackCopyPairing"}, //21.0.0+ + FunctionInfo{3001, nullptr, "GetErrorContextChangedEvent"}, //20.0.0+ + FunctionInfo{145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"}, // 18.0.0+ + FunctionInfo{195101, D<&IParentalControlService::SetPlayTimerSettings>, "SetPlayTimerSettingsForDebug"}, //18.0.0+ + ); States states{}; ParentalControlSettings settings{}; RestrictionSettings restriction_settings{}; diff --git a/src/core/hle/service/pctl/parental_control_service_factory.h b/src/core/hle/service/pctl/parental_control_service_factory.h index 6613edcc27..6727a81b18 100644 --- a/src/core/hle/service/pctl/parental_control_service_factory.h +++ b/src/core/hle/service/pctl/parental_control_service_factory.h @@ -27,8 +27,8 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, D<&IParentalControlServiceFactory::CreateService>, "CreateService"}, - {1, D<&IParentalControlServiceFactory::CreateServiceWithoutInitialize>, "CreateServiceWithoutInitialize"} + FunctionInfo{0, D<&IParentalControlServiceFactory::CreateService>, "CreateService"}, + FunctionInfo{1, D<&IParentalControlServiceFactory::CreateServiceWithoutInitialize>, "CreateServiceWithoutInitialize"} ); Capability capability{}; }; diff --git a/src/core/hle/service/psc/ovln/receiver.cpp b/src/core/hle/service/psc/ovln/receiver.cpp index 5196b0b845..02b262ad45 100644 --- a/src/core/hle/service/psc/ovln/receiver.cpp +++ b/src/core/hle/service/psc/ovln/receiver.cpp @@ -12,16 +12,16 @@ namespace Service::PSC { IReceiver::IReceiver(Core::System& system_) : ServiceFramework{system_, "IReceiver"}, service_context{system_, "IReceiver"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IReceiver::AddSource>, "AddSource"}, FunctionInfo{1, D<&IReceiver::RemoveSource>, "RemoveSource"}, FunctionInfo{2, D<&IReceiver::GetReceiveEventHandle>, "GetReceiveEventHandle"}, FunctionInfo{3, D<&IReceiver::Receive>, "Receive"}, FunctionInfo{4, D<&IReceiver::ReceiveWithTick>, "ReceiveWithTick"} - }; - // clang-format on - - RegisterHandlers(functions); + ); receive_event = service_context.CreateEvent("IReceiver::ReceiveEvent"); } diff --git a/src/core/hle/service/psc/ovln/receiver_service.cpp b/src/core/hle/service/psc/ovln/receiver_service.cpp index 3b0b180725..602cacc36c 100644 --- a/src/core/hle/service/psc/ovln/receiver_service.cpp +++ b/src/core/hle/service/psc/ovln/receiver_service.cpp @@ -11,13 +11,6 @@ namespace Service::PSC { IReceiverService::IReceiverService(Core::System& system_) : ServiceFramework{system_, "ovln:rcv"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IReceiverService::OpenReceiver>, "OpenReceiver"}, - }; - // clang-format on - - RegisterHandlers(functions); } IReceiverService::~IReceiverService() = default; diff --git a/src/core/hle/service/psc/ovln/receiver_service.h b/src/core/hle/service/psc/ovln/receiver_service.h index b3b31ba4aa..28e480b4d8 100644 --- a/src/core/hle/service/psc/ovln/receiver_service.h +++ b/src/core/hle/service/psc/ovln/receiver_service.h @@ -17,6 +17,13 @@ public: private: Result OpenReceiver(Out> out_receiver); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IReceiverService::OpenReceiver>, "OpenReceiver"} + ); }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/ovln/sender.cpp b/src/core/hle/service/psc/ovln/sender.cpp index 3227a56f25..ac8c06d071 100644 --- a/src/core/hle/service/psc/ovln/sender.cpp +++ b/src/core/hle/service/psc/ovln/sender.cpp @@ -7,14 +7,6 @@ namespace Service::PSC { ISender::ISender(Core::System& system_) : ServiceFramework{system_, "ISender"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ISender::Send>, "Send"}, - {1, nullptr, "GetUnreceivedMessageCount"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISender::~ISender() = default; diff --git a/src/core/hle/service/psc/ovln/sender.h b/src/core/hle/service/psc/ovln/sender.h index c1575428e3..5e6effdc96 100644 --- a/src/core/hle/service/psc/ovln/sender.h +++ b/src/core/hle/service/psc/ovln/sender.h @@ -16,6 +16,14 @@ public: private: Result Send(const OverlayNotification& notification, MessageFlags flags); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ISender::Send>, "Send"}, + FunctionInfo{1, nullptr, "GetUnreceivedMessageCount"} + ); }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/ovln/sender_service.cpp b/src/core/hle/service/psc/ovln/sender_service.cpp index 18d2c83a3d..39a44bea67 100644 --- a/src/core/hle/service/psc/ovln/sender_service.cpp +++ b/src/core/hle/service/psc/ovln/sender_service.cpp @@ -8,13 +8,6 @@ namespace Service::PSC { ISenderService::ISenderService(Core::System& system_) : ServiceFramework{system_, "ovln:snd"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ISenderService::OpenSender>, "OpenSender"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISenderService::~ISenderService() = default; diff --git a/src/core/hle/service/psc/ovln/sender_service.h b/src/core/hle/service/psc/ovln/sender_service.h index 10027701f4..cad5b903bf 100644 --- a/src/core/hle/service/psc/ovln/sender_service.h +++ b/src/core/hle/service/psc/ovln/sender_service.h @@ -16,8 +16,14 @@ public: ~ISenderService() override; private: - Result OpenSender(Out> out_sender, u32 sender_id, - std::array data); + Result OpenSender(Out> out_sender, u32 sender_id, std::array data); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ISenderService::OpenSender>, "OpenSender"} + ); }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/pm_control.cpp b/src/core/hle/service/psc/pm_control.cpp index 7dedb76629..635726853e 100644 --- a/src/core/hle/service/psc/pm_control.cpp +++ b/src/core/hle/service/psc/pm_control.cpp @@ -6,21 +6,6 @@ namespace Service::PSC { IPmControl::IPmControl(Core::System& system_) : ServiceFramework{system_, "psc:c"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Initialize"}, - {1, nullptr, "DispatchRequest"}, - {2, nullptr, "GetResult"}, - {3, nullptr, "GetState"}, - {4, nullptr, "Cancel"}, - {5, nullptr, "PrintModuleInformation"}, - {6, nullptr, "GetModuleInformation"}, - {10, nullptr, "AcquireStateLock"}, - {11, nullptr, "HasStateLock"}, - }; - // clang-format on - - RegisterHandlers(functions); } IPmControl::~IPmControl() = default; diff --git a/src/core/hle/service/psc/pm_control.h b/src/core/hle/service/psc/pm_control.h index e0ae2f39ca..23d94c26c9 100644 --- a/src/core/hle/service/psc/pm_control.h +++ b/src/core/hle/service/psc/pm_control.h @@ -11,6 +11,21 @@ class IPmControl final : public ServiceFramework { public: explicit IPmControl(Core::System& system_); ~IPmControl() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "Initialize"}, + FunctionInfo{1, nullptr, "DispatchRequest"}, + FunctionInfo{2, nullptr, "GetResult"}, + FunctionInfo{3, nullptr, "GetState"}, + FunctionInfo{4, nullptr, "Cancel"}, + FunctionInfo{5, nullptr, "PrintModuleInformation"}, + FunctionInfo{6, nullptr, "GetModuleInformation"}, + FunctionInfo{10, nullptr, "AcquireStateLock"}, + FunctionInfo{11, nullptr, "HasStateLock"} + ); }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/pm_module.cpp b/src/core/hle/service/psc/pm_module.cpp index be160f1847..71ce109364 100644 --- a/src/core/hle/service/psc/pm_module.cpp +++ b/src/core/hle/service/psc/pm_module.cpp @@ -10,16 +10,16 @@ namespace Service::PSC { IPmModule::IPmModule(Core::System& system_) : ServiceFramework{system_, "IPmModule"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "Initialize"}, FunctionInfo{1, nullptr, "GetRequest"}, FunctionInfo{2, nullptr, "Acknowledge"}, FunctionInfo{3, nullptr, "Finalize"}, FunctionInfo{4, nullptr, "AcknowledgeEx"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } IPmModule::~IPmModule() = default; diff --git a/src/core/hle/service/psc/pm_service.cpp b/src/core/hle/service/psc/pm_service.cpp index c4e0ad2286..1b3ff98f38 100644 --- a/src/core/hle/service/psc/pm_service.cpp +++ b/src/core/hle/service/psc/pm_service.cpp @@ -8,13 +8,6 @@ namespace Service::PSC { IPmService::IPmService(Core::System& system_) : ServiceFramework{system_, "psc:m"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&IPmService::GetPmModule>, "GetPmModule"}, - }; - // clang-format on - - RegisterHandlers(functions); } IPmService::~IPmService() = default; diff --git a/src/core/hle/service/psc/pm_service.h b/src/core/hle/service/psc/pm_service.h index 08e14c6f8f..8713f1e9df 100644 --- a/src/core/hle/service/psc/pm_service.h +++ b/src/core/hle/service/psc/pm_service.h @@ -17,6 +17,13 @@ public: private: Result GetPmModule(Out> out_module); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&IPmService::GetPmModule>, "GetPmModule"} + ); }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/time/alarms.cpp b/src/core/hle/service/psc/time/alarms.cpp index 17a795c4c5..f651af711d 100644 --- a/src/core/hle/service/psc/time/alarms.cpp +++ b/src/core/hle/service/psc/time/alarms.cpp @@ -136,15 +136,7 @@ Result Alarms::UpdateClosestAndSignal(Kernel::KernelCore& kernel) { IAlarmService::IAlarmService(Core::System& system_, std::shared_ptr manager) : ServiceFramework{system_, "time:al"} , m_alarms{manager->m_alarms} -{ - // clang-format off - static const FunctionInfo functions[] = { - {0, &IAlarmService::CreateWakeupAlarm, "CreateWakeupAlarm"}, - {1, &IAlarmService::CreateBackgroundTaskAlarm, "CreateBackgroundTaskAlarm"}, - }; - // clang-format on - RegisterHandlers(functions); -} +{} void IAlarmService::CreateWakeupAlarm(HLERequestContext& ctx) { LOG_DEBUG(Service_Time, "called."); @@ -165,17 +157,6 @@ void IAlarmService::CreateBackgroundTaskAlarm(HLERequestContext& ctx) { ISteadyClockAlarm::ISteadyClockAlarm(Core::System& system_, Alarms& alarms, AlarmType type) : ServiceFramework{system_, "ISteadyClockAlarm"}, m_ctx{system, "Psc:ISteadyClockAlarm"}, m_alarms{alarms}, m_alarm{system, m_ctx, type} { - // clang-format off - static const FunctionInfo functions[] = { - {0, &ISteadyClockAlarm::GetAlarmEvent, "GetAlarmEvent"}, - {1, &ISteadyClockAlarm::Enable, "Enable"}, - {2, &ISteadyClockAlarm::Disable, "Disable"}, - {3, &ISteadyClockAlarm::IsEnabled, "IsEnabled"}, - {10, nullptr, "CreateWakeLock"}, - {11, nullptr, "DestroyWakeLock"}, - }; - // clang-format on - RegisterHandlers(functions); } void ISteadyClockAlarm::GetAlarmEvent(HLERequestContext& ctx) { diff --git a/src/core/hle/service/psc/time/alarms.h b/src/core/hle/service/psc/time/alarms.h index 0a2fa7fac5..cc17a87e7f 100644 --- a/src/core/hle/service/psc/time/alarms.h +++ b/src/core/hle/service/psc/time/alarms.h @@ -114,6 +114,14 @@ public: private: void CreateWakeupAlarm(HLERequestContext& ctx); void CreateBackgroundTaskAlarm(HLERequestContext& ctx); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &IAlarmService::CreateWakeupAlarm, "CreateWakeupAlarm"}, + FunctionInfo{1, &IAlarmService::CreateBackgroundTaskAlarm, "CreateBackgroundTaskAlarm"} + ); Alarms& m_alarms; }; @@ -128,8 +136,18 @@ private: void Disable(HLERequestContext& ctx); void IsEnabled(HLERequestContext& ctx); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &ISteadyClockAlarm::GetAlarmEvent, "GetAlarmEvent"}, + FunctionInfo{1, &ISteadyClockAlarm::Enable, "Enable"}, + FunctionInfo{2, &ISteadyClockAlarm::Disable, "Disable"}, + FunctionInfo{3, &ISteadyClockAlarm::IsEnabled, "IsEnabled"}, + FunctionInfo{10, nullptr, "CreateWakeLock"}, + FunctionInfo{11, nullptr, "DestroyWakeLock"} + ); KernelHelpers::ServiceContext m_ctx; - Alarms& m_alarms; Alarm m_alarm; }; diff --git a/src/core/hle/service/psc/time/power_state_service.cpp b/src/core/hle/service/psc/time/power_state_service.cpp index 69e1c5f8d6..c28cf621be 100644 --- a/src/core/hle/service/psc/time/power_state_service.cpp +++ b/src/core/hle/service/psc/time/power_state_service.cpp @@ -15,13 +15,13 @@ IPowerStateRequestHandler::IPowerStateRequestHandler( , m_power_state_request_manager{power_state_request_manager} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IPowerStateRequestHandler::GetPowerStateRequestEventReadableHandle>, "GetPowerStateRequestEventReadableHandle"}, FunctionInfo{1, D<&IPowerStateRequestHandler::GetAndClearPowerStateRequest>, "GetAndClearPowerStateRequest"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } Result IPowerStateRequestHandler::GetPowerStateRequestEventReadableHandle( diff --git a/src/core/hle/service/psc/time/service_manager.cpp b/src/core/hle/service/psc/time/service_manager.cpp index e9f1407e4d..2f099e24dd 100644 --- a/src/core/hle/service/psc/time/service_manager.cpp +++ b/src/core/hle/service/psc/time/service_manager.cpp @@ -27,30 +27,6 @@ ServiceManager::ServiceManager(Core::System& system_, std::shared_ptrm_network_system_clock_context_writer}, m_ephemeral_system_context_writer{m_time->m_ephemeral_network_clock_context_writer}, m_local_operation{system_}, m_network_operation{system_}, m_ephemeral_operation{system_} { - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&ServiceManager::GetStaticServiceAsUser>, "GetStaticServiceAsUser"}, - {5, D<&ServiceManager::GetStaticServiceAsAdmin>, "GetStaticServiceAsAdmin"}, - {6, D<&ServiceManager::GetStaticServiceAsRepair>, "GetStaticServiceAsRepair"}, - {9, D<&ServiceManager::GetStaticServiceAsServiceManager>, "GetStaticServiceAsServiceManager"}, - {10, D<&ServiceManager::SetupStandardSteadyClockCore>, "SetupStandardSteadyClockCore"}, - {11, D<&ServiceManager::SetupStandardLocalSystemClockCore>, "SetupStandardLocalSystemClockCore"}, - {12, D<&ServiceManager::SetupStandardNetworkSystemClockCore>, "SetupStandardNetworkSystemClockCore"}, - {13, D<&ServiceManager::SetupStandardUserSystemClockCore>, "SetupStandardUserSystemClockCore"}, - {14, D<&ServiceManager::SetupTimeZoneServiceCore>, "SetupTimeZoneServiceCore"}, - {15, D<&ServiceManager::SetupEphemeralNetworkSystemClockCore>, "SetupEphemeralNetworkSystemClockCore"}, - {50, D<&ServiceManager::GetStandardLocalClockOperationEvent>, "GetStandardLocalClockOperationEvent"}, - {51, D<&ServiceManager::GetStandardNetworkClockOperationEventForServiceManager>, "GetStandardNetworkClockOperationEventForServiceManager"}, - {52, D<&ServiceManager::GetEphemeralNetworkClockOperationEventForServiceManager>, "GetEphemeralNetworkClockOperationEventForServiceManager"}, - {60, D<&ServiceManager::GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent>, "GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent"}, - {100, D<&ServiceManager::SetStandardSteadyClockBaseTime>, "SetStandardSteadyClockBaseTime"}, - {200, D<&ServiceManager::GetClosestAlarmUpdatedEvent>, "GetClosestAlarmUpdatedEvent"}, - {201, D<&ServiceManager::CheckAndSignalAlarms>, "CheckAndSignalAlarms"}, - {202, D<&ServiceManager::GetClosestAlarmInfo>, "GetClosestAlarmInfo "}, - }; - // clang-format on - RegisterHandlers(functions); - m_local_system_context_writer.Link(m_local_operation); m_network_system_context_writer.Link(m_network_operation); m_ephemeral_system_context_writer.Link(m_ephemeral_operation); diff --git a/src/core/hle/service/psc/time/service_manager.h b/src/core/hle/service/psc/time/service_manager.h index 09cff25038..b4b25681c6 100644 --- a/src/core/hle/service/psc/time/service_manager.h +++ b/src/core/hle/service/psc/time/service_manager.h @@ -65,6 +65,29 @@ private: void SetupSAndP(); Result GetStaticService(OutInterface out_service, StaticServiceSetupInfo setup_info, const char* name); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&ServiceManager::GetStaticServiceAsUser>, "GetStaticServiceAsUser"}, + FunctionInfo{5, D<&ServiceManager::GetStaticServiceAsAdmin>, "GetStaticServiceAsAdmin"}, + FunctionInfo{6, D<&ServiceManager::GetStaticServiceAsRepair>, "GetStaticServiceAsRepair"}, + FunctionInfo{9, D<&ServiceManager::GetStaticServiceAsServiceManager>, "GetStaticServiceAsServiceManager"}, + FunctionInfo{10, D<&ServiceManager::SetupStandardSteadyClockCore>, "SetupStandardSteadyClockCore"}, + FunctionInfo{11, D<&ServiceManager::SetupStandardLocalSystemClockCore>, "SetupStandardLocalSystemClockCore"}, + FunctionInfo{12, D<&ServiceManager::SetupStandardNetworkSystemClockCore>, "SetupStandardNetworkSystemClockCore"}, + FunctionInfo{13, D<&ServiceManager::SetupStandardUserSystemClockCore>, "SetupStandardUserSystemClockCore"}, + FunctionInfo{14, D<&ServiceManager::SetupTimeZoneServiceCore>, "SetupTimeZoneServiceCore"}, + FunctionInfo{15, D<&ServiceManager::SetupEphemeralNetworkSystemClockCore>, "SetupEphemeralNetworkSystemClockCore"}, + FunctionInfo{50, D<&ServiceManager::GetStandardLocalClockOperationEvent>, "GetStandardLocalClockOperationEvent"}, + FunctionInfo{51, D<&ServiceManager::GetStandardNetworkClockOperationEventForServiceManager>, "GetStandardNetworkClockOperationEventForServiceManager"}, + FunctionInfo{52, D<&ServiceManager::GetEphemeralNetworkClockOperationEventForServiceManager>, "GetEphemeralNetworkClockOperationEventForServiceManager"}, + FunctionInfo{60, D<&ServiceManager::GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent>, "GetStandardUserSystemClockAutomaticCorrectionUpdatedEvent"}, + FunctionInfo{100, D<&ServiceManager::SetStandardSteadyClockBaseTime>, "SetStandardSteadyClockBaseTime"}, + FunctionInfo{200, D<&ServiceManager::GetClosestAlarmUpdatedEvent>, "GetClosestAlarmUpdatedEvent"}, + FunctionInfo{201, D<&ServiceManager::CheckAndSignalAlarms>, "CheckAndSignalAlarms"}, + FunctionInfo{202, D<&ServiceManager::GetClosestAlarmInfo>, "GetClosestAlarmInfo "} + ); std::shared_ptr m_time; ServerManager& m_server_manager; bool m_is_s_and_p_setup{}; diff --git a/src/core/hle/service/psc/time/static.cpp b/src/core/hle/service/psc/time/static.cpp index 1cd4c7f87a..4a68910f3a 100644 --- a/src/core/hle/service/psc/time/static.cpp +++ b/src/core/hle/service/psc/time/static.cpp @@ -43,7 +43,10 @@ StaticService::StaticService(Core::System& system_, StaticServiceSetupInfo setup m_ephemeral_network_clock{m_time->m_ephemeral_network_clock}, m_shared_memory{ m_time->m_shared_memory} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&StaticService::GetStandardUserSystemClock>, "GetStandardUserSystemClock"}, FunctionInfo{1, D<&StaticService::GetStandardNetworkSystemClock>, "GetStandardNetworkSystemClock"}, FunctionInfo{2, D<&StaticService::GetStandardSteadyClock>, "GetStandardSteadyClock"}, @@ -63,10 +66,7 @@ StaticService::StaticService(Core::System& system_, StaticServiceSetupInfo setup FunctionInfo{401, D<&StaticService::GetClockSnapshotFromSystemClockContext>, "GetClockSnapshotFromSystemClockContext"}, FunctionInfo{500, D<&StaticService::CalculateStandardUserSystemClockDifferenceByUser>, "CalculateStandardUserSystemClockDifferenceByUser"}, FunctionInfo{501, D<&StaticService::CalculateSpanBetween>, "CalculateSpanBetween"} - }; - // clang-format on - - RegisterHandlers(functions); + ); } Result StaticService::GetStandardUserSystemClock(OutInterface out_service) { diff --git a/src/core/hle/service/psc/time/steady_clock.cpp b/src/core/hle/service/psc/time/steady_clock.cpp index 1d1551acf9..d2aa1a2dec 100644 --- a/src/core/hle/service/psc/time/steady_clock.cpp +++ b/src/core/hle/service/psc/time/steady_clock.cpp @@ -19,17 +19,18 @@ SteadyClock::SteadyClock(Core::System& system_, std::shared_ptr man , m_can_write_uninitialized_clock{can_write_uninitialized_clock} { // clang-format off - static const FunctionInfo functions[] = { - {0, D<&SteadyClock::GetCurrentTimePoint>, "GetCurrentTimePoint"}, - {2, D<&SteadyClock::GetTestOffset>, "GetTestOffset"}, - {3, D<&SteadyClock::SetTestOffset>, "SetTestOffset"}, - {100, D<&SteadyClock::GetRtcValue>, "GetRtcValue"}, - {101, D<&SteadyClock::IsRtcResetDetected>, "IsRtcResetDetected"}, - {102, D<&SteadyClock::GetSetupResultValue>, "GetSetupResultValue"}, - {200, D<&SteadyClock::GetInternalOffset>, "GetInternalOffset"}, - }; - // clang-format on - RegisterHandlers(functions); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&SteadyClock::GetCurrentTimePoint>, "GetCurrentTimePoint"}, + FunctionInfo{2, D<&SteadyClock::GetTestOffset>, "GetTestOffset"}, + FunctionInfo{3, D<&SteadyClock::SetTestOffset>, "SetTestOffset"}, + FunctionInfo{100, D<&SteadyClock::GetRtcValue>, "GetRtcValue"}, + FunctionInfo{101, D<&SteadyClock::IsRtcResetDetected>, "IsRtcResetDetected"}, + FunctionInfo{102, D<&SteadyClock::GetSetupResultValue>, "GetSetupResultValue"}, + FunctionInfo{200, D<&SteadyClock::GetInternalOffset>, "GetInternalOffset"} + ); } Result SteadyClock::GetCurrentTimePoint(Out out_time_point) { diff --git a/src/core/hle/service/psc/time/system_clock.cpp b/src/core/hle/service/psc/time/system_clock.cpp index e978ffb5e5..8e0d654f4c 100644 --- a/src/core/hle/service/psc/time/system_clock.cpp +++ b/src/core/hle/service/psc/time/system_clock.cpp @@ -16,18 +16,7 @@ SystemClock::SystemClock(Core::System& system_, SystemClockCore& clock_core, boo , m_clock_core{clock_core} , m_can_write_clock{can_write_clock} , m_can_write_uninitialized_clock{can_write_uninitialized_clock} -{ - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&SystemClock::GetCurrentTime>, "GetCurrentTime"}, - {1, D<&SystemClock::SetCurrentTime>, "SetCurrentTime"}, - {2, D<&SystemClock::GetSystemClockContext>, "GetSystemClockContext"}, - {3, D<&SystemClock::SetSystemClockContext>, "SetSystemClockContext"}, - {4, D<&SystemClock::GetOperationEventReadableHandle>, "GetOperationEventReadableHandle"}, - }; - // clang-format on - RegisterHandlers(functions); -} +{} Result SystemClock::GetCurrentTime(Out out_time) { SCOPE_EXIT { diff --git a/src/core/hle/service/psc/time/system_clock.h b/src/core/hle/service/psc/time/system_clock.h index 0d91aaa735..262b8c333c 100644 --- a/src/core/hle/service/psc/time/system_clock.h +++ b/src/core/hle/service/psc/time/system_clock.h @@ -31,6 +31,16 @@ public: Result GetOperationEventReadableHandle(OutCopyHandle out_event); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&SystemClock::GetCurrentTime>, "GetCurrentTime"}, + FunctionInfo{1, D<&SystemClock::SetCurrentTime>, "SetCurrentTime"}, + FunctionInfo{2, D<&SystemClock::GetSystemClockContext>, "GetSystemClockContext"}, + FunctionInfo{3, D<&SystemClock::SetSystemClockContext>, "SetSystemClockContext"}, + FunctionInfo{4, D<&SystemClock::GetOperationEventReadableHandle>, "GetOperationEventReadableHandle"} + ); SystemClockCore& m_clock_core; bool m_can_write_clock; bool m_can_write_uninitialized_clock; diff --git a/src/core/hle/service/psc/time/time_zone_service.cpp b/src/core/hle/service/psc/time/time_zone_service.cpp index bd6bb3ba93..789304bfd2 100644 --- a/src/core/hle/service/psc/time/time_zone_service.cpp +++ b/src/core/hle/service/psc/time/time_zone_service.cpp @@ -19,27 +19,7 @@ TimeZoneService::TimeZoneService(Core::System& system_, StandardSteadyClockCore& , m_clock_core{clock_core} , m_time_zone{time_zone} , m_can_write_timezone_device_location{can_write_timezone_device_location} -{ - // clang-format off - static const FunctionInfo functions[] = { - {0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"}, - {1, D<&TimeZoneService::SetDeviceLocationName>, "SetDeviceLocationName"}, - {2, D<&TimeZoneService::GetTotalLocationNameCount>, "GetTotalLocationNameCount"}, - {3, D<&TimeZoneService::LoadLocationNameList>, "LoadLocationNameList"}, - {4, D<&TimeZoneService::LoadTimeZoneRule>, "LoadTimeZoneRule"}, - {5, D<&TimeZoneService::GetTimeZoneRuleVersion>, "GetTimeZoneRuleVersion"}, - {6, D<&TimeZoneService::GetDeviceLocationNameAndUpdatedTime>, "GetDeviceLocationNameAndUpdatedTime"}, - {7, D<&TimeZoneService::SetDeviceLocationNameWithTimeZoneRule>, "SetDeviceLocationNameWithTimeZoneRule"}, - {8, D<&TimeZoneService::ParseTimeZoneBinary>, "ParseTimeZoneBinary"}, - {20, D<&TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle>, "GetDeviceLocationNameOperationEventReadableHandle"}, - {100, D<&TimeZoneService::ToCalendarTime>, "ToCalendarTime"}, - {101, D<&TimeZoneService::ToCalendarTimeWithMyRule>, "ToCalendarTimeWithMyRule"}, - {201, D<&TimeZoneService::ToPosixTime>, "ToPosixTime"}, - {202, D<&TimeZoneService::ToPosixTimeWithMyRule>, "ToPosixTimeWithMyRule"}, - }; - // clang-format on - RegisterHandlers(functions); -} +{} Result TimeZoneService::GetDeviceLocationName(Out out_location_name) { SCOPE_EXIT { diff --git a/src/core/hle/service/psc/time/time_zone_service.h b/src/core/hle/service/psc/time/time_zone_service.h index 0067b08258..da4fd24e0e 100644 --- a/src/core/hle/service/psc/time/time_zone_service.h +++ b/src/core/hle/service/psc/time/time_zone_service.h @@ -59,6 +59,25 @@ public: const CalendarTime& calendar_time); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"}, + FunctionInfo{1, D<&TimeZoneService::SetDeviceLocationName>, "SetDeviceLocationName"}, + FunctionInfo{2, D<&TimeZoneService::GetTotalLocationNameCount>, "GetTotalLocationNameCount"}, + FunctionInfo{3, D<&TimeZoneService::LoadLocationNameList>, "LoadLocationNameList"}, + FunctionInfo{4, D<&TimeZoneService::LoadTimeZoneRule>, "LoadTimeZoneRule"}, + FunctionInfo{5, D<&TimeZoneService::GetTimeZoneRuleVersion>, "GetTimeZoneRuleVersion"}, + FunctionInfo{6, D<&TimeZoneService::GetDeviceLocationNameAndUpdatedTime>, "GetDeviceLocationNameAndUpdatedTime"}, + FunctionInfo{7, D<&TimeZoneService::SetDeviceLocationNameWithTimeZoneRule>, "SetDeviceLocationNameWithTimeZoneRule"}, + FunctionInfo{8, D<&TimeZoneService::ParseTimeZoneBinary>, "ParseTimeZoneBinary"}, + FunctionInfo{20, D<&TimeZoneService::GetDeviceLocationNameOperationEventReadableHandle>, "GetDeviceLocationNameOperationEventReadableHandle"}, + FunctionInfo{100, D<&TimeZoneService::ToCalendarTime>, "ToCalendarTime"}, + FunctionInfo{101, D<&TimeZoneService::ToCalendarTimeWithMyRule>, "ToCalendarTimeWithMyRule"}, + FunctionInfo{201, D<&TimeZoneService::ToPosixTime>, "ToPosixTime"}, + FunctionInfo{202, D<&TimeZoneService::ToPosixTimeWithMyRule>, "ToPosixTimeWithMyRule"} + ); StandardSteadyClockCore& m_clock_core; TimeZone& m_time_zone; bool m_can_write_timezone_device_location; diff --git a/src/core/hle/service/ptm/psm.cpp b/src/core/hle/service/ptm/psm.cpp index 896b236d41..3bf689c765 100644 --- a/src/core/hle/service/ptm/psm.cpp +++ b/src/core/hle/service/ptm/psm.cpp @@ -122,31 +122,6 @@ private: }; PSM::PSM(Core::System& system_) : ServiceFramework{system_, "psm"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, &PSM::GetBatteryChargePercentage, "GetBatteryChargePercentage"}, - {1, &PSM::GetChargerType, "GetChargerType"}, - {2, nullptr, "EnableBatteryCharging"}, - {3, nullptr, "DisableBatteryCharging"}, - {4, nullptr, "IsBatteryChargingEnabled"}, - {5, nullptr, "AcquireControllerPowerSupply"}, - {6, nullptr, "ReleaseControllerPowerSupply"}, - {7, &PSM::OpenSession, "OpenSession"}, - {8, nullptr, "EnableEnoughPowerChargeEmulation"}, - {9, nullptr, "DisableEnoughPowerChargeEmulation"}, - {10, nullptr, "EnableFastBatteryCharging"}, - {11, nullptr, "DisableFastBatteryCharging"}, - {12, &PSM::GetBatteryVoltageState, "GetBatteryVoltageState"}, - {13, nullptr, "GetRawBatteryChargePercentage"}, - {14, nullptr, "IsEnoughPowerSupplied"}, - {15, &PSM::GetBatteryAgePercentage, "GetBatteryAgePercentage"}, - {16, nullptr, "GetBatteryChargeInfoEvent"}, - {17, &PSM::GetBatteryChargeInfoFields, "GetBatteryChargeInfoFields"}, - {18, nullptr, "GetBatteryChargeCalibratedEvent"}, - }; - // clang-format on - - RegisterHandlers(functions); } PSM::~PSM() = default; diff --git a/src/core/hle/service/ptm/psm.h b/src/core/hle/service/ptm/psm.h index 77c38d1f9b..60ae8d716d 100644 --- a/src/core/hle/service/ptm/psm.h +++ b/src/core/hle/service/ptm/psm.h @@ -28,6 +28,31 @@ private: void GetBatteryVoltageState(HLERequestContext& ctx); void GetBatteryAgePercentage(HLERequestContext& ctx); void GetBatteryChargeInfoFields(HLERequestContext& ctx); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &PSM::GetBatteryChargePercentage, "GetBatteryChargePercentage"}, + FunctionInfo{1, &PSM::GetChargerType, "GetChargerType"}, + FunctionInfo{2, nullptr, "EnableBatteryCharging"}, + FunctionInfo{3, nullptr, "DisableBatteryCharging"}, + FunctionInfo{4, nullptr, "IsBatteryChargingEnabled"}, + FunctionInfo{5, nullptr, "AcquireControllerPowerSupply"}, + FunctionInfo{6, nullptr, "ReleaseControllerPowerSupply"}, + FunctionInfo{7, &PSM::OpenSession, "OpenSession"}, + FunctionInfo{8, nullptr, "EnableEnoughPowerChargeEmulation"}, + FunctionInfo{9, nullptr, "DisableEnoughPowerChargeEmulation"}, + FunctionInfo{10, nullptr, "EnableFastBatteryCharging"}, + FunctionInfo{11, nullptr, "DisableFastBatteryCharging"}, + FunctionInfo{12, &PSM::GetBatteryVoltageState, "GetBatteryVoltageState"}, + FunctionInfo{13, nullptr, "GetRawBatteryChargePercentage"}, + FunctionInfo{14, nullptr, "IsEnoughPowerSupplied"}, + FunctionInfo{15, &PSM::GetBatteryAgePercentage, "GetBatteryAgePercentage"}, + FunctionInfo{16, nullptr, "GetBatteryChargeInfoEvent"}, + FunctionInfo{17, &PSM::GetBatteryChargeInfoFields, "GetBatteryChargeInfoFields"}, + FunctionInfo{18, nullptr, "GetBatteryChargeCalibratedEvent"} + ); }; } // namespace Service::PTM diff --git a/src/core/hle/service/ptm/ts.cpp b/src/core/hle/service/ptm/ts.cpp index d90126305a..ec0493aa37 100644 --- a/src/core/hle/service/ptm/ts.cpp +++ b/src/core/hle/service/ptm/ts.cpp @@ -42,17 +42,6 @@ private: }; TS::TS(Core::System& system_) : ServiceFramework{system_, "ts"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetTemperatureRange"}, - {1, &TS::GetTemperature, "GetTemperature"}, - {2, nullptr, "SetMeasurementMode"}, - {3, &TS::GetTemperatureMilliC, "GetTemperatureMilliC"}, - {4, &TS::OpenSession, "OpenSession"}, - }; - // clang-format on - - RegisterHandlers(functions); } TS::~TS() = default; diff --git a/src/core/hle/service/ptm/ts.h b/src/core/hle/service/ptm/ts.h index a10a91a64b..3eb5e942df 100644 --- a/src/core/hle/service/ptm/ts.h +++ b/src/core/hle/service/ptm/ts.h @@ -17,6 +17,17 @@ private: void GetTemperature(HLERequestContext& ctx); void GetTemperatureMilliC(HLERequestContext& ctx); void OpenSession(HLERequestContext& ctx); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "GetTemperatureRange"}, + FunctionInfo{1, &TS::GetTemperature, "GetTemperature"}, + FunctionInfo{2, nullptr, "SetMeasurementMode"}, + FunctionInfo{3, &TS::GetTemperatureMilliC, "GetTemperatureMilliC"}, + FunctionInfo{4, &TS::OpenSession, "OpenSession"} + ); }; } // namespace Service::PTM diff --git a/src/core/hle/service/services.h b/src/core/hle/service/services.h index da5281ff29..97bd0973f5 100644 --- a/src/core/hle/service/services.h +++ b/src/core/hle/service/services.h @@ -8,6 +8,9 @@ #include "common/polyfill_thread.h" #include "core/hle/service/sm/sm.h" +// Include these for proper template instancing +#include "core/hle/service/ipc_helpers.h" +#include "core/hle/service/cmif_serialization.h" namespace Service { diff --git a/src/core/hle/service/set/factory_settings_server.cpp b/src/core/hle/service/set/factory_settings_server.cpp index a8e307ae26..f2ee79b2f0 100644 --- a/src/core/hle/service/set/factory_settings_server.cpp +++ b/src/core/hle/service/set/factory_settings_server.cpp @@ -7,55 +7,6 @@ namespace Service::Set { IFactorySettingsServer::IFactorySettingsServer(Core::System& system_) : ServiceFramework{system_, "set:cal"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "GetBluetoothBdAddress"}, - {1, nullptr, "GetConfigurationId1"}, - {2, nullptr, "GetAccelerometerOffset"}, - {3, nullptr, "GetAccelerometerScale"}, - {4, nullptr, "GetGyroscopeOffset"}, - {5, nullptr, "GetGyroscopeScale"}, - {6, nullptr, "GetWirelessLanMacAddress"}, - {7, nullptr, "GetWirelessLanCountryCodeCount"}, - {8, nullptr, "GetWirelessLanCountryCodes"}, - {9, nullptr, "GetSerialNumber"}, - {10, nullptr, "SetInitialSystemAppletProgramId"}, - {11, nullptr, "SetOverlayDispProgramId"}, - {12, nullptr, "GetBatteryLot"}, - {14, nullptr, "GetEciDeviceCertificate"}, - {15, nullptr, "GetEticketDeviceCertificate"}, - {16, nullptr, "GetSslKey"}, - {17, nullptr, "GetSslCertificate"}, - {18, nullptr, "GetGameCardKey"}, - {19, nullptr, "GetGameCardCertificate"}, - {20, nullptr, "GetEciDeviceKey"}, - {21, nullptr, "GetEticketDeviceKey"}, - {22, nullptr, "GetSpeakerParameter"}, - {23, nullptr, "GetLcdVendorId"}, - {24, nullptr, "GetEciDeviceCertificate2"}, - {25, nullptr, "GetEciDeviceKey2"}, - {26, nullptr, "GetAmiiboKey"}, - {27, nullptr, "GetAmiiboEcqvCertificate"}, - {28, nullptr, "GetAmiiboEcdsaCertificate"}, - {29, nullptr, "GetAmiiboEcqvBlsKey"}, - {30, nullptr, "GetAmiiboEcqvBlsCertificate"}, - {31, nullptr, "GetAmiiboEcqvBlsRootCertificate"}, - {32, nullptr, "GetUsbTypeCPowerSourceCircuitVersion"}, - {33, nullptr, "GetAnalogStickModuleTypeL"}, - {34, nullptr, "GetAnalogStickModelParameterL"}, - {35, nullptr, "GetAnalogStickFactoryCalibrationL"}, - {36, nullptr, "GetAnalogStickModuleTypeR"}, - {37, nullptr, "GetAnalogStickModelParameterR"}, - {38, nullptr, "GetAnalogStickFactoryCalibrationR"}, - {39, nullptr, "GetConsoleSixAxisSensorModuleType"}, - {40, nullptr, "GetConsoleSixAxisSensorHorizontalOffset"}, - {41, nullptr, "GetBatteryVersion"}, - {42, nullptr, "GetDeviceId"}, - {43, nullptr, "GetConsoleSixAxisSensorMountType"}, - }; - // clang-format on - - RegisterHandlers(functions); } IFactorySettingsServer::~IFactorySettingsServer() = default; diff --git a/src/core/hle/service/set/factory_settings_server.h b/src/core/hle/service/set/factory_settings_server.h index e64cd13809..518aec30a8 100644 --- a/src/core/hle/service/set/factory_settings_server.h +++ b/src/core/hle/service/set/factory_settings_server.h @@ -15,6 +15,55 @@ class IFactorySettingsServer final : public ServiceFramework, "GetLanguageCode"}, - {1, C<&ISettingsServer::GetAvailableLanguageCodes>, "GetAvailableLanguageCodes"}, - {2, C<&ISettingsServer::MakeLanguageCode>, "MakeLanguageCode"}, - {3, C<&ISettingsServer::GetAvailableLanguageCodeCount>, "GetAvailableLanguageCodeCount"}, - {4, C<&ISettingsServer::GetRegionCode>, "GetRegionCode"}, - {5, C<&ISettingsServer::GetAvailableLanguageCodes2>, "GetAvailableLanguageCodes2"}, - {6, C<&ISettingsServer::GetAvailableLanguageCodeCount2>, "GetAvailableLanguageCodeCount2"}, - {7, C<&ISettingsServer::GetKeyCodeMap>, "GetKeyCodeMap"}, - {8, C<&ISettingsServer::GetQuestFlag>, "GetQuestFlag"}, - {9, C<&ISettingsServer::GetKeyCodeMap2>, "GetKeyCodeMap2"}, - {10, nullptr, "GetFirmwareVersionForDebug"}, - {11, C<&ISettingsServer::GetDeviceNickName>, "GetDeviceNickName"}, - {12, C<&ISettingsServer::GetKeyCodeMapByPort>, "GetKeyCodeMapByPort"}, - }; - // clang-format on - - RegisterHandlers(functions); } ISettingsServer::~ISettingsServer() = default; diff --git a/src/core/hle/service/set/settings_server.h b/src/core/hle/service/set/settings_server.h index a9cee5f626..a897d8b377 100644 --- a/src/core/hle/service/set/settings_server.h +++ b/src/core/hle/service/set/settings_server.h @@ -23,31 +23,36 @@ public: private: Result GetLanguageCode(Out out_language_code); - - Result GetAvailableLanguageCodes(Out out_count, - OutArray language_codes); - + Result GetAvailableLanguageCodes(Out out_count, OutArray language_codes); Result MakeLanguageCode(Out out_language_code, Language language); - Result GetAvailableLanguageCodeCount(Out out_count); - Result GetRegionCode(Out out_region_code); - - Result GetAvailableLanguageCodes2( - Out out_count, OutArray language_codes); - + Result GetAvailableLanguageCodes2(Out out_count, OutArray language_codes); Result GetAvailableLanguageCodeCount2(Out out_count); - Result GetKeyCodeMap(OutLargeData out_key_code_map); - Result GetQuestFlag(Out out_quest_flag); - Result GetKeyCodeMap2(OutLargeData out_key_code_map); - - Result GetDeviceNickName( - OutLargeData, BufferAttr_HipcMapAlias> out_device_name); - + Result GetDeviceNickName(OutLargeData, BufferAttr_HipcMapAlias> out_device_name); Result GetKeyCodeMapByPort(OutLargeData out_key_code_map, u32 port); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&ISettingsServer::GetLanguageCode>, "GetLanguageCode"}, + FunctionInfo{1, C<&ISettingsServer::GetAvailableLanguageCodes>, "GetAvailableLanguageCodes"}, + FunctionInfo{2, C<&ISettingsServer::MakeLanguageCode>, "MakeLanguageCode"}, + FunctionInfo{3, C<&ISettingsServer::GetAvailableLanguageCodeCount>, "GetAvailableLanguageCodeCount"}, + FunctionInfo{4, C<&ISettingsServer::GetRegionCode>, "GetRegionCode"}, + FunctionInfo{5, C<&ISettingsServer::GetAvailableLanguageCodes2>, "GetAvailableLanguageCodes2"}, + FunctionInfo{6, C<&ISettingsServer::GetAvailableLanguageCodeCount2>, "GetAvailableLanguageCodeCount2"}, + FunctionInfo{7, C<&ISettingsServer::GetKeyCodeMap>, "GetKeyCodeMap"}, + FunctionInfo{8, C<&ISettingsServer::GetQuestFlag>, "GetQuestFlag"}, + FunctionInfo{9, C<&ISettingsServer::GetKeyCodeMap2>, "GetKeyCodeMap2"}, + FunctionInfo{10, nullptr, "GetFirmwareVersionForDebug"}, + FunctionInfo{11, C<&ISettingsServer::GetDeviceNickName>, "GetDeviceNickName"}, + FunctionInfo{12, C<&ISettingsServer::GetKeyCodeMapByPort>, "GetKeyCodeMapByPort"} + ); }; } // namespace Service::Set diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cpp index 52642e37f7..e82bd72cab 100644 --- a/src/core/hle/service/set/system_settings_server.cpp +++ b/src/core/hle/service/set/system_settings_server.cpp @@ -116,238 +116,6 @@ Result GetFirmwareVersionImpl(FirmwareVersionFormat& out_firmware, Core::System& ISystemSettingsServer::ISystemSettingsServer(Core::System& system_) : ServiceFramework{system_, "set:sys"}, m_system{system} { - // clang-format off - static const FunctionInfo functions[] = { - {0, C<&ISystemSettingsServer::SetLanguageCode>, "SetLanguageCode"}, - {1, nullptr, "SetNetworkSettings"}, - {2, nullptr, "GetNetworkSettings"}, - {3, C<&ISystemSettingsServer::GetFirmwareVersion>, "GetFirmwareVersion"}, - {4, C<&ISystemSettingsServer::GetFirmwareVersion2>, "GetFirmwareVersion2"}, - {5, nullptr, "GetFirmwareVersionDigest"}, - {7, C<&ISystemSettingsServer::GetLockScreenFlag>, "GetLockScreenFlag"}, - {8, C<&ISystemSettingsServer::SetLockScreenFlag>, "SetLockScreenFlag"}, - {9, nullptr, "GetBacklightSettings"}, - {10, nullptr, "SetBacklightSettings"}, - {11, nullptr, "SetBluetoothDevicesSettings"}, - {12, nullptr, "GetBluetoothDevicesSettings"}, - {13, C<&ISystemSettingsServer::GetExternalSteadyClockSourceId>, "GetExternalSteadyClockSourceId"}, - {14, C<&ISystemSettingsServer::SetExternalSteadyClockSourceId>, "SetExternalSteadyClockSourceId"}, - {15, C<&ISystemSettingsServer::GetUserSystemClockContext>, "GetUserSystemClockContext"}, - {16, C<&ISystemSettingsServer::SetUserSystemClockContext>, "SetUserSystemClockContext"}, - {17, C<&ISystemSettingsServer::GetAccountSettings>, "GetAccountSettings"}, - {18, C<&ISystemSettingsServer::SetAccountSettings>, "SetAccountSettings"}, - {19, nullptr, "GetAudioVolume"}, - {20, nullptr, "SetAudioVolume"}, - {21, C<&ISystemSettingsServer::GetEulaVersions>, "GetEulaVersions"}, - {22, C<&ISystemSettingsServer::SetEulaVersions>, "SetEulaVersions"}, - {23, C<&ISystemSettingsServer::GetColorSetId>, "GetColorSetId"}, - {24, C<&ISystemSettingsServer::SetColorSetId>, "SetColorSetId"}, - {25, C<&ISystemSettingsServer::GetConsoleInformationUploadFlag>, "GetConsoleInformationUploadFlag"}, - {26, C<&ISystemSettingsServer::SetConsoleInformationUploadFlag>, "SetConsoleInformationUploadFlag"}, - {27, C<&ISystemSettingsServer::GetAutomaticApplicationDownloadFlag>, "GetAutomaticApplicationDownloadFlag"}, - {28, C<&ISystemSettingsServer::SetAutomaticApplicationDownloadFlag>, "SetAutomaticApplicationDownloadFlag"}, - {29, C<&ISystemSettingsServer::GetNotificationSettings>, "GetNotificationSettings"}, - {30, C<&ISystemSettingsServer::SetNotificationSettings>, "SetNotificationSettings"}, - {31, C<&ISystemSettingsServer::GetAccountNotificationSettings>, "GetAccountNotificationSettings"}, - {32, C<&ISystemSettingsServer::SetAccountNotificationSettings>, "SetAccountNotificationSettings"}, - {35, C<&ISystemSettingsServer::GetVibrationMasterVolume>, "GetVibrationMasterVolume"}, - {36, C<&ISystemSettingsServer::SetVibrationMasterVolume>, "SetVibrationMasterVolume"}, - {37, C<&ISystemSettingsServer::GetSettingsItemValueSize>, "GetSettingsItemValueSize"}, - {38, C<&ISystemSettingsServer::GetSettingsItemValue>, "GetSettingsItemValue"}, - {39, C<&ISystemSettingsServer::GetTvSettings>, "GetTvSettings"}, - {40, C<&ISystemSettingsServer::SetTvSettings>, "SetTvSettings"}, - {41, nullptr, "GetEdid"}, - {42, nullptr, "SetEdid"}, - {43, C<&ISystemSettingsServer::GetAudioOutputMode>, "GetAudioOutputMode"}, - {44, C<&ISystemSettingsServer::SetAudioOutputMode>, "SetAudioOutputMode"}, - {45, C<&ISystemSettingsServer::GetSpeakerAutoMuteFlag>, "GetSpeakerAutoMuteFlag"}, - {46, C<&ISystemSettingsServer::SetSpeakerAutoMuteFlag>, "SetSpeakerAutoMuteFlag"}, - {47, C<&ISystemSettingsServer::GetQuestFlag>, "GetQuestFlag"}, - {48, C<&ISystemSettingsServer::SetQuestFlag>, "SetQuestFlag"}, - {49, nullptr, "GetDataDeletionSettings"}, - {50, nullptr, "SetDataDeletionSettings"}, - {51, nullptr, "GetInitialSystemAppletProgramId"}, - {52, nullptr, "GetOverlayDispProgramId"}, - {53, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationName>, "GetDeviceTimeZoneLocationName"}, - {54, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationName>, "SetDeviceTimeZoneLocationName"}, - {55, nullptr, "GetWirelessCertificationFileSize"}, - {56, nullptr, "GetWirelessCertificationFile"}, - {57, C<&ISystemSettingsServer::SetRegionCode>, "SetRegionCode"}, - {58, C<&ISystemSettingsServer::GetNetworkSystemClockContext>, "GetNetworkSystemClockContext"}, - {59, C<&ISystemSettingsServer::SetNetworkSystemClockContext>, "SetNetworkSystemClockContext"}, - {60, C<&ISystemSettingsServer::IsUserSystemClockAutomaticCorrectionEnabled>, "IsUserSystemClockAutomaticCorrectionEnabled"}, - {61, C<&ISystemSettingsServer::SetUserSystemClockAutomaticCorrectionEnabled>, "SetUserSystemClockAutomaticCorrectionEnabled"}, - {62, C<&ISystemSettingsServer::GetDebugModeFlag>, "GetDebugModeFlag"}, - {63, C<&ISystemSettingsServer::GetPrimaryAlbumStorage>, "GetPrimaryAlbumStorage"}, - {64, C<&ISystemSettingsServer::SetPrimaryAlbumStorage>, "SetPrimaryAlbumStorage"}, - {65, C<&ISystemSettingsServer::GetUsb30EnableFlag>, "GetUsb30EnableFlag"}, - {66, C<&ISystemSettingsServer::SetUsb30EnableFlag>, "SetUsb30EnableFlag"}, - {67, C<&ISystemSettingsServer::GetBatteryLot>, "GetBatteryLot"}, - {68, C<&ISystemSettingsServer::GetSerialNumber>, "GetSerialNumber"}, - {69, C<&ISystemSettingsServer::GetNfcEnableFlag>, "GetNfcEnableFlag"}, - {70, C<&ISystemSettingsServer::SetNfcEnableFlag>, "SetNfcEnableFlag"}, - {71, C<&ISystemSettingsServer::GetSleepSettings>, "GetSleepSettings"}, - {72, C<&ISystemSettingsServer::SetSleepSettings>, "SetSleepSettings"}, - {73, C<&ISystemSettingsServer::GetWirelessLanEnableFlag>, "GetWirelessLanEnableFlag"}, - {74, C<&ISystemSettingsServer::SetWirelessLanEnableFlag>, "SetWirelessLanEnableFlag"}, - {75, C<&ISystemSettingsServer::GetInitialLaunchSettings>, "GetInitialLaunchSettings"}, - {76, C<&ISystemSettingsServer::SetInitialLaunchSettings>, "SetInitialLaunchSettings"}, - {77, C<&ISystemSettingsServer::GetDeviceNickName>, "GetDeviceNickName"}, - {78, C<&ISystemSettingsServer::SetDeviceNickName>, "SetDeviceNickName"}, - {79, C<&ISystemSettingsServer::GetProductModel>, "GetProductModel"}, - {80, nullptr, "GetLdnChannel"}, - {81, nullptr, "SetLdnChannel"}, - {82, nullptr, "AcquireTelemetryDirtyFlagEventHandle"}, - {83, nullptr, "GetTelemetryDirtyFlags"}, - {84, nullptr, "GetPtmBatteryLot"}, - {85, nullptr, "SetPtmBatteryLot"}, - {86, nullptr, "GetPtmFuelGaugeParameter"}, - {87, nullptr, "SetPtmFuelGaugeParameter"}, - {88, C<&ISystemSettingsServer::GetBluetoothEnableFlag>, "GetBluetoothEnableFlag"}, - {89, C<&ISystemSettingsServer::SetBluetoothEnableFlag>, "SetBluetoothEnableFlag"}, - {90, C<&ISystemSettingsServer::GetMiiAuthorId>, "GetMiiAuthorId"}, - {91, nullptr, "SetShutdownRtcValue"}, - {92, nullptr, "GetShutdownRtcValue"}, - {93, nullptr, "AcquireFatalDirtyFlagEventHandle"}, - {94, nullptr, "GetFatalDirtyFlags"}, - {95, C<&ISystemSettingsServer::GetAutoUpdateEnableFlag>, "GetAutoUpdateEnableFlag"}, - {96, C<&ISystemSettingsServer::SetAutoUpdateEnableFlag>, "SetAutoUpdateEnableFlag"}, - {97, nullptr, "GetNxControllerSettings"}, - {98, nullptr, "SetNxControllerSettings"}, - {99, C<&ISystemSettingsServer::GetBatteryPercentageFlag>, "GetBatteryPercentageFlag"}, - {100, C<&ISystemSettingsServer::SetBatteryPercentageFlag>, "SetBatteryPercentageFlag"}, - {101, nullptr, "GetExternalRtcResetFlag"}, - {102, nullptr, "SetExternalRtcResetFlag"}, - {103, nullptr, "GetUsbFullKeyEnableFlag"}, - {104, nullptr, "SetUsbFullKeyEnableFlag"}, - {105, C<&ISystemSettingsServer::SetExternalSteadyClockInternalOffset>, "SetExternalSteadyClockInternalOffset"}, - {106, C<&ISystemSettingsServer::GetExternalSteadyClockInternalOffset>, "GetExternalSteadyClockInternalOffset"}, - {107, nullptr, "GetBacklightSettingsEx"}, - {108, nullptr, "SetBacklightSettingsEx"}, - {109, nullptr, "GetHeadphoneVolumeWarningCount"}, - {110, nullptr, "SetHeadphoneVolumeWarningCount"}, - {111, nullptr, "GetBluetoothAfhEnableFlag"}, - {112, nullptr, "SetBluetoothAfhEnableFlag"}, - {113, nullptr, "GetBluetoothBoostEnableFlag"}, - {114, nullptr, "SetBluetoothBoostEnableFlag"}, - {115, nullptr, "GetInRepairProcessEnableFlag"}, - {116, nullptr, "SetInRepairProcessEnableFlag"}, - {117, nullptr, "GetHeadphoneVolumeUpdateFlag"}, - {118, nullptr, "SetHeadphoneVolumeUpdateFlag"}, - {119, nullptr, "NeedsToUpdateHeadphoneVolume"}, - {120, C<&ISystemSettingsServer::GetPushNotificationActivityModeOnSleep>, "GetPushNotificationActivityModeOnSleep"}, - {121, C<&ISystemSettingsServer::SetPushNotificationActivityModeOnSleep>, "SetPushNotificationActivityModeOnSleep"}, - {122, nullptr, "GetServiceDiscoveryControlSettings"}, - {123, nullptr, "SetServiceDiscoveryControlSettings"}, - {124, C<&ISystemSettingsServer::GetErrorReportSharePermission>, "GetErrorReportSharePermission"}, - {125, C<&ISystemSettingsServer::SetErrorReportSharePermission>, "SetErrorReportSharePermission"}, - {126, C<&ISystemSettingsServer::GetAppletLaunchFlags>, "GetAppletLaunchFlags"}, - {127, C<&ISystemSettingsServer::SetAppletLaunchFlags>, "SetAppletLaunchFlags"}, - {128, nullptr, "GetConsoleSixAxisSensorAccelerationBias"}, - {129, nullptr, "SetConsoleSixAxisSensorAccelerationBias"}, - {130, nullptr, "GetConsoleSixAxisSensorAngularVelocityBias"}, - {131, nullptr, "SetConsoleSixAxisSensorAngularVelocityBias"}, - {132, nullptr, "GetConsoleSixAxisSensorAccelerationGain"}, - {133, nullptr, "SetConsoleSixAxisSensorAccelerationGain"}, - {134, nullptr, "GetConsoleSixAxisSensorAngularVelocityGain"}, - {135, nullptr, "SetConsoleSixAxisSensorAngularVelocityGain"}, - {136, C<&ISystemSettingsServer::GetKeyboardLayout>, "GetKeyboardLayout"}, - {137, C<&ISystemSettingsServer::SetKeyboardLayout>, "SetKeyboardLayout"}, - {138, nullptr, "GetWebInspectorFlag"}, - {139, nullptr, "GetAllowedSslHosts"}, - {140, nullptr, "GetHostFsMountPoint"}, - {141, nullptr, "GetRequiresRunRepairTimeReviser"}, - {142, nullptr, "SetRequiresRunRepairTimeReviser"}, - {143, nullptr, "SetBlePairingSettings"}, - {144, nullptr, "GetBlePairingSettings"}, - {145, nullptr, "GetConsoleSixAxisSensorAngularVelocityTimeBias"}, - {146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"}, - {147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"}, - {148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"}, - {149, C<&ISystemSettingsServer::GetRebootlessSystemUpdateVersion>, "GetRebootlessSystemUpdateVersion"}, - {150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"}, - {151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"}, - {152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"}, - {153, C<&ISystemSettingsServer::SetUserSystemClockAutomaticCorrectionUpdatedTime>, "SetUserSystemClockAutomaticCorrectionUpdatedTime"}, - {154, nullptr, "GetAccountOnlineStorageSettings"}, - {155, nullptr, "SetAccountOnlineStorageSettings"}, - {156, nullptr, "GetPctlReadyFlag"}, - {157, nullptr, "SetPctlReadyFlag"}, - {158, nullptr, "GetAnalogStickUserCalibrationL"}, - {159, nullptr, "SetAnalogStickUserCalibrationL"}, - {160, nullptr, "GetAnalogStickUserCalibrationR"}, - {161, nullptr, "SetAnalogStickUserCalibrationR"}, - {162, nullptr, "GetPtmBatteryVersion"}, - {163, nullptr, "SetPtmBatteryVersion"}, - {164, nullptr, "GetUsb30HostEnableFlag"}, - {165, nullptr, "SetUsb30HostEnableFlag"}, - {166, nullptr, "GetUsb30DeviceEnableFlag"}, - {167, nullptr, "SetUsb30DeviceEnableFlag"}, - {168, nullptr, "GetThemeId"}, - {169, nullptr, "SetThemeId"}, - {170, C<&ISystemSettingsServer::GetChineseTraditionalInputMethod>, "GetChineseTraditionalInputMethod"}, - {171, nullptr, "SetChineseTraditionalInputMethod"}, - {172, nullptr, "GetPtmCycleCountReliability"}, - {173, nullptr, "SetPtmCycleCountReliability"}, - {174, C<&ISystemSettingsServer::GetHomeMenuScheme>, "GetHomeMenuScheme"}, - {175, nullptr, "GetThemeSettings"}, - {176, nullptr, "SetThemeSettings"}, - {177, nullptr, "GetThemeKey"}, - {178, nullptr, "SetThemeKey"}, - {179, nullptr, "GetZoomFlag"}, - {180, nullptr, "SetZoomFlag"}, - {181, nullptr, "GetT"}, - {182, nullptr, "SetT"}, - {183, C<&ISystemSettingsServer::GetPlatformRegion>, "GetPlatformRegion"}, - {184, C<&ISystemSettingsServer::SetPlatformRegion>, "SetPlatformRegion"}, - {185, C<&ISystemSettingsServer::GetHomeMenuSchemeModel>, "GetHomeMenuSchemeModel"}, - {186, nullptr, "GetMemoryUsageRateFlag"}, - {187, C<&ISystemSettingsServer::GetTouchScreenMode>, "GetTouchScreenMode"}, - {188, C<&ISystemSettingsServer::SetTouchScreenMode>, "SetTouchScreenMode"}, - {189, nullptr, "GetButtonConfigSettingsFull"}, - {190, nullptr, "SetButtonConfigSettingsFull"}, - {191, nullptr, "GetButtonConfigSettingsEmbedded"}, - {192, nullptr, "SetButtonConfigSettingsEmbedded"}, - {193, nullptr, "GetButtonConfigSettingsLeft"}, - {194, nullptr, "SetButtonConfigSettingsLeft"}, - {195, nullptr, "GetButtonConfigSettingsRight"}, - {196, nullptr, "SetButtonConfigSettingsRight"}, - {197, nullptr, "GetButtonConfigRegisteredSettingsEmbedded"}, - {198, nullptr, "SetButtonConfigRegisteredSettingsEmbedded"}, - {199, nullptr, "GetButtonConfigRegisteredSettings"}, - {200, nullptr, "SetButtonConfigRegisteredSettings"}, - {201, C<&ISystemSettingsServer::GetFieldTestingFlag>, "GetFieldTestingFlag"}, - {202, nullptr, "SetFieldTestingFlag"}, - {203, C<&ISystemSettingsServer::GetPanelCrcMode>, "GetPanelCrcMode"}, - {204, C<&ISystemSettingsServer::SetPanelCrcMode>, "SetPanelCrcMode"}, - {205, nullptr, "GetNxControllerSettingsEx"}, - {206, nullptr, "SetNxControllerSettingsEx"}, - {207, nullptr, "GetHearingProtectionSafeguardFlag"}, - {208, nullptr, "SetHearingProtectionSafeguardFlag"}, - {209, nullptr, "GetHearingProtectionSafeguardRemainingTime"}, - {210, nullptr, "SetHearingProtectionSafeguardRemainingTime"}, - {221, nullptr, "GetForceMonauralOutputFlag"}, //17.0.0+ - {222, nullptr, "SetForceMonauralOutputFlag"}, //17.0.0+ - {251, nullptr, "GetAccountIdentificationSettings"}, //18.0.0+ - {252, nullptr, "SetAccountIdentificationSettings"}, //18.0.0+ - {263, nullptr, "AcquireVphymDirtyFlagEventHandle"}, //20.0.0+ - {264, nullptr, "GetVphymDirtyFlags"}, //20.0.0+ - {282, nullptr, "ConvertToProductModel"}, //20.0.0+ - {283, nullptr, "ConvertToProductModelName"}, //20.0.0+ - {289, nullptr, "GetDefaultAccountIdentificationFlagSet"}, //20.0.0+ - {300, nullptr, "AcquirePushNotificationDirtyFlagEventHandle"}, //20.0.0+ - {301, nullptr, "GetPushNotificationDirtyFlags"}, //20.0.0+ - {306, nullptr, "GetPinCodeReregistrationGuideAccounts"}, //20.0.0+ - {307, nullptr, "SetPinCodeReregistrationGuideAccounts"}, //20.0.0+ - {315, C<&ISystemSettingsServer::GetHttpAuthConfigs>, "GetHttpAuthConfigs"}, //21.0.0+ - {319, C<&ISystemSettingsServer::GetAccountUserSettings>, "GetAccountUserSettings"}, //21.0.0+ - {320, nullptr, "SetAccountUserSettings"}, //21.0.0+ - {321, C<&ISystemSettingsServer::GetDefaultAccountUserSettings>, "GetDefaultAccountUserSettings"}, //21.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); - SetupSettings(); m_system_settings.region_code = diff --git a/src/core/hle/service/set/system_settings_server.h b/src/core/hle/service/set/system_settings_server.h index 1d56e61f88..a1429d6213 100644 --- a/src/core/hle/service/set/system_settings_server.h +++ b/src/core/hle/service/set/system_settings_server.h @@ -179,6 +179,236 @@ private: void StoreSettings(); void SetSaveNeeded(); + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, C<&ISystemSettingsServer::SetLanguageCode>, "SetLanguageCode"}, + FunctionInfo{1, nullptr, "SetNetworkSettings"}, + FunctionInfo{2, nullptr, "GetNetworkSettings"}, + FunctionInfo{3, C<&ISystemSettingsServer::GetFirmwareVersion>, "GetFirmwareVersion"}, + FunctionInfo{4, C<&ISystemSettingsServer::GetFirmwareVersion2>, "GetFirmwareVersion2"}, + FunctionInfo{5, nullptr, "GetFirmwareVersionDigest"}, + FunctionInfo{7, C<&ISystemSettingsServer::GetLockScreenFlag>, "GetLockScreenFlag"}, + FunctionInfo{8, C<&ISystemSettingsServer::SetLockScreenFlag>, "SetLockScreenFlag"}, + FunctionInfo{9, nullptr, "GetBacklightSettings"}, + FunctionInfo{10, nullptr, "SetBacklightSettings"}, + FunctionInfo{11, nullptr, "SetBluetoothDevicesSettings"}, + FunctionInfo{12, nullptr, "GetBluetoothDevicesSettings"}, + FunctionInfo{13, C<&ISystemSettingsServer::GetExternalSteadyClockSourceId>, "GetExternalSteadyClockSourceId"}, + FunctionInfo{14, C<&ISystemSettingsServer::SetExternalSteadyClockSourceId>, "SetExternalSteadyClockSourceId"}, + FunctionInfo{15, C<&ISystemSettingsServer::GetUserSystemClockContext>, "GetUserSystemClockContext"}, + FunctionInfo{16, C<&ISystemSettingsServer::SetUserSystemClockContext>, "SetUserSystemClockContext"}, + FunctionInfo{17, C<&ISystemSettingsServer::GetAccountSettings>, "GetAccountSettings"}, + FunctionInfo{18, C<&ISystemSettingsServer::SetAccountSettings>, "SetAccountSettings"}, + FunctionInfo{19, nullptr, "GetAudioVolume"}, + FunctionInfo{20, nullptr, "SetAudioVolume"}, + FunctionInfo{21, C<&ISystemSettingsServer::GetEulaVersions>, "GetEulaVersions"}, + FunctionInfo{22, C<&ISystemSettingsServer::SetEulaVersions>, "SetEulaVersions"}, + FunctionInfo{23, C<&ISystemSettingsServer::GetColorSetId>, "GetColorSetId"}, + FunctionInfo{24, C<&ISystemSettingsServer::SetColorSetId>, "SetColorSetId"}, + FunctionInfo{25, C<&ISystemSettingsServer::GetConsoleInformationUploadFlag>, "GetConsoleInformationUploadFlag"}, + FunctionInfo{26, C<&ISystemSettingsServer::SetConsoleInformationUploadFlag>, "SetConsoleInformationUploadFlag"}, + FunctionInfo{27, C<&ISystemSettingsServer::GetAutomaticApplicationDownloadFlag>, "GetAutomaticApplicationDownloadFlag"}, + FunctionInfo{28, C<&ISystemSettingsServer::SetAutomaticApplicationDownloadFlag>, "SetAutomaticApplicationDownloadFlag"}, + FunctionInfo{29, C<&ISystemSettingsServer::GetNotificationSettings>, "GetNotificationSettings"}, + FunctionInfo{30, C<&ISystemSettingsServer::SetNotificationSettings>, "SetNotificationSettings"}, + FunctionInfo{31, C<&ISystemSettingsServer::GetAccountNotificationSettings>, "GetAccountNotificationSettings"}, + FunctionInfo{32, C<&ISystemSettingsServer::SetAccountNotificationSettings>, "SetAccountNotificationSettings"}, + FunctionInfo{35, C<&ISystemSettingsServer::GetVibrationMasterVolume>, "GetVibrationMasterVolume"}, + FunctionInfo{36, C<&ISystemSettingsServer::SetVibrationMasterVolume>, "SetVibrationMasterVolume"}, + FunctionInfo{37, C<&ISystemSettingsServer::GetSettingsItemValueSize>, "GetSettingsItemValueSize"}, + FunctionInfo{38, C<&ISystemSettingsServer::GetSettingsItemValue>, "GetSettingsItemValue"}, + FunctionInfo{39, C<&ISystemSettingsServer::GetTvSettings>, "GetTvSettings"}, + FunctionInfo{40, C<&ISystemSettingsServer::SetTvSettings>, "SetTvSettings"}, + FunctionInfo{41, nullptr, "GetEdid"}, + FunctionInfo{42, nullptr, "SetEdid"}, + FunctionInfo{43, C<&ISystemSettingsServer::GetAudioOutputMode>, "GetAudioOutputMode"}, + FunctionInfo{44, C<&ISystemSettingsServer::SetAudioOutputMode>, "SetAudioOutputMode"}, + FunctionInfo{45, C<&ISystemSettingsServer::GetSpeakerAutoMuteFlag>, "GetSpeakerAutoMuteFlag"}, + FunctionInfo{46, C<&ISystemSettingsServer::SetSpeakerAutoMuteFlag>, "SetSpeakerAutoMuteFlag"}, + FunctionInfo{47, C<&ISystemSettingsServer::GetQuestFlag>, "GetQuestFlag"}, + FunctionInfo{48, C<&ISystemSettingsServer::SetQuestFlag>, "SetQuestFlag"}, + FunctionInfo{49, nullptr, "GetDataDeletionSettings"}, + FunctionInfo{50, nullptr, "SetDataDeletionSettings"}, + FunctionInfo{51, nullptr, "GetInitialSystemAppletProgramId"}, + FunctionInfo{52, nullptr, "GetOverlayDispProgramId"}, + FunctionInfo{53, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationName>, "GetDeviceTimeZoneLocationName"}, + FunctionInfo{54, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationName>, "SetDeviceTimeZoneLocationName"}, + FunctionInfo{55, nullptr, "GetWirelessCertificationFileSize"}, + FunctionInfo{56, nullptr, "GetWirelessCertificationFile"}, + FunctionInfo{57, C<&ISystemSettingsServer::SetRegionCode>, "SetRegionCode"}, + FunctionInfo{58, C<&ISystemSettingsServer::GetNetworkSystemClockContext>, "GetNetworkSystemClockContext"}, + FunctionInfo{59, C<&ISystemSettingsServer::SetNetworkSystemClockContext>, "SetNetworkSystemClockContext"}, + FunctionInfo{60, C<&ISystemSettingsServer::IsUserSystemClockAutomaticCorrectionEnabled>, "IsUserSystemClockAutomaticCorrectionEnabled"}, + FunctionInfo{61, C<&ISystemSettingsServer::SetUserSystemClockAutomaticCorrectionEnabled>, "SetUserSystemClockAutomaticCorrectionEnabled"}, + FunctionInfo{62, C<&ISystemSettingsServer::GetDebugModeFlag>, "GetDebugModeFlag"}, + FunctionInfo{63, C<&ISystemSettingsServer::GetPrimaryAlbumStorage>, "GetPrimaryAlbumStorage"}, + FunctionInfo{64, C<&ISystemSettingsServer::SetPrimaryAlbumStorage>, "SetPrimaryAlbumStorage"}, + FunctionInfo{65, C<&ISystemSettingsServer::GetUsb30EnableFlag>, "GetUsb30EnableFlag"}, + FunctionInfo{66, C<&ISystemSettingsServer::SetUsb30EnableFlag>, "SetUsb30EnableFlag"}, + FunctionInfo{67, C<&ISystemSettingsServer::GetBatteryLot>, "GetBatteryLot"}, + FunctionInfo{68, C<&ISystemSettingsServer::GetSerialNumber>, "GetSerialNumber"}, + FunctionInfo{69, C<&ISystemSettingsServer::GetNfcEnableFlag>, "GetNfcEnableFlag"}, + FunctionInfo{70, C<&ISystemSettingsServer::SetNfcEnableFlag>, "SetNfcEnableFlag"}, + FunctionInfo{71, C<&ISystemSettingsServer::GetSleepSettings>, "GetSleepSettings"}, + FunctionInfo{72, C<&ISystemSettingsServer::SetSleepSettings>, "SetSleepSettings"}, + FunctionInfo{73, C<&ISystemSettingsServer::GetWirelessLanEnableFlag>, "GetWirelessLanEnableFlag"}, + FunctionInfo{74, C<&ISystemSettingsServer::SetWirelessLanEnableFlag>, "SetWirelessLanEnableFlag"}, + FunctionInfo{75, C<&ISystemSettingsServer::GetInitialLaunchSettings>, "GetInitialLaunchSettings"}, + FunctionInfo{76, C<&ISystemSettingsServer::SetInitialLaunchSettings>, "SetInitialLaunchSettings"}, + FunctionInfo{77, C<&ISystemSettingsServer::GetDeviceNickName>, "GetDeviceNickName"}, + FunctionInfo{78, C<&ISystemSettingsServer::SetDeviceNickName>, "SetDeviceNickName"}, + FunctionInfo{79, C<&ISystemSettingsServer::GetProductModel>, "GetProductModel"}, + FunctionInfo{80, nullptr, "GetLdnChannel"}, + FunctionInfo{81, nullptr, "SetLdnChannel"}, + FunctionInfo{82, nullptr, "AcquireTelemetryDirtyFlagEventHandle"}, + FunctionInfo{83, nullptr, "GetTelemetryDirtyFlags"}, + FunctionInfo{84, nullptr, "GetPtmBatteryLot"}, + FunctionInfo{85, nullptr, "SetPtmBatteryLot"}, + FunctionInfo{86, nullptr, "GetPtmFuelGaugeParameter"}, + FunctionInfo{87, nullptr, "SetPtmFuelGaugeParameter"}, + FunctionInfo{88, C<&ISystemSettingsServer::GetBluetoothEnableFlag>, "GetBluetoothEnableFlag"}, + FunctionInfo{89, C<&ISystemSettingsServer::SetBluetoothEnableFlag>, "SetBluetoothEnableFlag"}, + FunctionInfo{90, C<&ISystemSettingsServer::GetMiiAuthorId>, "GetMiiAuthorId"}, + FunctionInfo{91, nullptr, "SetShutdownRtcValue"}, + FunctionInfo{92, nullptr, "GetShutdownRtcValue"}, + FunctionInfo{93, nullptr, "AcquireFatalDirtyFlagEventHandle"}, + FunctionInfo{94, nullptr, "GetFatalDirtyFlags"}, + FunctionInfo{95, C<&ISystemSettingsServer::GetAutoUpdateEnableFlag>, "GetAutoUpdateEnableFlag"}, + FunctionInfo{96, C<&ISystemSettingsServer::SetAutoUpdateEnableFlag>, "SetAutoUpdateEnableFlag"}, + FunctionInfo{97, nullptr, "GetNxControllerSettings"}, + FunctionInfo{98, nullptr, "SetNxControllerSettings"}, + FunctionInfo{99, C<&ISystemSettingsServer::GetBatteryPercentageFlag>, "GetBatteryPercentageFlag"}, + FunctionInfo{100, C<&ISystemSettingsServer::SetBatteryPercentageFlag>, "SetBatteryPercentageFlag"}, + FunctionInfo{101, nullptr, "GetExternalRtcResetFlag"}, + FunctionInfo{102, nullptr, "SetExternalRtcResetFlag"}, + FunctionInfo{103, nullptr, "GetUsbFullKeyEnableFlag"}, + FunctionInfo{104, nullptr, "SetUsbFullKeyEnableFlag"}, + FunctionInfo{105, C<&ISystemSettingsServer::SetExternalSteadyClockInternalOffset>, "SetExternalSteadyClockInternalOffset"}, + FunctionInfo{106, C<&ISystemSettingsServer::GetExternalSteadyClockInternalOffset>, "GetExternalSteadyClockInternalOffset"}, + FunctionInfo{107, nullptr, "GetBacklightSettingsEx"}, + FunctionInfo{108, nullptr, "SetBacklightSettingsEx"}, + FunctionInfo{109, nullptr, "GetHeadphoneVolumeWarningCount"}, + FunctionInfo{110, nullptr, "SetHeadphoneVolumeWarningCount"}, + FunctionInfo{111, nullptr, "GetBluetoothAfhEnableFlag"}, + FunctionInfo{112, nullptr, "SetBluetoothAfhEnableFlag"}, + FunctionInfo{113, nullptr, "GetBluetoothBoostEnableFlag"}, + FunctionInfo{114, nullptr, "SetBluetoothBoostEnableFlag"}, + FunctionInfo{115, nullptr, "GetInRepairProcessEnableFlag"}, + FunctionInfo{116, nullptr, "SetInRepairProcessEnableFlag"}, + FunctionInfo{117, nullptr, "GetHeadphoneVolumeUpdateFlag"}, + FunctionInfo{118, nullptr, "SetHeadphoneVolumeUpdateFlag"}, + FunctionInfo{119, nullptr, "NeedsToUpdateHeadphoneVolume"}, + FunctionInfo{120, C<&ISystemSettingsServer::GetPushNotificationActivityModeOnSleep>, "GetPushNotificationActivityModeOnSleep"}, + FunctionInfo{121, C<&ISystemSettingsServer::SetPushNotificationActivityModeOnSleep>, "SetPushNotificationActivityModeOnSleep"}, + FunctionInfo{122, nullptr, "GetServiceDiscoveryControlSettings"}, + FunctionInfo{123, nullptr, "SetServiceDiscoveryControlSettings"}, + FunctionInfo{124, C<&ISystemSettingsServer::GetErrorReportSharePermission>, "GetErrorReportSharePermission"}, + FunctionInfo{125, C<&ISystemSettingsServer::SetErrorReportSharePermission>, "SetErrorReportSharePermission"}, + FunctionInfo{126, C<&ISystemSettingsServer::GetAppletLaunchFlags>, "GetAppletLaunchFlags"}, + FunctionInfo{127, C<&ISystemSettingsServer::SetAppletLaunchFlags>, "SetAppletLaunchFlags"}, + FunctionInfo{128, nullptr, "GetConsoleSixAxisSensorAccelerationBias"}, + FunctionInfo{129, nullptr, "SetConsoleSixAxisSensorAccelerationBias"}, + FunctionInfo{130, nullptr, "GetConsoleSixAxisSensorAngularVelocityBias"}, + FunctionInfo{131, nullptr, "SetConsoleSixAxisSensorAngularVelocityBias"}, + FunctionInfo{132, nullptr, "GetConsoleSixAxisSensorAccelerationGain"}, + FunctionInfo{133, nullptr, "SetConsoleSixAxisSensorAccelerationGain"}, + FunctionInfo{134, nullptr, "GetConsoleSixAxisSensorAngularVelocityGain"}, + FunctionInfo{135, nullptr, "SetConsoleSixAxisSensorAngularVelocityGain"}, + FunctionInfo{136, C<&ISystemSettingsServer::GetKeyboardLayout>, "GetKeyboardLayout"}, + FunctionInfo{137, C<&ISystemSettingsServer::SetKeyboardLayout>, "SetKeyboardLayout"}, + FunctionInfo{138, nullptr, "GetWebInspectorFlag"}, + FunctionInfo{139, nullptr, "GetAllowedSslHosts"}, + FunctionInfo{140, nullptr, "GetHostFsMountPoint"}, + FunctionInfo{141, nullptr, "GetRequiresRunRepairTimeReviser"}, + FunctionInfo{142, nullptr, "SetRequiresRunRepairTimeReviser"}, + FunctionInfo{143, nullptr, "SetBlePairingSettings"}, + FunctionInfo{144, nullptr, "GetBlePairingSettings"}, + FunctionInfo{145, nullptr, "GetConsoleSixAxisSensorAngularVelocityTimeBias"}, + FunctionInfo{146, nullptr, "SetConsoleSixAxisSensorAngularVelocityTimeBias"}, + FunctionInfo{147, nullptr, "GetConsoleSixAxisSensorAngularAcceleration"}, + FunctionInfo{148, nullptr, "SetConsoleSixAxisSensorAngularAcceleration"}, + FunctionInfo{149, C<&ISystemSettingsServer::GetRebootlessSystemUpdateVersion>, "GetRebootlessSystemUpdateVersion"}, + FunctionInfo{150, C<&ISystemSettingsServer::GetDeviceTimeZoneLocationUpdatedTime>, "GetDeviceTimeZoneLocationUpdatedTime"}, + FunctionInfo{151, C<&ISystemSettingsServer::SetDeviceTimeZoneLocationUpdatedTime>, "SetDeviceTimeZoneLocationUpdatedTime"}, + FunctionInfo{152, C<&ISystemSettingsServer::GetUserSystemClockAutomaticCorrectionUpdatedTime>, "GetUserSystemClockAutomaticCorrectionUpdatedTime"}, + FunctionInfo{153, C<&ISystemSettingsServer::SetUserSystemClockAutomaticCorrectionUpdatedTime>, "SetUserSystemClockAutomaticCorrectionUpdatedTime"}, + FunctionInfo{154, nullptr, "GetAccountOnlineStorageSettings"}, + FunctionInfo{155, nullptr, "SetAccountOnlineStorageSettings"}, + FunctionInfo{156, nullptr, "GetPctlReadyFlag"}, + FunctionInfo{157, nullptr, "SetPctlReadyFlag"}, + FunctionInfo{158, nullptr, "GetAnalogStickUserCalibrationL"}, + FunctionInfo{159, nullptr, "SetAnalogStickUserCalibrationL"}, + FunctionInfo{160, nullptr, "GetAnalogStickUserCalibrationR"}, + FunctionInfo{161, nullptr, "SetAnalogStickUserCalibrationR"}, + FunctionInfo{162, nullptr, "GetPtmBatteryVersion"}, + FunctionInfo{163, nullptr, "SetPtmBatteryVersion"}, + FunctionInfo{164, nullptr, "GetUsb30HostEnableFlag"}, + FunctionInfo{165, nullptr, "SetUsb30HostEnableFlag"}, + FunctionInfo{166, nullptr, "GetUsb30DeviceEnableFlag"}, + FunctionInfo{167, nullptr, "SetUsb30DeviceEnableFlag"}, + FunctionInfo{168, nullptr, "GetThemeId"}, + FunctionInfo{169, nullptr, "SetThemeId"}, + FunctionInfo{170, C<&ISystemSettingsServer::GetChineseTraditionalInputMethod>, "GetChineseTraditionalInputMethod"}, + FunctionInfo{171, nullptr, "SetChineseTraditionalInputMethod"}, + FunctionInfo{172, nullptr, "GetPtmCycleCountReliability"}, + FunctionInfo{173, nullptr, "SetPtmCycleCountReliability"}, + FunctionInfo{174, C<&ISystemSettingsServer::GetHomeMenuScheme>, "GetHomeMenuScheme"}, + FunctionInfo{175, nullptr, "GetThemeSettings"}, + FunctionInfo{176, nullptr, "SetThemeSettings"}, + FunctionInfo{177, nullptr, "GetThemeKey"}, + FunctionInfo{178, nullptr, "SetThemeKey"}, + FunctionInfo{179, nullptr, "GetZoomFlag"}, + FunctionInfo{180, nullptr, "SetZoomFlag"}, + FunctionInfo{181, nullptr, "GetT"}, + FunctionInfo{182, nullptr, "SetT"}, + FunctionInfo{183, C<&ISystemSettingsServer::GetPlatformRegion>, "GetPlatformRegion"}, + FunctionInfo{184, C<&ISystemSettingsServer::SetPlatformRegion>, "SetPlatformRegion"}, + FunctionInfo{185, C<&ISystemSettingsServer::GetHomeMenuSchemeModel>, "GetHomeMenuSchemeModel"}, + FunctionInfo{186, nullptr, "GetMemoryUsageRateFlag"}, + FunctionInfo{187, C<&ISystemSettingsServer::GetTouchScreenMode>, "GetTouchScreenMode"}, + FunctionInfo{188, C<&ISystemSettingsServer::SetTouchScreenMode>, "SetTouchScreenMode"}, + FunctionInfo{189, nullptr, "GetButtonConfigSettingsFull"}, + FunctionInfo{190, nullptr, "SetButtonConfigSettingsFull"}, + FunctionInfo{191, nullptr, "GetButtonConfigSettingsEmbedded"}, + FunctionInfo{192, nullptr, "SetButtonConfigSettingsEmbedded"}, + FunctionInfo{193, nullptr, "GetButtonConfigSettingsLeft"}, + FunctionInfo{194, nullptr, "SetButtonConfigSettingsLeft"}, + FunctionInfo{195, nullptr, "GetButtonConfigSettingsRight"}, + FunctionInfo{196, nullptr, "SetButtonConfigSettingsRight"}, + FunctionInfo{197, nullptr, "GetButtonConfigRegisteredSettingsEmbedded"}, + FunctionInfo{198, nullptr, "SetButtonConfigRegisteredSettingsEmbedded"}, + FunctionInfo{199, nullptr, "GetButtonConfigRegisteredSettings"}, + FunctionInfo{200, nullptr, "SetButtonConfigRegisteredSettings"}, + FunctionInfo{201, C<&ISystemSettingsServer::GetFieldTestingFlag>, "GetFieldTestingFlag"}, + FunctionInfo{202, nullptr, "SetFieldTestingFlag"}, + FunctionInfo{203, C<&ISystemSettingsServer::GetPanelCrcMode>, "GetPanelCrcMode"}, + FunctionInfo{204, C<&ISystemSettingsServer::SetPanelCrcMode>, "SetPanelCrcMode"}, + FunctionInfo{205, nullptr, "GetNxControllerSettingsEx"}, + FunctionInfo{206, nullptr, "SetNxControllerSettingsEx"}, + FunctionInfo{207, nullptr, "GetHearingProtectionSafeguardFlag"}, + FunctionInfo{208, nullptr, "SetHearingProtectionSafeguardFlag"}, + FunctionInfo{209, nullptr, "GetHearingProtectionSafeguardRemainingTime"}, + FunctionInfo{210, nullptr, "SetHearingProtectionSafeguardRemainingTime"}, + FunctionInfo{221, nullptr, "GetForceMonauralOutputFlag"}, //17.0.0+ + FunctionInfo{222, nullptr, "SetForceMonauralOutputFlag"}, //17.0.0+ + FunctionInfo{251, nullptr, "GetAccountIdentificationSettings"}, //18.0.0+ + FunctionInfo{252, nullptr, "SetAccountIdentificationSettings"}, //18.0.0+ + FunctionInfo{263, nullptr, "AcquireVphymDirtyFlagEventHandle"}, //20.0.0+ + FunctionInfo{264, nullptr, "GetVphymDirtyFlags"}, //20.0.0+ + FunctionInfo{282, nullptr, "ConvertToProductModel"}, //20.0.0+ + FunctionInfo{283, nullptr, "ConvertToProductModelName"}, //20.0.0+ + FunctionInfo{289, nullptr, "GetDefaultAccountIdentificationFlagSet"}, //20.0.0+ + FunctionInfo{300, nullptr, "AcquirePushNotificationDirtyFlagEventHandle"}, //20.0.0+ + FunctionInfo{301, nullptr, "GetPushNotificationDirtyFlags"}, //20.0.0+ + FunctionInfo{306, nullptr, "GetPinCodeReregistrationGuideAccounts"}, //20.0.0+ + FunctionInfo{307, nullptr, "SetPinCodeReregistrationGuideAccounts"}, //20.0.0+ + FunctionInfo{315, C<&ISystemSettingsServer::GetHttpAuthConfigs>, "GetHttpAuthConfigs"}, //21.0.0+ + FunctionInfo{319, C<&ISystemSettingsServer::GetAccountUserSettings>, "GetAccountUserSettings"}, //21.0.0+ + FunctionInfo{320, nullptr, "SetAccountUserSettings"}, //21.0.0+ + FunctionInfo{321, C<&ISystemSettingsServer::GetDefaultAccountUserSettings>, "GetDefaultAccountUserSettings"} //21.0.0+ + ); Core::System& m_system; SystemSettings m_system_settings{}; PrivateSettings m_private_settings{}; diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp index c75c5437df..9d541ca418 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -268,37 +268,37 @@ SM::SM(ServiceManager& service_manager_, Core::System& system_) , kernel{system_.Kernel()} { RegisterHandlers({ - {0, &SM::Initialize, "Initialize"}, - {1, &SM::GetServiceCmif, "GetService"}, - {2, &SM::RegisterServiceCmif, "RegisterService"}, - {3, &SM::UnregisterService, "UnregisterService"}, - {4, nullptr, "DetachClient"}, + FunctionInfo{0, &SM::Initialize, "Initialize"}, + FunctionInfo{1, &SM::GetServiceCmif, "GetService"}, + FunctionInfo{2, &SM::RegisterServiceCmif, "RegisterService"}, + FunctionInfo{3, &SM::UnregisterService, "UnregisterService"}, + FunctionInfo{4, nullptr, "DetachClient"}, // TODO: are these non-TIPC as well? - {65000, nullptr, "AtmosphereInstallMitm"}, - {65001, nullptr, "AtmosphereUninstallMitm"}, - {65002, nullptr, "Deprecated_AtmosphereAssociatePidTidForMitm"}, - {65003, nullptr, "AtmosphereAcknowledgeMitmSession"}, - {65004, nullptr, "AtmosphereHasMitm"}, - {65005, nullptr, "AtmosphereWaitMitm"}, - {65006, nullptr, "AtmosphereDeclareFutureMitm"}, - {65100, &SM::AtmosphereHasService, "AtmosphereHasService"}, - {65101, nullptr, "AtmosphereWaitService"}, + FunctionInfo{65000, nullptr, "AtmosphereInstallMitm"}, + FunctionInfo{65001, nullptr, "AtmosphereUninstallMitm"}, + FunctionInfo{65002, nullptr, "Deprecated_AtmosphereAssociatePidTidForMitm"}, + FunctionInfo{65003, nullptr, "AtmosphereAcknowledgeMitmSession"}, + FunctionInfo{65004, nullptr, "AtmosphereHasMitm"}, + FunctionInfo{65005, nullptr, "AtmosphereWaitMitm"}, + FunctionInfo{65006, nullptr, "AtmosphereDeclareFutureMitm"}, + FunctionInfo{65100, &SM::AtmosphereHasService, "AtmosphereHasService"}, + FunctionInfo{65101, nullptr, "AtmosphereWaitService"}, }); RegisterHandlersTipc({ - {0, &SM::Initialize, "Initialize"}, - {1, &SM::GetServiceTipc, "GetService"}, - {2, &SM::RegisterServiceTipc, "RegisterService"}, - {3, &SM::UnregisterService, "UnregisterService"}, - {4, nullptr, "DetachClient"}, - {65000, nullptr, "AtmosphereInstallMitm"}, - {65001, nullptr, "AtmosphereUninstallMitm"}, - {65002, nullptr, "Deprecated_AtmosphereAssociatePidTidForMitm"}, - {65003, nullptr, "AtmosphereAcknowledgeMitmSession"}, - {65004, nullptr, "AtmosphereHasMitm"}, - {65005, nullptr, "AtmosphereWaitMitm"}, - {65006, nullptr, "AtmosphereDeclareFutureMitm"}, - {65100, &SM::AtmosphereHasService, "AtmosphereHasService"}, - {65101, nullptr, "AtmosphereWaitService"}, + FunctionInfo{0, &SM::Initialize, "Initialize"}, + FunctionInfo{1, &SM::GetServiceTipc, "GetService"}, + FunctionInfo{2, &SM::RegisterServiceTipc, "RegisterService"}, + FunctionInfo{3, &SM::UnregisterService, "UnregisterService"}, + FunctionInfo{4, nullptr, "DetachClient"}, + FunctionInfo{65000, nullptr, "AtmosphereInstallMitm"}, + FunctionInfo{65001, nullptr, "AtmosphereUninstallMitm"}, + FunctionInfo{65002, nullptr, "Deprecated_AtmosphereAssociatePidTidForMitm"}, + FunctionInfo{65003, nullptr, "AtmosphereAcknowledgeMitmSession"}, + FunctionInfo{65004, nullptr, "AtmosphereHasMitm"}, + FunctionInfo{65005, nullptr, "AtmosphereWaitMitm"}, + FunctionInfo{65006, nullptr, "AtmosphereDeclareFutureMitm"}, + FunctionInfo{65100, &SM::AtmosphereHasService, "AtmosphereHasService"}, + FunctionInfo{65101, nullptr, "AtmosphereWaitService"}, }); } diff --git a/src/core/hle/service/sm/sm_controller.cpp b/src/core/hle/service/sm/sm_controller.cpp index 125eb4a247..2173564733 100644 --- a/src/core/hle/service/sm/sm_controller.cpp +++ b/src/core/hle/service/sm/sm_controller.cpp @@ -113,12 +113,12 @@ void Controller::SetPointerBufferSize(HLERequestContext& ctx) { // https://switchbrew.org/wiki/IPC_Marshalling Controller::Controller(Core::System& system_) : ServiceFramework{system_, "IpcController"} { static const FunctionInfo functions[] = { - {0, &Controller::ConvertCurrentObjectToDomain, "ConvertCurrentObjectToDomain"}, - {1, nullptr, "CopyFromCurrentDomain"}, - {2, &Controller::CloneCurrentObject, "CloneCurrentObject"}, - {3, &Controller::QueryPointerBufferSize, "QueryPointerBufferSize"}, - {4, &Controller::CloneCurrentObjectEx, "CloneCurrentObjectEx"}, - {5, &Controller::SetPointerBufferSize, "SetPointerBufferSize"}, //TODO: where does this come from + FunctionInfo{0, &Controller::ConvertCurrentObjectToDomain, "ConvertCurrentObjectToDomain"}, + FunctionInfo{1, nullptr, "CopyFromCurrentDomain"}, + FunctionInfo{2, &Controller::CloneCurrentObject, "CloneCurrentObject"}, + FunctionInfo{3, &Controller::QueryPointerBufferSize, "QueryPointerBufferSize"}, + FunctionInfo{4, &Controller::CloneCurrentObjectEx, "CloneCurrentObjectEx"}, + FunctionInfo{5, &Controller::SetPointerBufferSize, "SetPointerBufferSize"}, //TODO: where does this come from }; RegisterHandlers(functions); } diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 0137a3be66..63bd7051ca 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -1083,59 +1083,6 @@ void BSD_USA::OnProxyPacketReceived(const Network::ProxyPacket& packet) { BSD_USA::BSD_USA(Core::System& system_, const char* name, bool is_user_) : ServiceFramework{system_, name} , is_user{is_user_} { - // clang-format off - static const FunctionInfo functions[] = { - {0, &BSD_USA::RegisterClient, "RegisterClient"}, - {1, &BSD_USA::StartMonitoring, "StartMonitoring"}, - {2, &BSD_USA::Socket, "Socket"}, - {3, &BSD_USA::SocketExempt, "SocketExempt"}, - {4, nullptr, "Open"}, - {5, &BSD_USA::Select, "Select"}, - {6, &BSD_USA::Poll, "Poll"}, - {7, nullptr, "Sysctl"}, - {8, &BSD_USA::Recv, "Recv"}, - {9, &BSD_USA::RecvFrom, "RecvFrom"}, - {10, &BSD_USA::Send, "Send"}, - {11, &BSD_USA::SendTo, "SendTo"}, - {12, &BSD_USA::Accept, "Accept"}, - {13, &BSD_USA::Bind, "Bind"}, - {14, &BSD_USA::Connect, "Connect"}, - {15, &BSD_USA::GetPeerName, "GetPeerName"}, - {16, &BSD_USA::GetSockName, "GetSockName"}, - {17, &BSD_USA::GetSockOpt, "GetSockOpt"}, - {18, &BSD_USA::Listen, "Listen"}, - {19, nullptr, "Ioctl"}, - {20, &BSD_USA::Fcntl, "Fcntl"}, - {21, &BSD_USA::SetSockOpt, "SetSockOpt"}, - {22, &BSD_USA::Shutdown, "Shutdown"}, - {23, nullptr, "ShutdownAllSockets"}, - {24, &BSD_USA::Write, "Write"}, - {25, &BSD_USA::Read, "Read"}, - {26, &BSD_USA::Close, "Close"}, - {27, &BSD_USA::DuplicateSocket, "DuplicateSocket"}, - {28, nullptr, "GetResourceStatistics"}, - {29, nullptr, "RecvMMsg"}, //3.0.0+ - {30, nullptr, "SendMMsg"}, //3.0.0+ - {31, &BSD_USA::EventFd, "EventFd"}, //7.0.0+ - {32, nullptr, "RegisterResourceStatisticsName"}, //7.0.0+ - {33, nullptr, "RegisterClientShared"}, //10.0.0+ - {34, nullptr, "GetSocketStatistics"}, //15.0.0+ - {35, nullptr, "NifIoctl"}, //17.0.0+ - {36, nullptr, "Unknown36"}, //18.0.0+ - {37, nullptr, "Unknown37"}, //18.0.0+ - {38, nullptr, "Unknown38"}, //18.0.0+ - {39, nullptr, "Unknown39"}, //20.0.0+ - {40, nullptr, "Unknown40"}, //20.0.0+ - {41, nullptr, "Unknown41"}, //21.0.0+ - {42, nullptr, "Unknown42"}, //21.0.0+ - {43, nullptr, "Unknown43"}, //21.0.0+ - {200, nullptr, "SetThreadCoreMask"}, //15.0.0+ - {201, nullptr, "GetThreadCoreMask"}, //15.0.0+ - }; - // clang-format on - - RegisterHandlers(functions); - if (auto room_member = Network::GetRoomMember().lock()) { proxy_packet_received = room_member->BindOnProxyPacketReceived( [this](const Network::ProxyPacket& packet) { OnProxyPacketReceived(packet); }); @@ -1156,40 +1103,12 @@ std::unique_lock BSD_USA::LockService() noexcept { BSDCFG::BSDCFG(Core::System& system_, const char *name) : ServiceFramework{system_, name} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "SetIfUp"}, - {1, nullptr, "SetIfUpWithEvent"}, - {2, nullptr, "CancelIf"}, - {3, nullptr, "SetIfDown"}, - {4, nullptr, "GetIfState"}, - {5, nullptr, "DhcpRenew"}, - {6, nullptr, "AddStaticArpEntry"}, - {7, nullptr, "RemoveArpEntry"}, - {8, nullptr, "LookupArpEntry"}, - {9, nullptr, "LookupArpEntry2"}, - {10, nullptr, "ClearArpEntries"}, - {11, nullptr, "ClearArpEntries2"}, - {12, nullptr, "PrintArpEntries"}, - {13, nullptr, "Unknown13"}, - {14, nullptr, "Unknown14"}, - {15, nullptr, "Unknown15"}, - }; - // clang-format on - - RegisterHandlers(functions); } BSDCFG::~BSDCFG() = default; BSD_NU::BSD_NU(Core::System& system_) : ServiceFramework{system_, "bsd:nu"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "CreateUserService"}, - }; - // clang-format on - RegisterHandlers(functions); } BSD_NU::~BSD_NU() = default; diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index b542e196f0..b4a6884bd8 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h @@ -189,6 +189,58 @@ private: protected: std::unique_lock LockService() noexcept override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &BSD_USA::RegisterClient, "RegisterClient"}, + FunctionInfo{1, &BSD_USA::StartMonitoring, "StartMonitoring"}, + FunctionInfo{2, &BSD_USA::Socket, "Socket"}, + FunctionInfo{3, &BSD_USA::SocketExempt, "SocketExempt"}, + FunctionInfo{4, nullptr, "Open"}, + FunctionInfo{5, &BSD_USA::Select, "Select"}, + FunctionInfo{6, &BSD_USA::Poll, "Poll"}, + FunctionInfo{7, nullptr, "Sysctl"}, + FunctionInfo{8, &BSD_USA::Recv, "Recv"}, + FunctionInfo{9, &BSD_USA::RecvFrom, "RecvFrom"}, + FunctionInfo{10, &BSD_USA::Send, "Send"}, + FunctionInfo{11, &BSD_USA::SendTo, "SendTo"}, + FunctionInfo{12, &BSD_USA::Accept, "Accept"}, + FunctionInfo{13, &BSD_USA::Bind, "Bind"}, + FunctionInfo{14, &BSD_USA::Connect, "Connect"}, + FunctionInfo{15, &BSD_USA::GetPeerName, "GetPeerName"}, + FunctionInfo{16, &BSD_USA::GetSockName, "GetSockName"}, + FunctionInfo{17, &BSD_USA::GetSockOpt, "GetSockOpt"}, + FunctionInfo{18, &BSD_USA::Listen, "Listen"}, + FunctionInfo{19, nullptr, "Ioctl"}, + FunctionInfo{20, &BSD_USA::Fcntl, "Fcntl"}, + FunctionInfo{21, &BSD_USA::SetSockOpt, "SetSockOpt"}, + FunctionInfo{22, &BSD_USA::Shutdown, "Shutdown"}, + FunctionInfo{23, nullptr, "ShutdownAllSockets"}, + FunctionInfo{24, &BSD_USA::Write, "Write"}, + FunctionInfo{25, &BSD_USA::Read, "Read"}, + FunctionInfo{26, &BSD_USA::Close, "Close"}, + FunctionInfo{27, &BSD_USA::DuplicateSocket, "DuplicateSocket"}, + FunctionInfo{28, nullptr, "GetResourceStatistics"}, + FunctionInfo{29, nullptr, "RecvMMsg"}, //3.0.0+ + FunctionInfo{30, nullptr, "SendMMsg"}, //3.0.0+ + FunctionInfo{31, &BSD_USA::EventFd, "EventFd"}, //7.0.0+ + FunctionInfo{32, nullptr, "RegisterResourceStatisticsName"}, //7.0.0+ + FunctionInfo{33, nullptr, "RegisterClientShared"}, //10.0.0+ + FunctionInfo{34, nullptr, "GetSocketStatistics"}, //15.0.0+ + FunctionInfo{35, nullptr, "NifIoctl"}, //17.0.0+ + FunctionInfo{36, nullptr, "Unknown36"}, //18.0.0+ + FunctionInfo{37, nullptr, "Unknown37"}, //18.0.0+ + FunctionInfo{38, nullptr, "Unknown38"}, //18.0.0+ + FunctionInfo{39, nullptr, "Unknown39"}, //20.0.0+ + FunctionInfo{40, nullptr, "Unknown40"}, //20.0.0+ + FunctionInfo{41, nullptr, "Unknown41"}, //21.0.0+ + FunctionInfo{42, nullptr, "Unknown42"}, //21.0.0+ + FunctionInfo{43, nullptr, "Unknown43"}, //21.0.0+ + FunctionInfo{200, nullptr, "SetThreadCoreMask"}, //15.0.0+ + FunctionInfo{201, nullptr, "GetThreadCoreMask"} //15.0.0+ + ); bool is_user = false; }; @@ -196,12 +248,41 @@ class BSDCFG final : public ServiceFramework { public: explicit BSDCFG(Core::System& system_, const char *name); ~BSDCFG() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "SetIfUp"}, + FunctionInfo{1, nullptr, "SetIfUpWithEvent"}, + FunctionInfo{2, nullptr, "CancelIf"}, + FunctionInfo{3, nullptr, "SetIfDown"}, + FunctionInfo{4, nullptr, "GetIfState"}, + FunctionInfo{5, nullptr, "DhcpRenew"}, + FunctionInfo{6, nullptr, "AddStaticArpEntry"}, + FunctionInfo{7, nullptr, "RemoveArpEntry"}, + FunctionInfo{8, nullptr, "LookupArpEntry"}, + FunctionInfo{9, nullptr, "LookupArpEntry2"}, + FunctionInfo{10, nullptr, "ClearArpEntries"}, + FunctionInfo{11, nullptr, "ClearArpEntries2"}, + FunctionInfo{12, nullptr, "PrintArpEntries"}, + FunctionInfo{13, nullptr, "Unknown13"}, + FunctionInfo{14, nullptr, "Unknown14"}, + FunctionInfo{15, nullptr, "Unknown15"} + ); }; class BSD_NU final : public ServiceFramework { public: explicit BSD_NU(Core::System& system_); ~BSD_NU() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "CreateUserService"} + ); }; } // namespace Service::Sockets diff --git a/src/core/hle/service/sockets/nsd.cpp b/src/core/hle/service/sockets/nsd.cpp index 241f2971ca..8f042aee75 100644 --- a/src/core/hle/service/sockets/nsd.cpp +++ b/src/core/hle/service/sockets/nsd.cpp @@ -29,38 +29,6 @@ struct EnvironmentIdentifier { static_assert(sizeof(EnvironmentIdentifier) == 0x8); NSD::NSD(Core::System& system_, const char* name) : ServiceFramework{system_, name} { - // clang-format off - static const FunctionInfo functions[] = { - {5, nullptr, "GetSettingUrl"}, - {10, nullptr, "GetSettingName"}, - {11, &NSD::GetEnvironmentIdentifier, "GetEnvironmentIdentifier"}, - {12, nullptr, "GetDeviceId"}, - {13, nullptr, "DeleteSettings"}, - {14, nullptr, "ImportSettings"}, - {15, &NSD::SetChangeEnvironmentIdentifierDisabled, "SetChangeEnvironmentIdentifierDisabled"}, - {20, &NSD::Resolve, "Resolve"}, - {21, &NSD::ResolveEx, "ResolveEx"}, - {30, nullptr, "GetNasServiceSetting"}, - {31, nullptr, "GetNasServiceSettingEx"}, - {40, nullptr, "GetNasRequestFqdn"}, - {41, nullptr, "GetNasRequestFqdnEx"}, - {42, nullptr, "GetNasApiFqdn"}, - {43, nullptr, "GetNasApiFqdnEx"}, - {50, nullptr, "GetCurrentSetting"}, - {51, nullptr, "WriteTestParameter"}, - {52, nullptr, "ReadTestParameter"}, - {60, nullptr, "ReadSaveDataFromFsForTest"}, - {61, nullptr, "WriteSaveDataToFsForTest"}, - {62, nullptr, "DeleteSaveDataOfFsForTest"}, - {63, nullptr, "IsChangeEnvironmentIdentifierDisabled"}, - {64, nullptr, "SetWithoutDomainExchangeFqdns"}, - {100, &NSD::GetApplicationServerEnvironmentType, "GetApplicationServerEnvironmentType"}, - {101, nullptr, "SetApplicationServerEnvironmentType"}, - {102, nullptr, "DeleteApplicationServerEnvironmentType"}, - }; - // clang-format on - - RegisterHandlers(functions); } static std::string ResolveImpl(const std::string& fqdn_in) { diff --git a/src/core/hle/service/sockets/nsd.h b/src/core/hle/service/sockets/nsd.h index e4a4588467..220f076e8e 100644 --- a/src/core/hle/service/sockets/nsd.h +++ b/src/core/hle/service/sockets/nsd.h @@ -25,6 +25,38 @@ private: void ResolveEx(HLERequestContext& ctx); void GetEnvironmentIdentifier(HLERequestContext& ctx); void GetApplicationServerEnvironmentType(HLERequestContext& ctx); + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{5, nullptr, "GetSettingUrl"}, + FunctionInfo{10, nullptr, "GetSettingName"}, + FunctionInfo{11, &NSD::GetEnvironmentIdentifier, "GetEnvironmentIdentifier"}, + FunctionInfo{12, nullptr, "GetDeviceId"}, + FunctionInfo{13, nullptr, "DeleteSettings"}, + FunctionInfo{14, nullptr, "ImportSettings"}, + FunctionInfo{15, &NSD::SetChangeEnvironmentIdentifierDisabled, "SetChangeEnvironmentIdentifierDisabled"}, + FunctionInfo{20, &NSD::Resolve, "Resolve"}, + FunctionInfo{21, &NSD::ResolveEx, "ResolveEx"}, + FunctionInfo{30, nullptr, "GetNasServiceSetting"}, + FunctionInfo{31, nullptr, "GetNasServiceSettingEx"}, + FunctionInfo{40, nullptr, "GetNasRequestFqdn"}, + FunctionInfo{41, nullptr, "GetNasRequestFqdnEx"}, + FunctionInfo{42, nullptr, "GetNasApiFqdn"}, + FunctionInfo{43, nullptr, "GetNasApiFqdnEx"}, + FunctionInfo{50, nullptr, "GetCurrentSetting"}, + FunctionInfo{51, nullptr, "WriteTestParameter"}, + FunctionInfo{52, nullptr, "ReadTestParameter"}, + FunctionInfo{60, nullptr, "ReadSaveDataFromFsForTest"}, + FunctionInfo{61, nullptr, "WriteSaveDataToFsForTest"}, + FunctionInfo{62, nullptr, "DeleteSaveDataOfFsForTest"}, + FunctionInfo{63, nullptr, "IsChangeEnvironmentIdentifierDisabled"}, + FunctionInfo{64, nullptr, "SetWithoutDomainExchangeFqdns"}, + FunctionInfo{100, &NSD::GetApplicationServerEnvironmentType, "GetApplicationServerEnvironmentType"}, + FunctionInfo{101, nullptr, "SetApplicationServerEnvironmentType"}, + FunctionInfo{102, nullptr, "DeleteApplicationServerEnvironmentType"} + ); }; } // namespace Service::Sockets diff --git a/src/core/hle/service/sockets/sfdnsres.cpp b/src/core/hle/service/sockets/sfdnsres.cpp index ab5cfb4e19..c89705356e 100644 --- a/src/core/hle/service/sockets/sfdnsres.cpp +++ b/src/core/hle/service/sockets/sfdnsres.cpp @@ -391,14 +391,6 @@ void SFDNSRES::ResolverSetOptionRequest(HLERequestContext& ctx) { DNS_PRIV::DNS_PRIV(Core::System& system_) : ServiceFramework{system_, "dns:priv"} { - // clang-format off - static const FunctionInfo functions[] = { - {0, nullptr, "Cmd0"}, - {1, nullptr, "Cmd1"}, - {2, nullptr, "Cmd2"}, - }; - // clang-format on - RegisterHandlers(functions); } DNS_PRIV::~DNS_PRIV() = default; diff --git a/src/core/hle/service/sockets/sfdnsres.h b/src/core/hle/service/sockets/sfdnsres.h index 9c77adb348..b9eab0e08a 100644 --- a/src/core/hle/service/sockets/sfdnsres.h +++ b/src/core/hle/service/sockets/sfdnsres.h @@ -31,22 +31,22 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, nullptr, "SetDnsAddressesPrivateRequest"}, - {1, nullptr, "GetDnsAddressPrivateRequest"}, - {2, &SFDNSRES::GetHostByNameRequest, "GetHostByNameRequest"}, - {3, nullptr, "GetHostByAddrRequest"}, - {4, nullptr, "GetHostStringErrorRequest"}, - {5, &SFDNSRES::GetGaiStringErrorRequest, "GetGaiStringErrorRequest"}, - {6, &SFDNSRES::GetAddrInfoRequest, "GetAddrInfoRequest"}, - {7, nullptr, "GetNameInfoRequest"}, - {8, nullptr, "RequestCancelHandleRequest"}, - {9, nullptr, "CancelRequest"}, - {10, &SFDNSRES::GetHostByNameRequestWithOptions, "GetHostByNameRequestWithOptions"}, - {11, nullptr, "GetHostByAddrRequestWithOptions"}, - {12, &SFDNSRES::GetAddrInfoRequestWithOptions, "GetAddrInfoRequestWithOptions"}, - {13, nullptr, "GetNameInfoRequestWithOptions"}, - {14, &SFDNSRES::ResolverSetOptionRequest, "ResolverSetOptionRequest"}, - {15, nullptr, "ResolverGetOptionRequest"} + FunctionInfo{0, nullptr, "SetDnsAddressesPrivateRequest"}, + FunctionInfo{1, nullptr, "GetDnsAddressPrivateRequest"}, + FunctionInfo{2, &SFDNSRES::GetHostByNameRequest, "GetHostByNameRequest"}, + FunctionInfo{3, nullptr, "GetHostByAddrRequest"}, + FunctionInfo{4, nullptr, "GetHostStringErrorRequest"}, + FunctionInfo{5, &SFDNSRES::GetGaiStringErrorRequest, "GetGaiStringErrorRequest"}, + FunctionInfo{6, &SFDNSRES::GetAddrInfoRequest, "GetAddrInfoRequest"}, + FunctionInfo{7, nullptr, "GetNameInfoRequest"}, + FunctionInfo{8, nullptr, "RequestCancelHandleRequest"}, + FunctionInfo{9, nullptr, "CancelRequest"}, + FunctionInfo{10, &SFDNSRES::GetHostByNameRequestWithOptions, "GetHostByNameRequestWithOptions"}, + FunctionInfo{11, nullptr, "GetHostByAddrRequestWithOptions"}, + FunctionInfo{12, &SFDNSRES::GetAddrInfoRequestWithOptions, "GetAddrInfoRequestWithOptions"}, + FunctionInfo{13, nullptr, "GetNameInfoRequestWithOptions"}, + FunctionInfo{14, &SFDNSRES::ResolverSetOptionRequest, "ResolverSetOptionRequest"}, + FunctionInfo{15, nullptr, "ResolverGetOptionRequest"} ); }; @@ -54,6 +54,15 @@ class DNS_PRIV final : public ServiceFramework { public: explicit DNS_PRIV(Core::System& system_); ~DNS_PRIV() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, nullptr, "Cmd0"}, + FunctionInfo{1, nullptr, "Cmd1"}, + FunctionInfo{2, nullptr, "Cmd2"} + ); }; } // namespace Service::Sockets diff --git a/src/core/hle/service/spl/spl.cpp b/src/core/hle/service/spl/spl.cpp index 81be99c360..ad0251fac5 100644 --- a/src/core/hle/service/spl/spl.cpp +++ b/src/core/hle/service/spl/spl.cpp @@ -8,181 +8,22 @@ namespace Service::SPL { -SPL::SPL(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:") { - // clang-format off - static const FunctionInfo functions[] = { - {0, &SPL::GetConfig, "GetConfig"}, - {1, &SPL::ModularExponentiate, "ModularExponentiate"}, - {5, &SPL::SetConfig, "SetConfig"}, - {7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, - {11, &SPL::IsDevelopment, "IsDevelopment"}, - {24, &SPL::SetBootReason, "SetBootReason"}, - {25, &SPL::GetBootReason, "GetBootReason"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - +SPL::SPL(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "spl:") {} SPL::~SPL() = default; -SPL_MIG::SPL_MIG(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:mig") { - // clang-format off - static const FunctionInfo functions[] = { - {0, &SPL::GetConfig, "GetConfig"}, - {1, &SPL::ModularExponentiate, "ModularExponentiate"}, - {2, &SPL::GenerateAesKek, "GenerateAesKek"}, - {3, nullptr, "LoadAesKey"}, - {4, &SPL::GenerateAesKey, "GenerateAesKey"}, - {5, &SPL::SetConfig, "SetConfig"}, - {7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, - {11, &SPL::IsDevelopment, "IsDevelopment"}, - {14, nullptr, "DecryptAesKey"}, - {15, nullptr, "CryptAesCtr"}, - {16, nullptr, "ComputeCmac"}, - {21, nullptr, "AllocateAesKeyslot"}, - {22, nullptr, "DeallocateAesKeySlot"}, - {23, nullptr, "GetAesKeyslotAvailableEvent"}, - {24, &SPL::SetBootReason, "SetBootReason"}, - {25, &SPL::GetBootReason, "GetBootReason"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - +SPL_MIG::SPL_MIG(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "spl:mig") {} SPL_MIG::~SPL_MIG() = default; -SPL_FS::SPL_FS(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:fs") { - // clang-format off - static const FunctionInfo functions[] = { - {0, &SPL::GetConfig, "GetConfig"}, - {1, &SPL::ModularExponentiate, "ModularExponentiate"}, - {2, nullptr, "GenerateAesKek"}, - {3, nullptr, "LoadAesKey"}, - {4, nullptr, "GenerateAesKey"}, - {5, &SPL::SetConfig, "SetConfig"}, - {7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, - {9, nullptr, "ImportLotusKey"}, - {10, nullptr, "DecryptLotusMessage"}, - {11, &SPL::IsDevelopment, "IsDevelopment"}, - {12, nullptr, "GenerateSpecificAesKey"}, - {14, nullptr, "DecryptAesKey"}, - {15, nullptr, "CryptAesCtr"}, - {16, nullptr, "ComputeCmac"}, - {19, nullptr, "LoadTitleKey"}, - {21, nullptr, "AllocateAesKeyslot"}, - {22, nullptr, "DeallocateAesKeySlot"}, - {23, nullptr, "GetAesKeyslotAvailableEvent"}, - {24, &SPL::SetBootReason, "SetBootReason"}, - {25, &SPL::GetBootReason, "GetBootReason"}, - {31, nullptr, "GetPackage2Hash"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - +SPL_FS::SPL_FS(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "spl:fs") {} SPL_FS::~SPL_FS() = default; -SPL_SSL::SPL_SSL(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:ssl") { - // clang-format off - static const FunctionInfo functions[] = { - {0, &SPL::GetConfig, "GetConfig"}, - {1, &SPL::ModularExponentiate, "ModularExponentiate"}, - {2, nullptr, "GenerateAesKek"}, - {3, nullptr, "LoadAesKey"}, - {4, nullptr, "GenerateAesKey"}, - {5, &SPL::SetConfig, "SetConfig"}, - {7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, - {11, &SPL::IsDevelopment, "IsDevelopment"}, - {13, nullptr, "DecryptDeviceUniqueData"}, - {14, nullptr, "DecryptAesKey"}, - {15, nullptr, "CryptAesCtr"}, - {16, nullptr, "ComputeCmac"}, - {21, nullptr, "AllocateAesKeyslot"}, - {22, nullptr, "DeallocateAesKeySlot"}, - {23, nullptr, "GetAesKeyslotAvailableEvent"}, - {24, &SPL::SetBootReason, "SetBootReason"}, - {25, &SPL::GetBootReason, "GetBootReason"}, - {26, nullptr, "DecryptAndStoreSslClientCertKey"}, - {27, nullptr, "ModularExponentiateWithSslClientCertKey"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - +SPL_SSL::SPL_SSL(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "spl:ssl") {} SPL_SSL::~SPL_SSL() = default; -SPL_ES::SPL_ES(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:es") { - // clang-format off - static const FunctionInfo functions[] = { - {0, &SPL::GetConfig, "GetConfig"}, - {1, &SPL::ModularExponentiate, "ModularExponentiate"}, - {2, nullptr, "GenerateAesKek"}, - {3, nullptr, "LoadAesKey"}, - {4, nullptr, "GenerateAesKey"}, - {5, &SPL::SetConfig, "SetConfig"}, - {7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, - {11, &SPL::IsDevelopment, "IsDevelopment"}, - {13, nullptr, "DecryptDeviceUniqueData"}, - {14, nullptr, "DecryptAesKey"}, - {15, nullptr, "CryptAesCtr"}, - {16, nullptr, "ComputeCmac"}, - {17, nullptr, "ImportEsKey"}, - {18, nullptr, "UnwrapTitleKey"}, - {20, nullptr, "PrepareEsCommonKey"}, - {21, nullptr, "AllocateAesKeyslot"}, - {22, nullptr, "DeallocateAesKeySlot"}, - {23, nullptr, "GetAesKeyslotAvailableEvent"}, - {24, &SPL::SetBootReason, "SetBootReason"}, - {25, &SPL::GetBootReason, "GetBootReason"}, - {28, nullptr, "DecryptAndStoreDrmDeviceCertKey"}, - {29, nullptr, "ModularExponentiateWithDrmDeviceCertKey"}, - {31, nullptr, "PrepareEsArchiveKey"}, - {32, nullptr, "LoadPreparedAesKey"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - +SPL_ES::SPL_ES(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "spl:es") {} SPL_ES::~SPL_ES() = default; -SPL_MANU::SPL_MANU(Core::System& system_, std::shared_ptr module_) - : Interface(system_, std::move(module_), "spl:manu") { - // clang-format off - static const FunctionInfo functions[] = { - {0, &SPL::GetConfig, "GetConfig"}, - {1, &SPL::ModularExponentiate, "ModularExponentiate"}, - {2, nullptr, "GenerateAesKek"}, - {3, nullptr, "LoadAesKey"}, - {4, nullptr, "GenerateAesKey"}, - {5, &SPL::SetConfig, "SetConfig"}, - {7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, - {11, &SPL::IsDevelopment, "IsDevelopment"}, - {13, nullptr, "DecryptDeviceUniqueData"}, - {14, nullptr, "DecryptAesKey"}, - {15, nullptr, "CryptAesCtr"}, - {16, nullptr, "ComputeCmac"}, - {21, nullptr, "AllocateAesKeyslot"}, - {22, nullptr, "DeallocateAesKeySlot"}, - {23, nullptr, "GetAesKeyslotAvailableEvent"}, - {24, &SPL::SetBootReason, "SetBootReason"}, - {25, &SPL::GetBootReason, "GetBootReason"}, - {30, nullptr, "ReencryptDeviceUniqueData"}, - }; - // clang-format on - - RegisterHandlers(functions); -} - +SPL_MANU::SPL_MANU(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "spl:manu") {} SPL_MANU::~SPL_MANU() = default; } // namespace Service::SPL diff --git a/src/core/hle/service/spl/spl.h b/src/core/hle/service/spl/spl.h index 83a3cda539..619713ed65 100644 --- a/src/core/hle/service/spl/spl.h +++ b/src/core/hle/service/spl/spl.h @@ -18,36 +18,177 @@ class SPL final : public Module::Interface { public: explicit SPL(Core::System& system_, std::shared_ptr module_); ~SPL() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &SPL::GetConfig, "GetConfig"}, + FunctionInfo{1, &SPL::ModularExponentiate, "ModularExponentiate"}, + FunctionInfo{5, &SPL::SetConfig, "SetConfig"}, + FunctionInfo{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, + FunctionInfo{11, &SPL::IsDevelopment, "IsDevelopment"}, + FunctionInfo{24, &SPL::SetBootReason, "SetBootReason"}, + FunctionInfo{25, &SPL::GetBootReason, "GetBootReason"} + ); }; class SPL_MIG final : public Module::Interface { public: explicit SPL_MIG(Core::System& system_, std::shared_ptr module_); ~SPL_MIG() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &SPL::GetConfig, "GetConfig"}, + FunctionInfo{1, &SPL::ModularExponentiate, "ModularExponentiate"}, + FunctionInfo{2, &SPL::GenerateAesKek, "GenerateAesKek"}, + FunctionInfo{3, nullptr, "LoadAesKey"}, + FunctionInfo{4, &SPL::GenerateAesKey, "GenerateAesKey"}, + FunctionInfo{5, &SPL::SetConfig, "SetConfig"}, + FunctionInfo{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, + FunctionInfo{11, &SPL::IsDevelopment, "IsDevelopment"}, + FunctionInfo{14, nullptr, "DecryptAesKey"}, + FunctionInfo{15, nullptr, "CryptAesCtr"}, + FunctionInfo{16, nullptr, "ComputeCmac"}, + FunctionInfo{21, nullptr, "AllocateAesKeyslot"}, + FunctionInfo{22, nullptr, "DeallocateAesKeySlot"}, + FunctionInfo{23, nullptr, "GetAesKeyslotAvailableEvent"}, + FunctionInfo{24, &SPL::SetBootReason, "SetBootReason"}, + FunctionInfo{25, &SPL::GetBootReason, "GetBootReason"} + ); }; class SPL_FS final : public Module::Interface { public: explicit SPL_FS(Core::System& system_, std::shared_ptr module_); ~SPL_FS() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &SPL::GetConfig, "GetConfig"}, + FunctionInfo{1, &SPL::ModularExponentiate, "ModularExponentiate"}, + FunctionInfo{2, nullptr, "GenerateAesKek"}, + FunctionInfo{3, nullptr, "LoadAesKey"}, + FunctionInfo{4, nullptr, "GenerateAesKey"}, + FunctionInfo{5, &SPL::SetConfig, "SetConfig"}, + FunctionInfo{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, + FunctionInfo{9, nullptr, "ImportLotusKey"}, + FunctionInfo{10, nullptr, "DecryptLotusMessage"}, + FunctionInfo{11, &SPL::IsDevelopment, "IsDevelopment"}, + FunctionInfo{12, nullptr, "GenerateSpecificAesKey"}, + FunctionInfo{14, nullptr, "DecryptAesKey"}, + FunctionInfo{15, nullptr, "CryptAesCtr"}, + FunctionInfo{16, nullptr, "ComputeCmac"}, + FunctionInfo{19, nullptr, "LoadTitleKey"}, + FunctionInfo{21, nullptr, "AllocateAesKeyslot"}, + FunctionInfo{22, nullptr, "DeallocateAesKeySlot"}, + FunctionInfo{23, nullptr, "GetAesKeyslotAvailableEvent"}, + FunctionInfo{24, &SPL::SetBootReason, "SetBootReason"}, + FunctionInfo{25, &SPL::GetBootReason, "GetBootReason"}, + FunctionInfo{31, nullptr, "GetPackage2Hash"} + ); }; class SPL_SSL final : public Module::Interface { public: explicit SPL_SSL(Core::System& system_, std::shared_ptr module_); ~SPL_SSL() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &SPL::GetConfig, "GetConfig"}, + FunctionInfo{1, &SPL::ModularExponentiate, "ModularExponentiate"}, + FunctionInfo{2, nullptr, "GenerateAesKek"}, + FunctionInfo{3, nullptr, "LoadAesKey"}, + FunctionInfo{4, nullptr, "GenerateAesKey"}, + FunctionInfo{5, &SPL::SetConfig, "SetConfig"}, + FunctionInfo{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, + FunctionInfo{11, &SPL::IsDevelopment, "IsDevelopment"}, + FunctionInfo{13, nullptr, "DecryptDeviceUniqueData"}, + FunctionInfo{14, nullptr, "DecryptAesKey"}, + FunctionInfo{15, nullptr, "CryptAesCtr"}, + FunctionInfo{16, nullptr, "ComputeCmac"}, + FunctionInfo{21, nullptr, "AllocateAesKeyslot"}, + FunctionInfo{22, nullptr, "DeallocateAesKeySlot"}, + FunctionInfo{23, nullptr, "GetAesKeyslotAvailableEvent"}, + FunctionInfo{24, &SPL::SetBootReason, "SetBootReason"}, + FunctionInfo{25, &SPL::GetBootReason, "GetBootReason"}, + FunctionInfo{26, nullptr, "DecryptAndStoreSslClientCertKey"}, + FunctionInfo{27, nullptr, "ModularExponentiateWithSslClientCertKey"} + ); }; class SPL_ES final : public Module::Interface { public: explicit SPL_ES(Core::System& system_, std::shared_ptr module_); ~SPL_ES() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &SPL::GetConfig, "GetConfig"}, + FunctionInfo{1, &SPL::ModularExponentiate, "ModularExponentiate"}, + FunctionInfo{2, nullptr, "GenerateAesKek"}, + FunctionInfo{3, nullptr, "LoadAesKey"}, + FunctionInfo{4, nullptr, "GenerateAesKey"}, + FunctionInfo{5, &SPL::SetConfig, "SetConfig"}, + FunctionInfo{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, + FunctionInfo{11, &SPL::IsDevelopment, "IsDevelopment"}, + FunctionInfo{13, nullptr, "DecryptDeviceUniqueData"}, + FunctionInfo{14, nullptr, "DecryptAesKey"}, + FunctionInfo{15, nullptr, "CryptAesCtr"}, + FunctionInfo{16, nullptr, "ComputeCmac"}, + FunctionInfo{17, nullptr, "ImportEsKey"}, + FunctionInfo{18, nullptr, "UnwrapTitleKey"}, + FunctionInfo{20, nullptr, "PrepareEsCommonKey"}, + FunctionInfo{21, nullptr, "AllocateAesKeyslot"}, + FunctionInfo{22, nullptr, "DeallocateAesKeySlot"}, + FunctionInfo{23, nullptr, "GetAesKeyslotAvailableEvent"}, + FunctionInfo{24, &SPL::SetBootReason, "SetBootReason"}, + FunctionInfo{25, &SPL::GetBootReason, "GetBootReason"}, + FunctionInfo{28, nullptr, "DecryptAndStoreDrmDeviceCertKey"}, + FunctionInfo{29, nullptr, "ModularExponentiateWithDrmDeviceCertKey"}, + FunctionInfo{31, nullptr, "PrepareEsArchiveKey"}, + FunctionInfo{32, nullptr, "LoadPreparedAesKey"} + ); }; class SPL_MANU final : public Module::Interface { public: explicit SPL_MANU(Core::System& system_, std::shared_ptr module_); ~SPL_MANU() override; + + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{0, &SPL::GetConfig, "GetConfig"}, + FunctionInfo{1, &SPL::ModularExponentiate, "ModularExponentiate"}, + FunctionInfo{2, nullptr, "GenerateAesKek"}, + FunctionInfo{3, nullptr, "LoadAesKey"}, + FunctionInfo{4, nullptr, "GenerateAesKey"}, + FunctionInfo{5, &SPL::SetConfig, "SetConfig"}, + FunctionInfo{7, &SPL::GenerateRandomBytes, "GenerateRandomBytes"}, + FunctionInfo{11, &SPL::IsDevelopment, "IsDevelopment"}, + FunctionInfo{13, nullptr, "DecryptDeviceUniqueData"}, + FunctionInfo{14, nullptr, "DecryptAesKey"}, + FunctionInfo{15, nullptr, "CryptAesCtr"}, + FunctionInfo{16, nullptr, "ComputeCmac"}, + FunctionInfo{21, nullptr, "AllocateAesKeyslot"}, + FunctionInfo{22, nullptr, "DeallocateAesKeySlot"}, + FunctionInfo{23, nullptr, "GetAesKeyslotAvailableEvent"}, + FunctionInfo{24, &SPL::SetBootReason, "SetBootReason"}, + FunctionInfo{25, &SPL::GetBootReason, "GetBootReason"}, + FunctionInfo{30, nullptr, "ReencryptDeviceUniqueData"} + ); }; } // namespace Service::SPL diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index a86d879178..25b7631d5b 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -631,7 +631,10 @@ class ISslServiceForSystem final : public ServiceFramework public: explicit ISslServiceForSystem(Core::System& system_) : ServiceFramework{system_, "ssl:s"} { // clang-format off - static const FunctionInfo functions[] = { + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ISslServiceForSystem::CreateContext>, "CreateContext"}, FunctionInfo{1, D<&ISslServiceForSystem::GetContextCount>, "GetContextCount"}, FunctionInfo{2, D<&ISslServiceForSystem::GetCertificates>, "GetCertificates"}, @@ -646,10 +649,7 @@ class ISslServiceForSystem final : public ServiceFramework FunctionInfo{101, D<&ISslServiceForSystem::SetThreadCoreMask>, "SetThreadCoreMask"}, FunctionInfo{102, D<&ISslServiceForSystem::GetThreadCoreMask>, "GetThreadCoreMask"}, FunctionInfo{103, D<&ISslServiceForSystem::VerifySignature>, "VerifySignature"} - }; - // clang-format on - - RegisterHandlers(functions); + ); }; Result CreateContext() { diff --git a/src/core/hle/service/vi/application_display_service.cpp b/src/core/hle/service/vi/application_display_service.cpp index f179ba676a..924055885e 100644 --- a/src/core/hle/service/vi/application_display_service.cpp +++ b/src/core/hle/service/vi/application_display_service.cpp @@ -21,34 +21,6 @@ IApplicationDisplayService::IApplicationDisplayService(Core::System& system_, std::shared_ptr container) : ServiceFramework{system_, "IApplicationDisplayService"}, m_container{std::move(container)}, m_context{system, "IApplicationDisplayService"} { - // clang-format off - static const FunctionInfo functions[] = { - {100, C<&IApplicationDisplayService::GetRelayService>, "GetRelayService"}, - {101, C<&IApplicationDisplayService::GetSystemDisplayService>, "GetSystemDisplayService"}, - {102, C<&IApplicationDisplayService::GetManagerDisplayService>, "GetManagerDisplayService"}, - {103, C<&IApplicationDisplayService::GetIndirectDisplayTransactionService>, "GetIndirectDisplayTransactionService"}, - {1000, C<&IApplicationDisplayService::ListDisplays>, "ListDisplays"}, - {1010, C<&IApplicationDisplayService::OpenDisplay>, "OpenDisplay"}, - {1011, C<&IApplicationDisplayService::OpenDefaultDisplay>, "OpenDefaultDisplay"}, - {1020, C<&IApplicationDisplayService::CloseDisplay>, "CloseDisplay"}, - {1101, C<&IApplicationDisplayService::SetDisplayEnabled>, "SetDisplayEnabled"}, - {1102, C<&IApplicationDisplayService::GetDisplayResolution>, "GetDisplayResolution"}, - {2020, C<&IApplicationDisplayService::OpenLayer>, "OpenLayer"}, - {2021, C<&IApplicationDisplayService::CloseLayer>, "CloseLayer"}, - {2030, C<&IApplicationDisplayService::CreateStrayLayer>, "CreateStrayLayer"}, - {2031, C<&IApplicationDisplayService::DestroyStrayLayer>, "DestroyStrayLayer"}, - {2101, C<&IApplicationDisplayService::SetLayerScalingMode>, "SetLayerScalingMode"}, - {2102, C<&IApplicationDisplayService::ConvertScalingMode>, "ConvertScalingMode"}, - {2103, C<&IApplicationDisplayService::Cmd2103>, "Cmd2103"}, - {2450, C<&IApplicationDisplayService::GetIndirectLayerImageMap>, "GetIndirectLayerImageMap"}, - {2451, nullptr, "GetIndirectLayerImageCropMap"}, - {2460, C<&IApplicationDisplayService::GetIndirectLayerImageRequiredMemoryInfo>, "GetIndirectLayerImageRequiredMemoryInfo"}, - {5202, C<&IApplicationDisplayService::GetDisplayVsyncEvent>, "GetDisplayVsyncEvent"}, - {5203, nullptr, "GetDisplayVsyncEventForDebug"}, - }; - // clang-format on - - RegisterHandlers(functions); } IApplicationDisplayService::~IApplicationDisplayService() { diff --git a/src/core/hle/service/vi/application_display_service.h b/src/core/hle/service/vi/application_display_service.h index d2db391efd..c06efaff65 100644 --- a/src/core/hle/service/vi/application_display_service.h +++ b/src/core/hle/service/vi/application_display_service.h @@ -74,8 +74,34 @@ public: s64 width, s64 height); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{100, C<&IApplicationDisplayService::GetRelayService>, "GetRelayService"}, + FunctionInfo{101, C<&IApplicationDisplayService::GetSystemDisplayService>, "GetSystemDisplayService"}, + FunctionInfo{102, C<&IApplicationDisplayService::GetManagerDisplayService>, "GetManagerDisplayService"}, + FunctionInfo{103, C<&IApplicationDisplayService::GetIndirectDisplayTransactionService>, "GetIndirectDisplayTransactionService"}, + FunctionInfo{1000, C<&IApplicationDisplayService::ListDisplays>, "ListDisplays"}, + FunctionInfo{1010, C<&IApplicationDisplayService::OpenDisplay>, "OpenDisplay"}, + FunctionInfo{1011, C<&IApplicationDisplayService::OpenDefaultDisplay>, "OpenDefaultDisplay"}, + FunctionInfo{1020, C<&IApplicationDisplayService::CloseDisplay>, "CloseDisplay"}, + FunctionInfo{1101, C<&IApplicationDisplayService::SetDisplayEnabled>, "SetDisplayEnabled"}, + FunctionInfo{1102, C<&IApplicationDisplayService::GetDisplayResolution>, "GetDisplayResolution"}, + FunctionInfo{2020, C<&IApplicationDisplayService::OpenLayer>, "OpenLayer"}, + FunctionInfo{2021, C<&IApplicationDisplayService::CloseLayer>, "CloseLayer"}, + FunctionInfo{2030, C<&IApplicationDisplayService::CreateStrayLayer>, "CreateStrayLayer"}, + FunctionInfo{2031, C<&IApplicationDisplayService::DestroyStrayLayer>, "DestroyStrayLayer"}, + FunctionInfo{2101, C<&IApplicationDisplayService::SetLayerScalingMode>, "SetLayerScalingMode"}, + FunctionInfo{2102, C<&IApplicationDisplayService::ConvertScalingMode>, "ConvertScalingMode"}, + FunctionInfo{2103, C<&IApplicationDisplayService::Cmd2103>, "Cmd2103"}, + FunctionInfo{2450, C<&IApplicationDisplayService::GetIndirectLayerImageMap>, "GetIndirectLayerImageMap"}, + FunctionInfo{2451, nullptr, "GetIndirectLayerImageCropMap"}, + FunctionInfo{2460, C<&IApplicationDisplayService::GetIndirectLayerImageRequiredMemoryInfo>, "GetIndirectLayerImageRequiredMemoryInfo"}, + FunctionInfo{5202, C<&IApplicationDisplayService::GetDisplayVsyncEvent>, "GetDisplayVsyncEvent"}, + FunctionInfo{5203, nullptr, "GetDisplayVsyncEventForDebug"} + ); const std::shared_ptr m_container; - KernelHelpers::ServiceContext m_context; std::mutex m_lock{}; std::set m_open_layer_ids{}; diff --git a/src/core/hle/service/vi/application_root_service.h b/src/core/hle/service/vi/application_root_service.h index 0947ac48f0..cc0578de52 100644 --- a/src/core/hle/service/vi/application_root_service.h +++ b/src/core/hle/service/vi/application_root_service.h @@ -31,8 +31,8 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {0, C<&IApplicationRootService::GetDisplayService>, "GetDisplayService"}, - {1, nullptr, "GetDisplayServiceWithProxyNameExchange"} + FunctionInfo{0, C<&IApplicationRootService::GetDisplayService>, "GetDisplayService"}, + FunctionInfo{1, nullptr, "GetDisplayServiceWithProxyNameExchange"} ); const std::shared_ptr m_container; }; diff --git a/src/core/hle/service/vi/manager_display_service.cpp b/src/core/hle/service/vi/manager_display_service.cpp index e4d22ca11c..ec5387781e 100644 --- a/src/core/hle/service/vi/manager_display_service.cpp +++ b/src/core/hle/service/vi/manager_display_service.cpp @@ -13,93 +13,6 @@ namespace Service::VI { IManagerDisplayService::IManagerDisplayService(Core::System& system_, std::shared_ptr container) : ServiceFramework{system_, "IManagerDisplayService"}, m_container{std::move(container)} { - // clang-format off - static const FunctionInfo functions[] = { - {200, nullptr, "AllocateProcessHeapBlock"}, - {201, nullptr, "FreeProcessHeapBlock"}, - {1102, nullptr, "GetDisplayResolution"}, - {2010, C<&IManagerDisplayService::CreateManagedLayer>, "CreateManagedLayer"}, - {2011, C<&IManagerDisplayService::DestroyManagedLayer>, "DestroyManagedLayer"}, - {2012, nullptr, "CreateStrayLayer"}, - {2050, nullptr, "CreateIndirectLayer"}, - {2051, nullptr, "DestroyIndirectLayer"}, - {2052, nullptr, "CreateIndirectProducerEndPoint"}, - {2053, nullptr, "DestroyIndirectProducerEndPoint"}, - {2054, nullptr, "CreateIndirectConsumerEndPoint"}, - {2055, nullptr, "DestroyIndirectConsumerEndPoint"}, - {2060, nullptr, "CreateWatermarkCompositor"}, - {2062, nullptr, "SetWatermarkText"}, - {2063, nullptr, "SetWatermarkLayerStacks"}, - {2300, nullptr, "AcquireLayerTexturePresentingEvent"}, - {2301, nullptr, "ReleaseLayerTexturePresentingEvent"}, - {2302, nullptr, "GetDisplayHotplugEvent"}, - {2303, nullptr, "GetDisplayModeChangedEvent"}, - {2402, nullptr, "GetDisplayHotplugState"}, - {2501, nullptr, "GetCompositorErrorInfo"}, - {2601, nullptr, "GetDisplayErrorEvent"}, - {2701, nullptr, "GetDisplayFatalErrorEvent"}, - {4201, nullptr, "SetDisplayAlpha"}, - {4203, nullptr, "SetDisplayLayerStack"}, - {4205, nullptr, "SetDisplayPowerState"}, - {4206, nullptr, "SetDefaultDisplay"}, - {4207, nullptr, "ResetDisplayPanel"}, - {4208, nullptr, "SetDisplayFatalErrorEnabled"}, - {4209, nullptr, "IsDisplayPanelOn"}, - {4300, nullptr, "GetInternalPanelId"}, - {6000, C<&IManagerDisplayService::AddToLayerStack>, "AddToLayerStack"}, - {6001, nullptr, "RemoveFromLayerStack"}, - {6002, C<&IManagerDisplayService::SetLayerVisibility>, "SetLayerVisibility"}, - {6003, nullptr, "SetLayerConfig"}, - {6004, nullptr, "AttachLayerPresentationTracer"}, - {6005, nullptr, "DetachLayerPresentationTracer"}, - {6006, nullptr, "StartLayerPresentationRecording"}, - {6007, nullptr, "StopLayerPresentationRecording"}, - {6008, nullptr, "StartLayerPresentationFenceWait"}, - {6009, nullptr, "StopLayerPresentationFenceWait"}, - {6010, nullptr, "GetLayerPresentationAllFencesExpiredEvent"}, - {6011, nullptr, "EnableLayerAutoClearTransitionBuffer"}, - {6012, nullptr, "DisableLayerAutoClearTransitionBuffer"}, - {6013, nullptr, "SetLayerOpacity"}, - {6014, nullptr, "AttachLayerWatermarkCompositor"}, - {6015, nullptr, "DetachLayerWatermarkCompositor"}, - {7000, nullptr, "SetContentVisibility"}, - {8000, nullptr, "SetConductorLayer"}, - {8001, nullptr, "SetTimestampTracking"}, - {8100, nullptr, "SetIndirectProducerFlipOffset"}, - {8200, nullptr, "CreateSharedBufferStaticStorage"}, - {8201, nullptr, "CreateSharedBufferTransferMemory"}, - {8202, nullptr, "DestroySharedBuffer"}, - {8203, nullptr, "BindSharedLowLevelLayerToManagedLayer"}, - {8204, nullptr, "BindSharedLowLevelLayerToIndirectLayer"}, - {8207, nullptr, "UnbindSharedLowLevelLayer"}, - {8208, nullptr, "ConnectSharedLowLevelLayerToSharedBuffer"}, - {8209, nullptr, "DisconnectSharedLowLevelLayerFromSharedBuffer"}, - {8210, nullptr, "CreateSharedLayer"}, - {8211, nullptr, "DestroySharedLayer"}, - {8216, nullptr, "AttachSharedLayerToLowLevelLayer"}, - {8217, nullptr, "ForceDetachSharedLayerFromLowLevelLayer"}, - {8218, nullptr, "StartDetachSharedLayerFromLowLevelLayer"}, - {8219, nullptr, "FinishDetachSharedLayerFromLowLevelLayer"}, - {8220, nullptr, "GetSharedLayerDetachReadyEvent"}, - {8221, nullptr, "GetSharedLowLevelLayerSynchronizedEvent"}, - {8222, nullptr, "CheckSharedLowLevelLayerSynchronized"}, - {8223, nullptr, "RegisterSharedBufferImporterAruid"}, - {8224, nullptr, "UnregisterSharedBufferImporterAruid"}, - {8227, nullptr, "CreateSharedBufferProcessHeap"}, - {8228, nullptr, "GetSharedLayerLayerStacks"}, - {8229, nullptr, "SetSharedLayerLayerStacks"}, - {8291, nullptr, "PresentDetachedSharedFrameBufferToLowLevelLayer"}, - {8292, nullptr, "FillDetachedSharedFrameBufferColor"}, - {8293, nullptr, "GetDetachedSharedFrameBufferImage"}, - {8294, nullptr, "SetDetachedSharedFrameBufferImage"}, - {8295, nullptr, "CopyDetachedSharedFrameBufferImage"}, - {8296, nullptr, "SetDetachedSharedFrameBufferSubImage"}, - {8297, nullptr, "GetSharedFrameBufferContentParameter"}, - {8298, nullptr, "ExpandStartupLogoOnSharedFrameBuffer"}, - }; - // clang-format on - - RegisterHandlers(functions); } IManagerDisplayService::~IManagerDisplayService() = default; diff --git a/src/core/hle/service/vi/manager_display_service.h b/src/core/hle/service/vi/manager_display_service.h index 14a107cb43..43cd02698d 100644 --- a/src/core/hle/service/vi/manager_display_service.h +++ b/src/core/hle/service/vi/manager_display_service.h @@ -37,6 +37,92 @@ public: Result SetLayerVisibility(bool visible, u64 layer_id); private: + FunctionInfoBase const* FindRequest(u32 key) override { + return HandlerTableGenerateWithFind(key, functions); + } + static constexpr auto functions = CreateStaticMap( + FunctionInfo{200, nullptr, "AllocateProcessHeapBlock"}, + FunctionInfo{201, nullptr, "FreeProcessHeapBlock"}, + FunctionInfo{1102, nullptr, "GetDisplayResolution"}, + FunctionInfo{2010, C<&IManagerDisplayService::CreateManagedLayer>, "CreateManagedLayer"}, + FunctionInfo{2011, C<&IManagerDisplayService::DestroyManagedLayer>, "DestroyManagedLayer"}, + FunctionInfo{2012, nullptr, "CreateStrayLayer"}, + FunctionInfo{2050, nullptr, "CreateIndirectLayer"}, + FunctionInfo{2051, nullptr, "DestroyIndirectLayer"}, + FunctionInfo{2052, nullptr, "CreateIndirectProducerEndPoint"}, + FunctionInfo{2053, nullptr, "DestroyIndirectProducerEndPoint"}, + FunctionInfo{2054, nullptr, "CreateIndirectConsumerEndPoint"}, + FunctionInfo{2055, nullptr, "DestroyIndirectConsumerEndPoint"}, + FunctionInfo{2060, nullptr, "CreateWatermarkCompositor"}, + FunctionInfo{2062, nullptr, "SetWatermarkText"}, + FunctionInfo{2063, nullptr, "SetWatermarkLayerStacks"}, + FunctionInfo{2300, nullptr, "AcquireLayerTexturePresentingEvent"}, + FunctionInfo{2301, nullptr, "ReleaseLayerTexturePresentingEvent"}, + FunctionInfo{2302, nullptr, "GetDisplayHotplugEvent"}, + FunctionInfo{2303, nullptr, "GetDisplayModeChangedEvent"}, + FunctionInfo{2402, nullptr, "GetDisplayHotplugState"}, + FunctionInfo{2501, nullptr, "GetCompositorErrorInfo"}, + FunctionInfo{2601, nullptr, "GetDisplayErrorEvent"}, + FunctionInfo{2701, nullptr, "GetDisplayFatalErrorEvent"}, + FunctionInfo{4201, nullptr, "SetDisplayAlpha"}, + FunctionInfo{4203, nullptr, "SetDisplayLayerStack"}, + FunctionInfo{4205, nullptr, "SetDisplayPowerState"}, + FunctionInfo{4206, nullptr, "SetDefaultDisplay"}, + FunctionInfo{4207, nullptr, "ResetDisplayPanel"}, + FunctionInfo{4208, nullptr, "SetDisplayFatalErrorEnabled"}, + FunctionInfo{4209, nullptr, "IsDisplayPanelOn"}, + FunctionInfo{4300, nullptr, "GetInternalPanelId"}, + FunctionInfo{6000, C<&IManagerDisplayService::AddToLayerStack>, "AddToLayerStack"}, + FunctionInfo{6001, nullptr, "RemoveFromLayerStack"}, + FunctionInfo{6002, C<&IManagerDisplayService::SetLayerVisibility>, "SetLayerVisibility"}, + FunctionInfo{6003, nullptr, "SetLayerConfig"}, + FunctionInfo{6004, nullptr, "AttachLayerPresentationTracer"}, + FunctionInfo{6005, nullptr, "DetachLayerPresentationTracer"}, + FunctionInfo{6006, nullptr, "StartLayerPresentationRecording"}, + FunctionInfo{6007, nullptr, "StopLayerPresentationRecording"}, + FunctionInfo{6008, nullptr, "StartLayerPresentationFenceWait"}, + FunctionInfo{6009, nullptr, "StopLayerPresentationFenceWait"}, + FunctionInfo{6010, nullptr, "GetLayerPresentationAllFencesExpiredEvent"}, + FunctionInfo{6011, nullptr, "EnableLayerAutoClearTransitionBuffer"}, + FunctionInfo{6012, nullptr, "DisableLayerAutoClearTransitionBuffer"}, + FunctionInfo{6013, nullptr, "SetLayerOpacity"}, + FunctionInfo{6014, nullptr, "AttachLayerWatermarkCompositor"}, + FunctionInfo{6015, nullptr, "DetachLayerWatermarkCompositor"}, + FunctionInfo{7000, nullptr, "SetContentVisibility"}, + FunctionInfo{8000, nullptr, "SetConductorLayer"}, + FunctionInfo{8001, nullptr, "SetTimestampTracking"}, + FunctionInfo{8100, nullptr, "SetIndirectProducerFlipOffset"}, + FunctionInfo{8200, nullptr, "CreateSharedBufferStaticStorage"}, + FunctionInfo{8201, nullptr, "CreateSharedBufferTransferMemory"}, + FunctionInfo{8202, nullptr, "DestroySharedBuffer"}, + FunctionInfo{8203, nullptr, "BindSharedLowLevelLayerToManagedLayer"}, + FunctionInfo{8204, nullptr, "BindSharedLowLevelLayerToIndirectLayer"}, + FunctionInfo{8207, nullptr, "UnbindSharedLowLevelLayer"}, + FunctionInfo{8208, nullptr, "ConnectSharedLowLevelLayerToSharedBuffer"}, + FunctionInfo{8209, nullptr, "DisconnectSharedLowLevelLayerFromSharedBuffer"}, + FunctionInfo{8210, nullptr, "CreateSharedLayer"}, + FunctionInfo{8211, nullptr, "DestroySharedLayer"}, + FunctionInfo{8216, nullptr, "AttachSharedLayerToLowLevelLayer"}, + FunctionInfo{8217, nullptr, "ForceDetachSharedLayerFromLowLevelLayer"}, + FunctionInfo{8218, nullptr, "StartDetachSharedLayerFromLowLevelLayer"}, + FunctionInfo{8219, nullptr, "FinishDetachSharedLayerFromLowLevelLayer"}, + FunctionInfo{8220, nullptr, "GetSharedLayerDetachReadyEvent"}, + FunctionInfo{8221, nullptr, "GetSharedLowLevelLayerSynchronizedEvent"}, + FunctionInfo{8222, nullptr, "CheckSharedLowLevelLayerSynchronized"}, + FunctionInfo{8223, nullptr, "RegisterSharedBufferImporterAruid"}, + FunctionInfo{8224, nullptr, "UnregisterSharedBufferImporterAruid"}, + FunctionInfo{8227, nullptr, "CreateSharedBufferProcessHeap"}, + FunctionInfo{8228, nullptr, "GetSharedLayerLayerStacks"}, + FunctionInfo{8229, nullptr, "SetSharedLayerLayerStacks"}, + FunctionInfo{8291, nullptr, "PresentDetachedSharedFrameBufferToLowLevelLayer"}, + FunctionInfo{8292, nullptr, "FillDetachedSharedFrameBufferColor"}, + FunctionInfo{8293, nullptr, "GetDetachedSharedFrameBufferImage"}, + FunctionInfo{8294, nullptr, "SetDetachedSharedFrameBufferImage"}, + FunctionInfo{8295, nullptr, "CopyDetachedSharedFrameBufferImage"}, + FunctionInfo{8296, nullptr, "SetDetachedSharedFrameBufferSubImage"}, + FunctionInfo{8297, nullptr, "GetSharedFrameBufferContentParameter"}, + FunctionInfo{8298, nullptr, "ExpandStartupLogoOnSharedFrameBuffer"} + ); const std::shared_ptr m_container; }; diff --git a/src/core/hle/service/vi/manager_root_service.h b/src/core/hle/service/vi/manager_root_service.h index aaec917328..e1661dffd6 100644 --- a/src/core/hle/service/vi/manager_root_service.h +++ b/src/core/hle/service/vi/manager_root_service.h @@ -30,12 +30,12 @@ private: return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( - {2, C<&IManagerRootService::GetDisplayService>, "GetDisplayService"}, - {3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, - {100, nullptr, "PrepareFatal"}, - {101, nullptr, "ShowFatal"}, - {102, nullptr, "DrawFatalRectangle"}, - {103, nullptr, "DrawFatalText32"} + FunctionInfo{2, C<&IManagerRootService::GetDisplayService>, "GetDisplayService"}, + FunctionInfo{3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, + FunctionInfo{100, nullptr, "PrepareFatal"}, + FunctionInfo{101, nullptr, "ShowFatal"}, + FunctionInfo{102, nullptr, "DrawFatalRectangle"}, + FunctionInfo{103, nullptr, "DrawFatalText32"} ); const std::shared_ptr m_container; };