diff --git a/docs/SubsystemHLE.md b/docs/SubsystemHLE.md index 485ee4708b..7a59fef9fa 100644 --- a/docs/SubsystemHLE.md +++ b/docs/SubsystemHLE.md @@ -67,7 +67,7 @@ public: FunctionInfo{110, nullptr, "SetSystemProgramIdentification"}, FunctionInfo{111, nullptr, "EnsureIdTokenCacheAsync"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 8fffcdbba4..9932853201 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -139,7 +139,7 @@ private: FunctionInfo{170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+ FunctionInfo{180, nullptr, "GetRequestForNintendoAccountReauthentication"} // 18.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } Common::UUID account_id; @@ -167,7 +167,7 @@ public: FunctionInfo{110, nullptr, "SetSystemProgramIdentification"}, FunctionInfo{111, nullptr, "EnsureIdTokenCacheAsync"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -237,7 +237,7 @@ private: FunctionInfo{997, nullptr, "DebugUnlinkNintendoAccountAsync"}, FunctionInfo{998, nullptr, "DebugSetAvailabilityErrorDetail"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -256,7 +256,7 @@ public: FunctionInfo{21, nullptr, "GetIdToken"}, FunctionInfo{22, nullptr, "GetState"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -273,7 +273,7 @@ public: FunctionInfo{3, nullptr, "ApplyResponseAsync"}, FunctionInfo{10, nullptr, "Suspend"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -297,7 +297,7 @@ public: FunctionInfo{103, nullptr, "GetProfileImage"}, FunctionInfo{104, nullptr, "GetProfileLargeImage"} // 18.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -323,7 +323,7 @@ public: FunctionInfo{221, nullptr, "RegisterUserWithProfileAsync"}, // 17.0.0+ FunctionInfo{230, nullptr, "RegisterUserWithLargeImageProfileAsync"} // 18.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -336,7 +336,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetSystemEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -571,7 +571,7 @@ protected: rb.Push(ResultSuccess); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -613,7 +613,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{999, nullptr, "Dummy"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -633,7 +633,7 @@ public: FunctionInfo{16, nullptr, "GetProfileLargeImage"}, // 18.0.0+ FunctionInfo{21, nullptr, "LoadIdTokenCache"} // 3.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -673,7 +673,7 @@ public: ensure_token_id{std::make_shared(system)}, profile_manager{profile_manager_} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -774,7 +774,7 @@ public: FunctionInfo{3, nullptr, "GetResult"}, FunctionInfo{4, nullptr, "GetNetworkServiceLicenseKind"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -806,7 +806,7 @@ public: FunctionInfo{221, nullptr, "RegisterUserWithProfileAsync"}, // 17.0.0+ FunctionInfo{230, nullptr, "RegisterUserWithLargeImageProfileAsync"} // 18.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -830,7 +830,7 @@ public: FunctionInfo{23, nullptr, "IsApplicationAuthenticationCacheAvailable"}, FunctionInfo{24, nullptr, "InvalidateApplicationAuthenticationCache"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -847,7 +847,7 @@ public: FunctionInfo{2, nullptr, "IsAvailable"}, FunctionInfo{3, nullptr, "GetSystemEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -1251,7 +1251,7 @@ public: explicit ACC_AA(std::shared_ptr module_, std::shared_ptr profile_manager_, Core::System& system_) : Interface(std::move(module_), std::move(profile_manager_), system_, "acc:aa") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~ACC_AA() override = default; @@ -1272,7 +1272,7 @@ public: ~ACC_SU() override = default; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -1347,7 +1347,7 @@ public: ACC_U0(std::shared_ptr module_, std::shared_ptr profile_manager_, Core::System& system_) : Interface(std::move(module_), std::move(profile_manager_), system_, "acc:u0") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~ACC_U0() override = default; @@ -1386,7 +1386,7 @@ public: ACC_U1(std::shared_ptr module_, std::shared_ptr profile_manager_, Core::System& system_) : Interface(std::move(module_), std::move(profile_manager_), system_, "acc:u1") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~ACC_U1() override = default; @@ -1435,7 +1435,7 @@ class DAUTH_0 final : public ServiceFramework { public: explicit DAUTH_0(Core::System& system_) : ServiceFramework{system_, "dauth:0"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -1547,7 +1547,7 @@ public: FunctionInfo{10050, nullptr, "IsUserRegistrationRequestPermittedForAccountPolicy"}, FunctionInfo{10105, nullptr, "CheckNetworkServiceAvailabilityAsyncForAccountPolicy"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -1590,7 +1590,7 @@ public: FunctionInfo{998, nullptr, "DebugSetUserStateClose"}, FunctionInfo{999, nullptr, "DebugSetUserStateOpen"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -1640,7 +1640,7 @@ public: FunctionInfo{998, nullptr, "DebugSetUserStateClose"}, FunctionInfo{999, nullptr, "DebugSetUserStateOpen"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/acc/async_context.h b/src/core/hle/service/acc/async_context.h index a5e6eb664c..0137567d11 100644 --- a/src/core/hle/service/acc/async_context.h +++ b/src/core/hle/service/acc/async_context.h @@ -33,7 +33,7 @@ protected: void MarkComplete(); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 540b350c09..e4dc8de269 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -137,7 +137,7 @@ public: } private: - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -184,7 +184,7 @@ public: return m_window_system.GetByAppletResourceUserId(process_id.pid); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -288,7 +288,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -573,7 +573,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -714,7 +714,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -824,7 +824,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -1093,7 +1093,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -1204,7 +1204,7 @@ public: return m_window_system.GetByAppletResourceUserId(process_id.pid); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 92f3ceda96..e7bd7cb383 100644 --- a/src/core/hle/service/am/service/applet_common_functions.cpp +++ b/src/core/hle/service/am/service/applet_common_functions.cpp @@ -12,7 +12,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IAppletCommonFunctions::FindRequest(u32 key) { +std::optional IAppletCommonFunctions::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "SetTerminateResult"}, FunctionInfo{10, nullptr, "ReadThemeStorage"}, 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 48b00cbfde..9d2f24fe22 100644 --- a/src/core/hle/service/am/service/applet_common_functions.h +++ b/src/core/hle/service/am/service/applet_common_functions.h @@ -27,7 +27,7 @@ private: Result SetGpuTimeSliceBoost(s64 time_span); Result Unknown350(Out out_unknown); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 df35700db1..d24c2616dc 100644 --- a/src/core/hle/service/am/service/application_accessor.cpp +++ b/src/core/hle/service/am/service/application_accessor.cpp @@ -18,7 +18,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IApplicationAccessor::FindRequest(u32 key) { +std::optional IApplicationAccessor::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IApplicationAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"}, FunctionInfo{1, nullptr, "IsCompleted"}, diff --git a/src/core/hle/service/am/service/application_accessor.h b/src/core/hle/service/am/service/application_accessor.h index 4f0b87f293..57b222fc19 100644 --- a/src/core/hle/service/am/service/application_accessor.h +++ b/src/core/hle/service/am/service/application_accessor.h @@ -39,7 +39,7 @@ private: Result GetNsRightsEnvironmentHandle(Out out_handle); Result ReportApplicationExitTimeout(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 687cde587c..8d57f917fb 100644 --- a/src/core/hle/service/am/service/application_creator.cpp +++ b/src/core/hle/service/am/service/application_creator.cpp @@ -20,7 +20,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IApplicationCreator::FindRequest(u32 key) { +std::optional IApplicationCreator::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IApplicationCreator::CreateApplication>, "CreateApplication"}, FunctionInfo{1, nullptr, "PopLaunchRequestedApplication"}, diff --git a/src/core/hle/service/am/service/application_creator.h b/src/core/hle/service/am/service/application_creator.h index 8283758940..64434af542 100644 --- a/src/core/hle/service/am/service/application_creator.h +++ b/src/core/hle/service/am/service/application_creator.h @@ -24,7 +24,7 @@ private: Result CreateApplication(Out>, u64 application_id); Result CreateSystemApplication(Out>, u64 application_id); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 b8b68055b5..4fda5eedd6 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -51,7 +51,7 @@ FileSys::PatchManager::Metadata GetApplicationMetadata(Core::System& system, u64 } // Anonymous namespace -ServiceFrameworkBase::FunctionInfoBase const* IApplicationFunctions::FindRequest(u32 key) { +std::optional IApplicationFunctions::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{1, D<&IApplicationFunctions::PopLaunchParameter>, "PopLaunchParameter"}, FunctionInfo{10, nullptr, "CreateApplicationAndPushAndRequestToStart"}, diff --git a/src/core/hle/service/am/service/application_functions.h b/src/core/hle/service/am/service/application_functions.h index 83f16877b3..7093d13f82 100644 --- a/src/core/hle/service/am/service/application_functions.h +++ b/src/core/hle/service/am/service/application_functions.h @@ -84,7 +84,7 @@ private: Result GetUnknownEvent210(OutCopyHandle out_event); Result Unknown330(Out out); Result PrepareForJit(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/audio_controller.cpp b/src/core/hle/service/am/service/audio_controller.cpp index 9679bea325..994406af32 100644 --- a/src/core/hle/service/am/service/audio_controller.cpp +++ b/src/core/hle/service/am/service/audio_controller.cpp @@ -9,7 +9,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IAudioController::FindRequest(u32 key) { +std::optional IAudioController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioController::SetExpectedMasterVolume>, "SetExpectedMasterVolume"}, FunctionInfo{1, D<&IAudioController::GetMainAppletExpectedMasterVolume>, "GetMainAppletExpectedMasterVolume"}, diff --git a/src/core/hle/service/am/service/audio_controller.h b/src/core/hle/service/am/service/audio_controller.h index ac9892475b..9cdb33820d 100644 --- a/src/core/hle/service/am/service/audio_controller.h +++ b/src/core/hle/service/am/service/audio_controller.h @@ -23,7 +23,7 @@ private: Result ChangeMainAppletMasterVolume(f32 volume, s64 fade_time_ns); Result SetTransparentVolumeRate(f32 transparent_volume_rate); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 8e5b854ce9..e5b90d40c4 100644 --- a/src/core/hle/service/am/service/common_state_getter.cpp +++ b/src/core/hle/service/am/service/common_state_getter.cpp @@ -17,7 +17,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* ICommonStateGetter::FindRequest(u32 key) { +std::optional ICommonStateGetter::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ICommonStateGetter::GetEventHandle>, "GetEventHandle"}, FunctionInfo{1, D<&ICommonStateGetter::ReceiveMessage>, "ReceiveMessage"}, @@ -141,7 +141,7 @@ public: } private: - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 07a0c9b905..ad782ca48e 100644 --- a/src/core/hle/service/am/service/common_state_getter.h +++ b/src/core/hle/service/am/service/common_state_getter.h @@ -76,7 +76,7 @@ private: void SetCpuBoostMode(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 6a1a1bce14..a8097ea209 100644 --- a/src/core/hle/service/am/service/cradle_firmware_updater.cpp +++ b/src/core/hle/service/am/service/cradle_firmware_updater.cpp @@ -9,7 +9,7 @@ namespace Service::AM { - ServiceFrameworkBase::FunctionInfoBase const* ICradleFirmwareUpdater::FindRequest(u32 key) { + std::optional ICradleFirmwareUpdater::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ICradleFirmwareUpdater::StartUpdate>, "StartUpdate"}, FunctionInfo{1, D<&ICradleFirmwareUpdater::FinishUpdate>, "FinishUpdate"}, 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 9077b376ee..f8e4b93b27 100644 --- a/src/core/hle/service/am/service/cradle_firmware_updater.h +++ b/src/core/hle/service/am/service/cradle_firmware_updater.h @@ -33,7 +33,7 @@ private: Result GetCradleDeviceInfoChangeEvent(OutCopyHandle out_event); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext m_context; Event m_cradle_device_info_event; }; diff --git a/src/core/hle/service/am/service/debug_functions.h b/src/core/hle/service/am/service/debug_functions.h index f9064a94e0..19cb3a5241 100644 --- a/src/core/hle/service/am/service/debug_functions.h +++ b/src/core/hle/service/am/service/debug_functions.h @@ -15,7 +15,7 @@ public: explicit IDebugFunctions(Core::System& system_); ~IDebugFunctions() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/am/service/display_controller.cpp b/src/core/hle/service/am/service/display_controller.cpp index 40db3d1184..eb95dd1b86 100644 --- a/src/core/hle/service/am/service/display_controller.cpp +++ b/src/core/hle/service/am/service/display_controller.cpp @@ -12,7 +12,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IDisplayController::FindRequest(u32 key) { +std::optional IDisplayController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetLastForegroundCaptureImage"}, FunctionInfo{1, nullptr, "UpdateLastForegroundCaptureImage"}, diff --git a/src/core/hle/service/am/service/display_controller.h b/src/core/hle/service/am/service/display_controller.h index e38b7afef2..03d29f93c5 100644 --- a/src/core/hle/service/am/service/display_controller.h +++ b/src/core/hle/service/am/service/display_controller.h @@ -35,7 +35,7 @@ private: Out out_fbshare_layer_index); Result ReleaseLastApplicationCaptureSharedBuffer(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 ad5cd0ed31..be080ffcb3 100644 --- a/src/core/hle/service/am/service/global_state_controller.cpp +++ b/src/core/hle/service/am/service/global_state_controller.cpp @@ -10,7 +10,7 @@ namespace Service::AM { - ServiceFrameworkBase::FunctionInfoBase const* IGlobalStateController::FindRequest(u32 key) { + std::optional IGlobalStateController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "RequestToEnterSleep"}, FunctionInfo{1, nullptr, "EnterSleep"}, 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 0b864229f9..0de1415295 100644 --- a/src/core/hle/service/am/service/global_state_controller.h +++ b/src/core/hle/service/am/service/global_state_controller.h @@ -28,7 +28,7 @@ private: Result GetHdcpAuthenticationFailedEvent(OutCopyHandle out_event); Result OpenCradleFirmwareUpdater(Out> out_cradle_firmware_updater); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 00f127314a..5f61c842a2 100644 --- a/src/core/hle/service/am/service/home_menu_functions.cpp +++ b/src/core/hle/service/am/service/home_menu_functions.cpp @@ -14,7 +14,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IHomeMenuFunctions::FindRequest(u32 key) { +std::optional IHomeMenuFunctions::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{10, D<&IHomeMenuFunctions::RequestToGetForeground>, "RequestToGetForeground"}, FunctionInfo{11, D<&IHomeMenuFunctions::LockForeground>, "LockForeground"}, 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 2062aa580b..25eb9db45e 100644 --- a/src/core/hle/service/am/service/home_menu_functions.h +++ b/src/core/hle/service/am/service/home_menu_functions.h @@ -34,7 +34,7 @@ private: Result IsForceTerminateApplicationDisabledForDebug( Out out_is_force_terminate_application_disabled_for_debug); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 852220902d..5d74df7430 100644 --- a/src/core/hle/service/am/service/library_applet_accessor.cpp +++ b/src/core/hle/service/am/service/library_applet_accessor.cpp @@ -45,7 +45,7 @@ static void ReplaceEmptyUuidWithCurrentUser(const std::shared_ptr ILibraryAppletAccessor::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ILibraryAppletAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"}, FunctionInfo{1, D<&ILibraryAppletAccessor::IsCompleted>, "IsCompleted"}, 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 9618a1e9d2..e14ddb3bde 100644 --- a/src/core/hle/service/am/service/library_applet_accessor.h +++ b/src/core/hle/service/am/service/library_applet_accessor.h @@ -68,7 +68,7 @@ private: void FrontendExecuteInteractive(); void FrontendRequestExit(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_broker; 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 5dcdaaab43..006610bd47 100644 --- a/src/core/hle/service/am/service/overlay_functions.cpp +++ b/src/core/hle/service/am/service/overlay_functions.cpp @@ -8,7 +8,7 @@ #include "core/hle/service/am/window_system.h" namespace Service::AM { - ServiceFrameworkBase::FunctionInfoBase const* IOverlayFunctions::FindRequest(u32 key) { + std::optional IOverlayFunctions::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IOverlayFunctions::BeginToWatchShortHomeButtonMessage>, "BeginToWatchShortHomeButtonMessage"}, FunctionInfo{1, D<&IOverlayFunctions::EndToWatchShortHomeButtonMessage>, "EndToWatchShortHomeButtonMessage"}, diff --git a/src/core/hle/service/am/service/overlay_functions.h b/src/core/hle/service/am/service/overlay_functions.h index 0ed608e0c7..b94f0cc0d5 100644 --- a/src/core/hle/service/am/service/overlay_functions.h +++ b/src/core/hle/service/am/service/overlay_functions.h @@ -24,7 +24,7 @@ private: Result Unknown70(); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 33792b20bf..159f4dfd5c 100644 --- a/src/core/hle/service/am/service/process_winding_controller.cpp +++ b/src/core/hle/service/am/service/process_winding_controller.cpp @@ -13,7 +13,7 @@ namespace Service::AM { - ServiceFrameworkBase::FunctionInfoBase const* IProcessWindingController::FindRequest(u32 key) { + std::optional IProcessWindingController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"}, FunctionInfo{11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"}, 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 27ab33407e..91b29ac04b 100644 --- a/src/core/hle/service/am/service/process_winding_controller.h +++ b/src/core/hle/service/am/service/process_winding_controller.h @@ -33,7 +33,7 @@ private: SharedPointer reserved_applet_accessor); Result ReserveToStartAndWait(SharedPointer reserved_applet_accessor); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 eee7a6034e..ce8a308d6a 100644 --- a/src/core/hle/service/am/service/self_controller.cpp +++ b/src/core/hle/service/am/service/self_controller.cpp @@ -17,7 +17,7 @@ namespace Service::AM { - ServiceFrameworkBase::FunctionInfoBase const* ISelfController::FindRequest(u32 key) { + std::optional ISelfController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ISelfController::Exit>, "Exit"}, FunctionInfo{1, D<&ISelfController::LockExit>, "LockExit"}, diff --git a/src/core/hle/service/am/service/self_controller.h b/src/core/hle/service/am/service/self_controller.h index ddea4c5109..ce77769da2 100644 --- a/src/core/hle/service/am/service/self_controller.h +++ b/src/core/hle/service/am/service/self_controller.h @@ -70,7 +70,7 @@ private: Result Unknown230(u32 in_val, Out out_val); Result Unknown240(u32 in_val); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 9b51933881..a867cda6e2 100644 --- a/src/core/hle/service/am/service/storage.cpp +++ b/src/core/hle/service/am/service/storage.cpp @@ -12,7 +12,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IStorage::FindRequest(u32 key) { +std::optional IStorage::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IStorage::Open>, "Open"}, FunctionInfo{1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"} diff --git a/src/core/hle/service/am/service/storage.h b/src/core/hle/service/am/service/storage.h index c06c989639..63b7a0ad4c 100644 --- a/src/core/hle/service/am/service/storage.h +++ b/src/core/hle/service/am/service/storage.h @@ -32,7 +32,7 @@ private: Result OpenTransferStorage( Out> out_transfer_storage_accessor); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_impl; }; diff --git a/src/core/hle/service/am/service/storage_accessor.cpp b/src/core/hle/service/am/service/storage_accessor.cpp index fa55a826f0..0d29222bd9 100644 --- a/src/core/hle/service/am/service/storage_accessor.cpp +++ b/src/core/hle/service/am/service/storage_accessor.cpp @@ -11,7 +11,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IStorageAccessor::FindRequest(u32 key) { +std::optional IStorageAccessor::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IStorageAccessor::GetSize>, "GetSize"}, FunctionInfo{10, D<&IStorageAccessor::Write>, "Write"}, @@ -43,7 +43,7 @@ Result IStorageAccessor::Read(OutBuffer out_buffer, s R_RETURN(m_impl->Read(offset, out_buffer.data(), out_buffer.size())); } -ServiceFrameworkBase::FunctionInfoBase const* ITransferStorageAccessor::FindRequest(u32 key) { +std::optional ITransferStorageAccessor::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ITransferStorageAccessor::GetSize>, "GetSize"}, FunctionInfo{1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"} diff --git a/src/core/hle/service/am/service/storage_accessor.h b/src/core/hle/service/am/service/storage_accessor.h index 846bcf6d4f..ee64e7a3ec 100644 --- a/src/core/hle/service/am/service/storage_accessor.h +++ b/src/core/hle/service/am/service/storage_accessor.h @@ -22,7 +22,7 @@ private: Result Write(InBuffer buffer, s64 offset); Result Read(OutBuffer out_buffer, s64 offset); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_impl; }; @@ -36,7 +36,7 @@ private: Result GetSize(Out out_size); Result GetHandle(Out out_size, OutCopyHandle out_handle); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_impl; }; diff --git a/src/core/hle/service/am/service/window_controller.cpp b/src/core/hle/service/am/service/window_controller.cpp index 3c4d516e0e..d07aba0c79 100644 --- a/src/core/hle/service/am/service/window_controller.cpp +++ b/src/core/hle/service/am/service/window_controller.cpp @@ -12,7 +12,7 @@ namespace Service::AM { -ServiceFrameworkBase::FunctionInfoBase const* IWindowController::FindRequest(u32 key) { +std::optional IWindowController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "CreateWindow"}, FunctionInfo{1, D<&IWindowController::GetAppletResourceUserId>, "GetAppletResourceUserId"}, diff --git a/src/core/hle/service/am/service/window_controller.h b/src/core/hle/service/am/service/window_controller.h index a489846aa5..29fd723421 100644 --- a/src/core/hle/service/am/service/window_controller.h +++ b/src/core/hle/service/am/service/window_controller.h @@ -29,7 +29,7 @@ private: Result SetAppletWindowVisibility(bool visible); Result SetAppletGpuTimeSlice(s64 time_slice); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 434c758dfc..0222d9c52b 100644 --- a/src/core/hle/service/aoc/addon_content_manager.cpp +++ b/src/core/hle/service/aoc/addon_content_manager.cpp @@ -28,7 +28,7 @@ namespace Service::AOC { -ServiceFrameworkBase::FunctionInfoBase const* IAddOnContentManager::FindRequest(u32 key) { +std::optional IAddOnContentManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "CountAddOnContentByApplicationId"}, FunctionInfo{1, nullptr, "ListAddOnContentByApplicationId"}, diff --git a/src/core/hle/service/aoc/addon_content_manager.h b/src/core/hle/service/aoc/addon_content_manager.h index 7f9877941d..8ddb86cf19 100644 --- a/src/core/hle/service/aoc/addon_content_manager.h +++ b/src/core/hle/service/aoc/addon_content_manager.h @@ -43,7 +43,7 @@ public: OutInterface out_interface); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 0eb7592f19..eded803b25 100644 --- a/src/core/hle/service/aoc/purchase_event_manager.cpp +++ b/src/core/hle/service/aoc/purchase_event_manager.cpp @@ -11,7 +11,7 @@ namespace Service::AOC { constexpr Result ResultNoPurchasedProductInfoAvailable{ErrorModule::NIMShop, 400}; -ServiceFrameworkBase::FunctionInfoBase const* IPurchaseEventManager::FindRequest(u32 key) { +std::optional IPurchaseEventManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IPurchaseEventManager::SetDefaultDeliveryTarget>, "SetDefaultDeliveryTarget"}, FunctionInfo{1, D<&IPurchaseEventManager::SetDeliveryTarget>, "SetDeliveryTarget"}, diff --git a/src/core/hle/service/aoc/purchase_event_manager.h b/src/core/hle/service/aoc/purchase_event_manager.h index 5b662e96b5..d11089e567 100644 --- a/src/core/hle/service/aoc/purchase_event_manager.h +++ b/src/core/hle/service/aoc/purchase_event_manager.h @@ -25,7 +25,7 @@ public: Result PopPurchasedProductInfo(); Result PopPurchasedProductInfoWithUid(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; private: KernelHelpers::ServiceContext service_context; diff --git a/src/core/hle/service/apm/apm_interface.cpp b/src/core/hle/service/apm/apm_interface.cpp index b5b2b03fc4..2b4768478e 100644 --- a/src/core/hle/service/apm/apm_interface.cpp +++ b/src/core/hle/service/apm/apm_interface.cpp @@ -53,7 +53,7 @@ private: rb.Push(ResultSuccess); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/apm/apm_interface.h b/src/core/hle/service/apm/apm_interface.h index 000c7fd6da..0bbcd185a3 100644 --- a/src/core/hle/service/apm/apm_interface.h +++ b/src/core/hle/service/apm/apm_interface.h @@ -24,7 +24,7 @@ private: void GetPerformanceMode(HLERequestContext& ctx); void IsCpuOverclockEnabled(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -47,7 +47,7 @@ private: void GetPerformanceEvent(HLERequestContext& ctx); void GetCurrentPerformanceConfiguration(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/audio/audio.cpp b/src/core/hle/service/audio/audio.cpp index e2bba36546..6177efd46c 100644 --- a/src/core/hle/service/audio/audio.cpp +++ b/src/core/hle/service/audio/audio.cpp @@ -31,7 +31,7 @@ public: FunctionInfo{4, nullptr, "GetProcessRecordVolume"}, FunctionInfo{5, nullptr, "SetProcessRecordVolume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -48,7 +48,7 @@ public: FunctionInfo{3, nullptr, "GetDspStatisticsParameter"}, FunctionInfo{6, nullptr, "GetDspUsage"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -64,7 +64,7 @@ public: FunctionInfo{2, nullptr, "GetProcessMasterVolume"}, FunctionInfo{3, nullptr, "SetProcessMasterVolume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -84,7 +84,7 @@ public: FunctionInfo{6, nullptr, "GetProcessRecordVolume"}, FunctionInfo{7, nullptr, "SetProcessRecordVolume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -98,7 +98,7 @@ public: FunctionInfo{0, nullptr, "RequestSuspend"}, FunctionInfo{1, nullptr, "RequestResume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -112,7 +112,7 @@ public: FunctionInfo{0, nullptr, "RequestSuspend"}, FunctionInfo{1, nullptr, "RequestResume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -126,7 +126,7 @@ public: FunctionInfo{0, nullptr, "RequestSuspend"}, FunctionInfo{1, nullptr, "RequestResume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -140,7 +140,7 @@ public: FunctionInfo{0, nullptr, "RequestSuspend"}, FunctionInfo{1, nullptr, "RequestResume"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -163,7 +163,7 @@ public: FunctionInfo{9, nullptr, "SetAudioOutputProcessRecordVolume"}, FunctionInfo{10, nullptr, "GetAppletStateSummaries"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -177,7 +177,7 @@ public: FunctionInfo{0, nullptr, "RequestSuspendAudioForDebug"}, FunctionInfo{1, nullptr, "RequestResumeAudioForDebug"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/audio/audio_controller.cpp b/src/core/hle/service/audio/audio_controller.cpp index d66bf9a5f9..a960be2aa6 100644 --- a/src/core/hle/service/audio/audio_controller.cpp +++ b/src/core/hle/service/audio/audio_controller.cpp @@ -20,7 +20,7 @@ namespace Service::Audio { -ServiceFrameworkBase::FunctionInfoBase const* IAudioController::FindRequest(u32 key) { +std::optional IAudioController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioController::GetTargetVolume>, "GetTargetVolume"}, FunctionInfo{1, D<&IAudioController::SetTargetVolume>, "SetTargetVolume"}, diff --git a/src/core/hle/service/audio/audio_controller.h b/src/core/hle/service/audio/audio_controller.h index 75cb041ee1..e5c615fa21 100644 --- a/src/core/hle/service/audio/audio_controller.h +++ b/src/core/hle/service/audio/audio_controller.h @@ -59,7 +59,7 @@ private: Result AcquireTargetNotification(OutCopyHandle out_notification_event); Result Unknown5000(Out> out_audio_controller); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext service_context; Kernel::KEvent* notification_event; std::shared_ptr m_set_sys; diff --git a/src/core/hle/service/audio/audio_device.cpp b/src/core/hle/service/audio/audio_device.cpp index 61cda0de1f..c028536f47 100644 --- a/src/core/hle/service/audio/audio_device.cpp +++ b/src/core/hle/service/audio/audio_device.cpp @@ -12,7 +12,7 @@ namespace Service::Audio { using namespace AudioCore::Renderer; -ServiceFrameworkBase::FunctionInfoBase const* IAudioDevice::FindRequest(u32 key) { +std::optional IAudioDevice::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioDevice::ListAudioDeviceName>, "ListAudioDeviceName"}, FunctionInfo{1, D<&IAudioDevice::SetAudioDeviceOutputVolume>, "SetAudioDeviceOutputVolume"}, diff --git a/src/core/hle/service/audio/audio_device.h b/src/core/hle/service/audio/audio_device.h index 4a866838cb..bd0aaa5f7c 100644 --- a/src/core/hle/service/audio/audio_device.h +++ b/src/core/hle/service/audio/audio_device.h @@ -55,7 +55,7 @@ private: Result SetAudioDeviceOutputVolumeAutoTuneEnabled(bool enabled); Result IsAudioDeviceOutputVolumeAutoTuneEnabled(Out out_enabled); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext service_context; std::unique_ptr impl; Kernel::KEvent* event; diff --git a/src/core/hle/service/audio/audio_in.cpp b/src/core/hle/service/audio/audio_in.cpp index 24eab7b058..068574dbd2 100644 --- a/src/core/hle/service/audio/audio_in.cpp +++ b/src/core/hle/service/audio/audio_in.cpp @@ -11,7 +11,7 @@ namespace Service::Audio { using namespace AudioCore::AudioIn; -ServiceFrameworkBase::FunctionInfoBase const* IAudioIn::FindRequest(u32 key) { +std::optional IAudioIn::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"}, FunctionInfo{1, D<&IAudioIn::Start>, "Start"}, diff --git a/src/core/hle/service/audio/audio_in.h b/src/core/hle/service/audio/audio_in.h index 6dc2221b7b..dd7a41f300 100644 --- a/src/core/hle/service/audio/audio_in.h +++ b/src/core/hle/service/audio/audio_in.h @@ -46,7 +46,7 @@ public: Result FlushAudioInBuffers(Out out_flushed); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 266cd85fc4..422e72148b 100644 --- a/src/core/hle/service/audio/audio_in_manager.cpp +++ b/src/core/hle/service/audio/audio_in_manager.cpp @@ -12,7 +12,7 @@ namespace Service::Audio { using namespace AudioCore::AudioIn; -ServiceFrameworkBase::FunctionInfoBase const* IAudioInManager::FindRequest(u32 key) { +std::optional IAudioInManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"}, FunctionInfo{1, D<&IAudioInManager::OpenAudioIn>, "OpenAudioIn"}, diff --git a/src/core/hle/service/audio/audio_in_manager.h b/src/core/hle/service/audio/audio_in_manager.h index 1cc4bfcd25..0ee0badba7 100644 --- a/src/core/hle/service/audio/audio_in_manager.h +++ b/src/core/hle/service/audio/audio_in_manager.h @@ -54,7 +54,7 @@ private: AudioCore::AudioIn::AudioInParameter parameter, InCopyHandle process_handle, ClientAppletResourceUserId aruid); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 b6f6bcaf00..a5f06faab8 100644 --- a/src/core/hle/service/audio/audio_out.cpp +++ b/src/core/hle/service/audio/audio_out.cpp @@ -15,7 +15,7 @@ namespace Service::Audio { using namespace AudioCore::AudioOut; -ServiceFrameworkBase::FunctionInfoBase const* IAudioOut::FindRequest(u32 key) { +std::optional IAudioOut::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioOut::GetAudioOutState>, "GetAudioOutState"}, FunctionInfo{1, D<&IAudioOut::Start>, "Start"}, diff --git a/src/core/hle/service/audio/audio_out.h b/src/core/hle/service/audio/audio_out.h index b2e19146fa..311eb84afe 100644 --- a/src/core/hle/service/audio/audio_out.h +++ b/src/core/hle/service/audio/audio_out.h @@ -52,7 +52,7 @@ public: Result GetAudioOutVolume(Out out_volume); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext service_context; Kernel::KEvent* event; diff --git a/src/core/hle/service/audio/audio_out_manager.cpp b/src/core/hle/service/audio/audio_out_manager.cpp index a34c1410e2..9f24bc3513 100644 --- a/src/core/hle/service/audio/audio_out_manager.cpp +++ b/src/core/hle/service/audio/audio_out_manager.cpp @@ -13,7 +13,7 @@ namespace Service::Audio { using namespace AudioCore::AudioOut; -ServiceFrameworkBase::FunctionInfoBase const* IAudioOutManager::FindRequest(u32 key) { +std::optional IAudioOutManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioOutManager::ListAudioOuts>, "ListAudioOuts"}, FunctionInfo{1, D<&IAudioOutManager::OpenAudioOut>, "OpenAudioOut"}, diff --git a/src/core/hle/service/audio/audio_out_manager.h b/src/core/hle/service/audio/audio_out_manager.h index 7e48360ed0..4c71c12cdf 100644 --- a/src/core/hle/service/audio/audio_out_manager.h +++ b/src/core/hle/service/audio/audio_out_manager.h @@ -43,7 +43,7 @@ private: AudioCore::AudioOut::AudioOutParameter parameter, InCopyHandle process_handle, ClientAppletResourceUserId aruid); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::optional impl; }; diff --git a/src/core/hle/service/audio/audio_renderer.cpp b/src/core/hle/service/audio/audio_renderer.cpp index 141f9d6472..2f6a883d3e 100644 --- a/src/core/hle/service/audio/audio_renderer.cpp +++ b/src/core/hle/service/audio/audio_renderer.cpp @@ -10,7 +10,7 @@ namespace Service::Audio { using namespace AudioCore::Renderer; -ServiceFrameworkBase::FunctionInfoBase const* IAudioRenderer::FindRequest(u32 key) { +std::optional IAudioRenderer::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"}, FunctionInfo{1, D<&IAudioRenderer::GetSampleCount>, "GetSampleCount"}, diff --git a/src/core/hle/service/audio/audio_renderer.h b/src/core/hle/service/audio/audio_renderer.h index 2ffb360040..e03fc6551d 100644 --- a/src/core/hle/service/audio/audio_renderer.h +++ b/src/core/hle/service/audio/audio_renderer.h @@ -45,7 +45,7 @@ private: Result SetVoiceDropParameter(f32 voice_drop_parameter); Result GetVoiceDropParameter(Out out_voice_drop_parameter); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 cb35da1bf2..98701c79c1 100644 --- a/src/core/hle/service/audio/audio_renderer_manager.cpp +++ b/src/core/hle/service/audio/audio_renderer_manager.cpp @@ -18,7 +18,7 @@ namespace Service::Audio { using namespace AudioCore::Renderer; -ServiceFrameworkBase::FunctionInfoBase const* IAudioRendererManager::FindRequest(u32 key) { +std::optional IAudioRendererManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IAudioRendererManager::OpenAudioRenderer>, "OpenAudioRenderer"}, FunctionInfo{1, D<&IAudioRendererManager::GetWorkBufferSize>, "GetWorkBufferSize"}, diff --git a/src/core/hle/service/audio/audio_renderer_manager.h b/src/core/hle/service/audio/audio_renderer_manager.h index f327403d84..bd3ea06326 100644 --- a/src/core/hle/service/audio/audio_renderer_manager.h +++ b/src/core/hle/service/audio/audio_renderer_manager.h @@ -33,7 +33,7 @@ private: Result GetAudioDeviceServiceWithRevisionInfo(Out> out_audio_device, u32 revision, ClientAppletResourceUserId aruid); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::optional impl; u32 num_audio_devices{0}; }; diff --git a/src/core/hle/service/audio/final_output_recorder_manager.cpp b/src/core/hle/service/audio/final_output_recorder_manager.cpp index 32951eecdb..9c51613de6 100644 --- a/src/core/hle/service/audio/final_output_recorder_manager.cpp +++ b/src/core/hle/service/audio/final_output_recorder_manager.cpp @@ -27,7 +27,7 @@ public: FunctionInfo{10, nullptr, "FlushFinalOutputRecorderBuffers"}, FunctionInfo{11, nullptr, "AttachWorkBuffer"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; 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 e50640b1a2..ee392b2ada 100644 --- a/src/core/hle/service/audio/final_output_recorder_manager.h +++ b/src/core/hle/service/audio/final_output_recorder_manager.h @@ -19,7 +19,7 @@ public: explicit IFinalOutputRecorderManager(Core::System& system_); ~IFinalOutputRecorderManager() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 15d1e3452a..7beaa888ff 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 @@ -20,7 +20,7 @@ public: explicit IFinalOutputRecorderManagerForApplet(Core::System& system_); ~IFinalOutputRecorderManagerForApplet() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/audio/hardware_opus_decoder.cpp b/src/core/hle/service/audio/hardware_opus_decoder.cpp index 81bce1702b..f0dde63e14 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder.cpp +++ b/src/core/hle/service/audio/hardware_opus_decoder.cpp @@ -11,7 +11,7 @@ namespace Service::Audio { using namespace AudioCore::OpusDecoder; - ServiceFrameworkBase::FunctionInfoBase const* IHardwareOpusDecoder::FindRequest(u32 key) { + std::optional IHardwareOpusDecoder::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IHardwareOpusDecoder::DecodeInterleavedOld>, "DecodeInterleavedOld"}, FunctionInfo{1, D<&IHardwareOpusDecoder::SetContext>, "SetContext"}, diff --git a/src/core/hle/service/audio/hardware_opus_decoder.h b/src/core/hle/service/audio/hardware_opus_decoder.h index 88628ace8c..9f9b17bc81 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder.h +++ b/src/core/hle/service/audio/hardware_opus_decoder.h @@ -58,7 +58,7 @@ private: Out out_data_size, Out out_sample_count, Out out_time_taken, InBuffer opus_data, bool reset); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 09ef12ae4f..3000ba8c60 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder_manager.cpp +++ b/src/core/hle/service/audio/hardware_opus_decoder_manager.cpp @@ -12,7 +12,7 @@ namespace Service::Audio { using namespace AudioCore::OpusDecoder; -ServiceFrameworkBase::FunctionInfoBase const* IHardwareOpusDecoderManager::FindRequest(u32 key) { +std::optional IHardwareOpusDecoderManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoder>, "OpenHardwareOpusDecoder"}, FunctionInfo{1, D<&IHardwareOpusDecoderManager::GetWorkBufferSize>, "GetWorkBufferSize"}, 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 fb7af19445..1dbac9addb 100644 --- a/src/core/hle/service/audio/hardware_opus_decoder_manager.h +++ b/src/core/hle/service/audio/hardware_opus_decoder_manager.h @@ -49,7 +49,7 @@ private: Result GetWorkBufferSizeForMultiStreamExEx( Out out_size, InLargeData params); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; Core::System& system; AudioCore::OpusDecoder::OpusDecoderManager impl; }; diff --git a/src/core/hle/service/bcat/bcat_service.cpp b/src/core/hle/service/bcat/bcat_service.cpp index 0610e4f0c9..53fae8ce20 100644 --- a/src/core/hle/service/bcat/bcat_service.cpp +++ b/src/core/hle/service/bcat/bcat_service.cpp @@ -24,7 +24,7 @@ static u64 GetCurrentBuildID(const Core::System::CurrentBuildProcessID& id) { return out; } -ServiceFrameworkBase::FunctionInfoBase const* IBcatService::FindRequest(u32 key) { +std::optional IBcatService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{10100, D<&IBcatService::RequestSyncDeliveryCache>, "RequestSyncDeliveryCache"}, FunctionInfo{10101, D<&IBcatService::RequestSyncDeliveryCacheWithDirectoryName>, "RequestSyncDeliveryCacheWithDirectoryName"}, diff --git a/src/core/hle/service/bcat/bcat_service.h b/src/core/hle/service/bcat/bcat_service.h index cfccd17c09..ed95f021d0 100644 --- a/src/core/hle/service/bcat/bcat_service.h +++ b/src/core/hle/service/bcat/bcat_service.h @@ -41,7 +41,7 @@ private: ProgressServiceBackend& GetProgressBackend(SyncType type); const ProgressServiceBackend& GetProgressBackend(SyncType type) const; - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; BcatBackend& backend; u64 program_id; std::array(SyncType::Count)> progress; 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 7e855661d9..0d464a2fdc 100644 --- a/src/core/hle/service/bcat/delivery_cache_directory_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_directory_service.cpp @@ -27,7 +27,7 @@ static BcatDigest DigestFile(const FileSys::VirtualFile& file) { return out; } -ServiceFrameworkBase::FunctionInfoBase const* IDeliveryCacheDirectoryService::FindRequest(u32 key) { +std::optional IDeliveryCacheDirectoryService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IDeliveryCacheDirectoryService::Open>, "Open"}, FunctionInfo{1, D<&IDeliveryCacheDirectoryService::Read>, "Read"}, 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 10ed25cf29..af90680390 100644 --- a/src/core/hle/service/bcat/delivery_cache_directory_service.h +++ b/src/core/hle/service/bcat/delivery_cache_directory_service.h @@ -29,7 +29,7 @@ private: OutArray out_buffer); Result GetCount(Out out_count); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 37c401355d..d9b6ff77ee 100644 --- a/src/core/hle/service/bcat/delivery_cache_file_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_file_service.cpp @@ -12,7 +12,7 @@ namespace Service::BCAT { -ServiceFrameworkBase::FunctionInfoBase const* IDeliveryCacheFileService::FindRequest(u32 key) { +std::optional IDeliveryCacheFileService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IDeliveryCacheFileService::Open>, "Open"}, FunctionInfo{1, D<&IDeliveryCacheFileService::Read>, "Read"}, 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 b662685226..176c8eb3e5 100644 --- a/src/core/hle/service/bcat/delivery_cache_file_service.h +++ b/src/core/hle/service/bcat/delivery_cache_file_service.h @@ -29,7 +29,7 @@ private: Result GetSize(Out out_size); Result GetDigest(Out out_digest); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 29e893120c..4de42dd580 100644 --- a/src/core/hle/service/bcat/delivery_cache_progress_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_progress_service.cpp @@ -10,7 +10,7 @@ namespace Service::BCAT { -ServiceFrameworkBase::FunctionInfoBase const* IDeliveryCacheProgressService::FindRequest(u32 key) { +std::optional IDeliveryCacheProgressService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IDeliveryCacheProgressService::GetEvent>, "GetEvent"}, FunctionInfo{1, D<&IDeliveryCacheProgressService::GetImpl>, "GetImpl"} 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 7ea81677b1..88f49cea85 100644 --- a/src/core/hle/service/bcat/delivery_cache_progress_service.h +++ b/src/core/hle/service/bcat/delivery_cache_progress_service.h @@ -31,7 +31,7 @@ private: Result GetEvent(OutCopyHandle out_event); Result GetImpl(OutLargeData out_impl); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 b73113bf19..67dc857642 100644 --- a/src/core/hle/service/bcat/delivery_cache_storage_service.cpp +++ b/src/core/hle/service/bcat/delivery_cache_storage_service.cpp @@ -12,7 +12,7 @@ namespace Service::BCAT { -ServiceFrameworkBase::FunctionInfoBase const* IDeliveryCacheStorageService::FindRequest(u32 key) { +std::optional IDeliveryCacheStorageService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IDeliveryCacheStorageService::CreateFileService>, "CreateFileService"}, FunctionInfo{1, D<&IDeliveryCacheStorageService::CreateDirectoryService>, "CreateDirectoryService"}, 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 1b7766d885..b30f24fb47 100644 --- a/src/core/hle/service/bcat/delivery_cache_storage_service.h +++ b/src/core/hle/service/bcat/delivery_cache_storage_service.h @@ -31,7 +31,7 @@ private: Out out_directory_count, OutArray out_directories); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 f945957e67..57d71c49d8 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 @@ -9,7 +9,7 @@ namespace Service::News { -ServiceFrameworkBase::FunctionInfoBase const* INewlyArrivedEventHolder::FindRequest(u32 key) { +std::optional INewlyArrivedEventHolder::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&INewlyArrivedEventHolder::Get>, "Get"} ); 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 f21d00d42c..fccc8d6e55 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 @@ -29,7 +29,7 @@ public: private: Result Get(OutCopyHandle out_event); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; Kernel::KEvent* arrived_event; KernelHelpers::ServiceContext service_context; }; diff --git a/src/core/hle/service/bcat/news/news_data_service.cpp b/src/core/hle/service/bcat/news/news_data_service.cpp index db14bba80c..f5de93db49 100644 --- a/src/core/hle/service/bcat/news/news_data_service.cpp +++ b/src/core/hle/service/bcat/news/news_data_service.cpp @@ -24,7 +24,7 @@ std::string_view ToStringView(std::span buf) { } // namespace -ServiceFrameworkBase::FunctionInfoBase const* INewsDataService::FindRequest(u32 key) { +std::optional INewsDataService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&INewsDataService::Open>, "Open"}, FunctionInfo{1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"}, 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 ce6acf5350..8ce10c045d 100644 --- a/src/core/hle/service/bcat/news/news_data_service.h +++ b/src/core/hle/service/bcat/news/news_data_service.h @@ -31,7 +31,7 @@ private: Result Read(Out out_size, s64 offset, OutBuffer out_buffer); Result GetSize(Out out_size); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::vector opened_payload; }; diff --git a/src/core/hle/service/bcat/news/news_database_service.cpp b/src/core/hle/service/bcat/news/news_database_service.cpp index 2e926b72a9..08fdfcb58b 100644 --- a/src/core/hle/service/bcat/news/news_database_service.cpp +++ b/src/core/hle/service/bcat/news/news_database_service.cpp @@ -45,7 +45,7 @@ bool UpdateField(NewsRecord& rec, std::string_view column, s32 value, bool addit } // namespace -ServiceFrameworkBase::FunctionInfoBase const* INewsDatabaseService::FindRequest(u32 key) { +std::optional INewsDatabaseService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&INewsDatabaseService::GetListV1>, "GetListV1"}, FunctionInfo{1, D<&INewsDatabaseService::Count>, "Count"}, 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 282543c607..0a097b97bc 100644 --- a/src/core/hle/service/bcat/news/news_database_service.h +++ b/src/core/hle/service/bcat/news/news_database_service.h @@ -50,7 +50,7 @@ private: InBuffer order_by_phrase, s32 offset); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::News diff --git a/src/core/hle/service/bcat/news/news_service.cpp b/src/core/hle/service/bcat/news/news_service.cpp index d49987399f..ce1b9a39d8 100644 --- a/src/core/hle/service/bcat/news/news_service.cpp +++ b/src/core/hle/service/bcat/news/news_service.cpp @@ -12,7 +12,7 @@ namespace Service::News { -ServiceFrameworkBase::FunctionInfoBase const* INewsService::FindRequest(u32 key) { +std::optional INewsService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{10100, D<&INewsService::PostLocalNews>, "PostLocalNews"}, FunctionInfo{20100, D<&INewsService::SetPassphrase>, "SetPassphrase"}, diff --git a/src/core/hle/service/bcat/news/news_service.h b/src/core/hle/service/bcat/news/news_service.h index 966ac49f31..577147e604 100644 --- a/src/core/hle/service/bcat/news/news_service.h +++ b/src/core/hle/service/bcat/news/news_service.h @@ -30,7 +30,7 @@ private: Result ClearStorage(); Result ClearSubscriptionStatusAll(); Result GetNewsDatabaseDump(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::News 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 ce97a1f6fc..a6b3029e83 100644 --- a/src/core/hle/service/bcat/news/overwrite_event_holder.cpp +++ b/src/core/hle/service/bcat/news/overwrite_event_holder.cpp @@ -9,7 +9,7 @@ namespace Service::News { -ServiceFrameworkBase::FunctionInfoBase const* IOverwriteEventHolder::FindRequest(u32 key) { +std::optional IOverwriteEventHolder::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IOverwriteEventHolder::Get>, "Get"} ); 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 6c1bb5d0c8..ba52a36527 100644 --- a/src/core/hle/service/bcat/news/overwrite_event_holder.h +++ b/src/core/hle/service/bcat/news/overwrite_event_holder.h @@ -29,7 +29,7 @@ public: private: Result Get(OutCopyHandle out_event); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 febdb2f3d6..66e3b1277e 100644 --- a/src/core/hle/service/bcat/news/service_creator.cpp +++ b/src/core/hle/service/bcat/news/service_creator.cpp @@ -14,7 +14,7 @@ namespace Service::News { -ServiceFrameworkBase::FunctionInfoBase const* IServiceCreator::FindRequest(u32 key) { +std::optional IServiceCreator::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IServiceCreator::CreateNewsService>, "CreateNewsService"}, FunctionInfo{1, D<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"}, diff --git a/src/core/hle/service/bcat/news/service_creator.h b/src/core/hle/service/bcat/news/service_creator.h index 9091fba7bd..a87f30b67e 100644 --- a/src/core/hle/service/bcat/news/service_creator.h +++ b/src/core/hle/service/bcat/news/service_creator.h @@ -32,7 +32,7 @@ private: Result CreateNewsDatabaseService(OutInterface out_interface); Result CreateOverwriteEventHolder(OutInterface out_interface); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; u32 permissions; }; diff --git a/src/core/hle/service/bcat/service_creator.cpp b/src/core/hle/service/bcat/service_creator.cpp index dd47dc6d11..83f97bb17a 100644 --- a/src/core/hle/service/bcat/service_creator.cpp +++ b/src/core/hle/service/bcat/service_creator.cpp @@ -13,7 +13,7 @@ namespace Service::BCAT { -ServiceFrameworkBase::FunctionInfoBase const* IServiceCreator::FindRequest(u32 key) { +std::optional IServiceCreator::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IServiceCreator::CreateBcatService>, "CreateBcatService"}, FunctionInfo{1, D<&IServiceCreator::CreateDeliveryCacheStorageService>, "CreateDeliveryCacheStorageService"}, diff --git a/src/core/hle/service/bcat/service_creator.h b/src/core/hle/service/bcat/service_creator.h index f6382d54ca..02527574dc 100644 --- a/src/core/hle/service/bcat/service_creator.h +++ b/src/core/hle/service/bcat/service_creator.h @@ -36,7 +36,7 @@ private: Result CreateDeliveryCacheStorageServiceWithApplicationId( u64 application_id, OutInterface out_interface); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::unique_ptr backend; Service::FileSystem::FileSystemController& fsc; }; diff --git a/src/core/hle/service/bpc/bpc.cpp b/src/core/hle/service/bpc/bpc.cpp index 7547bee7b3..7c31cd190d 100644 --- a/src/core/hle/service/bpc/bpc.cpp +++ b/src/core/hle/service/bpc/bpc.cpp @@ -34,7 +34,7 @@ public: FunctionInfo{14, nullptr, "GetPowerButton"}, FunctionInfo{15, nullptr, "SetEnableWakeupTimer"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -50,7 +50,7 @@ public: FunctionInfo{3, nullptr, "ClearRtcResetDetected"}, FunctionInfo{4, nullptr, "SetUpRtcResetOnShutdown"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -67,7 +67,7 @@ public: FunctionInfo{4, nullptr, "GetAcOk"}, FunctionInfo{5, nullptr, "GetPowerEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -80,7 +80,7 @@ public: FunctionInfo{0, nullptr, "GetSleepButtonState"}, FunctionInfo{1, nullptr, "GetPowerButtonEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -94,7 +94,7 @@ public: FunctionInfo{1, nullptr, "CancelWakeupTimer"}, FunctionInfo{2, nullptr, "EnableWakeupTimerOnDevice"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -107,7 +107,7 @@ public: FunctionInfo{65000, nullptr, "RebootToFatalError"}, FunctionInfo{65001, nullptr, "SetRebootPayload"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp index 7693abbbef..913c9475e9 100644 --- a/src/core/hle/service/btdrv/btdrv.cpp +++ b/src/core/hle/service/btdrv/btdrv.cpp @@ -25,7 +25,7 @@ public: register_event = service_context.CreateEvent("BT:RegisterEvent"); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -61,7 +61,7 @@ class IBluetoothDriver final : public ServiceFramework { public: explicit IBluetoothDriver(Core::System& system_) : ServiceFramework{system_, "btdrv"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp index 0bc6d8a3fa..9ca77bcb69 100644 --- a/src/core/hle/service/btm/btm.cpp +++ b/src/core/hle/service/btm/btm.cpp @@ -118,7 +118,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -165,7 +165,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -226,7 +226,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -282,7 +282,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -294,7 +294,7 @@ class IBtmDebug final : public ServiceFramework { public: explicit IBtmDebug(Core::System& system_) : ServiceFramework{system_, "btm:dbg"} {} ~IBtmDebug() override = default; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -412,7 +412,7 @@ public: FunctionInfo{116, nullptr, "SetAudioSinkVolume"}, //15.0.0+ FunctionInfo{117, nullptr, "GetAudioSinkVolume"} //15.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/caps/caps.cpp b/src/core/hle/service/caps/caps.cpp index cf325ab9f0..505d1a7fee 100644 --- a/src/core/hle/service/caps/caps.cpp +++ b/src/core/hle/service/caps/caps.cpp @@ -27,7 +27,7 @@ public: FunctionInfo{4001, nullptr, "ShrinkJpeg"}, FunctionInfo{4002, nullptr, "ShrinkJpegEx"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/caps/caps_a.cpp b/src/core/hle/service/caps/caps_a.cpp index dfada135ef..5b7f6b7996 100644 --- a/src/core/hle/service/caps/caps_a.cpp +++ b/src/core/hle/service/caps/caps_a.cpp @@ -13,7 +13,7 @@ namespace Service::Capture { -ServiceFrameworkBase::FunctionInfoBase const* IAlbumAccessorService::FindRequest(u32 key) { +std::optional IAlbumAccessorService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetAlbumFileCount"}, FunctionInfo{1, C<&IAlbumAccessorService::GetAlbumFileList>, "GetAlbumFileList"}, diff --git a/src/core/hle/service/caps/caps_a.h b/src/core/hle/service/caps/caps_a.h index 810f4b1e12..55e5c77264 100644 --- a/src/core/hle/service/caps/caps_a.h +++ b/src/core/hle/service/caps/caps_a.h @@ -57,7 +57,7 @@ private: Result GetAlbumAccessResultForDebug(Out out_result); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 f3ef1dff0b..c62c3cd5d3 100644 --- a/src/core/hle/service/caps/caps_c.cpp +++ b/src/core/hle/service/caps/caps_c.cpp @@ -14,7 +14,7 @@ namespace Service::Capture { -ServiceFrameworkBase::FunctionInfoBase const* IAlbumControlService::FindRequest(u32 key) { +std::optional IAlbumControlService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{1, nullptr, "CaptureRawImage"}, FunctionInfo{2, nullptr, "CaptureRawImageWithTimeout"}, diff --git a/src/core/hle/service/caps/caps_c.h b/src/core/hle/service/caps/caps_c.h index 1569e44592..a1f19bbfc3 100644 --- a/src/core/hle/service/caps/caps_c.h +++ b/src/core/hle/service/caps/caps_c.h @@ -23,7 +23,7 @@ public: ~IAlbumControlService() override; private: Result SetShimLibraryVersion(ShimLibraryVersion library_version, ClientAppletResourceUserId aruid); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::shared_ptr manager = nullptr; }; diff --git a/src/core/hle/service/caps/caps_sc.h b/src/core/hle/service/caps/caps_sc.h index 286de93ee1..422f062e59 100644 --- a/src/core/hle/service/caps/caps_sc.h +++ b/src/core/hle/service/caps/caps_sc.h @@ -19,7 +19,7 @@ public: explicit IScreenShotControlService(Core::System& system_); ~IScreenShotControlService() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/caps/caps_ss.cpp b/src/core/hle/service/caps/caps_ss.cpp index a422df2022..0c444116b7 100644 --- a/src/core/hle/service/caps/caps_ss.cpp +++ b/src/core/hle/service/caps/caps_ss.cpp @@ -12,7 +12,7 @@ namespace Service::Capture { -ServiceFrameworkBase::FunctionInfoBase const* IScreenShotService::FindRequest(u32 key) { +std::optional IScreenShotService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{201, nullptr, "SaveScreenShot"}, FunctionInfo{202, nullptr, "SaveEditedScreenShot"}, diff --git a/src/core/hle/service/caps/caps_ss.h b/src/core/hle/service/caps/caps_ss.h index b932cbc387..8817637fb8 100644 --- a/src/core/hle/service/caps/caps_ss.h +++ b/src/core/hle/service/caps/caps_ss.h @@ -37,7 +37,7 @@ private: const InBuffer thumbnail_image_data_buffer); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 6ad54b341f..e708ddbb68 100644 --- a/src/core/hle/service/caps/caps_su.cpp +++ b/src/core/hle/service/caps/caps_su.cpp @@ -15,7 +15,7 @@ namespace Service::Capture { -ServiceFrameworkBase::FunctionInfoBase const* IScreenShotApplicationService::FindRequest(u32 key) { +std::optional IScreenShotApplicationService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{32, C<&IScreenShotApplicationService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, FunctionInfo{201, nullptr, "SaveScreenShot"}, diff --git a/src/core/hle/service/caps/caps_su.h b/src/core/hle/service/caps/caps_su.h index 6e46bfb853..0fdc994a25 100644 --- a/src/core/hle/service/caps/caps_su.h +++ b/src/core/hle/service/caps/caps_su.h @@ -45,7 +45,7 @@ private: const InBuffer image_data_buffer); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 5ed39fc3e9..c1fa418e03 100644 --- a/src/core/hle/service/caps/caps_u.cpp +++ b/src/core/hle/service/caps/caps_u.cpp @@ -13,7 +13,7 @@ namespace Service::Capture { -ServiceFrameworkBase::FunctionInfoBase const* IAlbumApplicationService::FindRequest(u32 key) { +std::optional IAlbumApplicationService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{32, C<&IAlbumApplicationService::SetShimLibraryVersion>, "SetShimLibraryVersion"}, FunctionInfo{102, C<&IAlbumApplicationService::GetAlbumFileList0AafeAruidDeprecated>, "GetAlbumFileList0AafeAruidDeprecated"}, diff --git a/src/core/hle/service/caps/caps_u.h b/src/core/hle/service/caps/caps_u.h index f21c8c2aab..52e151bbe2 100644 --- a/src/core/hle/service/caps/caps_u.h +++ b/src/core/hle/service/caps/caps_u.h @@ -36,7 +36,7 @@ private: AlbumFileDateTime end_date_time, ClientAppletResourceUserId aruid, OutArray out_entries); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::shared_ptr manager = nullptr; }; diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp index 8da01b03aa..7bed893bd7 100644 --- a/src/core/hle/service/erpt/erpt.cpp +++ b/src/core/hle/service/erpt/erpt.cpp @@ -19,7 +19,7 @@ class ErrorReportContext final : public ServiceFramework { public: explicit ErrorReportContext(Core::System& system_) : ServiceFramework{system_, "erpt:c"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -91,7 +91,7 @@ class ErrorReportSession final : public ServiceFramework { public: explicit ErrorReportSession(Core::System& system_) : ServiceFramework{system_, "erpt:r"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/es/es.cpp b/src/core/hle/service/es/es.cpp index a8df226143..fe0f991727 100644 --- a/src/core/hle/service/es/es.cpp +++ b/src/core/hle/service/es/es.cpp @@ -23,7 +23,7 @@ public: keys.SynthesizeTickets(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -332,7 +332,7 @@ public: FunctionInfo{1000, nullptr, "Cmd1000"}, FunctionInfo{8000, nullptr, "Cmd8000"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -398,7 +398,7 @@ public: FunctionInfo{8002, nullptr, "Cmd8002"}, FunctionInfo{8003, nullptr, "Cmd8003"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/eupld/eupld.cpp b/src/core/hle/service/eupld/eupld.cpp index 46f771bb72..ed1e1c19c5 100644 --- a/src/core/hle/service/eupld/eupld.cpp +++ b/src/core/hle/service/eupld/eupld.cpp @@ -23,7 +23,7 @@ public: FunctionInfo{3, nullptr, "SetAutoUpload"}, FunctionInfo{4, nullptr, "GetAutoUpload"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -40,7 +40,7 @@ public: FunctionInfo{4, nullptr, "CancelUpload"}, FunctionInfo{5, nullptr, "GetResult"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/fatal/fatal.cpp b/src/core/hle/service/fatal/fatal.cpp index fd5da76a16..4c9eca5d5b 100644 --- a/src/core/hle/service/fatal/fatal.cpp +++ b/src/core/hle/service/fatal/fatal.cpp @@ -170,7 +170,7 @@ public: explicit Fatal_P(std::shared_ptr module_, Core::System& system_) : Interface(std::move(module_), system_, "fatal:p") {} ~Fatal_P() override = default; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -184,7 +184,7 @@ public: explicit Fatal_U(std::shared_ptr module_, Core::System& system_) : Interface(std::move(module_), system_, "fatal:u") {} ~Fatal_U() override = default; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/fgm/fgm.cpp b/src/core/hle/service/fgm/fgm.cpp index 96bfd07bbe..96ea3478ea 100644 --- a/src/core/hle/service/fgm/fgm.cpp +++ b/src/core/hle/service/fgm/fgm.cpp @@ -18,7 +18,7 @@ class IRequest final : public ServiceFramework { public: explicit IRequest(Core::System& system_) : ServiceFramework{system_, "IRequest"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -34,7 +34,7 @@ class FGM final : public ServiceFramework { public: explicit FGM(Core::System& system_, const char* name) : ServiceFramework{system_, name} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -56,7 +56,7 @@ class FGM_DBG final : public ServiceFramework { public: explicit FGM_DBG(Core::System& system_) : ServiceFramework{system_, "fgm:dbg"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/filesystem/fsp/fs_i_directory.cpp b/src/core/hle/service/filesystem/fsp/fs_i_directory.cpp index e402b151e6..793b86cc51 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_directory.cpp +++ b/src/core/hle/service/filesystem/fsp/fs_i_directory.cpp @@ -11,7 +11,7 @@ namespace Service::FileSystem { -ServiceFrameworkBase::FunctionInfoBase const* IDirectory::FindRequest(u32 key) { +std::optional IDirectory::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IDirectory::Read>, "Read"}, FunctionInfo{1, D<&IDirectory::GetEntryCount>, "GetEntryCount"} 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 b3c4564b97..f2a57260e1 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_directory.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_directory.h @@ -30,7 +30,7 @@ private: const OutArray out_entries); Result GetEntryCount(Out out_count); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::FileSystem 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 ca5606a61a..992330e149 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_file.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_file.h @@ -31,7 +31,7 @@ private: Result SetSize(s64 size); Result GetSize(Out out_size); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp index f7a4bce8d9..6ab4916a36 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp +++ b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.cpp @@ -13,7 +13,7 @@ namespace Service::FileSystem { -ServiceFrameworkBase::FunctionInfoBase const* IFileSystem::FindRequest(u32 key) { +std::optional IFileSystem::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IFileSystem::CreateFile>, "CreateFile"}, FunctionInfo{1, D<&IFileSystem::DeleteFile>, "DeleteFile"}, 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 e14cd953c0..11d3c7fb31 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_filesystem.h @@ -58,7 +58,7 @@ public: Result GetFileSystemAttribute(Out out_attribute); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 81502450b4..31182e9159 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 @@ -20,7 +20,7 @@ private: Result Add(std::shared_ptr filesystem); Result Commit(); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 489dacce04..7faa4291c0 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 @@ -45,7 +45,7 @@ private: void FindNormalSaves(FileSys::SaveDataSpaceId space, const FileSys::VirtualDir& type); void FindTemporaryStorageSaves(FileSys::SaveDataSpaceId space, const FileSys::VirtualDir& type); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 5984e7deb4..44d5a6c8bb 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_storage.h +++ b/src/core/hle/service/filesystem/fsp/fs_i_storage.h @@ -23,7 +23,7 @@ private: s64 offset, s64 length); Result GetSize(Out out_size); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/filesystem/fsp/fsp_ldr.h b/src/core/hle/service/filesystem/fsp/fsp_ldr.h index 84d1f83fc0..fe3abeff1d 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_ldr.h +++ b/src/core/hle/service/filesystem/fsp/fsp_ldr.h @@ -19,7 +19,7 @@ public: explicit FSP_LDR(Core::System& system_); ~FSP_LDR() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/filesystem/fsp/fsp_pr.h b/src/core/hle/service/filesystem/fsp/fsp_pr.h index d6419187d6..bc692151a5 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_pr.h +++ b/src/core/hle/service/filesystem/fsp/fsp_pr.h @@ -19,7 +19,7 @@ public: explicit FSP_PR(Core::System& system_); ~FSP_PR() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp index 13f3ff7475..cb349636d5 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp @@ -47,7 +47,7 @@ namespace Service::FileSystem { -ServiceFrameworkBase::FunctionInfoBase const* FSP_SRV::FindRequest(u32 key) { +std::optional FSP_SRV::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "OpenFileSystem"}, FunctionInfo{1, D<&FSP_SRV::SetCurrentProcess>, "SetCurrentProcess"}, diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.h b/src/core/hle/service/filesystem/fsp/fsp_srv.h index 31f5cb5026..ebda008bcc 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.h @@ -115,7 +115,7 @@ private: s64 available_size, s64 journal_size); Result GetCacheStorageSize(s32 index, Out out_data_size, Out out_journal_size); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; FileSystemController& fsc; const FileSys::ContentProvider& content_provider; const Core::Reporter& reporter; diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index e50a0d3b6b..ba9d5504a1 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -25,7 +25,7 @@ public: completion_event = service_context.CreateEvent("IFriendService:CompletionEvent"); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -378,7 +378,7 @@ public: notification_event = service_context.CreateEvent("INotificationService:NotifyEvent"); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -499,7 +499,7 @@ public: : ServiceFramework{system_, "nd:app"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -515,7 +515,7 @@ public: : ServiceFramework{system_, "nd:sys"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/friend/friend_interface.h b/src/core/hle/service/friend/friend_interface.h index 56b2877e70..f67aeab79d 100644 --- a/src/core/hle/service/friend/friend_interface.h +++ b/src/core/hle/service/friend/friend_interface.h @@ -15,7 +15,7 @@ public: explicit Friend(std::shared_ptr module_, Core::System& system_, const char* name); ~Friend() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/glue/arp.cpp b/src/core/hle/service/glue/arp.cpp index 858d3f3ed0..203adb7ca7 100644 --- a/src/core/hle/service/glue/arp.cpp +++ b/src/core/hle/service/glue/arp.cpp @@ -150,7 +150,7 @@ public: explicit IRegistrar(Core::System& system_, IssuerFn&& issuer) : ServiceFramework{system_, "IRegistrar"}, issue_process_id{std::move(issuer)} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/glue/arp.h b/src/core/hle/service/glue/arp.h index 7c7a72058c..de966475f9 100644 --- a/src/core/hle/service/glue/arp.h +++ b/src/core/hle/service/glue/arp.h @@ -24,7 +24,7 @@ private: void GetApplicationControlProperty(HLERequestContext& ctx); void GetApplicationControlPropertyWithApplicationId(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -51,7 +51,7 @@ private: void AcquireRegistrar(HLERequestContext& ctx); void UnregisterApplicationInstance(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/glue/bgtc.h b/src/core/hle/service/glue/bgtc.h index f03b97f3dc..0ef0ab902f 100644 --- a/src/core/hle/service/glue/bgtc.h +++ b/src/core/hle/service/glue/bgtc.h @@ -20,7 +20,7 @@ public: ~BGTC_T() override; void OpenTaskService(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -33,7 +33,7 @@ public: explicit ITaskService(Core::System& system_); ~ITaskService() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -61,7 +61,7 @@ public: explicit BGTC_SC(Core::System& system_); ~BGTC_SC() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/glue/ectx.cpp b/src/core/hle/service/glue/ectx.cpp index 33af739b05..80d22a0ca7 100644 --- a/src/core/hle/service/glue/ectx.cpp +++ b/src/core/hle/service/glue/ectx.cpp @@ -14,7 +14,7 @@ class IContextRegistrar : public ServiceFramework { public: IContextRegistrar(Core::System& system_) : ServiceFramework{system_, "IContextRegistrar"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/glue/ectx.h b/src/core/hle/service/glue/ectx.h index fbe0e266ec..01f109c609 100644 --- a/src/core/hle/service/glue/ectx.h +++ b/src/core/hle/service/glue/ectx.h @@ -19,7 +19,7 @@ public: explicit ECTX_W(Core::System& system_); ~ECTX_W() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -34,7 +34,7 @@ public: explicit ECTX_R(Core::System& system_); ~ECTX_R() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -52,7 +52,7 @@ public: private: void CreateContextRegistrar(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/glue/notif.cpp b/src/core/hle/service/glue/notif.cpp index f582b7b8cc..a369b78ddd 100644 --- a/src/core/hle/service/glue/notif.cpp +++ b/src/core/hle/service/glue/notif.cpp @@ -20,7 +20,7 @@ namespace { constexpr inline std::size_t MaxAlarms = 8; } -ServiceFrameworkBase::FunctionInfoBase const* INotificationServicesForApplication::FindRequest(u32 key) { +std::optional INotificationServicesForApplication::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{500, D<&INotificationServicesForApplication::RegisterAlarmSetting>, "RegisterAlarmSetting"}, FunctionInfo{510, D<&INotificationServicesForApplication::UpdateAlarmSetting>, "UpdateAlarmSetting"}, @@ -32,7 +32,7 @@ ServiceFrameworkBase::FunctionInfoBase const* INotificationServicesForApplicatio return HandlerTableGenerateWithFind(key, functions); } -ServiceFrameworkBase::FunctionInfoBase const* INotificationServices::FindRequest(u32 key) { +std::optional INotificationServices::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{500, D<&INotificationServices::RegisterAlarmSetting>, "RegisterAlarmSetting"}, FunctionInfo{510, D<&INotificationServices::UpdateAlarmSetting>, "UpdateAlarmSetting"}, @@ -207,7 +207,7 @@ public: notification_event = service_context.CreateEvent("INotificationSystemEventAccessor:NotificationEvent"); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/glue/notif.h b/src/core/hle/service/glue/notif.h index ceecc050bf..c5367e5da4 100644 --- a/src/core/hle/service/glue/notif.h +++ b/src/core/hle/service/glue/notif.h @@ -101,7 +101,7 @@ private: Result DeleteAlarmSetting(AlarmSettingId alarm_setting_id); Result Initialize(ClientAppletResourceUserId aruid); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; NotificationServiceImpl impl; }; @@ -131,7 +131,7 @@ private: Out out_notification_presentation_setting, NotificationChannel notification_channel); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 a8bd1f271c..dc7651fd1f 100644 --- a/src/core/hle/service/glue/time/static.cpp +++ b/src/core/hle/service/glue/time/static.cpp @@ -24,7 +24,7 @@ namespace Service::Glue::Time { -ServiceFrameworkBase::FunctionInfoBase const* StaticService::FindRequest(u32 key) { +std::optional StaticService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&StaticService::GetStandardUserSystemClock>, "GetStandardUserSystemClock"}, FunctionInfo{1, D<&StaticService::GetStandardNetworkSystemClock>, "GetStandardNetworkSystemClock"}, diff --git a/src/core/hle/service/glue/time/static.h b/src/core/hle/service/glue/time/static.h index 40b8df07fd..5856553461 100644 --- a/src/core/hle/service/glue/time/static.h +++ b/src/core/hle/service/glue/time/static.h @@ -72,7 +72,7 @@ public: Result CalculateSpanBetween(Out out_time, InClockSnapshot a, InClockSnapshot b); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::shared_ptr m_set_sys; std::shared_ptr m_time_m; diff --git a/src/core/hle/service/glue/time/time_zone.cpp b/src/core/hle/service/glue/time/time_zone.cpp index 403c9f51d9..6e861b4060 100644 --- a/src/core/hle/service/glue/time/time_zone.cpp +++ b/src/core/hle/service/glue/time/time_zone.cpp @@ -19,7 +19,7 @@ namespace Service::Glue::Time { -ServiceFrameworkBase::FunctionInfoBase const* TimeZoneService::FindRequest(u32 key) { +std::optional TimeZoneService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"}, FunctionInfo{1, D<&TimeZoneService::SetDeviceLocationName>, "SetDeviceLocationName"}, diff --git a/src/core/hle/service/glue/time/time_zone.h b/src/core/hle/service/glue/time/time_zone.h index 604c590d30..839d823e67 100644 --- a/src/core/hle/service/glue/time/time_zone.h +++ b/src/core/hle/service/glue/time/time_zone.h @@ -80,7 +80,7 @@ public: const Service::PSC::Time::CalendarTime& calendar_time); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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/gpio/gpio.cpp b/src/core/hle/service/gpio/gpio.cpp index 976630b274..5441149c65 100644 --- a/src/core/hle/service/gpio/gpio.cpp +++ b/src/core/hle/service/gpio/gpio.cpp @@ -16,7 +16,7 @@ public: explicit GPIO(Core::System& system_) : ServiceFramework{system_, "gpio"} {} ~GPIO() override = default; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/grc/grc.cpp b/src/core/hle/service/grc/grc.cpp index 0624ccddab..5f6c84e914 100644 --- a/src/core/hle/service/grc/grc.cpp +++ b/src/core/hle/service/grc/grc.cpp @@ -23,7 +23,7 @@ public: FunctionInfo{101, nullptr, "CreateMovieMaker"}, FunctionInfo{9903, nullptr, "SetOffscreenRecordingMarker"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -37,7 +37,7 @@ public: FunctionInfo{2, nullptr, "Transfer"}, FunctionInfo{3, nullptr, "Cmd3"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; 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 9a4c8aef14..7a4f4cce2c 100644 --- a/src/core/hle/service/hid/active_vibration_device_list.cpp +++ b/src/core/hle/service/hid/active_vibration_device_list.cpp @@ -14,7 +14,7 @@ namespace Service::HID { -ServiceFrameworkBase::FunctionInfoBase const* IActiveVibrationDeviceList::FindRequest(u32 key) { +std::optional IActiveVibrationDeviceList::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IActiveVibrationDeviceList::ActivateVibrationDevice>, "ActivateVibrationDevice"} ); diff --git a/src/core/hle/service/hid/active_vibration_device_list.h b/src/core/hle/service/hid/active_vibration_device_list.h index 5725089ddb..57c31a8df1 100644 --- a/src/core/hle/service/hid/active_vibration_device_list.h +++ b/src/core/hle/service/hid/active_vibration_device_list.h @@ -30,7 +30,7 @@ public: private: static constexpr std::size_t MaxVibrationDevicesHandles{0x100}; Result ActivateVibrationDevice(Core::HID::VibrationDeviceHandle vibration_device_handle); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; mutable std::mutex mutex; std::size_t list_size{}; diff --git a/src/core/hle/service/hid/applet_resource.cpp b/src/core/hle/service/hid/applet_resource.cpp index 0192ea9085..6f658fa875 100644 --- a/src/core/hle/service/hid/applet_resource.cpp +++ b/src/core/hle/service/hid/applet_resource.cpp @@ -12,7 +12,7 @@ namespace Service::HID { -ServiceFrameworkBase::FunctionInfoBase const* IAppletResource::FindRequest(u32 key) { +std::optional IAppletResource::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IAppletResource::GetSharedMemoryHandle>, "GetSharedMemoryHandle"} ); diff --git a/src/core/hle/service/hid/applet_resource.h b/src/core/hle/service/hid/applet_resource.h index 5cf1fef34c..7b5d915218 100644 --- a/src/core/hle/service/hid/applet_resource.h +++ b/src/core/hle/service/hid/applet_resource.h @@ -32,7 +32,7 @@ public: private: Result GetSharedMemoryHandle(OutCopyHandle out_shared_memory_handle); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; u64 aruid{}; std::shared_ptr resource_manager; }; diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 4f2d7d7aaa..8621b6e076 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -32,7 +32,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetConsoleSixAxisSensorCalibrationValues"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~IHidTemporaryServer() override = default; @@ -50,7 +50,7 @@ public: FunctionInfo{3, nullptr, "GetReadSession"}, FunctionInfo{4, nullptr, "GetWriteSession"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~AHID_CD() override = default; @@ -69,7 +69,7 @@ public: FunctionInfo{4, nullptr, "DetachDevice"}, FunctionInfo{5, nullptr, "SetDeviceFilter"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~AHID_HDR() override = default; @@ -208,7 +208,7 @@ public: return resource_manager; } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp index 04294cf15a..60d37089f1 100644 --- a/src/core/hle/service/hid/hid_server.cpp +++ b/src/core/hle/service/hid/hid_server.cpp @@ -42,7 +42,7 @@ namespace Service::HID { -ServiceFrameworkBase::FunctionInfoBase const* IHidServer::FindRequest(u32 key) { +std::optional IHidServer::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IHidServer::CreateAppletResource>, "CreateAppletResource"}, FunctionInfo{1, C<&IHidServer::ActivateDebugPad>, "ActivateDebugPad"}, diff --git a/src/core/hle/service/hid/hid_server.h b/src/core/hle/service/hid/hid_server.h index e198901de4..f2c08e9df8 100644 --- a/src/core/hle/service/hid/hid_server.h +++ b/src/core/hle/service/hid/hid_server.h @@ -265,7 +265,7 @@ private: Result SetTouchScreenResolution(u32 width, u32 height, ClientAppletResourceUserId aruid); Result SetMouseLibraryVersion(ClientAppletResourceUserId aruid); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::shared_ptr resource_manager; std::shared_ptr firmware_settings; diff --git a/src/core/hle/service/hid/hid_system_server.h b/src/core/hle/service/hid/hid_system_server.h index 0db29a2953..6dfaa13bf5 100644 --- a/src/core/hle/service/hid/hid_system_server.h +++ b/src/core/hle/service/hid/hid_system_server.h @@ -84,7 +84,7 @@ private: std::shared_ptr GetResourceManager(); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/hid/hidbus.cpp b/src/core/hle/service/hid/hidbus.cpp index 8042e7949d..326cfbf74b 100644 --- a/src/core/hle/service/hid/hidbus.cpp +++ b/src/core/hle/service/hid/hidbus.cpp @@ -26,7 +26,7 @@ namespace Service::HID { // (15ms, 66Hz) constexpr auto hidbus_update_ns = std::chrono::nanoseconds{15 * 1000 * 1000}; -ServiceFrameworkBase::FunctionInfoBase const* Hidbus::FindRequest(u32 key) { +std::optional Hidbus::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{1, C<&Hidbus::GetBusHandle>, "GetBusHandle"}, FunctionInfo{2, C<&Hidbus::IsExternalDeviceConnected>, "IsExternalDeviceConnected"}, diff --git a/src/core/hle/service/hid/hidbus.h b/src/core/hle/service/hid/hidbus.h index fc7dd93c24..9ad097150e 100644 --- a/src/core/hle/service/hid/hidbus.h +++ b/src/core/hle/service/hid/hidbus.h @@ -147,7 +147,7 @@ private: } } - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; bool is_hidbus_enabled{false}; HidbusStatusManager hidbus_status{}; diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp index 42fc07c066..a17395b596 100644 --- a/src/core/hle/service/hid/irs.cpp +++ b/src/core/hle/service/hid/irs.cpp @@ -29,7 +29,7 @@ namespace Service::IRS { -ServiceFrameworkBase::FunctionInfoBase const* IRS::FindRequest(u32 key) { +std::optional IRS::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{302, C<&IRS::ActivateIrsensor>, "ActivateIrsensor"}, FunctionInfo{303, C<&IRS::DeactivateIrsensor>, "DeactivateIrsensor"}, diff --git a/src/core/hle/service/hid/irs.h b/src/core/hle/service/hid/irs.h index 73169924ad..be81ea75a9 100644 --- a/src/core/hle/service/hid/irs.h +++ b/src/core/hle/service/hid/irs.h @@ -157,7 +157,7 @@ private: return static_cast(*processors[index]); } - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; Core::HID::EmulatedController* npad_device = nullptr; StatusManager* shared_memory = nullptr; @@ -169,7 +169,7 @@ public: explicit IRS_SYS(Core::System& system); ~IRS_SYS() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/hid/xcd.h b/src/core/hle/service/hid/xcd.h index 33dc6e32d1..af1dd88ef7 100644 --- a/src/core/hle/service/hid/xcd.h +++ b/src/core/hle/service/hid/xcd.h @@ -19,7 +19,7 @@ public: explicit XCD_SYS(Core::System& system_); ~XCD_SYS() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/i2c/i2c.cpp b/src/core/hle/service/i2c/i2c.cpp index 3ee8023ef4..d0a5e29f8c 100644 --- a/src/core/hle/service/i2c/i2c.cpp +++ b/src/core/hle/service/i2c/i2c.cpp @@ -25,7 +25,7 @@ public: R_THROW(ResultUnknown); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -75,7 +75,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/jit/jit.cpp b/src/core/hle/service/jit/jit.cpp index f201e82d1e..9059aaf518 100644 --- a/src/core/hle/service/jit/jit.cpp +++ b/src/core/hle/service/jit/jit.cpp @@ -47,7 +47,7 @@ public: configuration.sys_ro_memory = configuration.user_ro_memory; } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -259,7 +259,7 @@ class JITU final : public ServiceFramework { public: explicit JITU(Core::System& system_) : ServiceFramework{system_, "jit:u"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/lbl/lbl.cpp b/src/core/hle/service/lbl/lbl.cpp index 560360a495..9b245201ff 100644 --- a/src/core/hle/service/lbl/lbl.cpp +++ b/src/core/hle/service/lbl/lbl.cpp @@ -20,7 +20,7 @@ class LBL final : public ServiceFramework { public: explicit LBL(Core::System& system_) : ServiceFramework{system_, "lbl"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/ldn/ldn.cpp b/src/core/hle/service/ldn/ldn.cpp index 2b3c85ec56..427904010e 100644 --- a/src/core/hle/service/ldn/ldn.cpp +++ b/src/core/hle/service/ldn/ldn.cpp @@ -21,7 +21,7 @@ class IClientProcessMonitor final public: explicit IClientProcessMonitor(Core::System& system_) : ServiceFramework{system_, "IClientProcessMonitor"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~IClientProcessMonitor() override = default; @@ -40,7 +40,7 @@ class IMonitorServiceCreator final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } private: @@ -60,7 +60,7 @@ class ISystemServiceCreator final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } private: @@ -90,7 +90,7 @@ class IUserServiceCreator final : public ServiceFramework { public: explicit IUserServiceCreator(Core::System& system_) : ServiceFramework{system_, "ldn:u"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } private: @@ -120,7 +120,7 @@ class ISfServiceCreator final : public ServiceFramework { public: explicit ISfServiceCreator(Core::System& system_, bool is_system_, const char* name_) : ServiceFramework{system_, name_}, is_system{is_system_} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } private: @@ -152,7 +152,7 @@ class ISfMonitorServiceCreator final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } private: diff --git a/src/core/hle/service/ldn/monitor_service.cpp b/src/core/hle/service/ldn/monitor_service.cpp index 20fc08d730..6a60b0b3d8 100644 --- a/src/core/hle/service/ldn/monitor_service.cpp +++ b/src/core/hle/service/ldn/monitor_service.cpp @@ -10,7 +10,7 @@ namespace Service::LDN { -ServiceFrameworkBase::FunctionInfoBase const* IMonitorService::FindRequest(u32 key) { +std::optional IMonitorService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IMonitorService::GetStateForMonitor>, "GetStateForMonitor"}, FunctionInfo{1, nullptr, "GetNetworkInfoForMonitor"}, diff --git a/src/core/hle/service/ldn/monitor_service.h b/src/core/hle/service/ldn/monitor_service.h index 64bc05d54d..9c1acd0a1e 100644 --- a/src/core/hle/service/ldn/monitor_service.h +++ b/src/core/hle/service/ldn/monitor_service.h @@ -26,7 +26,7 @@ private: Result InitializeMonitor(); Result FinalizeMonitor(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 d31bc7fd9c..ebe06b2059 100644 --- a/src/core/hle/service/ldn/sf_monitor_service.cpp +++ b/src/core/hle/service/ldn/sf_monitor_service.cpp @@ -10,7 +10,7 @@ namespace Service::LDN { -ServiceFrameworkBase::FunctionInfoBase const* ISfMonitorService::FindRequest(u32 key) { +std::optional ISfMonitorService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&ISfMonitorService::Initialize>, "Initialize"}, FunctionInfo{288, C<&ISfMonitorService::GetGroupInfo>, "GetGroupInfo"}, diff --git a/src/core/hle/service/ldn/sf_monitor_service.h b/src/core/hle/service/ldn/sf_monitor_service.h index 2768d7ea49..09ca16727d 100644 --- a/src/core/hle/service/ldn/sf_monitor_service.h +++ b/src/core/hle/service/ldn/sf_monitor_service.h @@ -24,7 +24,7 @@ public: private: Result Initialize(Out out_value); Result GetGroupInfo(OutLargeData out_group_info); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::LDN diff --git a/src/core/hle/service/ldn/sf_service.h b/src/core/hle/service/ldn/sf_service.h index 696b39bd2d..1b3e1b731d 100644 --- a/src/core/hle/service/ldn/sf_service.h +++ b/src/core/hle/service/ldn/sf_service.h @@ -20,7 +20,7 @@ public: explicit ISfService(Core::System& system_); ~ISfService() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ldn/sf_service_monitor.cpp b/src/core/hle/service/ldn/sf_service_monitor.cpp index e28bf22aad..574ba82a0b 100644 --- a/src/core/hle/service/ldn/sf_service_monitor.cpp +++ b/src/core/hle/service/ldn/sf_service_monitor.cpp @@ -10,7 +10,7 @@ namespace Service::LDN { -ServiceFrameworkBase::FunctionInfoBase const* ISfServiceMonitor::FindRequest(u32 key) { +std::optional ISfServiceMonitor::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&ISfServiceMonitor::Initialize>, "Initialize"}, FunctionInfo{256, nullptr, "AttachNetworkInterfaceStateChangeEvent"}, diff --git a/src/core/hle/service/ldn/sf_service_monitor.h b/src/core/hle/service/ldn/sf_service_monitor.h index 23989aad2e..5e5e64ae6c 100644 --- a/src/core/hle/service/ldn/sf_service_monitor.h +++ b/src/core/hle/service/ldn/sf_service_monitor.h @@ -24,7 +24,7 @@ public: private: Result Initialize(Out out_value); Result GetGroupInfo(OutLargeData out_group_info, GroupInfo in_group_info); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::LDN 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 7f262afd13..9d3d49aac4 100644 --- a/src/core/hle/service/ldn/system_local_communication_service.cpp +++ b/src/core/hle/service/ldn/system_local_communication_service.cpp @@ -9,7 +9,7 @@ namespace Service::LDN { -ServiceFrameworkBase::FunctionInfoBase const* ISystemLocalCommunicationService::FindRequest(u32 key) { +std::optional ISystemLocalCommunicationService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetState"}, FunctionInfo{1, nullptr, "GetNetworkInfo"}, diff --git a/src/core/hle/service/ldn/system_local_communication_service.h b/src/core/hle/service/ldn/system_local_communication_service.h index 6e2db93df8..c7e937e3a2 100644 --- a/src/core/hle/service/ldn/system_local_communication_service.h +++ b/src/core/hle/service/ldn/system_local_communication_service.h @@ -23,7 +23,7 @@ public: private: Result InitializeSystem2(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::LDN 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 1596d58a6b..26a742bf0b 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.cpp +++ b/src/core/hle/service/ldn/user_local_communication_service.cpp @@ -21,7 +21,7 @@ namespace Service::LDN { -ServiceFrameworkBase::FunctionInfoBase const* IUserLocalCommunicationService::FindRequest(u32 key) { +std::optional IUserLocalCommunicationService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IUserLocalCommunicationService::GetState>, "GetState"}, FunctionInfo{1, D<&IUserLocalCommunicationService::GetNetworkInfo>, "GetNetworkInfo"}, diff --git a/src/core/hle/service/ldn/user_local_communication_service.h b/src/core/hle/service/ldn/user_local_communication_service.h index 61cf980464..6f832b7a23 100644 --- a/src/core/hle/service/ldn/user_local_communication_service.h +++ b/src/core/hle/service/ldn/user_local_communication_service.h @@ -89,7 +89,7 @@ private: /// Callback to parse and handle a received LDN packet. void OnLDNPacketReceived(const Network::LDNPacket& packet); void OnEventFired(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext service_context; Kernel::KEvent* state_change_event; diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 900df0c00e..25ecc58fa4 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -19,7 +19,7 @@ public: FunctionInfo{1, nullptr, "FlushArguments"}, FunctionInfo{2, nullptr, "GetProcessModuleInfo"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -35,7 +35,7 @@ public: FunctionInfo{3, nullptr, "UnpinProgram"}, FunctionInfo{4, nullptr, "SetEnabledProgramVerification"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -48,7 +48,7 @@ public: FunctionInfo{0, nullptr, "SetProgramArgument"}, FunctionInfo{1, nullptr, "FlushArguments"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp index 49bfe819f2..1d3545e764 100644 --- a/src/core/hle/service/lm/lm.cpp +++ b/src/core/hle/service/lm/lm.cpp @@ -322,7 +322,7 @@ private: }; static_assert(sizeof(LogPacketHeader) == 0x18, "LogPacketHeader is an invalid size"); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -339,7 +339,7 @@ class LM final : public ServiceFramework { public: explicit LM(Core::System& system_) : ServiceFramework{system_, "lm"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -361,7 +361,7 @@ class LM_GET final : public ServiceFramework { public: explicit LM_GET(Core::System& system_) : ServiceFramework{system_, "lm:get"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/mig/mig.cpp b/src/core/hle/service/mig/mig.cpp index a17a404311..f0bf21a70f 100644 --- a/src/core/hle/service/mig/mig.cpp +++ b/src/core/hle/service/mig/mig.cpp @@ -16,7 +16,7 @@ class MIG_USR final : public ServiceFramework { public: explicit MIG_USR(Core::System& system_) : ServiceFramework{system_, "mig:usr"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/mii/mii.cpp b/src/core/hle/service/mii/mii.cpp index 8977dccabe..642a9e4907 100644 --- a/src/core/hle/service/mii/mii.cpp +++ b/src/core/hle/service/mii/mii.cpp @@ -22,7 +22,7 @@ namespace Service::Mii { -ServiceFrameworkBase::FunctionInfoBase const* IStaticService::FindRequest(u32 key) { +std::optional IStaticService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IStaticService::GetDatabaseService>, "GetDatabaseService"} ); @@ -39,7 +39,7 @@ public: manager->Initialize(metadata); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -324,7 +324,7 @@ class IImageDatabaseService final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/mii/mii.h b/src/core/hle/service/mii/mii.h index 0e4d6452ad..ba20db40d7 100644 --- a/src/core/hle/service/mii/mii.h +++ b/src/core/hle/service/mii/mii.h @@ -27,7 +27,7 @@ public: private: Result GetDatabaseService(Out> out_database_service); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::shared_ptr manager{nullptr}; bool is_system{}; }; diff --git a/src/core/hle/service/mm/mm_u.cpp b/src/core/hle/service/mm/mm_u.cpp index a28a6450fb..0b361ecdd2 100644 --- a/src/core/hle/service/mm/mm_u.cpp +++ b/src/core/hle/service/mm/mm_u.cpp @@ -51,7 +51,7 @@ class MM_U final : public ServiceFramework { public: explicit MM_U(Core::System& system_) : ServiceFramework{system_, "mm:u"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/mnpp/mnpp.cpp b/src/core/hle/service/mnpp/mnpp.cpp index 86389ca829..c5bc306302 100644 --- a/src/core/hle/service/mnpp/mnpp.cpp +++ b/src/core/hle/service/mnpp/mnpp.cpp @@ -16,7 +16,7 @@ class MNPP_APP final : public ServiceFramework { public: explicit MNPP_APP(Core::System& system_) : ServiceFramework{system_, "mnpp:app"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -53,7 +53,7 @@ public: FunctionInfo{300, nullptr, "Cmd300"}, FunctionInfo{400, nullptr, "Cmd400"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -69,7 +69,7 @@ public: FunctionInfo{20, nullptr, "Cmd20"}, FunctionInfo{100, nullptr, "Cmd100"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/ncm/ncm.cpp b/src/core/hle/service/ncm/ncm.cpp index 5748ab5a5d..4091eadcf9 100644 --- a/src/core/hle/service/ncm/ncm.cpp +++ b/src/core/hle/service/ncm/ncm.cpp @@ -48,7 +48,7 @@ public: FunctionInfo{18, nullptr, "RedirectApplicationProgramPathForDebug"}, FunctionInfo{19, nullptr, "EraseProgramRedirectionForDebug"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -73,7 +73,7 @@ public: FunctionInfo{8, nullptr, "Refresh"}, FunctionInfo{9, nullptr, "RefreshExcluding"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -90,7 +90,7 @@ public: FunctionInfo{3, nullptr, "RefreshApplicationAddOnContent"}, FunctionInfo{4, nullptr, "UnregisterApplicationAddOnContent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -100,7 +100,7 @@ public: explicit IContentStorage(Core::System& system_, FileSys::StorageId id) : ServiceFramework{system_, "IContentStorage"}, storage{id} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -256,7 +256,7 @@ public: explicit IContentMetaDatabase(Core::System& system_, FileSys::StorageId id) : ServiceFramework{system_, "IContentMetaDatabase"}, storage{id} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -365,7 +365,7 @@ public: FunctionInfo{2, nullptr, "RefreshLocationResolver"}, FunctionInfo{3, nullptr, "OpenAddOnContentLocationResolver"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -374,7 +374,7 @@ class NCM final : public ServiceFramework { public: explicit NCM(Core::System& system_) : ServiceFramework{system_, "ncm"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -427,7 +427,7 @@ public: : ServiceFramework{system_, "ncm:v"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index 1071304d21..d3a986faea 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp @@ -20,7 +20,7 @@ class IUser final : public NfcInterface { public: explicit IUser(Core::System& system_) : NfcInterface(system_, "NFC::IUser", BackendType::Nfc) {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMapWithClass( @@ -53,7 +53,7 @@ class ISystem final : public NfcInterface { public: explicit ISystem(Core::System& system_) : NfcInterface{system_, "NFC::ISystem", BackendType::Nfc} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMapWithClass( @@ -92,7 +92,7 @@ class MFIUser final : public MFInterface { public: explicit MFIUser(Core::System& system_) : MFInterface{system_, "NFC::MFInterface", BackendType::Mifare} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMapWithClass( @@ -122,7 +122,7 @@ public: FunctionInfo{1, nullptr, "Finalize"}, FunctionInfo{2, nullptr, "NotifyForegroundApplet"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -131,7 +131,7 @@ class NFC_AM final : public ServiceFramework { public: explicit NFC_AM(Core::System& system_) : ServiceFramework{system_, "nfc:am"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -153,7 +153,7 @@ class NFC_MF_U final : public ServiceFramework { public: explicit NFC_MF_U(Core::System& system_) : ServiceFramework{system_, "nfc:mf:u"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -175,7 +175,7 @@ class NFC_U final : public ServiceFramework { public: explicit NFC_U(Core::System& system_) : ServiceFramework{system_, "nfc:user"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -197,7 +197,7 @@ class NFC_SYS final : public ServiceFramework { public: explicit NFC_SYS(Core::System& system_) : ServiceFramework{system_, "nfc:sys"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/nfp/nfp.cpp b/src/core/hle/service/nfp/nfp.cpp index 41c7a3b097..bfeb7d5553 100644 --- a/src/core/hle/service/nfp/nfp.cpp +++ b/src/core/hle/service/nfp/nfp.cpp @@ -16,7 +16,7 @@ class IUser final : public Interface { public: explicit IUser(Core::System& system_) : Interface(system_, "NFP:IUser") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMapWithClass( @@ -53,7 +53,7 @@ class ISystem final : public Interface { public: explicit ISystem(Core::System& system_) : Interface(system_, "NFP:ISystem") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMapWithClass( @@ -92,7 +92,7 @@ class IDebug final : public Interface { public: explicit IDebug(Core::System& system_) : Interface(system_, "NFP:IDebug") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMapWithClass( @@ -152,7 +152,7 @@ private: rb.PushIpcInterface(ctx, system); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -164,7 +164,7 @@ class ISystemManager final : public ServiceFramework { public: explicit ISystemManager(Core::System& system_) : ServiceFramework{system_, "nfp:sys"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -186,7 +186,7 @@ class IDebugManager final : public ServiceFramework { public: explicit IDebugManager(Core::System& system_) : ServiceFramework{system_, "nfp:dbg"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/ngc/ngc.cpp b/src/core/hle/service/ngc/ngc.cpp index c1cd7b932f..fb3ef39093 100644 --- a/src/core/hle/service/ngc/ngc.cpp +++ b/src/core/hle/service/ngc/ngc.cpp @@ -23,7 +23,7 @@ class IService final : public ServiceFramework { public: explicit IService(Core::System& system_) : ServiceFramework{system_, "ngct:u"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -67,7 +67,7 @@ class NgcServiceImpl final : public ServiceFramework { public: explicit NgcServiceImpl(Core::System& system_) : ServiceFramework(system_, "ngc:u") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -167,7 +167,7 @@ public: FunctionInfo{120, nullptr, "CalculateContentFingerprint"}, FunctionInfo{130, nullptr, "TryEnableTemporalPassThrough"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -181,7 +181,7 @@ class IUserShimScopedObject final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -217,7 +217,7 @@ class IUserService final : public ServiceFramework { public: explicit IUserService(Core::System& system_) : ServiceFramework(system_, "stpl:u") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } Result Cmd0(u32 unk0, OutInterface out_interface) { @@ -235,7 +235,7 @@ class ISystemShimScopedObject final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -266,7 +266,7 @@ class ISystemService final : public ServiceFramework { public: explicit ISystemService(Core::System& system_) : ServiceFramework(system_, "stpl:sys") {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } Result Cmd0(OutInterface out_interface) { diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index 161b718121..bc938dacad 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -318,7 +318,7 @@ private: evt_scan_complete->Signal(system.Kernel()); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -464,7 +464,7 @@ private: event1->Signal(system.Kernel()); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -511,7 +511,7 @@ class INetworkProfile final : public ServiceFramework { public: explicit INetworkProfile(Core::System& system_) : ServiceFramework{system_, "INetworkProfile"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -1053,7 +1053,7 @@ void IGeneralService::GetCurrentAccessPoint(HLERequestContext& ctx) { rb.Push(ResultSuccess); } -ServiceFrameworkBase::FunctionInfoBase const* IGeneralService::FindRequest(u32 key) { +std::optional IGeneralService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{1, &IGeneralService::GetClientId, "GetClientId"}, FunctionInfo{2, &IGeneralService::CreateScanRequest, "CreateScanRequest"}, @@ -1135,7 +1135,7 @@ private: rb.PushIpcInterface(ctx, system); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/nifm/nifm.h b/src/core/hle/service/nifm/nifm.h index c70a58dd73..3f3535fa93 100644 --- a/src/core/hle/service/nifm/nifm.h +++ b/src/core/hle/service/nifm/nifm.h @@ -51,7 +51,7 @@ private: void SetBackgroundRequestEnabled(HLERequestContext& ctx); void GetCurrentAccessPoint(HLERequestContext& ctx); void GetScanDataV3(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::NIFM diff --git a/src/core/hle/service/nim/nim.cpp b/src/core/hle/service/nim/nim.cpp index 6e88410d1c..ea1394859e 100644 --- a/src/core/hle/service/nim/nim.cpp +++ b/src/core/hle/service/nim/nim.cpp @@ -29,7 +29,7 @@ public: completion_event = service_context.CreateEvent("IShopServiceAsync:Completion"); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -140,7 +140,7 @@ public: explicit IShopServiceAccessor(Core::System& system_) : ServiceFramework{system_, "IShopServiceAccessor"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -164,7 +164,7 @@ public: explicit IShopServiceAccessServer(Core::System& system_) : ServiceFramework{system_, "IShopServiceAccessServer"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -410,7 +410,7 @@ public: FunctionInfo{3000, nullptr, "RequestLatestApplicationIcon"}, //17.0.0+ FunctionInfo{3001, nullptr, "RequestDownloadIdbeLatestIconFile"} //17.0.0+ ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -419,7 +419,7 @@ class NIM_ECA final : public ServiceFramework { public: explicit NIM_ECA(Core::System& system_) : ServiceFramework{system_, "nim:eca"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -495,7 +495,7 @@ public: FunctionInfo{504, nullptr, "RequestDownloadTicketForPrepurchasedContents2"}, FunctionInfo{505, nullptr, "RequestDownloadTicketForPrepurchasedContentsForAccount"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -563,7 +563,7 @@ private: rb.PushRaw(server_time); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -582,7 +582,7 @@ class NTC final : public ServiceFramework { public: explicit NTC(Core::System& system_) : ServiceFramework{system_, "ntc"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -625,7 +625,7 @@ public: FunctionInfo{0, nullptr, "RegisterSpecialClient"}, FunctionInfo{1, nullptr, "UnregisterSpecialClient"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/npns/npns.cpp b/src/core/hle/service/npns/npns.cpp index 63f2c86032..a5b0bf7061 100644 --- a/src/core/hle/service/npns/npns.cpp +++ b/src/core/hle/service/npns/npns.cpp @@ -21,7 +21,7 @@ public: : ServiceFramework{system_, "npns:s"}, service_context{system, "npns:s"}, get_receive_event{service_context}, get_request_change_state_cancel_event{service_context} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -149,7 +149,7 @@ public: explicit INpnsUser(Core::System& system_) : ServiceFramework{system_, "npns:u"}, service_context{system, "npns:u"}, get_receive_event{service_context} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/ns/account_proxy_interface.h b/src/core/hle/service/ns/account_proxy_interface.h index 4bae80f889..37248726a9 100644 --- a/src/core/hle/service/ns/account_proxy_interface.h +++ b/src/core/hle/service/ns/account_proxy_interface.h @@ -15,7 +15,7 @@ public: explicit IAccountProxyInterface(Core::System& system_); ~IAccountProxyInterface() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/application_manager_interface.cpp b/src/core/hle/service/ns/application_manager_interface.cpp index 010551427b..18485fae24 100644 --- a/src/core/hle/service/ns/application_manager_interface.cpp +++ b/src/core/hle/service/ns/application_manager_interface.cpp @@ -25,7 +25,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IApplicationManagerInterface::FindRequest(u32 key) { +std::optional IApplicationManagerInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IApplicationManagerInterface::ListApplicationRecord>, "ListApplicationRecord"}, FunctionInfo{1, nullptr, "GenerateApplicationRecordCount"}, diff --git a/src/core/hle/service/ns/application_manager_interface.h b/src/core/hle/service/ns/application_manager_interface.h index 2f9e3ebe87..592068823c 100644 --- a/src/core/hle/service/ns/application_manager_interface.h +++ b/src/core/hle/service/ns/application_manager_interface.h @@ -85,7 +85,7 @@ public: void PushApplicationRecord(HLERequestContext& ctx); void ListApplicationTitle(HLERequestContext& ctx); void ListApplicationIcon(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; private: KernelHelpers::ServiceContext service_context; diff --git a/src/core/hle/service/ns/application_version_interface.h b/src/core/hle/service/ns/application_version_interface.h index 2571474f6f..c1f7710a00 100644 --- a/src/core/hle/service/ns/application_version_interface.h +++ b/src/core/hle/service/ns/application_version_interface.h @@ -15,7 +15,7 @@ public: explicit IApplicationVersionInterface(Core::System& system_); ~IApplicationVersionInterface() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/async_result.cpp b/src/core/hle/service/ns/async_result.cpp index ccb576cb0f..cc84ccdcfd 100644 --- a/src/core/hle/service/ns/async_result.cpp +++ b/src/core/hle/service/ns/async_result.cpp @@ -8,7 +8,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IAsyncResult::FindRequest(u32 key) { +std::optional IAsyncResult::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "Get"}, FunctionInfo{1, D<&IAsyncResult::Cancel>, "Cancel"}, diff --git a/src/core/hle/service/ns/async_result.h b/src/core/hle/service/ns/async_result.h index 2e8d88096a..1cad75bf47 100644 --- a/src/core/hle/service/ns/async_result.h +++ b/src/core/hle/service/ns/async_result.h @@ -13,7 +13,7 @@ public: private: Result Cancel(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; Service::Event* event{}; }; diff --git a/src/core/hle/service/ns/content_management_interface.h b/src/core/hle/service/ns/content_management_interface.h index 34f52c5f20..b5dd1e1fbd 100644 --- a/src/core/hle/service/ns/content_management_interface.h +++ b/src/core/hle/service/ns/content_management_interface.h @@ -25,7 +25,7 @@ public: 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 { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/develop_interface.h b/src/core/hle/service/ns/develop_interface.h index a73f436581..55e54fa38d 100644 --- a/src/core/hle/service/ns/develop_interface.h +++ b/src/core/hle/service/ns/develop_interface.h @@ -15,7 +15,7 @@ public: explicit IDevelopInterface(Core::System& system_); ~IDevelopInterface() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/document_interface.h b/src/core/hle/service/ns/document_interface.h index d0f1dd1253..43a194c3e6 100644 --- a/src/core/hle/service/ns/document_interface.h +++ b/src/core/hle/service/ns/document_interface.h @@ -21,7 +21,7 @@ private: Result ResolveApplicationContentPath(ContentPath content_path); Result GetRunningApplicationProgramId(Out out_program_id, u64 caller_program_id); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/download_task_interface.h b/src/core/hle/service/ns/download_task_interface.h index e121d93e9b..0fd2bacd42 100644 --- a/src/core/hle/service/ns/download_task_interface.h +++ b/src/core/hle/service/ns/download_task_interface.h @@ -19,7 +19,7 @@ private: Result EnableAutoCommit(); Result DisableAutoCommit(); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/dynamic_rights_interface.cpp b/src/core/hle/service/ns/dynamic_rights_interface.cpp index 40e172b220..e3df001cfc 100644 --- a/src/core/hle/service/ns/dynamic_rights_interface.cpp +++ b/src/core/hle/service/ns/dynamic_rights_interface.cpp @@ -9,7 +9,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IDynamicRightsInterface::FindRequest(u32 key) { +std::optional IDynamicRightsInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "RequestApplicationRightsOnServer"}, FunctionInfo{1, nullptr, "RequestAssignRights"}, diff --git a/src/core/hle/service/ns/dynamic_rights_interface.h b/src/core/hle/service/ns/dynamic_rights_interface.h index be7e282bad..e8a1d81491 100644 --- a/src/core/hle/service/ns/dynamic_rights_interface.h +++ b/src/core/hle/service/ns/dynamic_rights_interface.h @@ -22,7 +22,7 @@ private: Result VerifyActivatedRightsOwners(u64 rights_handle); Result HasAccountRestrictedRightsInRunningApplications(Out out_is_restricted); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/ecommerce_interface.h b/src/core/hle/service/ns/ecommerce_interface.h index cb62c1c7d8..d020ff5ef8 100644 --- a/src/core/hle/service/ns/ecommerce_interface.h +++ b/src/core/hle/service/ns/ecommerce_interface.h @@ -15,7 +15,7 @@ public: explicit IECommerceInterface(Core::System& system_); ~IECommerceInterface() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/factory_reset_interface.cpp b/src/core/hle/service/ns/factory_reset_interface.cpp index 6f2a5ff2aa..1fc6edcc9b 100644 --- a/src/core/hle/service/ns/factory_reset_interface.cpp +++ b/src/core/hle/service/ns/factory_reset_interface.cpp @@ -8,7 +8,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IFactoryResetInterface::FindRequest(u32 key) { +std::optional IFactoryResetInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{100, nullptr, "ResetToFactorySettings"}, FunctionInfo{101, nullptr, "ResetToFactorySettingsWithoutUserSaveData"}, diff --git a/src/core/hle/service/ns/factory_reset_interface.h b/src/core/hle/service/ns/factory_reset_interface.h index 963ef412d0..3d5700fb71 100644 --- a/src/core/hle/service/ns/factory_reset_interface.h +++ b/src/core/hle/service/ns/factory_reset_interface.h @@ -14,7 +14,7 @@ class IFactoryResetInterface final : public ServiceFramework FindRequest(u32 key) override; }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 03bad32709..ff1654517b 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp @@ -36,7 +36,7 @@ public: FunctionInfo{100, nullptr, "Cmd100" }, FunctionInfo{101, nullptr, "Cmd101" } ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -47,7 +47,7 @@ public: explicit IVulnerabilityManagerInterface(Core::System& system_) : ServiceFramework{system_, "ns:vm"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } ~IVulnerabilityManagerInterface() override = default; diff --git a/src/core/hle/service/ns/platform_service_manager.cpp b/src/core/hle/service/ns/platform_service_manager.cpp index 9e081ae769..dea6cb5c16 100644 --- a/src/core/hle/service/ns/platform_service_manager.cpp +++ b/src/core/hle/service/ns/platform_service_manager.cpp @@ -27,7 +27,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IPlatformServiceManager::FindRequest(u32 key) { +std::optional IPlatformServiceManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IPlatformServiceManager::RequestLoad>, "RequestLoad"}, FunctionInfo{1, D<&IPlatformServiceManager::GetLoadState>, "GetLoadState"}, diff --git a/src/core/hle/service/ns/platform_service_manager.h b/src/core/hle/service/ns/platform_service_manager.h index b1206bc967..fb99a441f5 100644 --- a/src/core/hle/service/ns/platform_service_manager.h +++ b/src/core/hle/service/ns/platform_service_manager.h @@ -73,7 +73,7 @@ private: Out out_fonts_are_loaded, Out out_font_count, Set::LanguageCode language_code); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 9bf6a20b96..13a1f33866 100644 --- a/src/core/hle/service/ns/query_service.cpp +++ b/src/core/hle/service/ns/query_service.cpp @@ -14,7 +14,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IQueryService::FindRequest(u32 key) { +std::optional IQueryService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "QueryAppletEvent"}, FunctionInfo{1, nullptr, "QueryPlayStatistics"}, diff --git a/src/core/hle/service/ns/query_service.h b/src/core/hle/service/ns/query_service.h index 53232a79b6..08267d3165 100644 --- a/src/core/hle/service/ns/query_service.h +++ b/src/core/hle/service/ns/query_service.h @@ -62,7 +62,7 @@ private: OutArray out_stats, InArray application_ids); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 4faf99c8b4..cd3d442f79 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 @@ -73,7 +73,7 @@ void SanitizeJPEGImageSize(std::vector& image) { } // namespace -ServiceFrameworkBase::FunctionInfoBase const* IReadOnlyApplicationControlDataInterface::FindRequest(u32 key) { +std::optional IReadOnlyApplicationControlDataInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IReadOnlyApplicationControlDataInterface::GetApplicationControlData>, "GetApplicationControlData"}, FunctionInfo{1, D<&IReadOnlyApplicationControlDataInterface::GetApplicationDesiredLanguage>, "GetApplicationDesiredLanguage"}, @@ -131,7 +131,7 @@ private: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 89270533da..3f68029583 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 @@ -46,7 +46,7 @@ public: u8 flag2, u64 application_id); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // 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 076a194401..7a7cf9ec58 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 @@ -11,7 +11,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IReadOnlyApplicationRecordInterface::FindRequest(u32 key) { +std::optional IReadOnlyApplicationRecordInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IReadOnlyApplicationRecordInterface::HasApplicationRecord>, "HasApplicationRecord"}, FunctionInfo{1, nullptr, "NotifyApplicationFailure"}, 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 348fdf4bd8..308e753e7d 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 @@ -25,7 +25,7 @@ private: OutArray out_records, Out out_count, s32 entry_offset); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // 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 cff21ccb55..bbf30da3da 100644 --- a/src/core/hle/service/ns/service_getter_interface.cpp +++ b/src/core/hle/service/ns/service_getter_interface.cpp @@ -20,7 +20,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* IServiceGetterInterface::FindRequest(u32 key) { +std::optional IServiceGetterInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{7988, D<&IServiceGetterInterface::GetDynamicRightsInterface>, "GetDynamicRightsInterface"}, FunctionInfo{7989, D<&IServiceGetterInterface::GetReadOnlyApplicationControlDataInterface>, "GetReadOnlyApplicationControlDataInterface"}, diff --git a/src/core/hle/service/ns/service_getter_interface.h b/src/core/hle/service/ns/service_getter_interface.h index 44cebf8aa7..8c33aafc27 100644 --- a/src/core/hle/service/ns/service_getter_interface.h +++ b/src/core/hle/service/ns/service_getter_interface.h @@ -46,7 +46,7 @@ public: Out> out_interface); Result GetDocumentInterface(Out> out_interface); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::NS diff --git a/src/core/hle/service/ns/system_update_control.h b/src/core/hle/service/ns/system_update_control.h index e2236f1d93..acdf048e6c 100644 --- a/src/core/hle/service/ns/system_update_control.h +++ b/src/core/hle/service/ns/system_update_control.h @@ -15,7 +15,7 @@ public: explicit ISystemUpdateControl(Core::System& system_); ~ISystemUpdateControl() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ns/system_update_interface.cpp b/src/core/hle/service/ns/system_update_interface.cpp index ed4f4666d0..044d39835f 100644 --- a/src/core/hle/service/ns/system_update_interface.cpp +++ b/src/core/hle/service/ns/system_update_interface.cpp @@ -10,7 +10,7 @@ namespace Service::NS { -ServiceFrameworkBase::FunctionInfoBase const* ISystemUpdateInterface::FindRequest(u32 key) { +std::optional ISystemUpdateInterface::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ISystemUpdateInterface::GetBackgroundNetworkUpdateState>, "GetBackgroundNetworkUpdateState"}, FunctionInfo{1, D<&ISystemUpdateInterface::OpenSystemUpdateControl>, "OpenSystemUpdateControl"}, diff --git a/src/core/hle/service/ns/system_update_interface.h b/src/core/hle/service/ns/system_update_interface.h index 1bb841e989..2ea14f4f5e 100644 --- a/src/core/hle/service/ns/system_update_interface.h +++ b/src/core/hle/service/ns/system_update_interface.h @@ -33,7 +33,7 @@ private: Result GetSystemUpdateNotificationEventForContentDelivery( OutCopyHandle out_event); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext service_context; Event update_notification_event; }; diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index 3dea5d7618..81d8a3a63b 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -52,7 +52,7 @@ public: : ServiceFramework{system_, "nvgem:c"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -73,7 +73,7 @@ public: : ServiceFramework{system_, "nvgem:cd"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -91,7 +91,7 @@ public: : ServiceFramework{system_, "nvdbg:d"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/nvdrv/nvdrv_interface.h b/src/core/hle/service/nvdrv/nvdrv_interface.h index d6135240a6..b9b574398a 100644 --- a/src/core/hle/service/nvdrv/nvdrv_interface.h +++ b/src/core/hle/service/nvdrv/nvdrv_interface.h @@ -38,7 +38,7 @@ private: void ServiceError(HLERequestContext& ctx, NvResult result); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/nvdrv/nvmemp.h b/src/core/hle/service/nvdrv/nvmemp.h index db4981fa29..e98b07c494 100644 --- a/src/core/hle/service/nvdrv/nvmemp.h +++ b/src/core/hle/service/nvdrv/nvmemp.h @@ -23,7 +23,7 @@ private: void Open(HLERequestContext& ctx); void GetAruid(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver.cpp b/src/core/hle/service/nvnflinger/hos_binder_driver.cpp index 8b25720c09..c9023374c4 100644 --- a/src/core/hle/service/nvnflinger/hos_binder_driver.cpp +++ b/src/core/hle/service/nvnflinger/hos_binder_driver.cpp @@ -11,7 +11,7 @@ namespace Service::Nvnflinger { -ServiceFrameworkBase::FunctionInfoBase const* IHOSBinderDriver::FindRequest(u32 key) { +std::optional IHOSBinderDriver::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IHOSBinderDriver::TransactParcel>, "TransactParcel"}, FunctionInfo{1, C<&IHOSBinderDriver::AdjustRefcount>, "AdjustRefcount"}, diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver.h b/src/core/hle/service/nvnflinger/hos_binder_driver.h index f561814f19..7d44046115 100644 --- a/src/core/hle/service/nvnflinger/hos_binder_driver.h +++ b/src/core/hle/service/nvnflinger/hos_binder_driver.h @@ -44,7 +44,7 @@ private: OutBuffer parcel_reply, u32 flags); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 af56bd311f..dc1d0c96af 100644 --- a/src/core/hle/service/olsc/daemon_controller.cpp +++ b/src/core/hle/service/olsc/daemon_controller.cpp @@ -9,7 +9,7 @@ namespace Service::OLSC { -ServiceFrameworkBase::FunctionInfoBase const* IDaemonController::FindRequest(u32 key) { +std::optional IDaemonController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IDaemonController::GetApplicationAutoTransferSetting>, "GetApplicationAutoTransferSetting"}, FunctionInfo{1, D<&IDaemonController::SetApplicationAutoTransferSetting>, "SetApplicationAutoTransferSetting"}, diff --git a/src/core/hle/service/olsc/daemon_controller.h b/src/core/hle/service/olsc/daemon_controller.h index 8efa90f405..b90d3ee778 100644 --- a/src/core/hle/service/olsc/daemon_controller.h +++ b/src/core/hle/service/olsc/daemon_controller.h @@ -38,7 +38,7 @@ private: Result GetAutonomyTaskStatus(Out out_status, Common::UUID user_id); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; // Internal in-memory state to back the above APIs struct AppKey { diff --git a/src/core/hle/service/olsc/native_handle_holder.cpp b/src/core/hle/service/olsc/native_handle_holder.cpp index cfabb97499..1f6f8419fc 100644 --- a/src/core/hle/service/olsc/native_handle_holder.cpp +++ b/src/core/hle/service/olsc/native_handle_holder.cpp @@ -12,7 +12,7 @@ namespace Service::OLSC { -ServiceFrameworkBase::FunctionInfoBase const* INativeHandleHolder::FindRequest(u32 key) { +std::optional INativeHandleHolder::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&INativeHandleHolder::GetNativeHandle>, "GetNativeHandle"} ); diff --git a/src/core/hle/service/olsc/native_handle_holder.h b/src/core/hle/service/olsc/native_handle_holder.h index ab76969bfb..0ab51c7ca0 100644 --- a/src/core/hle/service/olsc/native_handle_holder.h +++ b/src/core/hle/service/olsc/native_handle_holder.h @@ -25,7 +25,7 @@ public: private: Result GetNativeHandle(OutCopyHandle out_event); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; Service::KernelHelpers::ServiceContext service_context; Kernel::KEvent* event{}; diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp index 0386504b83..ca5162e3cb 100644 --- a/src/core/hle/service/olsc/olsc.cpp +++ b/src/core/hle/service/olsc/olsc.cpp @@ -21,7 +21,7 @@ class ISProfileBgAgentForSystemProcess final : public ServiceFramework FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -113,7 +113,7 @@ public: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 66a339369f..8d6b20d7ff 100644 --- a/src/core/hle/service/olsc/olsc_service_for_application.cpp +++ b/src/core/hle/service/olsc/olsc_service_for_application.cpp @@ -9,7 +9,7 @@ namespace Service::OLSC { -ServiceFrameworkBase::FunctionInfoBase const* IOlscServiceForApplication::FindRequest(u32 key) { +std::optional IOlscServiceForApplication::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IOlscServiceForApplication::Initialize>, "Initialize"}, FunctionInfo{10, nullptr, "VerifySaveDataBackupLicenseAsync"}, diff --git a/src/core/hle/service/olsc/olsc_service_for_application.h b/src/core/hle/service/olsc/olsc_service_for_application.h index 4c7683bf76..0d92f9ba78 100644 --- a/src/core/hle/service/olsc/olsc_service_for_application.h +++ b/src/core/hle/service/olsc/olsc_service_for_application.h @@ -22,7 +22,7 @@ private: Result GetSaveDataBackupSetting(Out out_save_data_backup_setting); Result SetSaveDataBackupSettingEnabled(bool enabled, NS::Uid account_id); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; bool initialized{}; }; diff --git a/src/core/hle/service/olsc/remote_storage_controller.cpp b/src/core/hle/service/olsc/remote_storage_controller.cpp index aaf0456f7f..e0d8c961ce 100644 --- a/src/core/hle/service/olsc/remote_storage_controller.cpp +++ b/src/core/hle/service/olsc/remote_storage_controller.cpp @@ -9,7 +9,7 @@ namespace Service::OLSC { - ServiceFrameworkBase::FunctionInfoBase const* IRemoteStorageController::FindRequest(u32 key) { + std::optional IRemoteStorageController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetSaveDataArchiveInfoBySaveDataId"}, FunctionInfo{1, nullptr, "GetSaveDataArchiveInfoByApplicationId"}, diff --git a/src/core/hle/service/olsc/remote_storage_controller.h b/src/core/hle/service/olsc/remote_storage_controller.h index 29afc1d5e0..20503d9800 100644 --- a/src/core/hle/service/olsc/remote_storage_controller.h +++ b/src/core/hle/service/olsc/remote_storage_controller.h @@ -22,7 +22,7 @@ private: Result GetDataNewnessByApplicationId(Out out_newness, u64 application_id); Result GetDataInfo(Out> out_data, u64 application_id); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // 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 5023f0c892..87099be55d 100644 --- a/src/core/hle/service/olsc/transfer_task_list_controller.cpp +++ b/src/core/hle/service/olsc/transfer_task_list_controller.cpp @@ -11,7 +11,7 @@ namespace Service::OLSC { - ServiceFrameworkBase::FunctionInfoBase const* ITransferTaskListController::FindRequest(u32 key) { + std::optional ITransferTaskListController::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetTransferTaskCountForOcean"}, FunctionInfo{1, nullptr, "GetTransferTaskInfoForOcean"}, 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 3bb780e98c..74c5eddee3 100644 --- a/src/core/hle/service/olsc/transfer_task_list_controller.h +++ b/src/core/hle/service/olsc/transfer_task_list_controller.h @@ -28,7 +28,7 @@ private: Result GetCurrentTransferTaskInfo(Out> out_info, u8 unknown); Result FindTransferTaskInfo(Out> out_info, InBuffer in); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::OLSC diff --git a/src/core/hle/service/omm/operation_mode_manager.h b/src/core/hle/service/omm/operation_mode_manager.h index 605d8439dd..ea604c8f60 100644 --- a/src/core/hle/service/omm/operation_mode_manager.h +++ b/src/core/hle/service/omm/operation_mode_manager.h @@ -19,7 +19,7 @@ public: explicit IOperationModeManager(Core::System& system_); ~IOperationModeManager() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/omm/policy_manager_system.h b/src/core/hle/service/omm/policy_manager_system.h index efecc59850..c6ff451e61 100644 --- a/src/core/hle/service/omm/policy_manager_system.h +++ b/src/core/hle/service/omm/policy_manager_system.h @@ -19,7 +19,7 @@ public: explicit IPolicyManagerSystem(Core::System& system_); ~IPolicyManagerSystem() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/omm/power_state_interface.h b/src/core/hle/service/omm/power_state_interface.h index 408d0ff578..fed55a4361 100644 --- a/src/core/hle/service/omm/power_state_interface.h +++ b/src/core/hle/service/omm/power_state_interface.h @@ -19,7 +19,7 @@ public: explicit IPowerStateInterface(Core::System& system_); ~IPowerStateInterface() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/pcie/pcie.cpp b/src/core/hle/service/pcie/pcie.cpp index f350c37039..f9aaa2d3b8 100644 --- a/src/core/hle/service/pcie/pcie.cpp +++ b/src/core/hle/service/pcie/pcie.cpp @@ -43,7 +43,7 @@ public: FunctionInfo{22, nullptr, "SetResetUponResumeEnable"}, FunctionInfo{23, nullptr, "ResetFunction"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -56,7 +56,7 @@ public: FunctionInfo{0, nullptr, "RegisterClassDriver"}, FunctionInfo{1, nullptr, "QueryFunctionsUnregistered"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -69,7 +69,7 @@ public: FunctionInfo{0, nullptr, "GetLoggedState"}, FunctionInfo{1, nullptr, "GetLoggedStateEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/pctl/pctl.cpp b/src/core/hle/service/pctl/pctl.cpp index ca30184d1a..4de3ad1172 100644 --- a/src/core/hle/service/pctl/pctl.cpp +++ b/src/core/hle/service/pctl/pctl.cpp @@ -449,7 +449,7 @@ public: bool disabled{}; }; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -616,7 +616,7 @@ public: } private: - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/pcv/pcv.cpp b/src/core/hle/service/pcv/pcv.cpp index 3070fadd3c..bb3d748527 100644 --- a/src/core/hle/service/pcv/pcv.cpp +++ b/src/core/hle/service/pcv/pcv.cpp @@ -49,7 +49,7 @@ public: FunctionInfo{28, nullptr, "IsPoweredOn"}, FunctionInfo{29, nullptr, "GetVoltage"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -61,7 +61,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "ReleaseControl"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -73,7 +73,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "SetClockRate"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -83,7 +83,7 @@ public: explicit IClkrstSession(Core::System& system_, DeviceCode device_code_) : ServiceFramework{system_, "IClkrstSession"}, device_code(device_code_) {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -127,7 +127,7 @@ class CLKRST final : public ServiceFramework { public: explicit CLKRST(Core::System& system_, const char* name) : ServiceFramework{system_, name} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -161,7 +161,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "ReleaseControl"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/pm/pm.cpp b/src/core/hle/service/pm/pm.cpp index f347cc7340..3d431c305f 100644 --- a/src/core/hle/service/pm/pm.cpp +++ b/src/core/hle/service/pm/pm.cpp @@ -67,7 +67,7 @@ private: rb.Push(ResultSuccess); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -150,7 +150,7 @@ private: rb.PushRaw(override_status); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -211,7 +211,7 @@ private: rb.Push(process->GetProcessId()); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -226,7 +226,7 @@ class Shell final : public ServiceFramework { public: explicit Shell(Core::System& system_) : ServiceFramework{system_, "pm:shell"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/prepo/prepo.cpp b/src/core/hle/service/prepo/prepo.cpp index 6068d6392a..a199c41d2c 100644 --- a/src/core/hle/service/prepo/prepo.cpp +++ b/src/core/hle/service/prepo/prepo.cpp @@ -23,7 +23,7 @@ class PlayReport final : public ServiceFramework { public: explicit PlayReport(const char* name, Core::System& system_) : ServiceFramework{system_, name} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/psc/ovln/receiver.cpp b/src/core/hle/service/psc/ovln/receiver.cpp index 55045ed5e1..4c64f3ef0e 100644 --- a/src/core/hle/service/psc/ovln/receiver.cpp +++ b/src/core/hle/service/psc/ovln/receiver.cpp @@ -9,7 +9,7 @@ namespace Service::PSC { -ServiceFrameworkBase::FunctionInfoBase const* IReceiver::FindRequest(u32 key) { +std::optional IReceiver::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IReceiver::AddSource>, "AddSource"}, FunctionInfo{1, D<&IReceiver::RemoveSource>, "RemoveSource"}, diff --git a/src/core/hle/service/psc/ovln/receiver.h b/src/core/hle/service/psc/ovln/receiver.h index a860a8ba2d..ebf9f1ab23 100644 --- a/src/core/hle/service/psc/ovln/receiver.h +++ b/src/core/hle/service/psc/ovln/receiver.h @@ -36,7 +36,7 @@ private: Result Receive(Out out_notification, Out out_flags); Result ReceiveWithTick(Out out_notification, Out out_flags, Out out_tick); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; KernelHelpers::ServiceContext service_context; Kernel::KEvent* receive_event; diff --git a/src/core/hle/service/psc/ovln/receiver_service.cpp b/src/core/hle/service/psc/ovln/receiver_service.cpp index 98be2d89dd..a065637e5a 100644 --- a/src/core/hle/service/psc/ovln/receiver_service.cpp +++ b/src/core/hle/service/psc/ovln/receiver_service.cpp @@ -10,7 +10,7 @@ namespace Service::PSC { - ServiceFrameworkBase::FunctionInfoBase const* IReceiverService::FindRequest(u32 key) { + std::optional IReceiverService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IReceiverService::OpenReceiver>, "OpenReceiver"} ); diff --git a/src/core/hle/service/psc/ovln/receiver_service.h b/src/core/hle/service/psc/ovln/receiver_service.h index 147109cf56..bd053cd50c 100644 --- a/src/core/hle/service/psc/ovln/receiver_service.h +++ b/src/core/hle/service/psc/ovln/receiver_service.h @@ -21,7 +21,7 @@ public: private: Result OpenReceiver(Out> out_receiver); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/ovln/sender.cpp b/src/core/hle/service/psc/ovln/sender.cpp index a0d057a6a1..c270b376fb 100644 --- a/src/core/hle/service/psc/ovln/sender.cpp +++ b/src/core/hle/service/psc/ovln/sender.cpp @@ -9,7 +9,7 @@ namespace Service::PSC { - ServiceFrameworkBase::FunctionInfoBase const* ISender::FindRequest(u32 key) { + std::optional ISender::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ISender::Send>, "Send"}, FunctionInfo{1, nullptr, "GetUnreceivedMessageCount"} diff --git a/src/core/hle/service/psc/ovln/sender.h b/src/core/hle/service/psc/ovln/sender.h index aec4568455..0ebb060f98 100644 --- a/src/core/hle/service/psc/ovln/sender.h +++ b/src/core/hle/service/psc/ovln/sender.h @@ -20,7 +20,7 @@ public: private: Result Send(const OverlayNotification& notification, MessageFlags flags); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // 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 02daf096ad..4c24e33ce0 100644 --- a/src/core/hle/service/psc/ovln/sender_service.cpp +++ b/src/core/hle/service/psc/ovln/sender_service.cpp @@ -10,7 +10,7 @@ namespace Service::PSC { - ServiceFrameworkBase::FunctionInfoBase const* ISenderService::FindRequest(u32 key) { + std::optional ISenderService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ISenderService::OpenSender>, "OpenSender"} ); diff --git a/src/core/hle/service/psc/ovln/sender_service.h b/src/core/hle/service/psc/ovln/sender_service.h index 51184bdda0..90a9a33872 100644 --- a/src/core/hle/service/psc/ovln/sender_service.h +++ b/src/core/hle/service/psc/ovln/sender_service.h @@ -21,7 +21,7 @@ public: private: Result OpenSender(Out> out_sender, u32 sender_id, std::array data); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/pm_control.h b/src/core/hle/service/psc/pm_control.h index 55c7663564..716fd25411 100644 --- a/src/core/hle/service/psc/pm_control.h +++ b/src/core/hle/service/psc/pm_control.h @@ -15,7 +15,7 @@ public: explicit IPmControl(Core::System& system_); ~IPmControl() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/psc/pm_module.cpp b/src/core/hle/service/psc/pm_module.cpp index 94f586203a..7e3ec55a0b 100644 --- a/src/core/hle/service/psc/pm_module.cpp +++ b/src/core/hle/service/psc/pm_module.cpp @@ -8,7 +8,7 @@ namespace Service::PSC { -ServiceFrameworkBase::FunctionInfoBase const* IPmModule::FindRequest(u32 key) { +std::optional IPmModule::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "Initialize"}, FunctionInfo{1, nullptr, "GetRequest"}, diff --git a/src/core/hle/service/psc/pm_module.h b/src/core/hle/service/psc/pm_module.h index d913c71f2c..811e50e8f6 100644 --- a/src/core/hle/service/psc/pm_module.h +++ b/src/core/hle/service/psc/pm_module.h @@ -14,7 +14,7 @@ class IPmModule final : public ServiceFramework { public: explicit IPmModule(Core::System& system_); ~IPmModule() override; - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // namespace Service::PSC diff --git a/src/core/hle/service/psc/psc.cpp b/src/core/hle/service/psc/psc.cpp index ae1ff1f963..43da055aa2 100644 --- a/src/core/hle/service/psc/psc.cpp +++ b/src/core/hle/service/psc/psc.cpp @@ -29,7 +29,7 @@ public: FunctionInfo{3, nullptr, "IsLocked"}, FunctionInfo{4, nullptr, "GetRelatedState"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -42,7 +42,7 @@ public: FunctionInfo{0, nullptr, "GetInputSourceState"}, FunctionInfo{1, nullptr, "GetTriggerTargetEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -54,7 +54,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "GetNotifyEvent"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -81,7 +81,7 @@ public: FunctionInfo{14, nullptr, "Cmd14"}, FunctionInfo{15, nullptr, "Cmd15"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -98,7 +98,7 @@ public: FunctionInfo{4, nullptr, "Cmd4"}, FunctionInfo{5, nullptr, "Cmd5"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -117,7 +117,7 @@ private: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/psc/time/alarms.h b/src/core/hle/service/psc/time/alarms.h index cc17a87e7f..5dce77f352 100644 --- a/src/core/hle/service/psc/time/alarms.h +++ b/src/core/hle/service/psc/time/alarms.h @@ -115,7 +115,7 @@ private: void CreateWakeupAlarm(HLERequestContext& ctx); void CreateBackgroundTaskAlarm(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -136,7 +136,7 @@ private: void Disable(HLERequestContext& ctx); void IsEnabled(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( 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 16d387b1f7..795aeb94a8 100644 --- a/src/core/hle/service/psc/time/power_state_service.cpp +++ b/src/core/hle/service/psc/time/power_state_service.cpp @@ -9,7 +9,7 @@ namespace Service::PSC::Time { -ServiceFrameworkBase::FunctionInfoBase const* IPowerStateRequestHandler::FindRequest(u32 key) { +std::optional IPowerStateRequestHandler::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&IPowerStateRequestHandler::GetPowerStateRequestEventReadableHandle>, "GetPowerStateRequestEventReadableHandle"}, FunctionInfo{1, D<&IPowerStateRequestHandler::GetAndClearPowerStateRequest>, "GetAndClearPowerStateRequest"} diff --git a/src/core/hle/service/psc/time/power_state_service.h b/src/core/hle/service/psc/time/power_state_service.h index f8c7370b71..14d9c1a77a 100644 --- a/src/core/hle/service/psc/time/power_state_service.h +++ b/src/core/hle/service/psc/time/power_state_service.h @@ -27,7 +27,7 @@ public: Result GetAndClearPowerStateRequest(Out out_cleared, Out out_priority); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; PowerStateRequestManager& m_power_state_request_manager; }; diff --git a/src/core/hle/service/psc/time/service_manager.cpp b/src/core/hle/service/psc/time/service_manager.cpp index 3188eef94c..be25ee9a70 100644 --- a/src/core/hle/service/psc/time/service_manager.cpp +++ b/src/core/hle/service/psc/time/service_manager.cpp @@ -13,7 +13,7 @@ namespace Service::PSC::Time { - ServiceFrameworkBase::FunctionInfoBase const* ServiceManager::FindRequest(u32 key) { + std::optional ServiceManager::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&ServiceManager::GetStaticServiceAsUser>, "GetStaticServiceAsUser"}, FunctionInfo{5, D<&ServiceManager::GetStaticServiceAsAdmin>, "GetStaticServiceAsAdmin"}, diff --git a/src/core/hle/service/psc/time/service_manager.h b/src/core/hle/service/psc/time/service_manager.h index a729b49c8b..a8b94d8939 100644 --- a/src/core/hle/service/psc/time/service_manager.h +++ b/src/core/hle/service/psc/time/service_manager.h @@ -65,7 +65,7 @@ private: void SetupSAndP(); Result GetStaticService(OutInterface out_service, StaticServiceSetupInfo setup_info, const char* name); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; std::shared_ptr m_time; ServerManager& m_server_manager; diff --git a/src/core/hle/service/psc/time/static.cpp b/src/core/hle/service/psc/time/static.cpp index 03f2079297..2b2b6f1f04 100644 --- a/src/core/hle/service/psc/time/static.cpp +++ b/src/core/hle/service/psc/time/static.cpp @@ -33,7 +33,7 @@ constexpr Result GetTimeFromTimePointAndContext(s64* out_time, SteadyClockTimePo } } // namespace -ServiceFrameworkBase::FunctionInfoBase const* StaticService::FindRequest(u32 key) { +std::optional StaticService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&StaticService::GetStandardUserSystemClock>, "GetStandardUserSystemClock"}, FunctionInfo{1, D<&StaticService::GetStandardNetworkSystemClock>, "GetStandardNetworkSystemClock"}, diff --git a/src/core/hle/service/psc/time/static.h b/src/core/hle/service/psc/time/static.h index b6fd522099..a86fec178f 100644 --- a/src/core/hle/service/psc/time/static.h +++ b/src/core/hle/service/psc/time/static.h @@ -71,7 +71,7 @@ private: Result GetClockSnapshotImpl(OutClockSnapshot out_snapshot, const SystemClockContext& user_context, const SystemClockContext& network_context, TimeType type); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; StaticServiceSetupInfo m_setup_info; std::shared_ptr m_time; diff --git a/src/core/hle/service/psc/time/steady_clock.cpp b/src/core/hle/service/psc/time/steady_clock.cpp index 6ab74cddcb..3d138837d3 100644 --- a/src/core/hle/service/psc/time/steady_clock.cpp +++ b/src/core/hle/service/psc/time/steady_clock.cpp @@ -11,7 +11,7 @@ namespace Service::PSC::Time { -ServiceFrameworkBase::FunctionInfoBase const* SteadyClock::FindRequest(u32 key) { +std::optional SteadyClock::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&SteadyClock::GetCurrentTimePoint>, "GetCurrentTimePoint"}, FunctionInfo{2, D<&SteadyClock::GetTestOffset>, "GetTestOffset"}, diff --git a/src/core/hle/service/psc/time/steady_clock.h b/src/core/hle/service/psc/time/steady_clock.h index c149b10dd2..e4de3e3717 100644 --- a/src/core/hle/service/psc/time/steady_clock.h +++ b/src/core/hle/service/psc/time/steady_clock.h @@ -34,7 +34,7 @@ public: Result GetSetupResultValue(Out out_result); Result GetInternalOffset(Out out_internal_offset); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; private: StandardSteadyClockCore& m_clock_core; diff --git a/src/core/hle/service/psc/time/system_clock.cpp b/src/core/hle/service/psc/time/system_clock.cpp index c861234ec0..c08eca0b02 100644 --- a/src/core/hle/service/psc/time/system_clock.cpp +++ b/src/core/hle/service/psc/time/system_clock.cpp @@ -11,7 +11,7 @@ namespace Service::PSC::Time { -ServiceFrameworkBase::FunctionInfoBase const* SystemClock::FindRequest(u32 key) { +std::optional SystemClock::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&SystemClock::GetCurrentTime>, "GetCurrentTime"}, FunctionInfo{1, D<&SystemClock::SetCurrentTime>, "SetCurrentTime"}, diff --git a/src/core/hle/service/psc/time/system_clock.h b/src/core/hle/service/psc/time/system_clock.h index e795061a4c..4f7d285d39 100644 --- a/src/core/hle/service/psc/time/system_clock.h +++ b/src/core/hle/service/psc/time/system_clock.h @@ -31,7 +31,7 @@ public: Result GetOperationEventReadableHandle(OutCopyHandle out_event); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 7616801743..6a717846d3 100644 --- a/src/core/hle/service/psc/time/time_zone_service.cpp +++ b/src/core/hle/service/psc/time/time_zone_service.cpp @@ -13,7 +13,7 @@ namespace Service::PSC::Time { - ServiceFrameworkBase::FunctionInfoBase const* TimeZoneService::FindRequest(u32 key) { + std::optional TimeZoneService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, D<&TimeZoneService::GetDeviceLocationName>, "GetDeviceLocationName"}, FunctionInfo{1, D<&TimeZoneService::SetDeviceLocationName>, "SetDeviceLocationName"}, 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 4a6341e9aa..fbb107f87c 100644 --- a/src/core/hle/service/psc/time/time_zone_service.h +++ b/src/core/hle/service/psc/time/time_zone_service.h @@ -59,7 +59,7 @@ public: const CalendarTime& calendar_time); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 3bf689c765..5cad46f997 100644 --- a/src/core/hle/service/ptm/psm.cpp +++ b/src/core/hle/service/ptm/psm.cpp @@ -26,7 +26,7 @@ public: state_change_event = service_context.CreateEvent("IPsmSession::state_change_event"); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/ptm/psm.h b/src/core/hle/service/ptm/psm.h index 60ae8d716d..fe77b23d79 100644 --- a/src/core/hle/service/ptm/psm.h +++ b/src/core/hle/service/ptm/psm.h @@ -29,7 +29,7 @@ private: void GetBatteryAgePercentage(HLERequestContext& ctx); void GetBatteryChargeInfoFields(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ptm/ptm.cpp b/src/core/hle/service/ptm/ptm.cpp index 07cd6318a1..ad474ec411 100644 --- a/src/core/hle/service/ptm/ptm.cpp +++ b/src/core/hle/service/ptm/ptm.cpp @@ -24,7 +24,7 @@ public: FunctionInfo{1, nullptr, "DisableVdd50StateControl"}, FunctionInfo{2, nullptr, "SetVdd50State"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -37,7 +37,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "OpenSession"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/ptm/ts.cpp b/src/core/hle/service/ptm/ts.cpp index ec0493aa37..f22ff2ec69 100644 --- a/src/core/hle/service/ptm/ts.cpp +++ b/src/core/hle/service/ptm/ts.cpp @@ -21,7 +21,7 @@ class ISession : public ServiceFramework { public: explicit ISession(Core::System& system_) : ServiceFramework{system_, "ISession"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } diff --git a/src/core/hle/service/ptm/ts.h b/src/core/hle/service/ptm/ts.h index 500a1b8d17..21f3ac2b70 100644 --- a/src/core/hle/service/ptm/ts.h +++ b/src/core/hle/service/ptm/ts.h @@ -21,7 +21,7 @@ private: void GetTemperatureMilliC(HLERequestContext& ctx); void OpenSession(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ro/ro.cpp b/src/core/hle/service/ro/ro.cpp index 5bd6b18087..368e1c9fb4 100644 --- a/src/core/hle/service/ro/ro.cpp +++ b/src/core/hle/service/ro/ro.cpp @@ -516,7 +516,7 @@ public: m_ro->UnregisterProcess(system.Kernel(), m_context_id); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -578,7 +578,7 @@ public: : ServiceFramework{system_, "ro:dmnt"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 5b9c9960e9..e55e58456f 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -69,7 +69,7 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx, c void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) { const bool is_cmd_read = ctx.GetCommand() == 0; auto const info = FindRequest(ctx.GetCommand()); - if (info == nullptr || info->handler_callback == nullptr) + if (!info.has_value() || info->handler_callback == nullptr) return ReportUnimplementedFunction(ctx, info); LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer())); @@ -84,7 +84,7 @@ void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) { void ServiceFrameworkBase::InvokeRequestTipc(HLERequestContext& ctx) { auto const info = FindRequestTipc(ctx.GetCommand()); - if (info == nullptr || info->handler_callback == nullptr) + if (!info.has_value() || info->handler_callback == nullptr) return ReportUnimplementedFunction(ctx, info); LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer())); diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 886aa57986..be7082fc96 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -105,8 +105,8 @@ private: explicit ServiceFrameworkBase(Core::System& system_, const char* service_name_, u32 max_sessions_, InvokerFn* handler_invoker_); ~ServiceFrameworkBase() override; - virtual FunctionInfoBase const* FindRequest(u32 key) = 0; - virtual FunctionInfoBase const* FindRequestTipc(u32 key) = 0; + virtual std::optional FindRequest(u32 key) = 0; + virtual std::optional FindRequestTipc(u32 key) = 0; void ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info); @@ -152,15 +152,20 @@ protected: /// @param expected_header_ request header in the command buffer which will trigger dispatch to this handler /// @param handler_callback_ member function in this service which will be called to handle the request /// @param name_ human-friendly name for the request. Used mostly for logging purposes. - FunctionInfoTyped(u32 expected_header_, HandlerFnP handler_callback_, const char* name_, u32 version_gating_ = 0) - : FunctionInfoBase{expected_header_, HandlerFnP(handler_callback_), name_, version_gating_} + constexpr FunctionInfoTyped(u32 expected_header_, HandlerFnP handler_callback_, const char* name_, u32 version_gating_ = 0) + : FunctionInfoBase{ + expected_header_, + HandlerFnP(handler_callback_), + name_, + version_gating_ + } {} }; using FunctionInfo = FunctionInfoTyped; template requires (std::same_as && ...) - [[nodiscard]] static constexpr frozen::map CreateStaticMap(Ts... args) { + [[nodiscard]] static consteval frozen::map CreateStaticMap(Ts... args) { return frozen::map{ {args.expected_header, FunctionInfo(args)}... }; @@ -169,16 +174,16 @@ protected: // Used exclusively by NFC template requires (std::same_as> && ...) - [[nodiscard]] static constexpr frozen::map, sizeof...(Ts)> CreateStaticMapWithClass(Ts... args) { + [[nodiscard]] static consteval frozen::map, sizeof...(Ts)> CreateStaticMapWithClass(Ts... args) { return frozen::map, sizeof...(args)>{ {args.expected_header, FunctionInfoTyped(args)}... }; } template - [[nodiscard]] static FunctionInfoBase const* HandlerTableGenerateWithFind(u32 key, T const& map) { + [[nodiscard]] static constexpr std::optional HandlerTableGenerateWithFind(u32 key, T const& map) { auto const it = map.find(key); - return it != map.end() ? std::addressof(it->second) : nullptr; + return it != map.end() ? std::optional{it->second} : std::nullopt; } /// @brief Initializes the handler with no functions installed. @@ -190,10 +195,10 @@ protected: : ServiceFrameworkBase(system_, service_name_, max_sessions_, Invoker) {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { UNREACHABLE(); } - FunctionInfoBase const* FindRequestTipc(u32 key) override { + std::optional FindRequestTipc(u32 key) override { UNREACHABLE(); } diff --git a/src/core/hle/service/set/factory_settings_server.h b/src/core/hle/service/set/factory_settings_server.h index c35c6776d2..dcc329f9c2 100644 --- a/src/core/hle/service/set/factory_settings_server.h +++ b/src/core/hle/service/set/factory_settings_server.h @@ -19,7 +19,7 @@ public: explicit IFactorySettingsServer(Core::System& system_); ~IFactorySettingsServer() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/set/firmware_debug_settings_server.h b/src/core/hle/service/set/firmware_debug_settings_server.h index 38f660d2a5..35c8d5ce19 100644 --- a/src/core/hle/service/set/firmware_debug_settings_server.h +++ b/src/core/hle/service/set/firmware_debug_settings_server.h @@ -19,7 +19,7 @@ public: explicit IFirmwareDebugSettingsServer(Core::System& system_); ~IFirmwareDebugSettingsServer() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/set/settings_server.cpp b/src/core/hle/service/set/settings_server.cpp index 6576b8121f..4580cb723b 100644 --- a/src/core/hle/service/set/settings_server.cpp +++ b/src/core/hle/service/set/settings_server.cpp @@ -89,7 +89,7 @@ LanguageCode GetLanguageCodeFromIndex(std::size_t index) { return available_language_codes.at(index); } -ServiceFrameworkBase::FunctionInfoBase const* ISettingsServer::FindRequest(u32 key) { +std::optional ISettingsServer::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&ISettingsServer::GetLanguageCode>, "GetLanguageCode"}, FunctionInfo{1, C<&ISettingsServer::GetAvailableLanguageCodes>, "GetAvailableLanguageCodes"}, diff --git a/src/core/hle/service/set/settings_server.h b/src/core/hle/service/set/settings_server.h index 014d19f898..2aa487b8b1 100644 --- a/src/core/hle/service/set/settings_server.h +++ b/src/core/hle/service/set/settings_server.h @@ -38,7 +38,7 @@ private: Result GetDeviceNickName(OutLargeData, BufferAttr_HipcMapAlias> out_device_name); Result GetKeyCodeMapByPort(OutLargeData out_key_code_map, u32 port); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; }; } // 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 3cea0997f6..95cc9c143d 100644 --- a/src/core/hle/service/set/system_settings_server.cpp +++ b/src/core/hle/service/set/system_settings_server.cpp @@ -114,7 +114,7 @@ Result GetFirmwareVersionImpl(FirmwareVersionFormat& out_firmware, Core::System& return ResultSuccess; } -ServiceFrameworkBase::FunctionInfoBase const* ISystemSettingsServer::FindRequest(u32 key) { +std::optional ISystemSettingsServer::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&ISystemSettingsServer::SetLanguageCode>, "SetLanguageCode"}, FunctionInfo{1, nullptr, "SetNetworkSettings"}, diff --git a/src/core/hle/service/set/system_settings_server.h b/src/core/hle/service/set/system_settings_server.h index 1de2944387..8fc78a232f 100644 --- a/src/core/hle/service/set/system_settings_server.h +++ b/src/core/hle/service/set/system_settings_server.h @@ -179,7 +179,7 @@ private: void StoreSettings(); void SetSaveNeeded(); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 a1a36b63a2..588fa3df06 100644 --- a/src/core/hle/service/sm/sm.cpp +++ b/src/core/hle/service/sm/sm.cpp @@ -131,10 +131,10 @@ private: void RegisterServiceImpl(HLERequestContext& ctx, std::string name, u32 max_session_count, bool is_light); // TODO: We reuse function list for both TIPC and non-TIPC - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } - FunctionInfoBase const* FindRequestTipc(u32 key) override { + std::optional FindRequestTipc(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/sm/sm_controller.h b/src/core/hle/service/sm/sm_controller.h index 7f62b242a8..8109d93f06 100644 --- a/src/core/hle/service/sm/sm_controller.h +++ b/src/core/hle/service/sm/sm_controller.h @@ -26,7 +26,7 @@ private: void QueryPointerBufferSize(HLERequestContext& ctx); void SetPointerBufferSize(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/sockets/bsd.h b/src/core/hle/service/sockets/bsd.h index b4a6884bd8..55fff24c52 100644 --- a/src/core/hle/service/sockets/bsd.h +++ b/src/core/hle/service/sockets/bsd.h @@ -190,7 +190,7 @@ private: protected: std::unique_lock LockService() noexcept override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -249,7 +249,7 @@ public: explicit BSDCFG(Core::System& system_, const char *name); ~BSDCFG() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -277,7 +277,7 @@ public: explicit BSD_NU(Core::System& system_); ~BSD_NU() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/sockets/nsd.h b/src/core/hle/service/sockets/nsd.h index 220f076e8e..f3e4d48aff 100644 --- a/src/core/hle/service/sockets/nsd.h +++ b/src/core/hle/service/sockets/nsd.h @@ -26,7 +26,7 @@ private: void GetEnvironmentIdentifier(HLERequestContext& ctx); void GetApplicationServerEnvironmentType(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/sockets/sfdnsres.h b/src/core/hle/service/sockets/sfdnsres.h index b9eab0e08a..b365d03b2d 100644 --- a/src/core/hle/service/sockets/sfdnsres.h +++ b/src/core/hle/service/sockets/sfdnsres.h @@ -27,7 +27,7 @@ private: void GetAddrInfoRequestWithOptions(HLERequestContext& ctx); void ResolverSetOptionRequest(HLERequestContext& ctx); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -55,7 +55,7 @@ public: explicit DNS_PRIV(Core::System& system_); ~DNS_PRIV() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/sockets/sockets.cpp b/src/core/hle/service/sockets/sockets.cpp index 61112e3316..1c723e96a6 100644 --- a/src/core/hle/service/sockets/sockets.cpp +++ b/src/core/hle/service/sockets/sockets.cpp @@ -26,7 +26,7 @@ public: FunctionInfo{5, nullptr, "GetMediaType"}, FunctionInfo{6, nullptr, "GetMacAddress"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -43,7 +43,7 @@ public: FunctionInfo{3, nullptr, "GetInterfaceList"}, FunctionInfo{4, nullptr, "GetInterfaceCount"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -56,7 +56,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "CreateDriverService"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/spl/spl.h b/src/core/hle/service/spl/spl.h index 619713ed65..8f84d2a3d3 100644 --- a/src/core/hle/service/spl/spl.h +++ b/src/core/hle/service/spl/spl.h @@ -19,7 +19,7 @@ public: explicit SPL(Core::System& system_, std::shared_ptr module_); ~SPL() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -38,7 +38,7 @@ public: explicit SPL_MIG(Core::System& system_, std::shared_ptr module_); ~SPL_MIG() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -66,7 +66,7 @@ public: explicit SPL_FS(Core::System& system_, std::shared_ptr module_); ~SPL_FS() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -99,7 +99,7 @@ public: explicit SPL_SSL(Core::System& system_, std::shared_ptr module_); ~SPL_SSL() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -130,7 +130,7 @@ public: explicit SPL_ES(Core::System& system_, std::shared_ptr module_); ~SPL_ES() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -166,7 +166,7 @@ public: explicit SPL_MANU(Core::System& system_, std::shared_ptr module_); ~SPL_MANU() override; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/spl/spl_module.cpp b/src/core/hle/service/spl/spl_module.cpp index 9a970d81d1..594575d9a0 100644 --- a/src/core/hle/service/spl/spl_module.cpp +++ b/src/core/hle/service/spl/spl_module.cpp @@ -207,7 +207,7 @@ public: explicit CSRNG(Core::System& system_, std::shared_ptr module_) : Interface(system_, std::move(module_), "csrng") {} ~CSRNG() override = default; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index 8f0202cfb4..c5902079ee 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -83,7 +83,7 @@ public: shared_data->connection_count++; } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -540,7 +540,7 @@ private: R_SUCCEED(); } - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -567,7 +567,7 @@ class ISslService final : public ServiceFramework { public: explicit ISslService(Core::System& system_) : ServiceFramework{system_, "ssl"}, cert_store{system} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -703,7 +703,7 @@ public: R_SUCCEED(); }; - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/tma/tma.cpp b/src/core/hle/service/tma/tma.cpp index 13df6e098f..e9198eea64 100644 --- a/src/core/hle/service/tma/tma.cpp +++ b/src/core/hle/service/tma/tma.cpp @@ -21,7 +21,7 @@ public: : ServiceFramework{system_, "htc:tenv"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( diff --git a/src/core/hle/service/usb/usb.cpp b/src/core/hle/service/usb/usb.cpp index 2b0fb043df..27e04aab8b 100644 --- a/src/core/hle/service/usb/usb.cpp +++ b/src/core/hle/service/usb/usb.cpp @@ -34,7 +34,7 @@ public: FunctionInfo{11, nullptr, "CtrlStall"}, FunctionInfo{12, nullptr, "AppendConfigurationData"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -46,7 +46,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "OpenDsService"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -67,7 +67,7 @@ public: FunctionInfo{7, nullptr, "CreateSmmuSpace"}, FunctionInfo{8, nullptr, "ShareReportRing"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -89,7 +89,7 @@ public: FunctionInfo{8, nullptr, "ResetDevice"}, FunctionInfo{9, nullptr, "OpenUsbEp"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -109,7 +109,7 @@ public: FunctionInfo{7, nullptr, "AcquireUsbIf"}, FunctionInfo{8, nullptr, "SetTestMode"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -127,7 +127,7 @@ public: FunctionInfo{5, nullptr, "DisablePowerRequestNotice"}, FunctionInfo{6, nullptr, "ReplyPowerRequest"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -136,7 +136,7 @@ class IPdManager final : public ServiceFramework { public: explicit IPdManager(Core::System& system_) : ServiceFramework{system_, "usb:pd"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -170,7 +170,7 @@ public: FunctionInfo{7, nullptr, "EnableCradleRecovery"}, FunctionInfo{8, nullptr, "DisableCradleRecovery"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -179,7 +179,7 @@ class IPdCradleManager final : public ServiceFramework { public: explicit IPdCradleManager(Core::System& system_) : ServiceFramework{system_, "usb:pd:c"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } @@ -209,7 +209,7 @@ public: FunctionInfo{4, nullptr, "SetDiagData"}, FunctionInfo{5, nullptr, "GetDiagData"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -221,7 +221,7 @@ public: static constexpr auto functions = CreateStaticMap( FunctionInfo{0, nullptr, "OpenManufactureSession"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -234,7 +234,7 @@ public: FunctionInfo{0, nullptr, "ImportQuirkDevices"}, FunctionInfo{1, nullptr, "HasQuirk"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; @@ -247,7 +247,7 @@ public: FunctionInfo{0, nullptr, "GetTopologyChangeEvent"}, FunctionInfo{1, nullptr, "GetFlattenedTopology"} ); - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } }; diff --git a/src/core/hle/service/vi/application_display_service.cpp b/src/core/hle/service/vi/application_display_service.cpp index 88030d66b4..dcebb2eba9 100644 --- a/src/core/hle/service/vi/application_display_service.cpp +++ b/src/core/hle/service/vi/application_display_service.cpp @@ -17,7 +17,7 @@ namespace Service::VI { -ServiceFrameworkBase::FunctionInfoBase const* IApplicationDisplayService::FindRequest(u32 key) { +std::optional IApplicationDisplayService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{100, C<&IApplicationDisplayService::GetRelayService>, "GetRelayService"}, FunctionInfo{101, C<&IApplicationDisplayService::GetSystemDisplayService>, "GetSystemDisplayService"}, diff --git a/src/core/hle/service/vi/application_display_service.h b/src/core/hle/service/vi/application_display_service.h index eb22b28223..0b5898ee56 100644 --- a/src/core/hle/service/vi/application_display_service.h +++ b/src/core/hle/service/vi/application_display_service.h @@ -74,7 +74,7 @@ public: s64 width, s64 height); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_container; KernelHelpers::ServiceContext m_context; std::mutex m_lock{}; diff --git a/src/core/hle/service/vi/application_root_service.cpp b/src/core/hle/service/vi/application_root_service.cpp index 9a4c5c8d42..f12c564277 100644 --- a/src/core/hle/service/vi/application_root_service.cpp +++ b/src/core/hle/service/vi/application_root_service.cpp @@ -14,7 +14,7 @@ namespace Service::VI { -ServiceFrameworkBase::FunctionInfoBase const* IApplicationRootService::FindRequest(u32 key) { +std::optional IApplicationRootService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{0, C<&IApplicationRootService::GetDisplayService>, "GetDisplayService"}, FunctionInfo{1, nullptr, "GetDisplayServiceWithProxyNameExchange"} diff --git a/src/core/hle/service/vi/application_root_service.h b/src/core/hle/service/vi/application_root_service.h index 4b6ad49de6..4deaa04f4c 100644 --- a/src/core/hle/service/vi/application_root_service.h +++ b/src/core/hle/service/vi/application_root_service.h @@ -30,7 +30,7 @@ private: Policy policy); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; 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 189e897a3d..1b3b0f3379 100644 --- a/src/core/hle/service/vi/manager_display_service.cpp +++ b/src/core/hle/service/vi/manager_display_service.cpp @@ -10,7 +10,7 @@ namespace Service::VI { -ServiceFrameworkBase::FunctionInfoBase const* IManagerDisplayService::FindRequest(u32 key) { +std::optional IManagerDisplayService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{200, nullptr, "AllocateProcessHeapBlock"}, FunctionInfo{201, nullptr, "FreeProcessHeapBlock"}, diff --git a/src/core/hle/service/vi/manager_display_service.h b/src/core/hle/service/vi/manager_display_service.h index 033be4dddd..1c7a79f337 100644 --- a/src/core/hle/service/vi/manager_display_service.h +++ b/src/core/hle/service/vi/manager_display_service.h @@ -37,7 +37,7 @@ public: Result SetLayerVisibility(bool visible, u64 layer_id); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_container; }; diff --git a/src/core/hle/service/vi/manager_root_service.cpp b/src/core/hle/service/vi/manager_root_service.cpp index 8ab0e25845..0cc98bc2c0 100644 --- a/src/core/hle/service/vi/manager_root_service.cpp +++ b/src/core/hle/service/vi/manager_root_service.cpp @@ -15,7 +15,7 @@ namespace Service::VI { -ServiceFrameworkBase::FunctionInfoBase const* IManagerRootService::FindRequest(u32 key) { +std::optional IManagerRootService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{2, C<&IManagerRootService::GetDisplayService>, "GetDisplayService"}, FunctionInfo{3, nullptr, "GetDisplayServiceWithProxyNameExchange"}, diff --git a/src/core/hle/service/vi/manager_root_service.h b/src/core/hle/service/vi/manager_root_service.h index 35e904bb58..78c0d1f80d 100644 --- a/src/core/hle/service/vi/manager_root_service.h +++ b/src/core/hle/service/vi/manager_root_service.h @@ -29,7 +29,7 @@ public: Policy policy); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_container; }; diff --git a/src/core/hle/service/vi/system_display_service.cpp b/src/core/hle/service/vi/system_display_service.cpp index a996084119..997f0a51fc 100644 --- a/src/core/hle/service/vi/system_display_service.cpp +++ b/src/core/hle/service/vi/system_display_service.cpp @@ -12,7 +12,7 @@ namespace Service::VI { -ServiceFrameworkBase::FunctionInfoBase const* ISystemDisplayService::FindRequest(u32 key) { +std::optional ISystemDisplayService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{1200, nullptr, "GetZOrderCountMin"}, FunctionInfo{1202, nullptr, "GetZOrderCountMax"}, diff --git a/src/core/hle/service/vi/system_display_service.h b/src/core/hle/service/vi/system_display_service.h index f6e83863cd..04c9f0977e 100644 --- a/src/core/hle/service/vi/system_display_service.h +++ b/src/core/hle/service/vi/system_display_service.h @@ -47,7 +47,7 @@ private: Result CancelSharedFrameBuffer(u64 layer_id, s64 slot); private: - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_container; }; diff --git a/src/core/hle/service/vi/system_root_service.cpp b/src/core/hle/service/vi/system_root_service.cpp index e3d0417792..c078be37a3 100644 --- a/src/core/hle/service/vi/system_root_service.cpp +++ b/src/core/hle/service/vi/system_root_service.cpp @@ -14,7 +14,7 @@ namespace Service::VI { -ServiceFrameworkBase::FunctionInfoBase const* ISystemRootService::FindRequest(u32 key) { +std::optional ISystemRootService::FindRequest(u32 key) { static constexpr auto functions = CreateStaticMap( FunctionInfo{1, C<&ISystemRootService::GetDisplayService>, "GetDisplayService"}, FunctionInfo{3, nullptr, "GetDisplayServiceWithProxyNameExchange"} diff --git a/src/core/hle/service/vi/system_root_service.h b/src/core/hle/service/vi/system_root_service.h index f71376f03b..baf516fec5 100644 --- a/src/core/hle/service/vi/system_root_service.h +++ b/src/core/hle/service/vi/system_root_service.h @@ -29,7 +29,7 @@ private: Out> out_application_display_service, Policy policy); - FunctionInfoBase const* FindRequest(u32 key) override; + std::optional FindRequest(u32 key) override; const std::shared_ptr m_container; }; diff --git a/src/core/hle/service/wlan/wlan.cpp b/src/core/hle/service/wlan/wlan.cpp index 4e6e382810..c4bbd87f6c 100644 --- a/src/core/hle/service/wlan/wlan.cpp +++ b/src/core/hle/service/wlan/wlan.cpp @@ -18,7 +18,7 @@ public: : ServiceFramework{system_, "wlan:lcl"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -128,7 +128,7 @@ public: : ServiceFramework{system_, "wlan:lg"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -142,7 +142,7 @@ public: : ServiceFramework{system_, "wlan:lga"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -156,7 +156,7 @@ public: : ServiceFramework{system_, "wlan:sg"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -170,7 +170,7 @@ public: : ServiceFramework{system_, "wlan:soc"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -196,7 +196,7 @@ public: : ServiceFramework{system_, "wlan:dtc"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -237,7 +237,7 @@ public: : ServiceFramework{system_, "wlan:p"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap( @@ -252,7 +252,7 @@ public: : ServiceFramework{system_, "wlan:nd"} {} - FunctionInfoBase const* FindRequest(u32 key) override { + std::optional FindRequest(u32 key) override { return HandlerTableGenerateWithFind(key, functions); } static constexpr auto functions = CreateStaticMap(