2026-09-26 08:11:32

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2026-09-26 08:11:32 +00:00
committed by crueter
parent 83a92be045
commit 441c902329
272 changed files with 4566 additions and 4679 deletions
-4
View File
@@ -346,7 +346,6 @@ public:
explicit IProfileCommon(Core::System& system_, const char* name, bool editor_commands,
Common::UUID user_id_, ProfileManager& profile_manager_)
: ServiceFramework{system_, name}, profile_manager{profile_manager_}, user_id{user_id_} {
// clang-format off
static const FunctionInfo functions[] = {
FunctionInfo{0, &IProfileCommon::Get, "Get"},
FunctionInfo{1, &IProfileCommon::GetBase, "GetBase"},
@@ -356,17 +355,14 @@ public:
FunctionInfo{21, &IProfileCommon::Unknown21, "Unknown21"},
FunctionInfo{30, &IProfileCommon::Unknown30, "Unknown30"}
};
// clang-format on
RegisterHandlers(functions);
if (editor_commands) {
// clang-format off
static const FunctionInfo editor_functions[] = {
FunctionInfo{100, &IProfileCommon::Store, "Store"},
FunctionInfo{101, &IProfileCommon::StoreWithImage, "StoreWithImage"},
FunctionInfo{110, &IProfileCommon::Unknown110, "Unknown110"}
};
// clang-format on
RegisterHandlers(editor_functions);
}
}
@@ -19,23 +19,6 @@ namespace Service::AM {
IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& system_,
WindowSystem& window_system)
: ServiceFramework{system_, "appletAE"}, m_window_system{window_system} {
// clang-format off
static const FunctionInfo functions[] = {
{100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"},
{110, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxyEx"},
{200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"},
{201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"},
{300, D<&IAllSystemAppletProxiesService::OpenOverlayAppletProxy>, "OpenOverlayAppletProxy"},
{350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"},
{400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"},
{410, nullptr, "GetSystemAppletControllerForDebug"},
{450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+
{460, D<&IAllSystemAppletProxiesService::GetAppletAlternativeFunctions>, "GetAppletAlternativeFunctions"}, // 20.0.0+
{1000, nullptr, "GetDebugFunctions"},
};
// clang-format on
RegisterHandlers(functions);
}
IAllSystemAppletProxiesService::~IAllSystemAppletProxiesService() = default;
@@ -49,6 +49,22 @@ private:
private:
std::shared_ptr<Applet> GetAppletFromProcessId(ProcessId pid);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"},
FunctionInfo{110, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxyEx"},
FunctionInfo{200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"},
FunctionInfo{201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"},
FunctionInfo{300, D<&IAllSystemAppletProxiesService::OpenOverlayAppletProxy>, "OpenOverlayAppletProxy"},
FunctionInfo{350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"},
FunctionInfo{400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"},
FunctionInfo{410, nullptr, "GetSystemAppletControllerForDebug"},
FunctionInfo{450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+
FunctionInfo{460, D<&IAllSystemAppletProxiesService::GetAppletAlternativeFunctions>, "GetAppletAlternativeFunctions"}, // 20.0.0+
FunctionInfo{1000, nullptr, "GetDebugFunctions"}
);
WindowSystem& m_window_system;
};
@@ -15,36 +15,6 @@ namespace Service::AM {
IAppletCommonFunctions::IAppletCommonFunctions(Core::System& system_,
std::shared_ptr<Applet> applet_)
: ServiceFramework{system_, "IAppletCommonFunctions"}, applet{std::move(applet_)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "SetTerminateResult"},
{10, nullptr, "ReadThemeStorage"},
{11, nullptr, "WriteThemeStorage"},
{20, nullptr, "PushToAppletBoundChannel"},
{21, nullptr, "TryPopFromAppletBoundChannel"},
{40, nullptr, "GetDisplayLogicalResolution"},
{42, D<&IAppletCommonFunctions::SetDisplayMagnification>, "SetDisplayMagnification"},
{50, D<&IAppletCommonFunctions::SetHomeButtonDoubleClickEnabled>, "SetHomeButtonDoubleClickEnabled"},
{51, D<&IAppletCommonFunctions::GetHomeButtonDoubleClickEnabled>, "GetHomeButtonDoubleClickEnabled"},
{52, nullptr, "IsHomeButtonShortPressedBlocked"},
{60, nullptr, "IsVrModeCurtainRequired"},
{61, nullptr, "IsSleepRequiredByHighTemperature"},
{62, nullptr, "IsSleepRequiredByLowBattery"},
{70, D<&IAppletCommonFunctions::SetCpuBoostRequestPriority>, "SetCpuBoostRequestPriority"},
{80, nullptr, "SetHandlingCaptureButtonShortPressedMessageEnabledForApplet"},
{81, nullptr, "SetHandlingCaptureButtonLongPressedMessageEnabledForApplet"},
{90, nullptr, "OpenNamedChannelAsParent"},
{91, nullptr, "OpenNamedChannelAsChild"},
{100, nullptr, "SetApplicationCoreUsageMode"},
{300, D<&IAppletCommonFunctions::GetCurrentApplicationId>, "GetCurrentApplicationId"},
{310, nullptr, "IsSystemAppletHomeMenu"}, //19.0.0+
{320, D<&IAppletCommonFunctions::SetGpuTimeSliceBoost>, "SetGpuTimeSliceBoost"}, //19.0.0+
{321, nullptr, "SetGpuTimeSliceBoostDueToApplication"}, //19.0.0+
{350, D<&IAppletCommonFunctions::Unknown350>, "Unknown350"} //20.0.0+
};
// clang-format on
RegisterHandlers(functions);
}
IAppletCommonFunctions::~IAppletCommonFunctions() = default;
@@ -27,6 +27,35 @@ private:
Result SetGpuTimeSliceBoost(s64 time_span);
Result Unknown350(Out<u16> out_unknown);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "SetTerminateResult"},
FunctionInfo{10, nullptr, "ReadThemeStorage"},
FunctionInfo{11, nullptr, "WriteThemeStorage"},
FunctionInfo{20, nullptr, "PushToAppletBoundChannel"},
FunctionInfo{21, nullptr, "TryPopFromAppletBoundChannel"},
FunctionInfo{40, nullptr, "GetDisplayLogicalResolution"},
FunctionInfo{42, D<&IAppletCommonFunctions::SetDisplayMagnification>, "SetDisplayMagnification"},
FunctionInfo{50, D<&IAppletCommonFunctions::SetHomeButtonDoubleClickEnabled>, "SetHomeButtonDoubleClickEnabled"},
FunctionInfo{51, D<&IAppletCommonFunctions::GetHomeButtonDoubleClickEnabled>, "GetHomeButtonDoubleClickEnabled"},
FunctionInfo{52, nullptr, "IsHomeButtonShortPressedBlocked"},
FunctionInfo{60, nullptr, "IsVrModeCurtainRequired"},
FunctionInfo{61, nullptr, "IsSleepRequiredByHighTemperature"},
FunctionInfo{62, nullptr, "IsSleepRequiredByLowBattery"},
FunctionInfo{70, D<&IAppletCommonFunctions::SetCpuBoostRequestPriority>, "SetCpuBoostRequestPriority"},
FunctionInfo{80, nullptr, "SetHandlingCaptureButtonShortPressedMessageEnabledForApplet"},
FunctionInfo{81, nullptr, "SetHandlingCaptureButtonLongPressedMessageEnabledForApplet"},
FunctionInfo{90, nullptr, "OpenNamedChannelAsParent"},
FunctionInfo{91, nullptr, "OpenNamedChannelAsChild"},
FunctionInfo{100, nullptr, "SetApplicationCoreUsageMode"},
FunctionInfo{300, D<&IAppletCommonFunctions::GetCurrentApplicationId>, "GetCurrentApplicationId"},
FunctionInfo{310, nullptr, "IsSystemAppletHomeMenu"}, //19.0.0+
FunctionInfo{320, D<&IAppletCommonFunctions::SetGpuTimeSliceBoost>, "SetGpuTimeSliceBoost"}, //19.0.0+
FunctionInfo{321, nullptr, "SetGpuTimeSliceBoostDueToApplication"}, //19.0.0+
FunctionInfo{350, D<&IAppletCommonFunctions::Unknown350>, "Unknown350"} //20.0.0+
);
const std::shared_ptr<Applet> applet;
};
@@ -22,38 +22,6 @@ IApplicationAccessor::IApplicationAccessor(Core::System& system_, std::shared_pt
WindowSystem& window_system)
: ServiceFramework{system_, "IApplicationAccessor"}, m_window_system(window_system),
m_applet(std::move(applet)) {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IApplicationAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"},
{1, nullptr, "IsCompleted"},
{10, D<&IApplicationAccessor::Start>, "Start"},
{20, D<&IApplicationAccessor::RequestExit>, "RequestExit"},
{25, D<&IApplicationAccessor::Terminate>, "Terminate"},
{30, D<&IApplicationAccessor::GetResult>, "GetResult"},
{101, D<&IApplicationAccessor::RequestForApplicationToGetForeground>, "RequestForApplicationToGetForeground"},
{110, nullptr, "TerminateAllLibraryApplets"},
{111, nullptr, "AreAnyLibraryAppletsLeft"},
{112, D<&IApplicationAccessor::GetCurrentLibraryApplet>, "GetCurrentLibraryApplet"},
{120, nullptr, "GetApplicationId"},
{121, D<&IApplicationAccessor::PushLaunchParameter>, "PushLaunchParameter"},
{122, D<&IApplicationAccessor::GetApplicationControlProperty>, "GetApplicationControlProperty"},
{123, nullptr, "GetApplicationLaunchProperty"},
{124, nullptr, "GetApplicationLaunchRequestInfo"},
{130, D<&IApplicationAccessor::SetUsers>, "SetUsers"},
{131, D<&IApplicationAccessor::CheckRightsEnvironmentAvailable>, "CheckRightsEnvironmentAvailable"},
{132, D<&IApplicationAccessor::GetNsRightsEnvironmentHandle>, "GetNsRightsEnvironmentHandle"},
{140, nullptr, "GetDesirableUids"},
{150, D<&IApplicationAccessor::ReportApplicationExitTimeout>, "ReportApplicationExitTimeout"},
{160, nullptr, "SetApplicationAttribute"},
{170, nullptr, "HasSaveDataAccessPermission"},
{180, nullptr, "PushToFriendInvitationStorageChannel"},
{190, nullptr, "PushToNotificationStorageChannel"},
{200, nullptr, "RequestApplicationSoftReset"},
{201, nullptr, "RestartApplicationTimer"},
};
// clang-format on
RegisterHandlers(functions);
}
IApplicationAccessor::~IApplicationAccessor() = default;
@@ -36,6 +36,37 @@ private:
Result GetNsRightsEnvironmentHandle(Out<u64> out_handle);
Result ReportApplicationExitTimeout();
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IApplicationAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"},
FunctionInfo{1, nullptr, "IsCompleted"},
FunctionInfo{10, D<&IApplicationAccessor::Start>, "Start"},
FunctionInfo{20, D<&IApplicationAccessor::RequestExit>, "RequestExit"},
FunctionInfo{25, D<&IApplicationAccessor::Terminate>, "Terminate"},
FunctionInfo{30, D<&IApplicationAccessor::GetResult>, "GetResult"},
FunctionInfo{101, D<&IApplicationAccessor::RequestForApplicationToGetForeground>, "RequestForApplicationToGetForeground"},
FunctionInfo{110, nullptr, "TerminateAllLibraryApplets"},
FunctionInfo{111, nullptr, "AreAnyLibraryAppletsLeft"},
FunctionInfo{112, D<&IApplicationAccessor::GetCurrentLibraryApplet>, "GetCurrentLibraryApplet"},
FunctionInfo{120, nullptr, "GetApplicationId"},
FunctionInfo{121, D<&IApplicationAccessor::PushLaunchParameter>, "PushLaunchParameter"},
FunctionInfo{122, D<&IApplicationAccessor::GetApplicationControlProperty>, "GetApplicationControlProperty"},
FunctionInfo{123, nullptr, "GetApplicationLaunchProperty"},
FunctionInfo{124, nullptr, "GetApplicationLaunchRequestInfo"},
FunctionInfo{130, D<&IApplicationAccessor::SetUsers>, "SetUsers"},
FunctionInfo{131, D<&IApplicationAccessor::CheckRightsEnvironmentAvailable>, "CheckRightsEnvironmentAvailable"},
FunctionInfo{132, D<&IApplicationAccessor::GetNsRightsEnvironmentHandle>, "GetNsRightsEnvironmentHandle"},
FunctionInfo{140, nullptr, "GetDesirableUids"},
FunctionInfo{150, D<&IApplicationAccessor::ReportApplicationExitTimeout>, "ReportApplicationExitTimeout"},
FunctionInfo{160, nullptr, "SetApplicationAttribute"},
FunctionInfo{170, nullptr, "HasSaveDataAccessPermission"},
FunctionInfo{180, nullptr, "PushToFriendInvitationStorageChannel"},
FunctionInfo{190, nullptr, "PushToNotificationStorageChannel"},
FunctionInfo{200, nullptr, "RequestApplicationSoftReset"},
FunctionInfo{201, nullptr, "RestartApplicationTimer"}
);
WindowSystem& m_window_system;
const std::shared_ptr<Applet> m_applet;
};
@@ -54,16 +54,6 @@ Result CreateGuestApplication(SharedPointer<IApplicationAccessor>* out_applicati
IApplicationCreator::IApplicationCreator(Core::System& system_, WindowSystem& window_system)
: ServiceFramework{system_, "IApplicationCreator"}, m_window_system{window_system} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IApplicationCreator::CreateApplication>, "CreateApplication"},
{1, nullptr, "PopLaunchRequestedApplication"},
{10, D<&IApplicationCreator::CreateSystemApplication>, "CreateSystemApplication"},
{100, nullptr, "PopFloatingApplicationForDevelopment"},
};
// clang-format on
RegisterHandlers(functions);
}
IApplicationCreator::~IApplicationCreator() = default;
@@ -24,6 +24,15 @@ private:
Result CreateApplication(Out<SharedPointer<IApplicationAccessor>>, u64 application_id);
Result CreateSystemApplication(Out<SharedPointer<IApplicationAccessor>>, u64 application_id);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IApplicationCreator::CreateApplication>, "CreateApplication"},
FunctionInfo{1, nullptr, "PopLaunchRequestedApplication"},
FunctionInfo{10, D<&IApplicationCreator::CreateSystemApplication>, "CreateSystemApplication"},
FunctionInfo{100, nullptr, "PopFloatingApplicationForDevelopment"}
);
WindowSystem& m_window_system;
};
@@ -55,74 +55,74 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_
: ServiceFramework{system_, "IApplicationFunctions"}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{1, D<&IApplicationFunctions::PopLaunchParameter>, "PopLaunchParameter"},
{10, nullptr, "CreateApplicationAndPushAndRequestToStart"},
{11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"},
{12, D<&IApplicationFunctions::CreateApplicationAndRequestToStart>, "CreateApplicationAndRequestToStart"},
{13, nullptr, "CreateApplicationAndRequestToStartForQuest"},
{14, nullptr, "CreateApplicationWithAttributeAndPushAndRequestToStartForQuest"},
{15, nullptr, "CreateApplicationWithAttributeAndRequestToStartForQuest"},
{20, D<&IApplicationFunctions::EnsureSaveData>, "EnsureSaveData"},
{21, D<&IApplicationFunctions::GetDesiredLanguage>, "GetDesiredLanguage"},
{22, D<&IApplicationFunctions::SetTerminateResult>, "SetTerminateResult"},
{23, D<&IApplicationFunctions::GetDisplayVersion>, "GetDisplayVersion"},
{24, nullptr, "GetLaunchStorageInfoForDebug"},
{25, D<&IApplicationFunctions::ExtendSaveData>, "ExtendSaveData"},
{26, D<&IApplicationFunctions::GetSaveDataSize>, "GetSaveDataSize"},
{27, D<&IApplicationFunctions::CreateCacheStorage>, "CreateCacheStorage"},
{28, D<&IApplicationFunctions::GetSaveDataSizeMax>, "GetSaveDataSizeMax"},
{29, D<&IApplicationFunctions::GetCacheStorageMax>, "GetCacheStorageMax"},
{30, D<&IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed>, "BeginBlockingHomeButtonShortAndLongPressed"},
{31, D<&IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed>, "EndBlockingHomeButtonShortAndLongPressed"},
{32, D<&IApplicationFunctions::BeginBlockingHomeButton>, "BeginBlockingHomeButton"},
{33, D<&IApplicationFunctions::EndBlockingHomeButton>, "EndBlockingHomeButton"},
{34, nullptr, "SelectApplicationLicense"},
{35, nullptr, "GetDeviceSaveDataSizeMax"},
{36, nullptr, "GetLimitedApplicationLicense"},
{37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"},
{40, D<&IApplicationFunctions::NotifyRunning>, "NotifyRunning"},
{50, D<&IApplicationFunctions::GetPseudoDeviceId>, "GetPseudoDeviceId"},
{60, D<&IApplicationFunctions::SetMediaPlaybackStateForApplication>, "SetMediaPlaybackStateForApplication"},
{65, D<&IApplicationFunctions::IsGamePlayRecordingSupported>, "IsGamePlayRecordingSupported"},
{66, D<&IApplicationFunctions::InitializeGamePlayRecording>, "InitializeGamePlayRecording"},
{67, D<&IApplicationFunctions::SetGamePlayRecordingState>, "SetGamePlayRecordingState"},
{68, nullptr, "RequestFlushGamePlayingMovieForDebug"},
{70, nullptr, "RequestToShutdown"},
{71, nullptr, "RequestToReboot"},
{72, nullptr, "RequestToSleep"},
{80, nullptr, "ExitAndRequestToShowThanksMessage"},
{90, D<&IApplicationFunctions::EnableApplicationCrashReport>, "EnableApplicationCrashReport"},
{100, D<&IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer>, "InitializeApplicationCopyrightFrameBuffer"},
{101, D<&IApplicationFunctions::SetApplicationCopyrightImage>, "SetApplicationCopyrightImage"},
{102, D<&IApplicationFunctions::SetApplicationCopyrightVisibility>, "SetApplicationCopyrightVisibility"},
{110, D<&IApplicationFunctions::QueryApplicationPlayStatistics>, "QueryApplicationPlayStatistics"},
{111, D<&IApplicationFunctions::QueryApplicationPlayStatisticsByUid>, "QueryApplicationPlayStatisticsByUid"},
{120, D<&IApplicationFunctions::ExecuteProgram>, "ExecuteProgram"},
{121, D<&IApplicationFunctions::ClearUserChannel>, "ClearUserChannel"},
{122, D<&IApplicationFunctions::UnpopToUserChannel>, "UnpopToUserChannel"},
{123, D<&IApplicationFunctions::GetPreviousProgramIndex>, "GetPreviousProgramIndex"},
{124, nullptr, "EnableApplicationAllThreadDumpOnCrash"},
{130, D<&IApplicationFunctions::GetGpuErrorDetectedSystemEvent>, "GetGpuErrorDetectedSystemEvent"},
{131, nullptr, "SetDelayTimeToAbortOnGpuError"},
{140, D<&IApplicationFunctions::GetFriendInvitationStorageChannelEvent>, "GetFriendInvitationStorageChannelEvent"},
{141, D<&IApplicationFunctions::TryPopFromFriendInvitationStorageChannel>, "TryPopFromFriendInvitationStorageChannel"},
{150, D<&IApplicationFunctions::GetNotificationStorageChannelEvent>, "GetNotificationStorageChannelEvent"},
{151, nullptr, "TryPopFromNotificationStorageChannel"},
{160, D<&IApplicationFunctions::GetHealthWarningDisappearedSystemEvent>, "GetHealthWarningDisappearedSystemEvent"},
{170, nullptr, "SetHdcpAuthenticationActivated"},
{180, nullptr, "GetLaunchRequiredVersion"},
{181, nullptr, "UpgradeLaunchRequiredVersion"},
{190, nullptr, "SendServerMaintenanceOverlayNotification"},
{200, nullptr, "GetLastApplicationExitReason"},
{210, D<&IApplicationFunctions::GetUnknownEvent210>, "Unknown210"},
{220, nullptr, "Unknown220"}, // [20.0.0+]
{300, nullptr, "CreateMovieWriter"}, // [19.0.0+]
{310, nullptr, "Unknown310"}, // [20.0.0+]
{320, nullptr, "Unknown320"}, // [20.0.0+]
{330, D<&IApplicationFunctions::Unknown330>, "Unknown330"}, // [20.0.0+]
{500, nullptr, "StartContinuousRecordingFlushForDebug"},
{1000, nullptr, "CreateMovieMaker"},
{1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"},
FunctionInfo{1, D<&IApplicationFunctions::PopLaunchParameter>, "PopLaunchParameter"},
FunctionInfo{10, nullptr, "CreateApplicationAndPushAndRequestToStart"},
FunctionInfo{11, nullptr, "CreateApplicationAndPushAndRequestToStartForQuest"},
FunctionInfo{12, D<&IApplicationFunctions::CreateApplicationAndRequestToStart>, "CreateApplicationAndRequestToStart"},
FunctionInfo{13, nullptr, "CreateApplicationAndRequestToStartForQuest"},
FunctionInfo{14, nullptr, "CreateApplicationWithAttributeAndPushAndRequestToStartForQuest"},
FunctionInfo{15, nullptr, "CreateApplicationWithAttributeAndRequestToStartForQuest"},
FunctionInfo{20, D<&IApplicationFunctions::EnsureSaveData>, "EnsureSaveData"},
FunctionInfo{21, D<&IApplicationFunctions::GetDesiredLanguage>, "GetDesiredLanguage"},
FunctionInfo{22, D<&IApplicationFunctions::SetTerminateResult>, "SetTerminateResult"},
FunctionInfo{23, D<&IApplicationFunctions::GetDisplayVersion>, "GetDisplayVersion"},
FunctionInfo{24, nullptr, "GetLaunchStorageInfoForDebug"},
FunctionInfo{25, D<&IApplicationFunctions::ExtendSaveData>, "ExtendSaveData"},
FunctionInfo{26, D<&IApplicationFunctions::GetSaveDataSize>, "GetSaveDataSize"},
FunctionInfo{27, D<&IApplicationFunctions::CreateCacheStorage>, "CreateCacheStorage"},
FunctionInfo{28, D<&IApplicationFunctions::GetSaveDataSizeMax>, "GetSaveDataSizeMax"},
FunctionInfo{29, D<&IApplicationFunctions::GetCacheStorageMax>, "GetCacheStorageMax"},
FunctionInfo{30, D<&IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed>, "BeginBlockingHomeButtonShortAndLongPressed"},
FunctionInfo{31, D<&IApplicationFunctions::EndBlockingHomeButtonShortAndLongPressed>, "EndBlockingHomeButtonShortAndLongPressed"},
FunctionInfo{32, D<&IApplicationFunctions::BeginBlockingHomeButton>, "BeginBlockingHomeButton"},
FunctionInfo{33, D<&IApplicationFunctions::EndBlockingHomeButton>, "EndBlockingHomeButton"},
FunctionInfo{34, nullptr, "SelectApplicationLicense"},
FunctionInfo{35, nullptr, "GetDeviceSaveDataSizeMax"},
FunctionInfo{36, nullptr, "GetLimitedApplicationLicense"},
FunctionInfo{37, nullptr, "GetLimitedApplicationLicenseUpgradableEvent"},
FunctionInfo{40, D<&IApplicationFunctions::NotifyRunning>, "NotifyRunning"},
FunctionInfo{50, D<&IApplicationFunctions::GetPseudoDeviceId>, "GetPseudoDeviceId"},
FunctionInfo{60, D<&IApplicationFunctions::SetMediaPlaybackStateForApplication>, "SetMediaPlaybackStateForApplication"},
FunctionInfo{65, D<&IApplicationFunctions::IsGamePlayRecordingSupported>, "IsGamePlayRecordingSupported"},
FunctionInfo{66, D<&IApplicationFunctions::InitializeGamePlayRecording>, "InitializeGamePlayRecording"},
FunctionInfo{67, D<&IApplicationFunctions::SetGamePlayRecordingState>, "SetGamePlayRecordingState"},
FunctionInfo{68, nullptr, "RequestFlushGamePlayingMovieForDebug"},
FunctionInfo{70, nullptr, "RequestToShutdown"},
FunctionInfo{71, nullptr, "RequestToReboot"},
FunctionInfo{72, nullptr, "RequestToSleep"},
FunctionInfo{80, nullptr, "ExitAndRequestToShowThanksMessage"},
FunctionInfo{90, D<&IApplicationFunctions::EnableApplicationCrashReport>, "EnableApplicationCrashReport"},
FunctionInfo{100, D<&IApplicationFunctions::InitializeApplicationCopyrightFrameBuffer>, "InitializeApplicationCopyrightFrameBuffer"},
FunctionInfo{101, D<&IApplicationFunctions::SetApplicationCopyrightImage>, "SetApplicationCopyrightImage"},
FunctionInfo{102, D<&IApplicationFunctions::SetApplicationCopyrightVisibility>, "SetApplicationCopyrightVisibility"},
FunctionInfo{110, D<&IApplicationFunctions::QueryApplicationPlayStatistics>, "QueryApplicationPlayStatistics"},
FunctionInfo{111, D<&IApplicationFunctions::QueryApplicationPlayStatisticsByUid>, "QueryApplicationPlayStatisticsByUid"},
FunctionInfo{120, D<&IApplicationFunctions::ExecuteProgram>, "ExecuteProgram"},
FunctionInfo{121, D<&IApplicationFunctions::ClearUserChannel>, "ClearUserChannel"},
FunctionInfo{122, D<&IApplicationFunctions::UnpopToUserChannel>, "UnpopToUserChannel"},
FunctionInfo{123, D<&IApplicationFunctions::GetPreviousProgramIndex>, "GetPreviousProgramIndex"},
FunctionInfo{124, nullptr, "EnableApplicationAllThreadDumpOnCrash"},
FunctionInfo{130, D<&IApplicationFunctions::GetGpuErrorDetectedSystemEvent>, "GetGpuErrorDetectedSystemEvent"},
FunctionInfo{131, nullptr, "SetDelayTimeToAbortOnGpuError"},
FunctionInfo{140, D<&IApplicationFunctions::GetFriendInvitationStorageChannelEvent>, "GetFriendInvitationStorageChannelEvent"},
FunctionInfo{141, D<&IApplicationFunctions::TryPopFromFriendInvitationStorageChannel>, "TryPopFromFriendInvitationStorageChannel"},
FunctionInfo{150, D<&IApplicationFunctions::GetNotificationStorageChannelEvent>, "GetNotificationStorageChannelEvent"},
FunctionInfo{151, nullptr, "TryPopFromNotificationStorageChannel"},
FunctionInfo{160, D<&IApplicationFunctions::GetHealthWarningDisappearedSystemEvent>, "GetHealthWarningDisappearedSystemEvent"},
FunctionInfo{170, nullptr, "SetHdcpAuthenticationActivated"},
FunctionInfo{180, nullptr, "GetLaunchRequiredVersion"},
FunctionInfo{181, nullptr, "UpgradeLaunchRequiredVersion"},
FunctionInfo{190, nullptr, "SendServerMaintenanceOverlayNotification"},
FunctionInfo{200, nullptr, "GetLastApplicationExitReason"},
FunctionInfo{210, D<&IApplicationFunctions::GetUnknownEvent210>, "Unknown210"},
FunctionInfo{220, nullptr, "Unknown220"}, // [20.0.0+]
FunctionInfo{300, nullptr, "CreateMovieWriter"}, // [19.0.0+]
FunctionInfo{310, nullptr, "Unknown310"}, // [20.0.0+]
FunctionInfo{320, nullptr, "Unknown320"}, // [20.0.0+]
FunctionInfo{330, D<&IApplicationFunctions::Unknown330>, "Unknown330"}, // [20.0.0+]
FunctionInfo{500, nullptr, "StartContinuousRecordingFlushForDebug"},
FunctionInfo{1000, nullptr, "CreateMovieMaker"},
FunctionInfo{1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"},
};
// clang-format on
@@ -20,21 +20,6 @@ IApplicationProxy::IApplicationProxy(Core::System& system_, std::shared_ptr<Appl
Kernel::KProcess* process, WindowSystem& window_system)
: ServiceFramework{system_, "IApplicationProxy"},
m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IApplicationProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
{1, D<&IApplicationProxy::GetSelfController>, "GetSelfController"},
{2, D<&IApplicationProxy::GetWindowController>, "GetWindowController"},
{3, D<&IApplicationProxy::GetAudioController>, "GetAudioController"},
{4, D<&IApplicationProxy::GetDisplayController>, "GetDisplayController"},
{10, D<&IApplicationProxy::GetProcessWindingController>, "GetProcessWindingController"},
{11, D<&IApplicationProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
{20, D<&IApplicationProxy::GetApplicationFunctions>, "GetApplicationFunctions"},
{1000, D<&IApplicationProxy::GetDebugFunctions>, "GetDebugFunctions"},
};
// clang-format on
RegisterHandlers(functions);
}
IApplicationProxy::~IApplicationProxy() = default;
@@ -41,6 +41,20 @@ private:
Out<SharedPointer<IApplicationFunctions>> out_application_functions);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IApplicationProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
FunctionInfo{1, D<&IApplicationProxy::GetSelfController>, "GetSelfController"},
FunctionInfo{2, D<&IApplicationProxy::GetWindowController>, "GetWindowController"},
FunctionInfo{3, D<&IApplicationProxy::GetAudioController>, "GetAudioController"},
FunctionInfo{4, D<&IApplicationProxy::GetDisplayController>, "GetDisplayController"},
FunctionInfo{10, D<&IApplicationProxy::GetProcessWindingController>, "GetProcessWindingController"},
FunctionInfo{11, D<&IApplicationProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
FunctionInfo{20, D<&IApplicationProxy::GetApplicationFunctions>, "GetApplicationFunctions"},
FunctionInfo{1000, D<&IApplicationProxy::GetDebugFunctions>, "GetDebugFunctions"}
);
WindowSystem& m_window_system;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
@@ -30,7 +30,7 @@ private:
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"}
FunctionInfo{0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"}
);
WindowSystem& m_window_system;
};
@@ -11,18 +11,6 @@ namespace Service::AM {
IAudioController::IAudioController(Core::System& system_)
: ServiceFramework{system_, "IAudioController"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioController::SetExpectedMasterVolume>, "SetExpectedMasterVolume"},
{1, D<&IAudioController::GetMainAppletExpectedMasterVolume>, "GetMainAppletExpectedMasterVolume"},
{2, D<&IAudioController::GetLibraryAppletExpectedMasterVolume>, "GetLibraryAppletExpectedMasterVolume"},
{3, D<&IAudioController::ChangeMainAppletMasterVolume>, "ChangeMainAppletMasterVolume"},
{4, D<&IAudioController::SetTransparentVolumeRate>, "SetTransparentVolumeRate"},
{5, nullptr, "Unknown5"}, //20.0.0+
};
// clang-format on
RegisterHandlers(functions);
}
IAudioController::~IAudioController() = default;
@@ -20,6 +20,17 @@ private:
Result ChangeMainAppletMasterVolume(f32 volume, s64 fade_time_ns);
Result SetTransparentVolumeRate(f32 transparent_volume_rate);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioController::SetExpectedMasterVolume>, "SetExpectedMasterVolume"},
FunctionInfo{1, D<&IAudioController::GetMainAppletExpectedMasterVolume>, "GetMainAppletExpectedMasterVolume"},
FunctionInfo{2, D<&IAudioController::GetLibraryAppletExpectedMasterVolume>, "GetLibraryAppletExpectedMasterVolume"},
FunctionInfo{3, D<&IAudioController::ChangeMainAppletMasterVolume>, "ChangeMainAppletMasterVolume"},
FunctionInfo{4, D<&IAudioController::SetTransparentVolumeRate>, "SetTransparentVolumeRate"},
FunctionInfo{5, nullptr, "Unknown5"}, //20.0.0+
);
static constexpr float MinAllowedVolume = 0.0f;
static constexpr float MaxAllowedVolume = 1.0f;
@@ -20,75 +20,6 @@ namespace Service::AM {
ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr<Applet> applet)
: ServiceFramework{system_, "ICommonStateGetter"}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ICommonStateGetter::GetEventHandle>, "GetEventHandle"},
{1, D<&ICommonStateGetter::ReceiveMessage>, "ReceiveMessage"},
{2, nullptr, "GetThisAppletKind"},
{3, nullptr, "AllowToEnterSleep"},
{4, nullptr, "DisallowToEnterSleep"},
{5, D<&ICommonStateGetter::GetOperationMode>, "GetOperationMode"},
{6, D<&ICommonStateGetter::GetPerformanceMode>, "GetPerformanceMode"},
{7, nullptr, "GetCradleStatus"},
{8, D<&ICommonStateGetter::GetBootMode>, "GetBootMode"},
{9, D<&ICommonStateGetter::GetCurrentFocusState>, "GetCurrentFocusState"},
{10, D<&ICommonStateGetter::RequestToAcquireSleepLock>, "RequestToAcquireSleepLock"},
{11, D<&ICommonStateGetter::ReleaseSleepLock>, "ReleaseSleepLock"},
{12, D<&ICommonStateGetter::ReleaseSleepLockTransiently>, "ReleaseSleepLockTransiently"},
{13, D<&ICommonStateGetter::GetAcquiredSleepLockEvent>, "GetAcquiredSleepLockEvent"},
{14, nullptr, "GetWakeupCount"}, //11.0.0+
{15, nullptr, "Unknown15"}, //19.0.0+
{20, D<&ICommonStateGetter::PushToGeneralChannel>, "PushToGeneralChannel"},
{30, D<&ICommonStateGetter::GetHomeButtonReaderLockAccessor>, "GetHomeButtonReaderLockAccessor"},
{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"}, //2.0.0+
{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, //7.0.0+
{40, nullptr, "GetCradleFwVersion"}, //2.0.0+
{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, //3.0.0+
{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, //3.0.0+
{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, //4.0.0+
{53, D<&ICommonStateGetter::BeginVrModeEx>, "BeginVrModeEx"}, //7.0.0+
{54, D<&ICommonStateGetter::EndVrModeEx>, "EndVrModeEx"}, //7.0.0+
{55, D<&ICommonStateGetter::IsInControllerFirmwareUpdateSection>, "IsInControllerFirmwareUpdateSection"}, //3.0.0+
{59, nullptr, "SetVrPositionForDebug"}, //1.0.0+
{60, D<&ICommonStateGetter::GetDefaultDisplayResolution>, "GetDefaultDisplayResolution"},
{61, D<&ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent>, "GetDefaultDisplayResolutionChangeEvent"},
{62, D<&ICommonStateGetter::GetHdcpAuthenticationState>, "GetHdcpAuthenticationState"},
{63, D<&ICommonStateGetter::GetHdcpAuthenticationStateChangeEvent>, "GetHdcpAuthenticationStateChangeEvent"},
{64, nullptr, "SetTvPowerStateMatchingMode"},
{65, nullptr, "GetApplicationIdByContentActionName"},
{66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"},
{67, nullptr, "CancelCpuBoostMode"},
{68, D<&ICommonStateGetter::GetBuiltInDisplayType>, "GetBuiltInDisplayType"},
{80, D<&ICommonStateGetter::PerformSystemButtonPressingIfInFocus>, "PerformSystemButtonPressingIfInFocus"},
{90, nullptr, "SetPerformanceConfigurationChangedNotification"},
{91, nullptr, "GetCurrentPerformanceConfiguration"},
{100, D<&ICommonStateGetter::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"},
{110, nullptr, "OpenMyGpuErrorHandler"},
{120, D<&ICommonStateGetter::GetAppletLaunchedHistory>, "GetAppletLaunchedHistory"}, //13.0.0+
{130, D<&ICommonStateGetter::EnableStartupLogoDisappearedMessage>, "EnableStartupLogoDisappearedMessage"}, //21.0.0+
{200, D<&ICommonStateGetter::GetOperationModeSystemInfo>, "GetOperationModeSystemInfo"},
{300, D<&ICommonStateGetter::GetSettingsPlatformRegion>, "GetSettingsPlatformRegion"},
{400, nullptr, "ActivateMigrationService"},
{401, nullptr, "DeactivateMigrationService"},
{500, nullptr, "DisableSleepTillShutdown"},
{501, nullptr, "SuppressDisablingSleepTemporarily"},
{502, nullptr, "IsSleepEnabled"},
{503, nullptr, "IsDisablingSleepSuppressed"},
{600, nullptr, "SetHidInputMagnificationForApplication"}, //20.0.0+
{610, D<&ICommonStateGetter::Unknown610>, "Unknown610"}, //21.0.0+
{611, D<&ICommonStateGetter::Unknown611>, "Unknown611"}, //22.0.0+
{900, D<&ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled>, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, //11.0.0+
{910, nullptr, "GetLaunchRequiredTick"}, //17.0.0+
{1000, D<&ICommonStateGetter::BeginVrMode3d>, "BeginVrMode3d"}, //19.0.0+
{1001, D<&ICommonStateGetter::EndVrMode3d>, "EndVrMode3d"}, //19.0.0+
{1002, D<&ICommonStateGetter::IsVrModeEnabled3d>, "IsVrModeEnabled3d"}, //19.0.0+
{1003, D<&ICommonStateGetter::GetVrLaboGoggleViewport>, "GetVrLaboGoggleViewport"}, //21.0.0+
{1004, D<&ICommonStateGetter::GetPanelPhysicalSizeForSpecificTitle>, "GetPanelPhysicalSizeForSpecificTitle"}, //21.0.0+
{1005, D<&ICommonStateGetter::GetPanelResolutionForSpecificTitle>, "GetPanelResolutionForSpecificTitle"}, //21.0.0+
};
// clang-format on
RegisterHandlers(functions);
}
ICommonStateGetter::~ICommonStateGetter() = default;
@@ -76,6 +76,74 @@ private:
void SetCpuBoostMode(HLERequestContext& ctx);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ICommonStateGetter::GetEventHandle>, "GetEventHandle"},
FunctionInfo{1, D<&ICommonStateGetter::ReceiveMessage>, "ReceiveMessage"},
FunctionInfo{2, nullptr, "GetThisAppletKind"},
FunctionInfo{3, nullptr, "AllowToEnterSleep"},
FunctionInfo{4, nullptr, "DisallowToEnterSleep"},
FunctionInfo{5, D<&ICommonStateGetter::GetOperationMode>, "GetOperationMode"},
FunctionInfo{6, D<&ICommonStateGetter::GetPerformanceMode>, "GetPerformanceMode"},
FunctionInfo{7, nullptr, "GetCradleStatus"},
FunctionInfo{8, D<&ICommonStateGetter::GetBootMode>, "GetBootMode"},
FunctionInfo{9, D<&ICommonStateGetter::GetCurrentFocusState>, "GetCurrentFocusState"},
FunctionInfo{10, D<&ICommonStateGetter::RequestToAcquireSleepLock>, "RequestToAcquireSleepLock"},
FunctionInfo{11, D<&ICommonStateGetter::ReleaseSleepLock>, "ReleaseSleepLock"},
FunctionInfo{12, D<&ICommonStateGetter::ReleaseSleepLockTransiently>, "ReleaseSleepLockTransiently"},
FunctionInfo{13, D<&ICommonStateGetter::GetAcquiredSleepLockEvent>, "GetAcquiredSleepLockEvent"},
FunctionInfo{14, nullptr, "GetWakeupCount"}, //11.0.0+
FunctionInfo{15, nullptr, "Unknown15"}, //19.0.0+
FunctionInfo{20, D<&ICommonStateGetter::PushToGeneralChannel>, "PushToGeneralChannel"},
FunctionInfo{30, D<&ICommonStateGetter::GetHomeButtonReaderLockAccessor>, "GetHomeButtonReaderLockAccessor"},
FunctionInfo{31, D<&ICommonStateGetter::GetReaderLockAccessorEx>, "GetReaderLockAccessorEx"}, //2.0.0+
FunctionInfo{32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, //7.0.0+
FunctionInfo{40, nullptr, "GetCradleFwVersion"}, //2.0.0+
FunctionInfo{50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, //3.0.0+
FunctionInfo{51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, //3.0.0+
FunctionInfo{52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, //4.0.0+
FunctionInfo{53, D<&ICommonStateGetter::BeginVrModeEx>, "BeginVrModeEx"}, //7.0.0+
FunctionInfo{54, D<&ICommonStateGetter::EndVrModeEx>, "EndVrModeEx"}, //7.0.0+
FunctionInfo{55, D<&ICommonStateGetter::IsInControllerFirmwareUpdateSection>, "IsInControllerFirmwareUpdateSection"}, //3.0.0+
FunctionInfo{59, nullptr, "SetVrPositionForDebug"}, //1.0.0+
FunctionInfo{60, D<&ICommonStateGetter::GetDefaultDisplayResolution>, "GetDefaultDisplayResolution"},
FunctionInfo{61, D<&ICommonStateGetter::GetDefaultDisplayResolutionChangeEvent>, "GetDefaultDisplayResolutionChangeEvent"},
FunctionInfo{62, D<&ICommonStateGetter::GetHdcpAuthenticationState>, "GetHdcpAuthenticationState"},
FunctionInfo{63, D<&ICommonStateGetter::GetHdcpAuthenticationStateChangeEvent>, "GetHdcpAuthenticationStateChangeEvent"},
FunctionInfo{64, nullptr, "SetTvPowerStateMatchingMode"},
FunctionInfo{65, nullptr, "GetApplicationIdByContentActionName"},
FunctionInfo{66, &ICommonStateGetter::SetCpuBoostMode, "SetCpuBoostMode"},
FunctionInfo{67, nullptr, "CancelCpuBoostMode"},
FunctionInfo{68, D<&ICommonStateGetter::GetBuiltInDisplayType>, "GetBuiltInDisplayType"},
FunctionInfo{80, D<&ICommonStateGetter::PerformSystemButtonPressingIfInFocus>, "PerformSystemButtonPressingIfInFocus"},
FunctionInfo{90, nullptr, "SetPerformanceConfigurationChangedNotification"},
FunctionInfo{91, nullptr, "GetCurrentPerformanceConfiguration"},
FunctionInfo{100, D<&ICommonStateGetter::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"},
FunctionInfo{110, nullptr, "OpenMyGpuErrorHandler"},
FunctionInfo{120, D<&ICommonStateGetter::GetAppletLaunchedHistory>, "GetAppletLaunchedHistory"}, //13.0.0+
FunctionInfo{130, D<&ICommonStateGetter::EnableStartupLogoDisappearedMessage>, "EnableStartupLogoDisappearedMessage"}, //21.0.0+
FunctionInfo{200, D<&ICommonStateGetter::GetOperationModeSystemInfo>, "GetOperationModeSystemInfo"},
FunctionInfo{300, D<&ICommonStateGetter::GetSettingsPlatformRegion>, "GetSettingsPlatformRegion"},
FunctionInfo{400, nullptr, "ActivateMigrationService"},
FunctionInfo{401, nullptr, "DeactivateMigrationService"},
FunctionInfo{500, nullptr, "DisableSleepTillShutdown"},
FunctionInfo{501, nullptr, "SuppressDisablingSleepTemporarily"},
FunctionInfo{502, nullptr, "IsSleepEnabled"},
FunctionInfo{503, nullptr, "IsDisablingSleepSuppressed"},
FunctionInfo{600, nullptr, "SetHidInputMagnificationForApplication"}, //20.0.0+
FunctionInfo{610, D<&ICommonStateGetter::Unknown610>, "Unknown610"}, //21.0.0+
FunctionInfo{611, D<&ICommonStateGetter::Unknown611>, "Unknown611"}, //22.0.0+
FunctionInfo{900, D<&ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled>, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, //11.0.0+
FunctionInfo{910, nullptr, "GetLaunchRequiredTick"}, //17.0.0+
FunctionInfo{1000, D<&ICommonStateGetter::BeginVrMode3d>, "BeginVrMode3d"}, //19.0.0+
FunctionInfo{1001, D<&ICommonStateGetter::EndVrMode3d>, "EndVrMode3d"}, //19.0.0+
FunctionInfo{1002, D<&ICommonStateGetter::IsVrModeEnabled3d>, "IsVrModeEnabled3d"}, //19.0.0+
FunctionInfo{1003, D<&ICommonStateGetter::GetVrLaboGoggleViewport>, "GetVrLaboGoggleViewport"}, //21.0.0+
FunctionInfo{1004, D<&ICommonStateGetter::GetPanelPhysicalSizeForSpecificTitle>, "GetPanelPhysicalSizeForSpecificTitle"}, //21.0.0+
FunctionInfo{1005, D<&ICommonStateGetter::GetPanelResolutionForSpecificTitle>, "GetPanelResolutionForSpecificTitle"}, //21.0.0+
);
const std::shared_ptr<Applet> m_applet;
};
@@ -9,19 +9,6 @@ namespace Service::AM {
ICradleFirmwareUpdater::ICradleFirmwareUpdater(Core::System& system_)
: ServiceFramework{system_, "ICradleFirmwareUpdater"},
m_context{system, "ICradleFirmwareUpdater"}, m_cradle_device_info_event{m_context} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ICradleFirmwareUpdater::StartUpdate>, "StartUpdate"},
{1, D<&ICradleFirmwareUpdater::FinishUpdate>, "FinishUpdate"},
{2, D<&ICradleFirmwareUpdater::GetCradleDeviceInfo>, "GetCradleDeviceInfo"},
{3, D<&ICradleFirmwareUpdater::GetCradleDeviceInfoChangeEvent>, "GetCradleDeviceInfoChangeEvent"},
{4, nullptr, "GetUpdateProgressInfo"},
{5, nullptr, "GetLastInternalResult"},
};
// clang-format on
RegisterHandlers(functions);
}
ICradleFirmwareUpdater::~ICradleFirmwareUpdater() = default;
@@ -30,6 +30,17 @@ private:
Result GetCradleDeviceInfoChangeEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ICradleFirmwareUpdater::StartUpdate>, "StartUpdate"},
FunctionInfo{1, D<&ICradleFirmwareUpdater::FinishUpdate>, "FinishUpdate"},
FunctionInfo{2, D<&ICradleFirmwareUpdater::GetCradleDeviceInfo>, "GetCradleDeviceInfo"},
FunctionInfo{3, D<&ICradleFirmwareUpdater::GetCradleDeviceInfoChangeEvent>, "GetCradleDeviceInfoChangeEvent"},
FunctionInfo{4, nullptr, "GetUpdateProgressInfo"},
FunctionInfo{5, nullptr, "GetLastInternalResult"}
);
KernelHelpers::ServiceContext m_context;
Event m_cradle_device_info_event;
};
@@ -7,35 +7,6 @@ namespace Service::AM {
IDebugFunctions::IDebugFunctions(Core::System& system_)
: ServiceFramework{system_, "IDebugFunctions"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "NotifyMessageToHomeMenuForDebug"},
{1, nullptr, "OpenMainApplication"},
{10, nullptr, "PerformSystemButtonPressing"},
{20, nullptr, "InvalidateTransitionLayer"},
{30, nullptr, "RequestLaunchApplicationWithUserAndArgumentForDebug"},
{31, nullptr, "RequestLaunchApplicationByApplicationLaunchInfoForDebug"},
{40, nullptr, "GetAppletResourceUsageInfo"},
{50, nullptr, "AddSystemProgramIdAndAppletIdForDebug"},
{51, nullptr, "AddOperationConfirmedLibraryAppletIdForDebug"},
{100, nullptr, "SetCpuBoostModeForApplet"},
{101, nullptr, "CancelCpuBoostModeForApplet"},
{110, nullptr, "PushToAppletBoundChannelForDebug"},
{111, nullptr, "TryPopFromAppletBoundChannelForDebug"},
{120, nullptr, "AlarmSettingNotificationEnableAppEventReserve"},
{121, nullptr, "AlarmSettingNotificationDisableAppEventReserve"},
{122, nullptr, "AlarmSettingNotificationPushAppEventNotify"},
{130, nullptr, "FriendInvitationSetApplicationParameter"},
{131, nullptr, "FriendInvitationClearApplicationParameter"},
{132, nullptr, "FriendInvitationPushApplicationParameter"},
{140, nullptr, "RestrictPowerOperationForSecureLaunchModeForDebug"},
{200, nullptr, "CreateFloatingLibraryAppletAccepterForDebug"},
{300, nullptr, "TerminateAllRunningApplicationsForDebug"},
{900, nullptr, "GetGrcProcessLaunchedSystemEvent"},
};
// clang-format on
RegisterHandlers(functions);
}
IDebugFunctions::~IDebugFunctions() = default;
@@ -11,6 +11,35 @@ class IDebugFunctions final : public ServiceFramework<IDebugFunctions> {
public:
explicit IDebugFunctions(Core::System& system_);
~IDebugFunctions() override;
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "NotifyMessageToHomeMenuForDebug"},
FunctionInfo{1, nullptr, "OpenMainApplication"},
FunctionInfo{10, nullptr, "PerformSystemButtonPressing"},
FunctionInfo{20, nullptr, "InvalidateTransitionLayer"},
FunctionInfo{30, nullptr, "RequestLaunchApplicationWithUserAndArgumentForDebug"},
FunctionInfo{31, nullptr, "RequestLaunchApplicationByApplicationLaunchInfoForDebug"},
FunctionInfo{40, nullptr, "GetAppletResourceUsageInfo"},
FunctionInfo{50, nullptr, "AddSystemProgramIdAndAppletIdForDebug"},
FunctionInfo{51, nullptr, "AddOperationConfirmedLibraryAppletIdForDebug"},
FunctionInfo{100, nullptr, "SetCpuBoostModeForApplet"},
FunctionInfo{101, nullptr, "CancelCpuBoostModeForApplet"},
FunctionInfo{110, nullptr, "PushToAppletBoundChannelForDebug"},
FunctionInfo{111, nullptr, "TryPopFromAppletBoundChannelForDebug"},
FunctionInfo{120, nullptr, "AlarmSettingNotificationEnableAppEventReserve"},
FunctionInfo{121, nullptr, "AlarmSettingNotificationDisableAppEventReserve"},
FunctionInfo{122, nullptr, "AlarmSettingNotificationPushAppEventNotify"},
FunctionInfo{130, nullptr, "FriendInvitationSetApplicationParameter"},
FunctionInfo{131, nullptr, "FriendInvitationClearApplicationParameter"},
FunctionInfo{132, nullptr, "FriendInvitationPushApplicationParameter"},
FunctionInfo{140, nullptr, "RestrictPowerOperationForSecureLaunchModeForDebug"},
FunctionInfo{200, nullptr, "CreateFloatingLibraryAppletAccepterForDebug"},
FunctionInfo{300, nullptr, "TerminateAllRunningApplicationsForDebug"},
FunctionInfo{900, nullptr, "GetGrcProcessLaunchedSystemEvent"}
);
};
} // namespace Service::AM
@@ -14,40 +14,6 @@ namespace Service::AM {
IDisplayController::IDisplayController(Core::System& system_, std::shared_ptr<Applet> applet_)
: ServiceFramework{system_, "IDisplayController"}, applet(std::move(applet_)) {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "GetLastForegroundCaptureImage"},
{1, nullptr, "UpdateLastForegroundCaptureImage"},
{2, nullptr, "GetLastApplicationCaptureImage"},
{3, nullptr, "GetCallerAppletCaptureImage"},
{4, nullptr, "UpdateCallerAppletCaptureImage"},
{5, D<&IDisplayController::GetLastForegroundCaptureImageEx>, "GetLastForegroundCaptureImageEx"},
{6, nullptr, "GetLastApplicationCaptureImageEx"},
{7, D<&IDisplayController::GetCallerAppletCaptureImageEx>, "GetCallerAppletCaptureImageEx"},
{8, D<&IDisplayController::TakeScreenShotOfOwnLayer>, "TakeScreenShotOfOwnLayer"},
{9, nullptr, "CopyBetweenCaptureBuffers"},
{10, nullptr, "AcquireLastApplicationCaptureBuffer"},
{11, nullptr, "ReleaseLastApplicationCaptureBuffer"},
{12, nullptr, "AcquireLastForegroundCaptureBuffer"},
{13, nullptr, "ReleaseLastForegroundCaptureBuffer"},
{14, nullptr, "AcquireCallerAppletCaptureBuffer"},
{15, nullptr, "ReleaseCallerAppletCaptureBuffer"},
{16, nullptr, "AcquireLastApplicationCaptureBufferEx"},
{17, nullptr, "AcquireLastForegroundCaptureBufferEx"},
{18, nullptr, "AcquireCallerAppletCaptureBufferEx"},
{20, D<&IDisplayController::ClearCaptureBuffer>, "ClearCaptureBuffer"},
{21, nullptr, "ClearAppletTransitionBuffer"},
{22, D<&IDisplayController::AcquireLastApplicationCaptureSharedBuffer>, "AcquireLastApplicationCaptureSharedBuffer"},
{23, D<&IDisplayController::ReleaseLastApplicationCaptureSharedBuffer>, "ReleaseLastApplicationCaptureSharedBuffer"},
{24, D<&IDisplayController::AcquireLastForegroundCaptureSharedBuffer>, "AcquireLastForegroundCaptureSharedBuffer"},
{25, D<&IDisplayController::ReleaseLastForegroundCaptureSharedBuffer>, "ReleaseLastForegroundCaptureSharedBuffer"},
{26, D<&IDisplayController::AcquireCallerAppletCaptureSharedBuffer>, "AcquireCallerAppletCaptureSharedBuffer"},
{27, D<&IDisplayController::ReleaseCallerAppletCaptureSharedBuffer>, "ReleaseCallerAppletCaptureSharedBuffer"},
{28, nullptr, "TakeScreenShotOfOwnLayerEx"},
};
// clang-format on
RegisterHandlers(functions);
}
IDisplayController::~IDisplayController() = default;
@@ -35,6 +35,39 @@ private:
Out<s32> out_fbshare_layer_index);
Result ReleaseLastApplicationCaptureSharedBuffer();
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "GetLastForegroundCaptureImage"},
FunctionInfo{1, nullptr, "UpdateLastForegroundCaptureImage"},
FunctionInfo{2, nullptr, "GetLastApplicationCaptureImage"},
FunctionInfo{3, nullptr, "GetCallerAppletCaptureImage"},
FunctionInfo{4, nullptr, "UpdateCallerAppletCaptureImage"},
FunctionInfo{5, D<&IDisplayController::GetLastForegroundCaptureImageEx>, "GetLastForegroundCaptureImageEx"},
FunctionInfo{6, nullptr, "GetLastApplicationCaptureImageEx"},
FunctionInfo{7, D<&IDisplayController::GetCallerAppletCaptureImageEx>, "GetCallerAppletCaptureImageEx"},
FunctionInfo{8, D<&IDisplayController::TakeScreenShotOfOwnLayer>, "TakeScreenShotOfOwnLayer"},
FunctionInfo{9, nullptr, "CopyBetweenCaptureBuffers"},
FunctionInfo{10, nullptr, "AcquireLastApplicationCaptureBuffer"},
FunctionInfo{11, nullptr, "ReleaseLastApplicationCaptureBuffer"},
FunctionInfo{12, nullptr, "AcquireLastForegroundCaptureBuffer"},
FunctionInfo{13, nullptr, "ReleaseLastForegroundCaptureBuffer"},
FunctionInfo{14, nullptr, "AcquireCallerAppletCaptureBuffer"},
FunctionInfo{15, nullptr, "ReleaseCallerAppletCaptureBuffer"},
FunctionInfo{16, nullptr, "AcquireLastApplicationCaptureBufferEx"},
FunctionInfo{17, nullptr, "AcquireLastForegroundCaptureBufferEx"},
FunctionInfo{18, nullptr, "AcquireCallerAppletCaptureBufferEx"},
FunctionInfo{20, D<&IDisplayController::ClearCaptureBuffer>, "ClearCaptureBuffer"},
FunctionInfo{21, nullptr, "ClearAppletTransitionBuffer"},
FunctionInfo{22, D<&IDisplayController::AcquireLastApplicationCaptureSharedBuffer>, "AcquireLastApplicationCaptureSharedBuffer"},
FunctionInfo{23, D<&IDisplayController::ReleaseLastApplicationCaptureSharedBuffer>, "ReleaseLastApplicationCaptureSharedBuffer"},
FunctionInfo{24, D<&IDisplayController::AcquireLastForegroundCaptureSharedBuffer>, "AcquireLastForegroundCaptureSharedBuffer"},
FunctionInfo{25, D<&IDisplayController::ReleaseLastForegroundCaptureSharedBuffer>, "ReleaseLastForegroundCaptureSharedBuffer"},
FunctionInfo{26, D<&IDisplayController::AcquireCallerAppletCaptureSharedBuffer>, "AcquireCallerAppletCaptureSharedBuffer"},
FunctionInfo{27, D<&IDisplayController::ReleaseCallerAppletCaptureSharedBuffer>, "ReleaseCallerAppletCaptureSharedBuffer"},
FunctionInfo{28, nullptr, "TakeScreenShotOfOwnLayerEx"}
);
const std::shared_ptr<Applet> applet;
};
@@ -10,25 +10,6 @@ namespace Service::AM {
IGlobalStateController::IGlobalStateController(Core::System& system_)
: ServiceFramework{system_, "IGlobalStateController"},
m_context{system_, "IGlobalStateController"}, m_hdcp_authentication_failed_event{m_context} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "RequestToEnterSleep"},
{1, nullptr, "EnterSleep"},
{2, nullptr, "StartSleepSequence"},
{3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"},
{4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"},
{9, nullptr, "IsAutoPowerDownRequested"},
{10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"},
{11, nullptr, "NotifyCecSettingsChanged"},
{12, nullptr, "SetDefaultHomeButtonLongPressTime"},
{13, nullptr, "UpdateDefaultDisplayResolution"},
{14, D<&IGlobalStateController::ShouldSleepOnBoot>, "ShouldSleepOnBoot"},
{15, D<&IGlobalStateController::GetHdcpAuthenticationFailedEvent>, "GetHdcpAuthenticationFailedEvent"},
{30, D<&IGlobalStateController::OpenCradleFirmwareUpdater>, "OpenCradleFirmwareUpdater"},
};
// clang-format on
RegisterHandlers(functions);
}
Result IGlobalStateController::StartShutdownSequence() {
@@ -23,9 +23,26 @@ private:
Result LoadAndApplyIdlePolicySettings();
Result ShouldSleepOnBoot(Out<bool> out_should_sleep_on_boot);
Result GetHdcpAuthenticationFailedEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result OpenCradleFirmwareUpdater(
Out<SharedPointer<ICradleFirmwareUpdater>> out_cradle_firmware_updater);
Result OpenCradleFirmwareUpdater(Out<SharedPointer<ICradleFirmwareUpdater>> out_cradle_firmware_updater);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "RequestToEnterSleep"},
FunctionInfo{1, nullptr, "EnterSleep"},
FunctionInfo{2, nullptr, "StartSleepSequence"},
FunctionInfo{3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"},
FunctionInfo{4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"},
FunctionInfo{9, nullptr, "IsAutoPowerDownRequested"},
FunctionInfo{10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"},
FunctionInfo{11, nullptr, "NotifyCecSettingsChanged"},
FunctionInfo{12, nullptr, "SetDefaultHomeButtonLongPressTime"},
FunctionInfo{13, nullptr, "UpdateDefaultDisplayResolution"},
FunctionInfo{14, D<&IGlobalStateController::ShouldSleepOnBoot>, "ShouldSleepOnBoot"},
FunctionInfo{15, D<&IGlobalStateController::GetHdcpAuthenticationFailedEvent>, "GetHdcpAuthenticationFailedEvent"},
FunctionInfo{30, D<&IGlobalStateController::OpenCradleFirmwareUpdater>, "OpenCradleFirmwareUpdater"}
);
KernelHelpers::ServiceContext m_context;
Event m_hdcp_authentication_failed_event;
};
@@ -18,27 +18,6 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_, std::shared_ptr<Ap
WindowSystem& window_system)
: ServiceFramework{system_, "IHomeMenuFunctions"}, m_window_system{window_system},
m_applet{std::move(applet)}, m_context{system, "IHomeMenuFunctions"} {
// clang-format off
static const FunctionInfo functions[] = {
{10, D<&IHomeMenuFunctions::RequestToGetForeground>, "RequestToGetForeground"},
{11, D<&IHomeMenuFunctions::LockForeground>, "LockForeground"},
{12, D<&IHomeMenuFunctions::UnlockForeground>, "UnlockForeground"},
{20, D<&IHomeMenuFunctions::PopFromGeneralChannel>, "PopFromGeneralChannel"},
{21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"},
{30, nullptr, "GetHomeButtonWriterLockAccessor"},
{31, nullptr, "GetWriterLockAccessorEx"},
{40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"},
{41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"},
{50, nullptr, "LaunchSystemApplet"},
{51, nullptr, "LaunchStarter"},
{100, nullptr, "PopRequestLaunchApplicationForDebug"},
{110, D<&IHomeMenuFunctions::IsForceTerminateApplicationDisabledForDebug>, "IsForceTerminateApplicationDisabledForDebug"},
{200, nullptr, "LaunchDevMenu"},
{1000, nullptr, "SetLastApplicationExitReason"},
};
// clang-format on
RegisterHandlers(functions);
}
IHomeMenuFunctions::~IHomeMenuFunctions() = default;
@@ -34,6 +34,26 @@ private:
Result IsForceTerminateApplicationDisabledForDebug(
Out<bool> out_is_force_terminate_application_disabled_for_debug);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{10, D<&IHomeMenuFunctions::RequestToGetForeground>, "RequestToGetForeground"},
FunctionInfo{11, D<&IHomeMenuFunctions::LockForeground>, "LockForeground"},
FunctionInfo{12, D<&IHomeMenuFunctions::UnlockForeground>, "UnlockForeground"},
FunctionInfo{20, D<&IHomeMenuFunctions::PopFromGeneralChannel>, "PopFromGeneralChannel"},
FunctionInfo{21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"},
FunctionInfo{30, nullptr, "GetHomeButtonWriterLockAccessor"},
FunctionInfo{31, nullptr, "GetWriterLockAccessorEx"},
FunctionInfo{40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"},
FunctionInfo{41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"},
FunctionInfo{50, nullptr, "LaunchSystemApplet"},
FunctionInfo{51, nullptr, "LaunchStarter"},
FunctionInfo{100, nullptr, "PopRequestLaunchApplicationForDebug"},
FunctionInfo{110, D<&IHomeMenuFunctions::IsForceTerminateApplicationDisabledForDebug>, "IsForceTerminateApplicationDisabledForDebug"},
FunctionInfo{200, nullptr, "LaunchDevMenu"},
FunctionInfo{1000, nullptr, "SetLastApplicationExitReason"}
);
WindowSystem& m_window_system;
const std::shared_ptr<Applet> m_applet;
KernelHelpers::ServiceContext m_context;
@@ -54,35 +54,6 @@ ILibraryAppletAccessor::ILibraryAppletAccessor(Core::System& system_,
std::shared_ptr<Applet> applet)
: ServiceFramework{system_, "ILibraryAppletAccessor"}, m_broker{std::move(broker)},
m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ILibraryAppletAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"},
{1, D<&ILibraryAppletAccessor::IsCompleted>, "IsCompleted"},
{10, D<&ILibraryAppletAccessor::Start>, "Start"},
{20, D<&ILibraryAppletAccessor::RequestExit>, "RequestExit"},
{25, D<&ILibraryAppletAccessor::Terminate>, "Terminate"},
{30, D<&ILibraryAppletAccessor::GetResult>, "GetResult"},
{50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"},
{60, D<&ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero>, "PresetLibraryAppletGpuTimeSliceZero"}, //10.0.0+
{80, nullptr, "RequestForLibraryAppletToGetForeground"}, //19.0.0+
{81, nullptr, "GetCurrentChildLibraryApplet"}, //19.0.0+
{90, D<&ILibraryAppletAccessor::Unknown90>, "Unknown90"}, //20.0.0+
{100, D<&ILibraryAppletAccessor::PushInData>, "PushInData"},
{101, D<&ILibraryAppletAccessor::PopOutData>, "PopOutData"},
{102, nullptr, "PushExtraStorage"},
{103, D<&ILibraryAppletAccessor::PushInteractiveInData>, "PushInteractiveInData"},
{104, D<&ILibraryAppletAccessor::PopInteractiveOutData>, "PopInteractiveOutData"},
{105, D<&ILibraryAppletAccessor::GetPopOutDataEvent>, "GetPopOutDataEvent"},
{106, D<&ILibraryAppletAccessor::GetPopInteractiveOutDataEvent>, "GetPopInteractiveOutDataEvent"},
{110, nullptr, "NeedsToExitProcess"},
{120, D<&ILibraryAppletAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"},
{150, nullptr, "RequestForAppletToGetForeground"},
{160, D<&ILibraryAppletAccessor::GetIndirectLayerConsumerHandle>, "GetIndirectLayerConsumerHandle"}, //2.0.0+
{170, D<&ILibraryAppletAccessor::Unknown170>, "Unknown170"}, //22.0.0+
};
// clang-format on
RegisterHandlers(functions);
}
ILibraryAppletAccessor::~ILibraryAppletAccessor() = default;
@@ -49,6 +49,34 @@ private:
void FrontendExecuteInteractive();
void FrontendRequestExit();
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ILibraryAppletAccessor::GetAppletStateChangedEvent>, "GetAppletStateChangedEvent"},
FunctionInfo{1, D<&ILibraryAppletAccessor::IsCompleted>, "IsCompleted"},
FunctionInfo{10, D<&ILibraryAppletAccessor::Start>, "Start"},
FunctionInfo{20, D<&ILibraryAppletAccessor::RequestExit>, "RequestExit"},
FunctionInfo{25, D<&ILibraryAppletAccessor::Terminate>, "Terminate"},
FunctionInfo{30, D<&ILibraryAppletAccessor::GetResult>, "GetResult"},
FunctionInfo{50, nullptr, "SetOutOfFocusApplicationSuspendingEnabled"},
FunctionInfo{60, D<&ILibraryAppletAccessor::PresetLibraryAppletGpuTimeSliceZero>, "PresetLibraryAppletGpuTimeSliceZero"}, //10.0.0+
FunctionInfo{80, nullptr, "RequestForLibraryAppletToGetForeground"}, //19.0.0+
FunctionInfo{81, nullptr, "GetCurrentChildLibraryApplet"}, //19.0.0+
FunctionInfo{90, D<&ILibraryAppletAccessor::Unknown90>, "Unknown90"}, //20.0.0+
FunctionInfo{100, D<&ILibraryAppletAccessor::PushInData>, "PushInData"},
FunctionInfo{101, D<&ILibraryAppletAccessor::PopOutData>, "PopOutData"},
FunctionInfo{102, nullptr, "PushExtraStorage"},
FunctionInfo{103, D<&ILibraryAppletAccessor::PushInteractiveInData>, "PushInteractiveInData"},
FunctionInfo{104, D<&ILibraryAppletAccessor::PopInteractiveOutData>, "PopInteractiveOutData"},
FunctionInfo{105, D<&ILibraryAppletAccessor::GetPopOutDataEvent>, "GetPopOutDataEvent"},
FunctionInfo{106, D<&ILibraryAppletAccessor::GetPopInteractiveOutDataEvent>, "GetPopInteractiveOutDataEvent"},
FunctionInfo{110, nullptr, "NeedsToExitProcess"},
FunctionInfo{120, D<&ILibraryAppletAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"},
FunctionInfo{150, nullptr, "RequestForAppletToGetForeground"},
FunctionInfo{160, D<&ILibraryAppletAccessor::GetIndirectLayerConsumerHandle>, "GetIndirectLayerConsumerHandle"}, //2.0.0+
FunctionInfo{170, D<&ILibraryAppletAccessor::Unknown170>, "Unknown170"}, //22.0.0+
);
const std::shared_ptr<AppletDataBroker> m_broker;
const std::shared_ptr<Applet> m_applet;
};
@@ -41,13 +41,13 @@ private:
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"},
{1, nullptr, "TerminateAllLibraryApplets"},
{2, nullptr, "AreAnyLibraryAppletsLeft"},
{3, D<&ILibraryAppletCreator::CreateLibraryAppletEx>, "CreateLibraryAppletEx"},
{10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"},
{11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"},
{12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"}
FunctionInfo{0, D<&ILibraryAppletCreator::CreateLibraryApplet>, "CreateLibraryApplet"},
FunctionInfo{1, nullptr, "TerminateAllLibraryApplets"},
FunctionInfo{2, nullptr, "AreAnyLibraryAppletsLeft"},
FunctionInfo{3, D<&ILibraryAppletCreator::CreateLibraryAppletEx>, "CreateLibraryAppletEx"},
FunctionInfo{10, D<&ILibraryAppletCreator::CreateStorage>, "CreateStorage"},
FunctionInfo{11, D<&ILibraryAppletCreator::CreateTransferMemoryStorage>, "CreateTransferMemoryStorage"},
FunctionInfo{12, D<&ILibraryAppletCreator::CreateHandleStorage>, "CreateHandleStorage"}
);
WindowSystem& m_window_system;
const std::shared_ptr<Applet> m_applet;
@@ -22,24 +22,6 @@ ILibraryAppletProxy::ILibraryAppletProxy(Core::System& system_, std::shared_ptr<
Kernel::KProcess* process, WindowSystem& window_system)
: ServiceFramework{system_, "ILibraryAppletProxy"},
m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ILibraryAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
{1, D<&ILibraryAppletProxy::GetSelfController>, "GetSelfController"},
{2, D<&ILibraryAppletProxy::GetWindowController>, "GetWindowController"},
{3, D<&ILibraryAppletProxy::GetAudioController>, "GetAudioController"},
{4, D<&ILibraryAppletProxy::GetDisplayController>, "GetDisplayController"},
{10, D<&ILibraryAppletProxy::GetProcessWindingController>, "GetProcessWindingController"},
{11, D<&ILibraryAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
{20, D<&ILibraryAppletProxy::OpenLibraryAppletSelfAccessor>, "OpenLibraryAppletSelfAccessor"},
{21, D<&ILibraryAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"},
{22, D<&ILibraryAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"},
{23, D<&ILibraryAppletProxy::GetGlobalStateController>, "GetGlobalStateController"},
{1000, D<&ILibraryAppletProxy::GetDebugFunctions>, "GetDebugFunctions"},
};
// clang-format on
RegisterHandlers(functions);
}
ILibraryAppletProxy::~ILibraryAppletProxy() = default;
@@ -48,6 +48,23 @@ private:
Result GetGlobalStateController(
Out<SharedPointer<IGlobalStateController>> out_global_state_controller);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ILibraryAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
FunctionInfo{1, D<&ILibraryAppletProxy::GetSelfController>, "GetSelfController"},
FunctionInfo{2, D<&ILibraryAppletProxy::GetWindowController>, "GetWindowController"},
FunctionInfo{3, D<&ILibraryAppletProxy::GetAudioController>, "GetAudioController"},
FunctionInfo{4, D<&ILibraryAppletProxy::GetDisplayController>, "GetDisplayController"},
FunctionInfo{10, D<&ILibraryAppletProxy::GetProcessWindingController>, "GetProcessWindingController"},
FunctionInfo{11, D<&ILibraryAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
FunctionInfo{20, D<&ILibraryAppletProxy::OpenLibraryAppletSelfAccessor>, "OpenLibraryAppletSelfAccessor"},
FunctionInfo{21, D<&ILibraryAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"},
FunctionInfo{22, D<&ILibraryAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"},
FunctionInfo{23, D<&ILibraryAppletProxy::GetGlobalStateController>, "GetGlobalStateController"},
FunctionInfo{1000, D<&ILibraryAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}
);
WindowSystem& m_window_system;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
@@ -46,47 +46,6 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_,
std::shared_ptr<Applet> applet)
: ServiceFramework{system_, "ILibraryAppletSelfAccessor"}, m_applet{std::move(applet)},
m_broker{m_applet->caller_applet_broker} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ILibraryAppletSelfAccessor::PopInData>, "PopInData"},
{1, D<&ILibraryAppletSelfAccessor::PushOutData>, "PushOutData"},
{2, D<&ILibraryAppletSelfAccessor::PopInteractiveInData>, "PopInteractiveInData"},
{3, D<&ILibraryAppletSelfAccessor::PushInteractiveOutData>, "PushInteractiveOutData"},
{5, D<&ILibraryAppletSelfAccessor::GetPopInDataEvent>, "GetPopInDataEvent"},
{6, D<&ILibraryAppletSelfAccessor::GetPopInteractiveInDataEvent>, "GetPopInteractiveInDataEvent"},
{10, D<&ILibraryAppletSelfAccessor::ExitProcessAndReturn>, "ExitProcessAndReturn"},
{11, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"},
{12, D<&ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo>, "GetMainAppletIdentityInfo"},
{13, D<&ILibraryAppletSelfAccessor::CanUseApplicationCore>, "CanUseApplicationCore"},
{14, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo>, "GetCallerAppletIdentityInfo"},
{15, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationControlProperty>, "GetMainAppletApplicationControlProperty"},
{16, D<&ILibraryAppletSelfAccessor::GetMainAppletStorageId>, "GetMainAppletStorageId"},
{17, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfoStack>, "GetCallerAppletIdentityInfoStack"},
{18, nullptr, "GetNextReturnDestinationAppletIdentityInfo"},
{19, D<&ILibraryAppletSelfAccessor::GetDesirableKeyboardLayout>, "GetDesirableKeyboardLayout"},
{20, nullptr, "PopExtraStorage"},
{25, nullptr, "GetPopExtraStorageEvent"},
{30, D<&ILibraryAppletSelfAccessor::UnpopInData>, "UnpopInData"},
{31, nullptr, "UnpopExtraStorage"},
{40, nullptr, "GetIndirectLayerProducerHandle"},
{50, D<&ILibraryAppletSelfAccessor::ReportVisibleError>, "ReportVisibleError"},
{51, D<&ILibraryAppletSelfAccessor::ReportVisibleErrorWithErrorContext>, "ReportVisibleErrorWithErrorContext"},
{60, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationDesiredLanguage>, "GetMainAppletApplicationDesiredLanguage"},
{70, D<&ILibraryAppletSelfAccessor::GetCurrentApplicationId>, "GetCurrentApplicationId"},
{80, nullptr, "RequestExitToSelf"},
{90, nullptr, "CreateApplicationAndPushAndRequestToLaunch"},
{100, nullptr, "CreateGameMovieTrimmer"},
{101, nullptr, "ReserveResourceForMovieOperation"},
{102, nullptr, "UnreserveResourceForMovieOperation"},
{110, D<&ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers>, "GetMainAppletAvailableUsers"},
{120, nullptr, "GetLaunchStorageInfoForDebug"},
{130, nullptr, "GetGpuErrorDetectedSystemEvent"},
{140, nullptr, "SetApplicationMemoryReservation"},
{150, D<&ILibraryAppletSelfAccessor::ShouldSetGpuTimeSliceManually>, "ShouldSetGpuTimeSliceManually"},
{160, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfoEx>, "GetLibraryAppletInfoEx"},
};
// clang-format on
RegisterHandlers(functions);
}
ILibraryAppletSelfAccessor::~ILibraryAppletSelfAccessor() = default;
@@ -80,6 +80,47 @@ private:
Result ShouldSetGpuTimeSliceManually(Out<bool> out_should_set_gpu_time_slice_manually);
Result GetLibraryAppletInfoEx(Out<LibraryAppletInfo> out_library_applet_info);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ILibraryAppletSelfAccessor::PopInData>, "PopInData"},
FunctionInfo{1, D<&ILibraryAppletSelfAccessor::PushOutData>, "PushOutData"},
FunctionInfo{2, D<&ILibraryAppletSelfAccessor::PopInteractiveInData>, "PopInteractiveInData"},
FunctionInfo{3, D<&ILibraryAppletSelfAccessor::PushInteractiveOutData>, "PushInteractiveOutData"},
FunctionInfo{5, D<&ILibraryAppletSelfAccessor::GetPopInDataEvent>, "GetPopInDataEvent"},
FunctionInfo{6, D<&ILibraryAppletSelfAccessor::GetPopInteractiveInDataEvent>, "GetPopInteractiveInDataEvent"},
FunctionInfo{10, D<&ILibraryAppletSelfAccessor::ExitProcessAndReturn>, "ExitProcessAndReturn"},
FunctionInfo{11, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfo>, "GetLibraryAppletInfo"},
FunctionInfo{12, D<&ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo>, "GetMainAppletIdentityInfo"},
FunctionInfo{13, D<&ILibraryAppletSelfAccessor::CanUseApplicationCore>, "CanUseApplicationCore"},
FunctionInfo{14, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo>, "GetCallerAppletIdentityInfo"},
FunctionInfo{15, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationControlProperty>, "GetMainAppletApplicationControlProperty"},
FunctionInfo{16, D<&ILibraryAppletSelfAccessor::GetMainAppletStorageId>, "GetMainAppletStorageId"},
FunctionInfo{17, D<&ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfoStack>, "GetCallerAppletIdentityInfoStack"},
FunctionInfo{18, nullptr, "GetNextReturnDestinationAppletIdentityInfo"},
FunctionInfo{19, D<&ILibraryAppletSelfAccessor::GetDesirableKeyboardLayout>, "GetDesirableKeyboardLayout"},
FunctionInfo{20, nullptr, "PopExtraStorage"},
FunctionInfo{25, nullptr, "GetPopExtraStorageEvent"},
FunctionInfo{30, D<&ILibraryAppletSelfAccessor::UnpopInData>, "UnpopInData"},
FunctionInfo{31, nullptr, "UnpopExtraStorage"},
FunctionInfo{40, nullptr, "GetIndirectLayerProducerHandle"},
FunctionInfo{50, D<&ILibraryAppletSelfAccessor::ReportVisibleError>, "ReportVisibleError"},
FunctionInfo{51, D<&ILibraryAppletSelfAccessor::ReportVisibleErrorWithErrorContext>, "ReportVisibleErrorWithErrorContext"},
FunctionInfo{60, D<&ILibraryAppletSelfAccessor::GetMainAppletApplicationDesiredLanguage>, "GetMainAppletApplicationDesiredLanguage"},
FunctionInfo{70, D<&ILibraryAppletSelfAccessor::GetCurrentApplicationId>, "GetCurrentApplicationId"},
FunctionInfo{80, nullptr, "RequestExitToSelf"},
FunctionInfo{90, nullptr, "CreateApplicationAndPushAndRequestToLaunch"},
FunctionInfo{100, nullptr, "CreateGameMovieTrimmer"},
FunctionInfo{101, nullptr, "ReserveResourceForMovieOperation"},
FunctionInfo{102, nullptr, "UnreserveResourceForMovieOperation"},
FunctionInfo{110, D<&ILibraryAppletSelfAccessor::GetMainAppletAvailableUsers>, "GetMainAppletAvailableUsers"},
FunctionInfo{120, nullptr, "GetLaunchStorageInfoForDebug"},
FunctionInfo{130, nullptr, "GetGpuErrorDetectedSystemEvent"},
FunctionInfo{140, nullptr, "SetApplicationMemoryReservation"},
FunctionInfo{150, D<&ILibraryAppletSelfAccessor::ShouldSetGpuTimeSliceManually>, "ShouldSetGpuTimeSliceManually"},
FunctionInfo{160, D<&ILibraryAppletSelfAccessor::GetLibraryAppletInfoEx>, "GetLibraryAppletInfoEx"}
);
const std::shared_ptr<Applet> m_applet;
const std::shared_ptr<AppletDataBroker> m_broker;
};
@@ -12,17 +12,6 @@ namespace Service::AM {
ILockAccessor::ILockAccessor(Core::System& system_)
: ServiceFramework{system_, "ILockAccessor"}, m_context{system_, "ILockAccessor"},
m_event{m_context} {
// clang-format off
static const FunctionInfo functions[] = {
{1, D<&ILockAccessor::TryLock>, "TryLock"},
{2, D<&ILockAccessor::Unlock>, "Unlock"},
{3, D<&ILockAccessor::GetEvent>, "GetEvent"},
{4, D<&ILockAccessor::IsLocked>, "IsLocked"},
};
// clang-format on
RegisterHandlers(functions);
m_event.Signal(system.Kernel());
}
@@ -23,6 +23,15 @@ private:
Result IsLocked(Out<bool> out_is_locked);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{1, D<&ILockAccessor::TryLock>, "TryLock"},
FunctionInfo{2, D<&ILockAccessor::Unlock>, "Unlock"},
FunctionInfo{3, D<&ILockAccessor::GetEvent>, "GetEvent"},
FunctionInfo{4, D<&ILockAccessor::IsLocked>, "IsLocked"}
);
KernelHelpers::ServiceContext m_context;
Event m_event;
std::mutex m_mutex{};
@@ -19,23 +19,6 @@ namespace Service::AM {
Kernel::KProcess *process, WindowSystem &window_system)
: ServiceFramework{system_, "IOverlayAppletProxy"},
m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IOverlayAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
{1, D<&IOverlayAppletProxy::GetSelfController>, "GetSelfController"},
{2, D<&IOverlayAppletProxy::GetWindowController>, "GetWindowController"},
{3, D<&IOverlayAppletProxy::GetAudioController>, "GetAudioController"},
{4, D<&IOverlayAppletProxy::GetDisplayController>, "GetDisplayController"},
{10, D<&IOverlayAppletProxy::GetProcessWindingController>, "GetProcessWindingController"},
{11, D<&IOverlayAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
{20, D<&IOverlayAppletProxy::GetOverlayFunctions>, "GetOverlayFunctions"},
{21, D<&IOverlayAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"},
{23, D<&IOverlayAppletProxy::GetGlobalStateController>, "GetGlobalStateController"},
{1000, D<&IOverlayAppletProxy::GetDebugFunctions>, "GetDebugFunctions"},
};
// clang-format on
RegisterHandlers(functions);
}
IOverlayAppletProxy::~IOverlayAppletProxy() = default;
@@ -47,6 +47,22 @@ private:
Out<SharedPointer<IGlobalStateController>> out_global_state_controller);
Result GetDebugFunctions(Out<SharedPointer<IDebugFunctions>> out_debug_functions);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IOverlayAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
FunctionInfo{1, D<&IOverlayAppletProxy::GetSelfController>, "GetSelfController"},
FunctionInfo{2, D<&IOverlayAppletProxy::GetWindowController>, "GetWindowController"},
FunctionInfo{3, D<&IOverlayAppletProxy::GetAudioController>, "GetAudioController"},
FunctionInfo{4, D<&IOverlayAppletProxy::GetDisplayController>, "GetDisplayController"},
FunctionInfo{10, D<&IOverlayAppletProxy::GetProcessWindingController>, "GetProcessWindingController"},
FunctionInfo{11, D<&IOverlayAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
FunctionInfo{20, D<&IOverlayAppletProxy::GetOverlayFunctions>, "GetOverlayFunctions"},
FunctionInfo{21, D<&IOverlayAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"},
FunctionInfo{23, D<&IOverlayAppletProxy::GetGlobalStateController>, "GetGlobalStateController"},
FunctionInfo{1000, D<&IOverlayAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}
);
WindowSystem& m_window_system;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
@@ -10,32 +10,6 @@
namespace Service::AM {
IOverlayFunctions::IOverlayFunctions(Core::System &system_, std::shared_ptr<Applet> applet)
: ServiceFramework{system_, "IOverlayFunctions"}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IOverlayFunctions::BeginToWatchShortHomeButtonMessage>, "BeginToWatchShortHomeButtonMessage"},
{1, D<&IOverlayFunctions::EndToWatchShortHomeButtonMessage>, "EndToWatchShortHomeButtonMessage"},
{2, D<&IOverlayFunctions::GetApplicationIdForLogo>, "GetApplicationIdForLogo"},
{3, nullptr, "SetGpuTimeSliceBoost"},
{4, D<&IOverlayFunctions::SetAutoSleepTimeAndDimmingTimeEnabled>, "SetAutoSleepTimeAndDimmingTimeEnabled"},
{5, nullptr, "TerminateApplicationAndSetReason"},
{6, nullptr, "SetScreenShotPermissionGlobally"},
{10, nullptr, "StartShutdownSequenceForOverlay"},
{11, nullptr, "StartRebootSequenceForOverlay"},
{20, D<&IOverlayFunctions::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"},
{21, D<&IOverlayFunctions::SetHandlingTouchScreenInputEnabled>, "SetHandlingTouchScreenInputEnabled"},
{30, nullptr, "SetHealthWarningShowingState"},
{31, D<&IOverlayFunctions::IsHealthWarningRequired>, "IsHealthWarningRequired"},
{40, nullptr, "GetApplicationNintendoLogo"},
{41, nullptr, "GetApplicationStartupMovie"},
{50, nullptr, "SetGpuTimeSliceBoostForApplication"},
{60, nullptr, "Unknown60"},
{70, D<&IOverlayFunctions::Unknown70>, "Unknown70"},
{90, nullptr, "SetRequiresGpuResourceUse"},
{101, nullptr, "BeginToObserveHidInputForDevelop"},
};
// clang-format on
RegisterHandlers(functions);
}
IOverlayFunctions::~IOverlayFunctions() = default;
@@ -6,24 +6,49 @@
#include "core/hle/service/service.h"
namespace Service::AM {
struct Applet;
struct Applet;
class IOverlayFunctions final : public ServiceFramework<IOverlayFunctions> {
public:
explicit IOverlayFunctions(Core::System &system_, std::shared_ptr<Applet> applet);
~IOverlayFunctions() override;
class IOverlayFunctions final : public ServiceFramework<IOverlayFunctions> {
public:
explicit IOverlayFunctions(Core::System &system_, std::shared_ptr<Applet> applet);
~IOverlayFunctions() override;
private:
Result BeginToWatchShortHomeButtonMessage();
Result EndToWatchShortHomeButtonMessage();
Result GetApplicationIdForLogo(Out<u64> out_application_id);
Result SetAutoSleepTimeAndDimmingTimeEnabled(bool enabled);
Result IsHealthWarningRequired(Out<bool> is_required);
Result SetHandlingHomeButtonShortPressedEnabled(bool enabled);
Result SetHandlingTouchScreenInputEnabled(bool enabled);
Result Unknown70();
private:
Result BeginToWatchShortHomeButtonMessage();
Result EndToWatchShortHomeButtonMessage();
Result GetApplicationIdForLogo(Out<u64> out_application_id);
Result SetAutoSleepTimeAndDimmingTimeEnabled(bool enabled);
Result IsHealthWarningRequired(Out<bool> is_required);
Result SetHandlingHomeButtonShortPressedEnabled(bool enabled);
Result SetHandlingTouchScreenInputEnabled(bool enabled);
Result Unknown70();
private:
const std::shared_ptr<Applet> m_applet;
};
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IOverlayFunctions::BeginToWatchShortHomeButtonMessage>, "BeginToWatchShortHomeButtonMessage"},
FunctionInfo{1, D<&IOverlayFunctions::EndToWatchShortHomeButtonMessage>, "EndToWatchShortHomeButtonMessage"},
FunctionInfo{2, D<&IOverlayFunctions::GetApplicationIdForLogo>, "GetApplicationIdForLogo"},
FunctionInfo{3, nullptr, "SetGpuTimeSliceBoost"},
FunctionInfo{4, D<&IOverlayFunctions::SetAutoSleepTimeAndDimmingTimeEnabled>, "SetAutoSleepTimeAndDimmingTimeEnabled"},
FunctionInfo{5, nullptr, "TerminateApplicationAndSetReason"},
FunctionInfo{6, nullptr, "SetScreenShotPermissionGlobally"},
FunctionInfo{10, nullptr, "StartShutdownSequenceForOverlay"},
FunctionInfo{11, nullptr, "StartRebootSequenceForOverlay"},
FunctionInfo{20, D<&IOverlayFunctions::SetHandlingHomeButtonShortPressedEnabled>, "SetHandlingHomeButtonShortPressedEnabled"},
FunctionInfo{21, D<&IOverlayFunctions::SetHandlingTouchScreenInputEnabled>, "SetHandlingTouchScreenInputEnabled"},
FunctionInfo{30, nullptr, "SetHealthWarningShowingState"},
FunctionInfo{31, D<&IOverlayFunctions::IsHealthWarningRequired>, "IsHealthWarningRequired"},
FunctionInfo{40, nullptr, "GetApplicationNintendoLogo"},
FunctionInfo{41, nullptr, "GetApplicationStartupMovie"},
FunctionInfo{50, nullptr, "SetGpuTimeSliceBoostForApplication"},
FunctionInfo{60, nullptr, "Unknown60"},
FunctionInfo{70, D<&IOverlayFunctions::Unknown70>, "Unknown70"},
FunctionInfo{90, nullptr, "SetRequiresGpuResourceUse"},
FunctionInfo{101, nullptr, "BeginToObserveHidInputForDevelop"}
);
const std::shared_ptr<Applet> m_applet;
};
} // namespace Service::AM
@@ -16,20 +16,6 @@ namespace Service::AM {
IProcessWindingController::IProcessWindingController(Core::System& system_,
std::shared_ptr<Applet> applet)
: ServiceFramework{system_, "IProcessWindingController"}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"},
{11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"},
{21, D<&IProcessWindingController::PushContext>, "PushContext"},
{22, D<&IProcessWindingController::PopContext>, "PopContext"},
{23, D<&IProcessWindingController::CancelWindingReservation>, "CancelWindingReservation"},
{30, D<&IProcessWindingController::WindAndDoReserved>, "WindAndDoReserved"},
{40, D<&IProcessWindingController::ReserveToStartAndWaitAndUnwindThis>, "ReserveToStartAndWaitAndUnwindThis"},
{41, D<&IProcessWindingController::ReserveToStartAndWait>, "ReserveToStartAndWait"},
};
// clang-format on
RegisterHandlers(functions);
}
IProcessWindingController::~IProcessWindingController() = default;
@@ -33,6 +33,19 @@ private:
SharedPointer<ILibraryAppletAccessor> reserved_applet_accessor);
Result ReserveToStartAndWait(SharedPointer<ILibraryAppletAccessor> reserved_applet_accessor);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"},
FunctionInfo{11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"},
FunctionInfo{21, D<&IProcessWindingController::PushContext>, "PushContext"},
FunctionInfo{22, D<&IProcessWindingController::PopContext>, "PopContext"},
FunctionInfo{23, D<&IProcessWindingController::CancelWindingReservation>, "CancelWindingReservation"},
FunctionInfo{30, D<&IProcessWindingController::WindAndDoReserved>, "WindAndDoReserved"},
FunctionInfo{40, D<&IProcessWindingController::ReserveToStartAndWaitAndUnwindThis>, "ReserveToStartAndWaitAndUnwindThis"},
FunctionInfo{41, D<&IProcessWindingController::ReserveToStartAndWait>, "ReserveToStartAndWait"}
);
const std::shared_ptr<Applet> m_applet;
};
@@ -21,63 +21,6 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
Kernel::KProcess* process)
: ServiceFramework{system_, "ISelfController"}, m_process{process}, m_applet{
std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ISelfController::Exit>, "Exit"},
{1, D<&ISelfController::LockExit>, "LockExit"},
{2, D<&ISelfController::UnlockExit>, "UnlockExit"},
{3, D<&ISelfController::EnterFatalSection>, "EnterFatalSection"},
{4, D<&ISelfController::LeaveFatalSection>, "LeaveFatalSection"},
{9, D<&ISelfController::GetLibraryAppletLaunchableEvent>, "GetLibraryAppletLaunchableEvent"},
{10, D<&ISelfController::SetScreenShotPermission>, "SetScreenShotPermission"},
{11, D<&ISelfController::SetOperationModeChangedNotification>, "SetOperationModeChangedNotification"},
{12, D<&ISelfController::SetPerformanceModeChangedNotification>, "SetPerformanceModeChangedNotification"},
{13, D<&ISelfController::SetFocusHandlingMode>, "SetFocusHandlingMode"},
{14, D<&ISelfController::SetRestartMessageEnabled>, "SetRestartMessageEnabled"},
{15, D<&ISelfController::SetScreenShotAppletIdentityInfo>, "SetScreenShotAppletIdentityInfo"},
{16, D<&ISelfController::SetOutOfFocusSuspendingEnabled>, "SetOutOfFocusSuspendingEnabled"},
{17, nullptr, "SetControllerFirmwareUpdateSection"},
{18, nullptr, "SetRequiresCaptureButtonShortPressedMessage"},
{19, D<&ISelfController::SetAlbumImageOrientation>, "SetAlbumImageOrientation"},
{20, nullptr, "SetDesirableKeyboardLayout"},
{21, nullptr, "GetScreenShotProgramId"},
{40, D<&ISelfController::CreateManagedDisplayLayer>, "CreateManagedDisplayLayer"},
{41, D<&ISelfController::IsSystemBufferSharingEnabled>, "IsSystemBufferSharingEnabled"},
{42, D<&ISelfController::GetSystemSharedLayerHandle>, "GetSystemSharedLayerHandle"},
{43, D<&ISelfController::GetSystemSharedBufferHandle>, "GetSystemSharedBufferHandle"},
{44, D<&ISelfController::CreateManagedDisplaySeparableLayer>, "CreateManagedDisplaySeparableLayer"},
{45, nullptr, "SetManagedDisplayLayerSeparationMode"},
{46, nullptr, "SetRecordingLayerCompositionEnabled"},
{50, D<&ISelfController::SetHandlesRequestToDisplay>, "SetHandlesRequestToDisplay"},
{51, D<&ISelfController::ApproveToDisplay>, "ApproveToDisplay"},
{60, D<&ISelfController::OverrideAutoSleepTimeAndDimmingTime>, "OverrideAutoSleepTimeAndDimmingTime"},
{61, D<&ISelfController::SetMediaPlaybackState>, "SetMediaPlaybackState"},
{62, D<&ISelfController::SetIdleTimeDetectionExtension>, "SetIdleTimeDetectionExtension"},
{63, D<&ISelfController::GetIdleTimeDetectionExtension>, "GetIdleTimeDetectionExtension"},
{64, nullptr, "SetInputDetectionSourceSet"},
{65, D<&ISelfController::ReportUserIsActive>, "ReportUserIsActive"},
{66, nullptr, "GetCurrentIlluminance"},
{67, D<&ISelfController::IsIlluminanceAvailable>, "IsIlluminanceAvailable"},
{68, D<&ISelfController::SetAutoSleepDisabled>, "SetAutoSleepDisabled"},
{69, D<&ISelfController::IsAutoSleepDisabled>, "IsAutoSleepDisabled"},
{70, nullptr, "ReportMultimediaError"},
{71, nullptr, "GetCurrentIlluminanceEx"},
{72, D<&ISelfController::SetInputDetectionPolicy>, "SetInputDetectionPolicy"},
{80, nullptr, "SetWirelessPriorityMode"},
{90, D<&ISelfController::GetAccumulatedSuspendedTickValue>, "GetAccumulatedSuspendedTickValue"},
{91, D<&ISelfController::GetAccumulatedSuspendedTickChangedEvent>, "GetAccumulatedSuspendedTickChangedEvent"},
{100, D<&ISelfController::SetAlbumImageTakenNotificationEnabled>, "SetAlbumImageTakenNotificationEnabled"},
{110, nullptr, "SetApplicationAlbumUserData"},
{120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"},
{130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"},
{230, D<&ISelfController::Unknown230>, "Unknown230"},
{240, D<&ISelfController::Unknown240>, "Unknown240"},
{1000, nullptr, "GetDebugStorageChannel"},
};
// clang-format on
RegisterHandlers(functions);
std::scoped_lock lk{m_applet->lock};
m_applet->display_layer_manager.Initialize(system, m_process, m_applet->applet_id,
m_applet->library_applet_mode);
@@ -70,6 +70,61 @@ private:
Result Unknown230(u32 in_val, Out<u16> out_val);
Result Unknown240(u32 in_val);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ISelfController::Exit>, "Exit"},
FunctionInfo{1, D<&ISelfController::LockExit>, "LockExit"},
FunctionInfo{2, D<&ISelfController::UnlockExit>, "UnlockExit"},
FunctionInfo{3, D<&ISelfController::EnterFatalSection>, "EnterFatalSection"},
FunctionInfo{4, D<&ISelfController::LeaveFatalSection>, "LeaveFatalSection"},
FunctionInfo{9, D<&ISelfController::GetLibraryAppletLaunchableEvent>, "GetLibraryAppletLaunchableEvent"},
FunctionInfo{10, D<&ISelfController::SetScreenShotPermission>, "SetScreenShotPermission"},
FunctionInfo{11, D<&ISelfController::SetOperationModeChangedNotification>, "SetOperationModeChangedNotification"},
FunctionInfo{12, D<&ISelfController::SetPerformanceModeChangedNotification>, "SetPerformanceModeChangedNotification"},
FunctionInfo{13, D<&ISelfController::SetFocusHandlingMode>, "SetFocusHandlingMode"},
FunctionInfo{14, D<&ISelfController::SetRestartMessageEnabled>, "SetRestartMessageEnabled"},
FunctionInfo{15, D<&ISelfController::SetScreenShotAppletIdentityInfo>, "SetScreenShotAppletIdentityInfo"},
FunctionInfo{16, D<&ISelfController::SetOutOfFocusSuspendingEnabled>, "SetOutOfFocusSuspendingEnabled"},
FunctionInfo{17, nullptr, "SetControllerFirmwareUpdateSection"},
FunctionInfo{18, nullptr, "SetRequiresCaptureButtonShortPressedMessage"},
FunctionInfo{19, D<&ISelfController::SetAlbumImageOrientation>, "SetAlbumImageOrientation"},
FunctionInfo{20, nullptr, "SetDesirableKeyboardLayout"},
FunctionInfo{21, nullptr, "GetScreenShotProgramId"},
FunctionInfo{40, D<&ISelfController::CreateManagedDisplayLayer>, "CreateManagedDisplayLayer"},
FunctionInfo{41, D<&ISelfController::IsSystemBufferSharingEnabled>, "IsSystemBufferSharingEnabled"},
FunctionInfo{42, D<&ISelfController::GetSystemSharedLayerHandle>, "GetSystemSharedLayerHandle"},
FunctionInfo{43, D<&ISelfController::GetSystemSharedBufferHandle>, "GetSystemSharedBufferHandle"},
FunctionInfo{44, D<&ISelfController::CreateManagedDisplaySeparableLayer>, "CreateManagedDisplaySeparableLayer"},
FunctionInfo{45, nullptr, "SetManagedDisplayLayerSeparationMode"},
FunctionInfo{46, nullptr, "SetRecordingLayerCompositionEnabled"},
FunctionInfo{50, D<&ISelfController::SetHandlesRequestToDisplay>, "SetHandlesRequestToDisplay"},
FunctionInfo{51, D<&ISelfController::ApproveToDisplay>, "ApproveToDisplay"},
FunctionInfo{60, D<&ISelfController::OverrideAutoSleepTimeAndDimmingTime>, "OverrideAutoSleepTimeAndDimmingTime"},
FunctionInfo{61, D<&ISelfController::SetMediaPlaybackState>, "SetMediaPlaybackState"},
FunctionInfo{62, D<&ISelfController::SetIdleTimeDetectionExtension>, "SetIdleTimeDetectionExtension"},
FunctionInfo{63, D<&ISelfController::GetIdleTimeDetectionExtension>, "GetIdleTimeDetectionExtension"},
FunctionInfo{64, nullptr, "SetInputDetectionSourceSet"},
FunctionInfo{65, D<&ISelfController::ReportUserIsActive>, "ReportUserIsActive"},
FunctionInfo{66, nullptr, "GetCurrentIlluminance"},
FunctionInfo{67, D<&ISelfController::IsIlluminanceAvailable>, "IsIlluminanceAvailable"},
FunctionInfo{68, D<&ISelfController::SetAutoSleepDisabled>, "SetAutoSleepDisabled"},
FunctionInfo{69, D<&ISelfController::IsAutoSleepDisabled>, "IsAutoSleepDisabled"},
FunctionInfo{70, nullptr, "ReportMultimediaError"},
FunctionInfo{71, nullptr, "GetCurrentIlluminanceEx"},
FunctionInfo{72, D<&ISelfController::SetInputDetectionPolicy>, "SetInputDetectionPolicy"},
FunctionInfo{80, nullptr, "SetWirelessPriorityMode"},
FunctionInfo{90, D<&ISelfController::GetAccumulatedSuspendedTickValue>, "GetAccumulatedSuspendedTickValue"},
FunctionInfo{91, D<&ISelfController::GetAccumulatedSuspendedTickChangedEvent>, "GetAccumulatedSuspendedTickChangedEvent"},
FunctionInfo{100, D<&ISelfController::SetAlbumImageTakenNotificationEnabled>, "SetAlbumImageTakenNotificationEnabled"},
FunctionInfo{110, nullptr, "SetApplicationAlbumUserData"},
FunctionInfo{120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"},
FunctionInfo{130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"},
FunctionInfo{230, D<&ISelfController::Unknown230>, "Unknown230"},
FunctionInfo{240, D<&ISelfController::Unknown240>, "Unknown240"},
FunctionInfo{1000, nullptr, "GetDebugStorageChannel"}
);
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
};
+2 -2
View File
@@ -15,8 +15,8 @@ namespace Service::AM {
IStorage::IStorage(Core::System& system_, std::shared_ptr<LibraryAppletStorage> impl)
: ServiceFramework{system_, "IStorage"}, m_impl{std::move(impl)} {
static const FunctionInfo functions[] = {
{0, D<&IStorage::Open>, "Open"},
{1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"},
FunctionInfo{0, D<&IStorage::Open>, "Open"},
FunctionInfo{1, D<&IStorage::OpenTransferStorage>, "OpenTransferStorage"},
};
RegisterHandlers(functions);
@@ -12,9 +12,9 @@ IStorageAccessor::IStorageAccessor(Core::System& system_,
std::shared_ptr<LibraryAppletStorage> impl)
: ServiceFramework{system_, "IStorageAccessor"}, m_impl{std::move(impl)} {
static const FunctionInfo functions[] = {
{0, D<&IStorageAccessor::GetSize>, "GetSize"},
{10, D<&IStorageAccessor::Write>, "Write"},
{11, D<&IStorageAccessor::Read>, "Read"},
FunctionInfo{0, D<&IStorageAccessor::GetSize>, "GetSize"},
FunctionInfo{10, D<&IStorageAccessor::Write>, "Write"},
FunctionInfo{11, D<&IStorageAccessor::Read>, "Read"},
};
RegisterHandlers(functions);
@@ -42,8 +42,8 @@ ITransferStorageAccessor::ITransferStorageAccessor(Core::System& system_,
std::shared_ptr<LibraryAppletStorage> impl)
: ServiceFramework{system_, "ITransferStorageAccessor"}, m_impl{std::move(impl)} {
static const FunctionInfo functions[] = {
{0, D<&ITransferStorageAccessor::GetSize>, "GetSize"},
{1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"},
FunctionInfo{0, D<&ITransferStorageAccessor::GetSize>, "GetSize"},
FunctionInfo{1, D<&ITransferStorageAccessor::GetHandle>, "GetHandle"},
};
RegisterHandlers(functions);
@@ -22,24 +22,6 @@ ISystemAppletProxy::ISystemAppletProxy(Core::System& system_, std::shared_ptr<Ap
Kernel::KProcess* process, WindowSystem& window_system)
: ServiceFramework{system_, "ISystemAppletProxy"},
m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ISystemAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
{1, D<&ISystemAppletProxy::GetSelfController>, "GetSelfController"},
{2, D<&ISystemAppletProxy::GetWindowController>, "GetWindowController"},
{3, D<&ISystemAppletProxy::GetAudioController>, "GetAudioController"},
{4, D<&ISystemAppletProxy::GetDisplayController>, "GetDisplayController"},
{10, D<&ISystemAppletProxy::GetProcessWindingController>, "GetProcessWindingController"},
{11, D<&ISystemAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
{20, D<&ISystemAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"},
{21, D<&ISystemAppletProxy::GetGlobalStateController>, "GetGlobalStateController"},
{22, D<&ISystemAppletProxy::GetApplicationCreator>, "GetApplicationCreator"},
{23, D<&ISystemAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"},
{1000, D<&ISystemAppletProxy::GetDebugFunctions>, "GetDebugFunctions"},
};
// clang-format on
RegisterHandlers(functions);
}
ISystemAppletProxy::~ISystemAppletProxy() = default;
@@ -50,6 +50,23 @@ private:
Result GetGlobalStateController(
Out<SharedPointer<IGlobalStateController>> out_global_state_controller);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&ISystemAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
FunctionInfo{1, D<&ISystemAppletProxy::GetSelfController>, "GetSelfController"},
FunctionInfo{2, D<&ISystemAppletProxy::GetWindowController>, "GetWindowController"},
FunctionInfo{3, D<&ISystemAppletProxy::GetAudioController>, "GetAudioController"},
FunctionInfo{4, D<&ISystemAppletProxy::GetDisplayController>, "GetDisplayController"},
FunctionInfo{10, D<&ISystemAppletProxy::GetProcessWindingController>, "GetProcessWindingController"},
FunctionInfo{11, D<&ISystemAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"},
FunctionInfo{20, D<&ISystemAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"},
FunctionInfo{21, D<&ISystemAppletProxy::GetGlobalStateController>, "GetGlobalStateController"},
FunctionInfo{22, D<&ISystemAppletProxy::GetApplicationCreator>, "GetApplicationCreator"},
FunctionInfo{23, D<&ISystemAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"},
FunctionInfo{1000, D<&ISystemAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}
);
WindowSystem& m_window_system;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
@@ -13,20 +13,6 @@ IWindowController::IWindowController(Core::System& system_, std::shared_ptr<Appl
WindowSystem& window_system)
: ServiceFramework{system_, "IWindowController"},
m_window_system{window_system}, m_applet{std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "CreateWindow"},
{1, D<&IWindowController::GetAppletResourceUserId>, "GetAppletResourceUserId"},
{2, D<&IWindowController::GetAppletResourceUserIdOfCallerApplet>, "GetAppletResourceUserIdOfCallerApplet"},
{10, D<&IWindowController::AcquireForegroundRights>, "AcquireForegroundRights"},
{11, D<&IWindowController::ReleaseForegroundRights>, "ReleaseForegroundRights"},
{12, D<&IWindowController::RejectToChangeIntoBackground>, "RejectToChangeIntoBackground"},
{20, D<&IWindowController::SetAppletWindowVisibility>, "SetAppletWindowVisibility"},
{21, D<&IWindowController::SetAppletGpuTimeSlice>, "SetAppletGpuTimeSlice"},
};
// clang-format on
RegisterHandlers(functions);
}
IWindowController::~IWindowController() = default;
@@ -26,6 +26,19 @@ private:
Result SetAppletWindowVisibility(bool visible);
Result SetAppletGpuTimeSlice(s64 time_slice);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "CreateWindow"},
FunctionInfo{1, D<&IWindowController::GetAppletResourceUserId>, "GetAppletResourceUserId"},
FunctionInfo{2, D<&IWindowController::GetAppletResourceUserIdOfCallerApplet>, "GetAppletResourceUserIdOfCallerApplet"},
FunctionInfo{10, D<&IWindowController::AcquireForegroundRights>, "AcquireForegroundRights"},
FunctionInfo{11, D<&IWindowController::ReleaseForegroundRights>, "ReleaseForegroundRights"},
FunctionInfo{12, D<&IWindowController::RejectToChangeIntoBackground>, "RejectToChangeIntoBackground"},
FunctionInfo{20, D<&IWindowController::SetAppletWindowVisibility>, "SetAppletWindowVisibility"},
FunctionInfo{21, D<&IWindowController::SetAppletGpuTimeSlice>, "SetAppletGpuTimeSlice"}
);
WindowSystem& m_window_system;
const std::shared_ptr<Applet> m_applet;
};
@@ -57,35 +57,6 @@ static std::vector<u64> AccumulateAOCTitleIDs(Core::System& system) {
IAddOnContentManager::IAddOnContentManager(Core::System& system_)
: ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)},
service_context{system_, "aoc:u"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "CountAddOnContentByApplicationId"},
{1, nullptr, "ListAddOnContentByApplicationId"},
{2, D<&IAddOnContentManager::CountAddOnContent>, "CountAddOnContent"},
{3, D<&IAddOnContentManager::ListAddOnContent>, "ListAddOnContent"},
{4, nullptr, "GetAddOnContentBaseIdByApplicationId"},
{5, D<&IAddOnContentManager::GetAddOnContentBaseId>, "GetAddOnContentBaseId"},
{6, nullptr, "PrepareAddOnContentByApplicationId"},
{7, D<&IAddOnContentManager::PrepareAddOnContent>, "PrepareAddOnContent"},
{8, D<&IAddOnContentManager::GetAddOnContentListChangedEvent>, "GetAddOnContentListChangedEvent"},
{9, nullptr, "GetAddOnContentLostErrorCode"},
{10, D<&IAddOnContentManager::GetAddOnContentListChangedEventWithProcessId>, "GetAddOnContentListChangedEventWithProcessId"},
{11, D<&IAddOnContentManager::NotifyMountAddOnContent>, "NotifyMountAddOnContent"},
{12, D<&IAddOnContentManager::NotifyUnmountAddOnContent>, "NotifyUnmountAddOnContent"},
{13, nullptr, "IsAddOnContentMountedForDebug"},
{50, D<&IAddOnContentManager::CheckAddOnContentMountStatus>, "CheckAddOnContentMountStatus"},
{100, D<&IAddOnContentManager::CreateEcPurchasedEventManager>, "CreateEcPurchasedEventManager"},
{101, D<&IAddOnContentManager::CreatePermanentEcPurchasedEventManager>, "CreatePermanentEcPurchasedEventManager"},
{110, nullptr, "CreateContentsServiceManager"},
{200, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"},
{300, nullptr, "SetupHostAddOnContent"},
{301, nullptr, "GetRegisteredAddOnContentPath"},
{302, nullptr, "UpdateCachedList"},
};
// clang-format on
RegisterHandlers(functions);
aoc_change_event = service_context.CreateEvent("GetAddOnContentListChanged:Event");
}
@@ -40,9 +40,35 @@ public:
OutInterface<IPurchaseEventManager> out_interface);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "CountAddOnContentByApplicationId"},
FunctionInfo{1, nullptr, "ListAddOnContentByApplicationId"},
FunctionInfo{2, D<&IAddOnContentManager::CountAddOnContent>, "CountAddOnContent"},
FunctionInfo{3, D<&IAddOnContentManager::ListAddOnContent>, "ListAddOnContent"},
FunctionInfo{4, nullptr, "GetAddOnContentBaseIdByApplicationId"},
FunctionInfo{5, D<&IAddOnContentManager::GetAddOnContentBaseId>, "GetAddOnContentBaseId"},
FunctionInfo{6, nullptr, "PrepareAddOnContentByApplicationId"},
FunctionInfo{7, D<&IAddOnContentManager::PrepareAddOnContent>, "PrepareAddOnContent"},
FunctionInfo{8, D<&IAddOnContentManager::GetAddOnContentListChangedEvent>, "GetAddOnContentListChangedEvent"},
FunctionInfo{9, nullptr, "GetAddOnContentLostErrorCode"},
FunctionInfo{10, D<&IAddOnContentManager::GetAddOnContentListChangedEventWithProcessId>, "GetAddOnContentListChangedEventWithProcessId"},
FunctionInfo{11, D<&IAddOnContentManager::NotifyMountAddOnContent>, "NotifyMountAddOnContent"},
FunctionInfo{12, D<&IAddOnContentManager::NotifyUnmountAddOnContent>, "NotifyUnmountAddOnContent"},
FunctionInfo{13, nullptr, "IsAddOnContentMountedForDebug"},
FunctionInfo{50, D<&IAddOnContentManager::CheckAddOnContentMountStatus>, "CheckAddOnContentMountStatus"},
FunctionInfo{100, D<&IAddOnContentManager::CreateEcPurchasedEventManager>, "CreateEcPurchasedEventManager"},
FunctionInfo{101, D<&IAddOnContentManager::CreatePermanentEcPurchasedEventManager>, "CreatePermanentEcPurchasedEventManager"},
FunctionInfo{110, nullptr, "CreateContentsServiceManager"},
FunctionInfo{200, nullptr, "SetRequiredAddOnContentsOnContentsAvailabilityTransition"},
FunctionInfo{300, nullptr, "SetupHostAddOnContent"},
FunctionInfo{301, nullptr, "GetRegisteredAddOnContentPath"},
FunctionInfo{302, nullptr, "UpdateCachedList"}
);
std::vector<u64> add_on_content;
KernelHelpers::ServiceContext service_context;
Kernel::KEvent* aoc_change_event;
};
@@ -15,16 +15,16 @@ IPurchaseEventManager::IPurchaseEventManager(Core::System& system_)
: ServiceFramework{system_, "IPurchaseEventManager"}, service_context{system,
"IPurchaseEventManager"} {
// clang-format off
static const FunctionInfo functions[] = {
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IPurchaseEventManager::SetDefaultDeliveryTarget>, "SetDefaultDeliveryTarget"},
FunctionInfo{1, D<&IPurchaseEventManager::SetDeliveryTarget>, "SetDeliveryTarget"},
FunctionInfo{2, D<&IPurchaseEventManager::GetPurchasedEvent>, "GetPurchasedEvent"},
FunctionInfo{3, D<&IPurchaseEventManager::PopPurchasedProductInfo>, "PopPurchasedProductInfo"},
FunctionInfo{4, D<&IPurchaseEventManager::PopPurchasedProductInfoWithUid>, "PopPurchasedProductInfoWithUid"}
};
// clang-format on
RegisterHandlers(functions);
);
purchased_event = service_context.CreateEvent("IPurchaseEventManager:PurchasedEvent");
}
+8 -8
View File
@@ -98,14 +98,14 @@ APM_Sys::APM_Sys(Core::System& system_, Controller& controller_)
: ServiceFramework{system_, "apm:sys"}, controller{controller_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "RequestPerformanceMode"},
{1, &APM_Sys::GetPerformanceEvent, "GetPerformanceEvent"},
{2, nullptr, "GetThrottlingState"},
{3, nullptr, "GetLastThrottlingState"},
{4, nullptr, "ClearLastThrottlingState"},
{5, nullptr, "LoadAndApplySettings"},
{6, &APM_Sys::SetCpuBoostMode, "SetCpuBoostMode"},
{7, &APM_Sys::GetCurrentPerformanceConfiguration, "GetCurrentPerformanceConfiguration"},
FunctionInfo{0, nullptr, "RequestPerformanceMode"},
FunctionInfo{1, &APM_Sys::GetPerformanceEvent, "GetPerformanceEvent"},
FunctionInfo{2, nullptr, "GetThrottlingState"},
FunctionInfo{3, nullptr, "GetLastThrottlingState"},
FunctionInfo{4, nullptr, "ClearLastThrottlingState"},
FunctionInfo{5, nullptr, "LoadAndApplySettings"},
FunctionInfo{6, &APM_Sys::SetCpuBoostMode, "SetCpuBoostMode"},
FunctionInfo{7, &APM_Sys::GetCurrentPerformanceConfiguration, "GetCurrentPerformanceConfiguration"},
};
// clang-format on
+3 -3
View File
@@ -25,9 +25,9 @@ private:
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, &APM::OpenSession, "OpenSession"},
{1, &APM::GetPerformanceMode, "GetPerformanceMode"},
{6, &APM::IsCpuOverclockEnabled, "IsCpuOverclockEnabled"}
FunctionInfo{0, &APM::OpenSession, "OpenSession"},
FunctionInfo{1, &APM::GetPerformanceMode, "GetPerformanceMode"},
FunctionInfo{6, &APM::IsCpuOverclockEnabled, "IsCpuOverclockEnabled"}
);
std::shared_ptr<Module> apm;
Controller& controller;
+60 -60
View File
@@ -24,66 +24,66 @@ IAudioController::IAudioController(Core::System& system_)
: ServiceFramework{system_, "audctl"}, service_context{system, "audctl"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioController::GetTargetVolume>, "GetTargetVolume"},
{1, D<&IAudioController::SetTargetVolume>, "SetTargetVolume"},
{2, D<&IAudioController::GetTargetVolumeMin>, "GetTargetVolumeMin"},
{3, D<&IAudioController::GetTargetVolumeMax>, "GetTargetVolumeMax"},
{4, D<&IAudioController::IsTargetMute>, "IsTargetMute"},
{5, D<&IAudioController::SetTargetMute>, "SetTargetMute"},
{6, nullptr, "IsTargetConnected"}, //20.0.0+
{7, nullptr, "SetDefaultTarget"},
{8, nullptr, "GetDefaultTarget"},
{9, D<&IAudioController::GetAudioOutputMode>, "GetAudioOutputMode"},
{10, D<&IAudioController::SetAudioOutputMode>, "SetAudioOutputMode"},
{11, nullptr, "SetForceMutePolicy"},
{12, D<&IAudioController::GetForceMutePolicy>, "GetForceMutePolicy"},
{13, D<&IAudioController::GetOutputModeSetting>, "GetOutputModeSetting"},
{14, D<&IAudioController::SetOutputModeSetting>, "SetOutputModeSetting"},
{15, nullptr, "SetOutputTarget"},
{16, nullptr, "SetInputTargetForceEnabled"},
{17, D<&IAudioController::SetHeadphoneOutputLevelMode>, "SetHeadphoneOutputLevelMode"},
{18, D<&IAudioController::GetHeadphoneOutputLevelMode>, "GetHeadphoneOutputLevelMode"},
{19, nullptr, "AcquireAudioVolumeUpdateEventForPlayReport"},
{20, nullptr, "AcquireAudioOutputDeviceUpdateEventForPlayReport"},
{21, nullptr, "GetAudioOutputTargetForPlayReport"},
{22, D<&IAudioController::NotifyHeadphoneVolumeWarningDisplayedEvent>, "NotifyHeadphoneVolumeWarningDisplayedEvent"},
{23, nullptr, "SetSystemOutputMasterVolume"},
{24, nullptr, "GetSystemOutputMasterVolume"},
{25, nullptr, "GetAudioVolumeDataForPlayReport"},
{26, nullptr, "UpdateHeadphoneSettings"},
{27, nullptr, "SetVolumeMappingTableForDev"},
{28, nullptr, "GetAudioOutputChannelCountForPlayReport"},
{29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"},
{30, D<&IAudioController::SetSpeakerAutoMuteEnabled>, "SetSpeakerAutoMuteEnabled"},
{31, D<&IAudioController::IsSpeakerAutoMuteEnabled>, "IsSpeakerAutoMuteEnabled"},
{32, D<&IAudioController::GetActiveOutputTarget>, "GetActiveOutputTarget"},
{33, nullptr, "GetTargetDeviceInfo"},
{34, D<&IAudioController::AcquireTargetNotification>, "AcquireTargetNotification"},
{35, nullptr, "SetHearingProtectionSafeguardTimerRemainingTimeForDebug"},
{36, nullptr, "GetHearingProtectionSafeguardTimerRemainingTimeForDebug"},
{37, nullptr, "SetHearingProtectionSafeguardEnabled"},
{38, nullptr, "IsHearingProtectionSafeguardEnabled"},
{39, nullptr, "IsHearingProtectionSafeguardMonitoringOutputForDebug"},
{40, nullptr, "GetSystemInformationForDebug"},
{41, nullptr, "SetVolumeButtonLongPressTime"},
{42, nullptr, "SetNativeVolumeForDebug"},
{43, nullptr, "Unknown43"}, //21.0.0+
{5000, D<&IAudioController::Unknown5000>, "Unknown5000"}, //19.0.0+
{10000, nullptr, "NotifyAudioOutputTargetForPlayReport"},
{10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"},
{10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"},
{10100, nullptr, "GetAudioVolumeDataForPlayReport"},
{10101, nullptr, "BindAudioVolumeUpdateEventForPlayReport"},
{10102, nullptr, "BindAudioOutputTargetUpdateEventForPlayReport"},
{10103, nullptr, "GetAudioOutputTargetForPlayReport"},
{10104, nullptr, "GetAudioOutputChannelCountForPlayReport"},
{10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, //14.0.0-19.0.1
{10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"}, //14.0.0-19.0.1
{10200, nullptr, "Unknown10200"}, //20.0.0+
{50000, nullptr, "SetAnalogInputBoostGainForPrototyping"}, //15.0.0-18.1.0
{50001, nullptr, "OverrideDefaultTargetForDebug"}, //19.0.0-19.0.1
{50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"}, //19.0.0+
{50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"} //19.0.0+
FunctionInfo{0, D<&IAudioController::GetTargetVolume>, "GetTargetVolume"},
FunctionInfo{1, D<&IAudioController::SetTargetVolume>, "SetTargetVolume"},
FunctionInfo{2, D<&IAudioController::GetTargetVolumeMin>, "GetTargetVolumeMin"},
FunctionInfo{3, D<&IAudioController::GetTargetVolumeMax>, "GetTargetVolumeMax"},
FunctionInfo{4, D<&IAudioController::IsTargetMute>, "IsTargetMute"},
FunctionInfo{5, D<&IAudioController::SetTargetMute>, "SetTargetMute"},
FunctionInfo{6, nullptr, "IsTargetConnected"}, //20.0.0+
FunctionInfo{7, nullptr, "SetDefaultTarget"},
FunctionInfo{8, nullptr, "GetDefaultTarget"},
FunctionInfo{9, D<&IAudioController::GetAudioOutputMode>, "GetAudioOutputMode"},
FunctionInfo{10, D<&IAudioController::SetAudioOutputMode>, "SetAudioOutputMode"},
FunctionInfo{11, nullptr, "SetForceMutePolicy"},
FunctionInfo{12, D<&IAudioController::GetForceMutePolicy>, "GetForceMutePolicy"},
FunctionInfo{13, D<&IAudioController::GetOutputModeSetting>, "GetOutputModeSetting"},
FunctionInfo{14, D<&IAudioController::SetOutputModeSetting>, "SetOutputModeSetting"},
FunctionInfo{15, nullptr, "SetOutputTarget"},
FunctionInfo{16, nullptr, "SetInputTargetForceEnabled"},
FunctionInfo{17, D<&IAudioController::SetHeadphoneOutputLevelMode>, "SetHeadphoneOutputLevelMode"},
FunctionInfo{18, D<&IAudioController::GetHeadphoneOutputLevelMode>, "GetHeadphoneOutputLevelMode"},
FunctionInfo{19, nullptr, "AcquireAudioVolumeUpdateEventForPlayReport"},
FunctionInfo{20, nullptr, "AcquireAudioOutputDeviceUpdateEventForPlayReport"},
FunctionInfo{21, nullptr, "GetAudioOutputTargetForPlayReport"},
FunctionInfo{22, D<&IAudioController::NotifyHeadphoneVolumeWarningDisplayedEvent>, "NotifyHeadphoneVolumeWarningDisplayedEvent"},
FunctionInfo{23, nullptr, "SetSystemOutputMasterVolume"},
FunctionInfo{24, nullptr, "GetSystemOutputMasterVolume"},
FunctionInfo{25, nullptr, "GetAudioVolumeDataForPlayReport"},
FunctionInfo{26, nullptr, "UpdateHeadphoneSettings"},
FunctionInfo{27, nullptr, "SetVolumeMappingTableForDev"},
FunctionInfo{28, nullptr, "GetAudioOutputChannelCountForPlayReport"},
FunctionInfo{29, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"},
FunctionInfo{30, D<&IAudioController::SetSpeakerAutoMuteEnabled>, "SetSpeakerAutoMuteEnabled"},
FunctionInfo{31, D<&IAudioController::IsSpeakerAutoMuteEnabled>, "IsSpeakerAutoMuteEnabled"},
FunctionInfo{32, D<&IAudioController::GetActiveOutputTarget>, "GetActiveOutputTarget"},
FunctionInfo{33, nullptr, "GetTargetDeviceInfo"},
FunctionInfo{34, D<&IAudioController::AcquireTargetNotification>, "AcquireTargetNotification"},
FunctionInfo{35, nullptr, "SetHearingProtectionSafeguardTimerRemainingTimeForDebug"},
FunctionInfo{36, nullptr, "GetHearingProtectionSafeguardTimerRemainingTimeForDebug"},
FunctionInfo{37, nullptr, "SetHearingProtectionSafeguardEnabled"},
FunctionInfo{38, nullptr, "IsHearingProtectionSafeguardEnabled"},
FunctionInfo{39, nullptr, "IsHearingProtectionSafeguardMonitoringOutputForDebug"},
FunctionInfo{40, nullptr, "GetSystemInformationForDebug"},
FunctionInfo{41, nullptr, "SetVolumeButtonLongPressTime"},
FunctionInfo{42, nullptr, "SetNativeVolumeForDebug"},
FunctionInfo{43, nullptr, "Unknown43"}, //21.0.0+
FunctionInfo{5000, D<&IAudioController::Unknown5000>, "Unknown5000"}, //19.0.0+
FunctionInfo{10000, nullptr, "NotifyAudioOutputTargetForPlayReport"},
FunctionInfo{10001, nullptr, "NotifyAudioOutputChannelCountForPlayReport"},
FunctionInfo{10002, nullptr, "NotifyUnsupportedUsbOutputDeviceAttachedForPlayReport"},
FunctionInfo{10100, nullptr, "GetAudioVolumeDataForPlayReport"},
FunctionInfo{10101, nullptr, "BindAudioVolumeUpdateEventForPlayReport"},
FunctionInfo{10102, nullptr, "BindAudioOutputTargetUpdateEventForPlayReport"},
FunctionInfo{10103, nullptr, "GetAudioOutputTargetForPlayReport"},
FunctionInfo{10104, nullptr, "GetAudioOutputChannelCountForPlayReport"},
FunctionInfo{10105, nullptr, "BindAudioOutputChannelCountUpdateEventForPlayReport"}, //14.0.0-19.0.1
FunctionInfo{10106, nullptr, "GetDefaultAudioOutputTargetForPlayReport"}, //14.0.0-19.0.1
FunctionInfo{10200, nullptr, "Unknown10200"}, //20.0.0+
FunctionInfo{50000, nullptr, "SetAnalogInputBoostGainForPrototyping"}, //15.0.0-18.1.0
FunctionInfo{50001, nullptr, "OverrideDefaultTargetForDebug"}, //19.0.0-19.0.1
FunctionInfo{50003, nullptr, "SetForceOverrideExternalDeviceNameForDebug"}, //19.0.0+
FunctionInfo{50004, nullptr, "ClearForceOverrideExternalDeviceNameForDebug"} //19.0.0+
};
// clang-format on
+21 -21
View File
@@ -18,27 +18,27 @@ IAudioDevice::IAudioDevice(Core::System& system_, u64 applet_resource_user_id, u
impl{std::make_unique<AudioDevice>(system_, applet_resource_user_id, revision)},
event{service_context.CreateEvent(fmt::format("IAudioDeviceEvent-{}", device_num))} {
static const FunctionInfo functions[] = {
{0, D<&IAudioDevice::ListAudioDeviceName>, "ListAudioDeviceName"},
{1, D<&IAudioDevice::SetAudioDeviceOutputVolume>, "SetAudioDeviceOutputVolume"},
{2, D<&IAudioDevice::GetAudioDeviceOutputVolume>, "GetAudioDeviceOutputVolume"},
{3, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioDeviceName"},
{4, D<&IAudioDevice::QueryAudioDeviceSystemEvent>, "QueryAudioDeviceSystemEvent"},
{5, D<&IAudioDevice::GetActiveChannelCount>, "GetActiveChannelCount"},
{6, D<&IAudioDevice::ListAudioDeviceNameAuto>, "ListAudioDeviceNameAuto"},
{7, D<&IAudioDevice::SetAudioDeviceOutputVolumeAuto>, "SetAudioDeviceOutputVolumeAuto"},
{8, D<&IAudioDevice::GetAudioDeviceOutputVolumeAuto>, "GetAudioDeviceOutputVolumeAuto"},
{10, D<&IAudioDevice::GetActiveAudioDeviceNameAuto>, "GetActiveAudioDeviceNameAuto"},
{11, D<&IAudioDevice::QueryAudioDeviceInputEvent>, "QueryAudioDeviceInputEvent"},
{12, D<&IAudioDevice::QueryAudioDeviceOutputEvent>, "QueryAudioDeviceOutputEvent"},
{13, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioOutputDeviceName"},
{14, D<&IAudioDevice::ListAudioOutputDeviceName>, "ListAudioOutputDeviceName"},
{15, nullptr, "AcquireAudioInputDeviceNotification"}, //17.0.0+
{16, nullptr, "ReleaseAudioInputDeviceNotification"}, //17.0.0+
{17, nullptr, "AcquireAudioOutputDeviceNotification"}, //17.0.0+
{18, nullptr, "ReleaseAudioOutputDeviceNotification"}, //17.0.0+
{19, D<&IAudioDevice::SetAudioDeviceOutputVolumeAutoTuneEnabled>, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+
{20, D<&IAudioDevice::IsAudioDeviceOutputVolumeAutoTuneEnabled>, "IsAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+
{21, nullptr, "IsActiveOutputDeviceEstimatedLowLatency"} //21.0.0+
FunctionInfo{0, D<&IAudioDevice::ListAudioDeviceName>, "ListAudioDeviceName"},
FunctionInfo{1, D<&IAudioDevice::SetAudioDeviceOutputVolume>, "SetAudioDeviceOutputVolume"},
FunctionInfo{2, D<&IAudioDevice::GetAudioDeviceOutputVolume>, "GetAudioDeviceOutputVolume"},
FunctionInfo{3, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioDeviceName"},
FunctionInfo{4, D<&IAudioDevice::QueryAudioDeviceSystemEvent>, "QueryAudioDeviceSystemEvent"},
FunctionInfo{5, D<&IAudioDevice::GetActiveChannelCount>, "GetActiveChannelCount"},
FunctionInfo{6, D<&IAudioDevice::ListAudioDeviceNameAuto>, "ListAudioDeviceNameAuto"},
FunctionInfo{7, D<&IAudioDevice::SetAudioDeviceOutputVolumeAuto>, "SetAudioDeviceOutputVolumeAuto"},
FunctionInfo{8, D<&IAudioDevice::GetAudioDeviceOutputVolumeAuto>, "GetAudioDeviceOutputVolumeAuto"},
FunctionInfo{10, D<&IAudioDevice::GetActiveAudioDeviceNameAuto>, "GetActiveAudioDeviceNameAuto"},
FunctionInfo{11, D<&IAudioDevice::QueryAudioDeviceInputEvent>, "QueryAudioDeviceInputEvent"},
FunctionInfo{12, D<&IAudioDevice::QueryAudioDeviceOutputEvent>, "QueryAudioDeviceOutputEvent"},
FunctionInfo{13, D<&IAudioDevice::GetActiveAudioDeviceName>, "GetActiveAudioOutputDeviceName"},
FunctionInfo{14, D<&IAudioDevice::ListAudioOutputDeviceName>, "ListAudioOutputDeviceName"},
FunctionInfo{15, nullptr, "AcquireAudioInputDeviceNotification"}, //17.0.0+
FunctionInfo{16, nullptr, "ReleaseAudioInputDeviceNotification"}, //17.0.0+
FunctionInfo{17, nullptr, "AcquireAudioOutputDeviceNotification"}, //17.0.0+
FunctionInfo{18, nullptr, "ReleaseAudioOutputDeviceNotification"}, //17.0.0+
FunctionInfo{19, D<&IAudioDevice::SetAudioDeviceOutputVolumeAutoTuneEnabled>, "SetAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+
FunctionInfo{20, D<&IAudioDevice::IsAudioDeviceOutputVolumeAutoTuneEnabled>, "IsAudioDeviceOutputVolumeAutoTuneEnabled"}, //18.0.0+
FunctionInfo{21, nullptr, "IsActiveOutputDeviceEstimatedLowLatency"} //21.0.0+
};
RegisterHandlers(functions);
+3 -26
View File
@@ -14,32 +14,9 @@ using namespace AudioCore::AudioIn;
IAudioIn::IAudioIn(Core::System& system_, Manager& manager, size_t session_id,
const std::string& device_name, const AudioInParameter& in_params,
Kernel::KProcess* handle, u64 applet_resource_user_id)
: ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"},
event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared<In>(system_,
manager, event,
session_id)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"},
{1, D<&IAudioIn::Start>, "Start"},
{2, D<&IAudioIn::Stop>, "Stop"},
{3, D<&IAudioIn::AppendAudioInBuffer>, "AppendAudioInBuffer"},
{4, D<&IAudioIn::RegisterBufferEvent>, "RegisterBufferEvent"},
{5, D<&IAudioIn::GetReleasedAudioInBuffers>, "GetReleasedAudioInBuffers"},
{6, D<&IAudioIn::ContainsAudioInBuffer>, "ContainsAudioInBuffer"},
{7, D<&IAudioIn::AppendAudioInBuffer>, "AppendUacInBuffer"},
{8, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendAudioInBufferAuto"},
{9, D<&IAudioIn::GetReleasedAudioInBuffersAuto>, "GetReleasedAudioInBuffersAuto"},
{10, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendUacInBufferAuto"},
{11, D<&IAudioIn::GetAudioInBufferCount>, "GetAudioInBufferCount"},
{12, D<&IAudioIn::SetDeviceGain>, "SetDeviceGain"},
{13, D<&IAudioIn::GetDeviceGain>, "GetDeviceGain"},
{14, D<&IAudioIn::FlushAudioInBuffers>, "FlushAudioInBuffers"},
};
// clang-format on
RegisterHandlers(functions);
: ServiceFramework{system_, "IAudioIn"}, process{handle}, service_context{system_, "IAudioIn"}
, event{service_context.CreateEvent("AudioInEvent")}, impl{std::make_shared<In>(system_, manager, event, session_id)}
{
process->Open(system.Kernel());
if (impl->GetSystem()
+20
View File
@@ -43,6 +43,26 @@ public:
Result FlushAudioInBuffers(Out<bool> out_flushed);
private:
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioIn::GetAudioInState>, "GetAudioInState"},
FunctionInfo{1, D<&IAudioIn::Start>, "Start"},
FunctionInfo{2, D<&IAudioIn::Stop>, "Stop"},
FunctionInfo{3, D<&IAudioIn::AppendAudioInBuffer>, "AppendAudioInBuffer"},
FunctionInfo{4, D<&IAudioIn::RegisterBufferEvent>, "RegisterBufferEvent"},
FunctionInfo{5, D<&IAudioIn::GetReleasedAudioInBuffers>, "GetReleasedAudioInBuffers"},
FunctionInfo{6, D<&IAudioIn::ContainsAudioInBuffer>, "ContainsAudioInBuffer"},
FunctionInfo{7, D<&IAudioIn::AppendAudioInBuffer>, "AppendUacInBuffer"},
FunctionInfo{8, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendAudioInBufferAuto"},
FunctionInfo{9, D<&IAudioIn::GetReleasedAudioInBuffersAuto>, "GetReleasedAudioInBuffersAuto"},
FunctionInfo{10, D<&IAudioIn::AppendAudioInBufferAuto>, "AppendUacInBufferAuto"},
FunctionInfo{11, D<&IAudioIn::GetAudioInBufferCount>, "GetAudioInBufferCount"},
FunctionInfo{12, D<&IAudioIn::SetDeviceGain>, "SetDeviceGain"},
FunctionInfo{13, D<&IAudioIn::GetDeviceGain>, "GetDeviceGain"},
FunctionInfo{14, D<&IAudioIn::FlushAudioInBuffers>, "FlushAudioInBuffers"}
);
Kernel::KProcess* process;
KernelHelpers::ServiceContext service_context;
Kernel::KEvent* event;
@@ -10,21 +10,9 @@ namespace Service::Audio {
using namespace AudioCore::AudioIn;
IAudioInManager::IAudioInManager(Core::System& system_)
: ServiceFramework{system_, "audin:u"}, impl{std::make_unique<AudioCore::AudioIn::Manager>(
system_)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"},
{1, D<&IAudioInManager::OpenAudioIn>, "OpenAudioIn"},
{2, D<&IAudioInManager::ListAudioIns>, "ListAudioInsAuto"},
{3, D<&IAudioInManager::OpenAudioIn>, "OpenAudioInAuto"},
{4, D<&IAudioInManager::ListAudioInsAutoFiltered>, "ListAudioInsAutoFiltered"},
{5, D<&IAudioInManager::OpenAudioInProtocolSpecified>, "OpenAudioInProtocolSpecified"},
};
// clang-format on
RegisterHandlers(functions);
}
: ServiceFramework{system_, "audin:u"}
, impl{std::make_unique<AudioCore::AudioIn::Manager>(system_)}
{}
IAudioInManager::~IAudioInManager() = default;
@@ -51,6 +51,17 @@ private:
AudioCore::AudioIn::AudioInParameter parameter,
InCopyHandle<Kernel::KProcess> process_handle, ClientAppletResourceUserId aruid);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioInManager::ListAudioIns>, "ListAudioIns"},
FunctionInfo{1, D<&IAudioInManager::OpenAudioIn>, "OpenAudioIn"},
FunctionInfo{2, D<&IAudioInManager::ListAudioIns>, "ListAudioInsAuto"},
FunctionInfo{3, D<&IAudioInManager::OpenAudioIn>, "OpenAudioInAuto"},
FunctionInfo{4, D<&IAudioInManager::ListAudioInsAutoFiltered>, "ListAudioInsAutoFiltered"},
FunctionInfo{5, D<&IAudioInManager::OpenAudioInProtocolSpecified>, "OpenAudioInProtocolSpecified"}
);
std::unique_ptr<AudioCore::AudioIn::Manager> impl;
};
+19 -18
View File
@@ -23,24 +23,25 @@ IAudioOut::IAudioOut(Core::System& system_, Manager& manager, size_t session_id,
impl{std::make_shared<AudioCore::AudioOut::Out>(system_, manager, event, session_id)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioOut::GetAudioOutState>, "GetAudioOutState"},
{1, D<&IAudioOut::Start>, "Start"},
{2, D<&IAudioOut::Stop>, "Stop"},
{3, D<&IAudioOut::AppendAudioOutBuffer>, "AppendAudioOutBuffer"},
{4, D<&IAudioOut::RegisterBufferEvent>, "RegisterBufferEvent"},
{5, D<&IAudioOut::GetReleasedAudioOutBuffers>, "GetReleasedAudioOutBuffers"},
{6, D<&IAudioOut::ContainsAudioOutBuffer>, "ContainsAudioOutBuffer"},
{7, D<&IAudioOut::AppendAudioOutBufferAuto>, "AppendAudioOutBufferAuto"},
{8, D<&IAudioOut::GetReleasedAudioOutBuffersAuto>, "GetReleasedAudioOutBuffersAuto"},
{9, D<&IAudioOut::GetAudioOutBufferCount>, "GetAudioOutBufferCount"},
{10, D<&IAudioOut::GetAudioOutPlayedSampleCount>, "GetAudioOutPlayedSampleCount"},
{11, D<&IAudioOut::FlushAudioOutBuffers>, "FlushAudioOutBuffers"},
{12, D<&IAudioOut::SetAudioOutVolume>, "SetAudioOutVolume"},
{13, D<&IAudioOut::GetAudioOutVolume>, "GetAudioOutVolume"},
};
// clang-format on
RegisterHandlers(functions);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioOut::GetAudioOutState>, "GetAudioOutState"},
FunctionInfo{1, D<&IAudioOut::Start>, "Start"},
FunctionInfo{2, D<&IAudioOut::Stop>, "Stop"},
FunctionInfo{3, D<&IAudioOut::AppendAudioOutBuffer>, "AppendAudioOutBuffer"},
FunctionInfo{4, D<&IAudioOut::RegisterBufferEvent>, "RegisterBufferEvent"},
FunctionInfo{5, D<&IAudioOut::GetReleasedAudioOutBuffers>, "GetReleasedAudioOutBuffers"},
FunctionInfo{6, D<&IAudioOut::ContainsAudioOutBuffer>, "ContainsAudioOutBuffer"},
FunctionInfo{7, D<&IAudioOut::AppendAudioOutBufferAuto>, "AppendAudioOutBufferAuto"},
FunctionInfo{8, D<&IAudioOut::GetReleasedAudioOutBuffersAuto>, "GetReleasedAudioOutBuffersAuto"},
FunctionInfo{9, D<&IAudioOut::GetAudioOutBufferCount>, "GetAudioOutBufferCount"},
FunctionInfo{10, D<&IAudioOut::GetAudioOutPlayedSampleCount>, "GetAudioOutPlayedSampleCount"},
FunctionInfo{11, D<&IAudioOut::FlushAudioOutBuffers>, "FlushAudioOutBuffers"},
FunctionInfo{12, D<&IAudioOut::SetAudioOutVolume>, "SetAudioOutVolume"},
FunctionInfo{13, D<&IAudioOut::GetAudioOutVolume>, "GetAudioOutVolume"}
);
process->Open(system.Kernel());
}
@@ -17,16 +17,6 @@ IAudioOutManager::IAudioOutManager(Core::System& system_)
: ServiceFramework{system_, "audout:u"}
, impl(system_)
{
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioOutManager::ListAudioOuts>, "ListAudioOuts"},
{1, D<&IAudioOutManager::OpenAudioOut>, "OpenAudioOut"},
{2, D<&IAudioOutManager::ListAudioOutsAuto>, "ListAudioOutsAuto"},
{3, D<&IAudioOutManager::OpenAudioOutAuto>, "OpenAudioOutAuto"},
};
// clang-format on
RegisterHandlers(functions);
}
IAudioOutManager::~IAudioOutManager() = default;
@@ -43,6 +43,15 @@ private:
AudioCore::AudioOut::AudioOutParameter parameter,
InCopyHandle<Kernel::KProcess> process_handle, ClientAppletResourceUserId aruid);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioOutManager::ListAudioOuts>, "ListAudioOuts"},
FunctionInfo{1, D<&IAudioOutManager::OpenAudioOut>, "OpenAudioOut"},
FunctionInfo{2, D<&IAudioOutManager::ListAudioOutsAuto>, "ListAudioOutsAuto"},
FunctionInfo{3, D<&IAudioOutManager::OpenAudioOutAuto>, "OpenAudioOutAuto"}
);
std::optional<AudioCore::AudioOut::Manager> impl;
};
+5 -26
View File
@@ -15,33 +15,12 @@ IAudioRenderer::IAudioRenderer(Core::System& system_, Manager& manager_,
Kernel::KTransferMemory* transfer_memory, u64 transfer_memory_size,
Kernel::KProcess* process_handle_, u64 applet_resource_user_id,
s32 session_id)
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"},
rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_},
impl{std::make_unique<Renderer>(system_, manager, rendered_event)}, process_handle{
process_handle_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},
{1, D<&IAudioRenderer::GetSampleCount>, "GetSampleCount"},
{2, D<&IAudioRenderer::GetMixBufferCount>, "GetMixBufferCount"},
{3, D<&IAudioRenderer::GetState>, "GetState"},
{4, D<&IAudioRenderer::RequestUpdate>, "RequestUpdate"},
{5, D<&IAudioRenderer::Start>, "Start"},
{6, D<&IAudioRenderer::Stop>, "Stop"},
{7, D<&IAudioRenderer::QuerySystemEvent>, "QuerySystemEvent"},
{8, D<&IAudioRenderer::SetRenderingTimeLimit>, "SetRenderingTimeLimit"},
{9, D<&IAudioRenderer::GetRenderingTimeLimit>, "GetRenderingTimeLimit"},
{10, D<&IAudioRenderer::RequestUpdateAuto>, "RequestUpdateAuto"}, //3.0.0+
{11, nullptr, "ExecuteAudioRendererRendering"}, //3.0.0+
{12, D<&IAudioRenderer::SetVoiceDropParameter>, "SetVoiceDropParameter"}, //15.0.0+
{13, D<&IAudioRenderer::GetVoiceDropParameter>, "GetVoiceDropParameter"}, //15.0.0+
};
// clang-format on
RegisterHandlers(functions);
: ServiceFramework{system_, "IAudioRenderer"}, service_context{system_, "IAudioRenderer"}
, rendered_event{service_context.CreateEvent("IAudioRendererEvent")}, manager{manager_}
, impl{std::make_unique<Renderer>(system_, manager, rendered_event)}
, process_handle{process_handle_} {
process_handle->Open(system_.Kernel());
impl->Initialize(params, transfer_memory, transfer_memory_size, process_handle,
applet_resource_user_id, session_id);
impl->Initialize(params, transfer_memory, transfer_memory_size, process_handle, applet_resource_user_id, session_id);
}
IAudioRenderer::~IAudioRenderer() {
@@ -42,6 +42,25 @@ private:
Result SetVoiceDropParameter(f32 voice_drop_parameter);
Result GetVoiceDropParameter(Out<f32> out_voice_drop_parameter);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioRenderer::GetSampleRate>, "GetSampleRate"},
FunctionInfo{1, D<&IAudioRenderer::GetSampleCount>, "GetSampleCount"},
FunctionInfo{2, D<&IAudioRenderer::GetMixBufferCount>, "GetMixBufferCount"},
FunctionInfo{3, D<&IAudioRenderer::GetState>, "GetState"},
FunctionInfo{4, D<&IAudioRenderer::RequestUpdate>, "RequestUpdate"},
FunctionInfo{5, D<&IAudioRenderer::Start>, "Start"},
FunctionInfo{6, D<&IAudioRenderer::Stop>, "Stop"},
FunctionInfo{7, D<&IAudioRenderer::QuerySystemEvent>, "QuerySystemEvent"},
FunctionInfo{8, D<&IAudioRenderer::SetRenderingTimeLimit>, "SetRenderingTimeLimit"},
FunctionInfo{9, D<&IAudioRenderer::GetRenderingTimeLimit>, "GetRenderingTimeLimit"},
FunctionInfo{10, D<&IAudioRenderer::RequestUpdateAuto>, "RequestUpdateAuto"}, //3.0.0+
FunctionInfo{11, nullptr, "ExecuteAudioRendererRendering"}, //3.0.0+
FunctionInfo{12, D<&IAudioRenderer::SetVoiceDropParameter>, "SetVoiceDropParameter"}, //15.0.0+
FunctionInfo{13, D<&IAudioRenderer::GetVoiceDropParameter>, "GetVoiceDropParameter"}, //15.0.0+
);
KernelHelpers::ServiceContext service_context;
Kernel::KEvent* rendered_event;
AudioCore::Renderer::Manager& manager;
@@ -22,17 +22,6 @@ IAudioRendererManager::IAudioRendererManager(Core::System& system_)
: ServiceFramework{system_, "audren:u"}
, impl(system_)
{
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IAudioRendererManager::OpenAudioRenderer>, "OpenAudioRenderer"},
{1, D<&IAudioRendererManager::GetWorkBufferSize>, "GetWorkBufferSize"},
{2, D<&IAudioRendererManager::GetAudioDeviceService>, "GetAudioDeviceService"},
{3, nullptr, "OpenAudioRendererForManualExecution"},
{4, D<&IAudioRendererManager::GetAudioDeviceServiceWithRevisionInfo>, "GetAudioDeviceServiceWithRevisionInfo"},
};
// clang-format on
RegisterHandlers(functions);
}
IAudioRendererManager::~IAudioRendererManager() = default;
@@ -33,6 +33,16 @@ private:
Result GetAudioDeviceServiceWithRevisionInfo(Out<SharedPointer<IAudioDevice>> out_audio_device,
u32 revision, ClientAppletResourceUserId aruid);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IAudioRendererManager::OpenAudioRenderer>, "OpenAudioRenderer"},
FunctionInfo{1, D<&IAudioRendererManager::GetWorkBufferSize>, "GetWorkBufferSize"},
FunctionInfo{2, D<&IAudioRendererManager::GetAudioDeviceService>, "GetAudioDeviceService"},
FunctionInfo{3, nullptr, "OpenAudioRendererForManualExecution"},
FunctionInfo{4, D<&IAudioRendererManager::GetAudioDeviceServiceWithRevisionInfo>, "GetAudioDeviceServiceWithRevisionInfo"}
);
std::optional<AudioCore::Renderer::Manager> impl;
u32 num_audio_devices{0};
};
@@ -20,7 +20,7 @@ public:
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, nullptr, "OpenFinalOutputRecorder"}
FunctionInfo{0, nullptr, "OpenFinalOutputRecorder"}
);
};
@@ -7,14 +7,6 @@ namespace Service::Audio {
IFinalOutputRecorderManagerForApplet::IFinalOutputRecorderManagerForApplet(Core::System& system_)
: ServiceFramework{system_, "audrec:a"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "RequestSuspend"},
{1, nullptr, "RequestResume"},
};
// clang-format on
RegisterHandlers(functions);
}
IFinalOutputRecorderManagerForApplet::~IFinalOutputRecorderManagerForApplet() = default;
@@ -16,6 +16,14 @@ class IFinalOutputRecorderManagerForApplet final
public:
explicit IFinalOutputRecorderManagerForApplet(Core::System& system_);
~IFinalOutputRecorderManagerForApplet() override;
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "RequestSuspend"},
FunctionInfo{1, nullptr, "RequestResume"}
);
};
} // namespace Service::Audio
@@ -11,22 +11,6 @@ using namespace AudioCore::OpusDecoder;
IHardwareOpusDecoder::IHardwareOpusDecoder(Core::System& system_, HardwareOpus& hardware_opus)
: ServiceFramework{system_, "IHardwareOpusDecoder"},
impl{std::make_unique<AudioCore::OpusDecoder::OpusDecoder>(system_, hardware_opus)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IHardwareOpusDecoder::DecodeInterleavedOld>, "DecodeInterleavedOld"},
{1, D<&IHardwareOpusDecoder::SetContext>, "SetContext"},
{2, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamOld>, "DecodeInterleavedForMultiStreamOld"},
{3, D<&IHardwareOpusDecoder::SetContextForMultiStream>, "SetContextForMultiStream"},
{4, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfOld>, "DecodeInterleavedWithPerfOld"},
{5, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfOld>, "DecodeInterleavedForMultiStreamWithPerfOld"},
{6, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfAndResetOld>, "DecodeInterleavedWithPerfAndResetOld"},
{7, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfAndResetOld>, "DecodeInterleavedForMultiStreamWithPerfAndResetOld"},
{8, D<&IHardwareOpusDecoder::DecodeInterleaved>, "DecodeInterleaved"},
{9, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStream>, "DecodeInterleavedForMultiStream"},
};
// clang-format on
RegisterHandlers(functions);
}
IHardwareOpusDecoder::~IHardwareOpusDecoder() = default;
@@ -56,6 +56,21 @@ private:
InBuffer<BufferAttr_HipcMapAlias | BufferAttr_HipcMapTransferAllowsNonSecure> opus_data,
bool reset);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IHardwareOpusDecoder::DecodeInterleavedOld>, "DecodeInterleavedOld"},
FunctionInfo{1, D<&IHardwareOpusDecoder::SetContext>, "SetContext"},
FunctionInfo{2, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamOld>, "DecodeInterleavedForMultiStreamOld"},
FunctionInfo{3, D<&IHardwareOpusDecoder::SetContextForMultiStream>, "SetContextForMultiStream"},
FunctionInfo{4, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfOld>, "DecodeInterleavedWithPerfOld"},
FunctionInfo{5, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfOld>, "DecodeInterleavedForMultiStreamWithPerfOld"},
FunctionInfo{6, D<&IHardwareOpusDecoder::DecodeInterleavedWithPerfAndResetOld>, "DecodeInterleavedWithPerfAndResetOld"},
FunctionInfo{7, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStreamWithPerfAndResetOld>, "DecodeInterleavedForMultiStreamWithPerfAndResetOld"},
FunctionInfo{8, D<&IHardwareOpusDecoder::DecodeInterleaved>, "DecodeInterleaved"},
FunctionInfo{9, D<&IHardwareOpusDecoder::DecodeInterleavedForMultiStream>, "DecodeInterleavedForMultiStream"}
);
std::unique_ptr<AudioCore::OpusDecoder::OpusDecoder> impl;
Common::ScratchBuffer<u8> output_data;
};
@@ -11,21 +11,6 @@ using namespace AudioCore::OpusDecoder;
IHardwareOpusDecoderManager::IHardwareOpusDecoderManager(Core::System& system_)
: ServiceFramework{system_, "hwopus"}, system{system_}, impl{system} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoder>, "OpenHardwareOpusDecoder"},
{1, D<&IHardwareOpusDecoderManager::GetWorkBufferSize>, "GetWorkBufferSize"},
{2, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStream>, "OpenOpusDecoderForMultiStream"},
{3, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStream>, "GetWorkBufferSizeForMultiStream"},
{4, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderEx>, "OpenHardwareOpusDecoderEx"},
{5, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeEx>, "GetWorkBufferSizeEx"},
{6, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStreamEx>, "OpenHardwareOpusDecoderForMultiStreamEx"},
{7, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamEx>, "GetWorkBufferSizeForMultiStreamEx"},
{8, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeExEx>, "GetWorkBufferSizeExEx"},
{9, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamExEx>, "GetWorkBufferSizeForMultiStreamExEx"},
};
// clang-format on
RegisterHandlers(functions);
}
IHardwareOpusDecoderManager::~IHardwareOpusDecoderManager() = default;
@@ -46,6 +46,21 @@ private:
Result GetWorkBufferSizeForMultiStreamExEx(
Out<u32> out_size, InLargeData<OpusMultiStreamParametersEx, BufferAttr_HipcPointer> params);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoder>, "OpenHardwareOpusDecoder"},
FunctionInfo{1, D<&IHardwareOpusDecoderManager::GetWorkBufferSize>, "GetWorkBufferSize"},
FunctionInfo{2, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStream>, "OpenOpusDecoderForMultiStream"},
FunctionInfo{3, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStream>, "GetWorkBufferSizeForMultiStream"},
FunctionInfo{4, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderEx>, "OpenHardwareOpusDecoderEx"},
FunctionInfo{5, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeEx>, "GetWorkBufferSizeEx"},
FunctionInfo{6, D<&IHardwareOpusDecoderManager::OpenHardwareOpusDecoderForMultiStreamEx>, "OpenHardwareOpusDecoderForMultiStreamEx"},
FunctionInfo{7, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamEx>, "GetWorkBufferSizeForMultiStreamEx"},
FunctionInfo{8, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeExEx>, "GetWorkBufferSizeExEx"},
FunctionInfo{9, D<&IHardwareOpusDecoderManager::GetWorkBufferSizeForMultiStreamExEx>, "GetWorkBufferSizeForMultiStreamExEx"}
);
Core::System& system;
AudioCore::OpusDecoder::OpusDecoderManager impl;
};
@@ -30,15 +30,6 @@ static BcatDigest DigestFile(const FileSys::VirtualFile& file) {
IDeliveryCacheDirectoryService::IDeliveryCacheDirectoryService(Core::System& system_,
FileSys::VirtualDir root_)
: ServiceFramework{system_, "IDeliveryCacheDirectoryService"}, root(std::move(root_)) {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IDeliveryCacheDirectoryService::Open>, "Open"},
{1, D<&IDeliveryCacheDirectoryService::Read>, "Read"},
{2, D<&IDeliveryCacheDirectoryService::GetCount>, "GetCount"},
};
// clang-format on
RegisterHandlers(functions);
}
IDeliveryCacheDirectoryService::~IDeliveryCacheDirectoryService() = default;
@@ -26,6 +26,14 @@ private:
OutArray<DeliveryCacheDirectoryEntry, BufferAttr_HipcMapAlias> out_buffer);
Result GetCount(Out<s32> out_count);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IDeliveryCacheDirectoryService::Open>, "Open"},
FunctionInfo{1, D<&IDeliveryCacheDirectoryService::Read>, "Read"},
FunctionInfo{2, D<&IDeliveryCacheDirectoryService::GetCount>, "GetCount"}
);
FileSys::VirtualDir root;
FileSys::VirtualDir current_dir;
};
@@ -12,16 +12,6 @@ namespace Service::BCAT {
IDeliveryCacheFileService::IDeliveryCacheFileService(Core::System& system_,
FileSys::VirtualDir root_)
: ServiceFramework{system_, "IDeliveryCacheFileService"}, root(std::move(root_)) {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IDeliveryCacheFileService::Open>, "Open"},
{1, D<&IDeliveryCacheFileService::Read>, "Read"},
{2, D<&IDeliveryCacheFileService::GetSize>, "GetSize"},
{3, D<&IDeliveryCacheFileService::GetDigest>, "GetDigest"},
};
// clang-format on
RegisterHandlers(functions);
}
IDeliveryCacheFileService::~IDeliveryCacheFileService() = default;
@@ -26,6 +26,15 @@ private:
Result GetSize(Out<u64> out_size);
Result GetDigest(Out<BcatDigest> out_digest);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IDeliveryCacheFileService::Open>, "Open"},
FunctionInfo{1, D<&IDeliveryCacheFileService::Read>, "Read"},
FunctionInfo{2, D<&IDeliveryCacheFileService::GetSize>, "GetSize"},
FunctionInfo{3, D<&IDeliveryCacheFileService::GetDigest>, "GetDigest"}
);
FileSys::VirtualDir root;
FileSys::VirtualFile current_file;
};
@@ -11,14 +11,6 @@ IDeliveryCacheProgressService::IDeliveryCacheProgressService(Core::System& syste
Kernel::KReadableEvent& event_,
const DeliveryCacheProgressImpl& impl_)
: ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{event_}, impl{impl_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IDeliveryCacheProgressService::GetEvent>, "Get"},
{1, D<&IDeliveryCacheProgressService::GetImpl>, "Get"},
};
// clang-format on
RegisterHandlers(functions);
}
IDeliveryCacheProgressService::~IDeliveryCacheProgressService() = default;
@@ -28,6 +28,13 @@ private:
Result GetEvent(OutCopyHandle<Kernel::KReadableEvent> out_event);
Result GetImpl(OutLargeData<DeliveryCacheProgressImpl, BufferAttr_HipcPointer> out_impl);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IDeliveryCacheProgressService::GetEvent>, "Get"},
FunctionInfo{1, D<&IDeliveryCacheProgressService::GetImpl>, "Get"}
);
Kernel::KReadableEvent& event;
const DeliveryCacheProgressImpl& impl;
};
@@ -15,15 +15,6 @@ namespace Service::BCAT {
IDeliveryCacheStorageService::IDeliveryCacheStorageService(Core::System& system_,
FileSys::VirtualDir root_)
: ServiceFramework{system_, "IDeliveryCacheStorageService"}, root(std::move(root_)) {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IDeliveryCacheStorageService::CreateFileService>, "CreateFileService"},
{1, D<&IDeliveryCacheStorageService::CreateDirectoryService>, "CreateDirectoryService"},
{10, D<&IDeliveryCacheStorageService::EnumerateDeliveryCacheDirectory>, "EnumerateDeliveryCacheDirectory"},
};
// clang-format on
RegisterHandlers(functions);
}
IDeliveryCacheStorageService::~IDeliveryCacheStorageService() = default;
@@ -28,6 +28,14 @@ private:
Out<s32> out_directory_count,
OutArray<DirectoryName, BufferAttr_HipcMapAlias> out_directories);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IDeliveryCacheStorageService::CreateFileService>, "CreateFileService"},
FunctionInfo{1, D<&IDeliveryCacheStorageService::CreateDirectoryService>, "CreateDirectoryService"},
FunctionInfo{10, D<&IDeliveryCacheStorageService::EnumerateDeliveryCacheDirectory>, "EnumerateDeliveryCacheDirectory"}
);
FileSys::VirtualDir root;
std::vector<DirectoryName> entries;
std::size_t next_read_index = 0;
@@ -7,16 +7,8 @@
namespace Service::News {
INewlyArrivedEventHolder::INewlyArrivedEventHolder(Core::System& system_)
: ServiceFramework{system_, "INewlyArrivedEventHolder"}, service_context{
system_,
"INewlyArrivedEventHolder"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&INewlyArrivedEventHolder::Get>, "Get"},
};
// clang-format on
RegisterHandlers(functions);
: ServiceFramework{system_, "INewlyArrivedEventHolder"}
, service_context{system_, "INewlyArrivedEventHolder"} {
arrived_event = service_context.CreateEvent("INewlyArrivedEventHolder::ArrivedEvent");
}
@@ -26,6 +26,12 @@ public:
private:
Result Get(OutCopyHandle<Kernel::KReadableEvent> out_event);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&INewlyArrivedEventHolder::Get>, "Get"}
);
Kernel::KEvent* arrived_event;
KernelHelpers::ServiceContext service_context;
};
@@ -35,11 +35,11 @@ private:
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&INewsDataService::Open>, "Open"},
{1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"},
{2, D<&INewsDataService::Read>, "Read"},
{3, D<&INewsDataService::GetSize>, "GetSize"},
{1001, D<&INewsDataService::OpenWithNewsRecord>, "OpenWithNewsRecord"}
FunctionInfo{0, D<&INewsDataService::Open>, "Open"},
FunctionInfo{1, D<&INewsDataService::OpenWithNewsRecordV1>, "OpenWithNewsRecordV1"},
FunctionInfo{2, D<&INewsDataService::Read>, "Read"},
FunctionInfo{3, D<&INewsDataService::GetSize>, "GetSize"},
FunctionInfo{1001, D<&INewsDataService::OpenWithNewsRecord>, "OpenWithNewsRecord"}
);
std::vector<u8> opened_payload;
};
@@ -54,13 +54,13 @@ private:
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
{0, D<&INewsDatabaseService::GetListV1>, "GetListV1"},
{1, D<&INewsDatabaseService::Count>, "Count"},
{2, D<&INewsDatabaseService::CountWithKey>, "CountWithKey"},
{3, D<&INewsDatabaseService::UpdateIntegerValue>, "UpdateIntegerValue"},
{4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"},
{5, D<&INewsDatabaseService::UpdateStringValue>, "UpdateStringValue"},
{1000, D<&INewsDatabaseService::GetList>, "GetList"}
FunctionInfo{0, D<&INewsDatabaseService::GetListV1>, "GetListV1"},
FunctionInfo{1, D<&INewsDatabaseService::Count>, "Count"},
FunctionInfo{2, D<&INewsDatabaseService::CountWithKey>, "CountWithKey"},
FunctionInfo{3, D<&INewsDatabaseService::UpdateIntegerValue>, "UpdateIntegerValue"},
FunctionInfo{4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"},
FunctionInfo{5, D<&INewsDatabaseService::UpdateStringValue>, "UpdateStringValue"},
FunctionInfo{1000, D<&INewsDatabaseService::GetList>, "GetList"}
);
};
+19 -19
View File
@@ -15,25 +15,25 @@ namespace Service::News {
INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "INewsService"} {
// clang-format off
static const FunctionInfo functions[] = {
{10100, D<&INewsService::PostLocalNews>, "PostLocalNews"},
{20100, D<&INewsService::SetPassphrase>, "SetPassphrase"},
{30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},
{30101, D<&INewsService::GetTopicList>, "GetTopicList"}, //3.0.0+
{30110, D<&INewsService::GetTopicList>, "Unknown30110"}, //6.0.0+ (stub)
{30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"},
{30201, D<&INewsService::IsSystemUpdateRequired>, "Unknown30201"}, //8.0.0+ (stub)
{30210, D<&INewsService::IsSystemUpdateRequired>, "Unknown30210"}, //10.0.0+ (stub)
{30300, nullptr, "RequestImmediateReception"},
{30400, nullptr, "DecodeArchiveFile"}, //3.0.0-18.1.0 (stub)
{30500, nullptr, "Unknown30500"}, //8.0.0+ (stub)
{30900, nullptr, "Unknown30900"}, //1.0.0 (stub)
{30901, nullptr, "Unknown30901"}, //1.0.0 (stub)
{30902, nullptr, "Unknown30902"}, //1.0.0 (stub)
{40100, nullptr, "SetSubscriptionStatus"},
{40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"}, //3.0.0+
{40200, D<&INewsService::ClearStorage>, "ClearStorage"},
{40201, D<&INewsService::ClearSubscriptionStatusAll>, "ClearSubscriptionStatusAll"},
{90100, D<&INewsService::GetNewsDatabaseDump>, "GetNewsDatabaseDump"},
FunctionInfo{10100, D<&INewsService::PostLocalNews>, "PostLocalNews"},
FunctionInfo{20100, D<&INewsService::SetPassphrase>, "SetPassphrase"},
FunctionInfo{30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},
FunctionInfo{30101, D<&INewsService::GetTopicList>, "GetTopicList"}, //3.0.0+
FunctionInfo{30110, D<&INewsService::GetTopicList>, "Unknown30110"}, //6.0.0+ (stub)
FunctionInfo{30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"},
FunctionInfo{30201, D<&INewsService::IsSystemUpdateRequired>, "Unknown30201"}, //8.0.0+ (stub)
FunctionInfo{30210, D<&INewsService::IsSystemUpdateRequired>, "Unknown30210"}, //10.0.0+ (stub)
FunctionInfo{30300, nullptr, "RequestImmediateReception"},
FunctionInfo{30400, nullptr, "DecodeArchiveFile"}, //3.0.0-18.1.0 (stub)
FunctionInfo{30500, nullptr, "Unknown30500"}, //8.0.0+ (stub)
FunctionInfo{30900, nullptr, "Unknown30900"}, //1.0.0 (stub)
FunctionInfo{30901, nullptr, "Unknown30901"}, //1.0.0 (stub)
FunctionInfo{30902, nullptr, "Unknown30902"}, //1.0.0 (stub)
FunctionInfo{40100, nullptr, "SetSubscriptionStatus"},
FunctionInfo{40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"}, //3.0.0+
FunctionInfo{40200, D<&INewsService::ClearStorage>, "ClearStorage"},
FunctionInfo{40201, D<&INewsService::ClearSubscriptionStatusAll>, "ClearSubscriptionStatusAll"},
FunctionInfo{90100, D<&INewsService::GetNewsDatabaseDump>, "GetNewsDatabaseDump"},
};
// clang-format on
@@ -7,15 +7,8 @@
namespace Service::News {
IOverwriteEventHolder::IOverwriteEventHolder(Core::System& system_)
: ServiceFramework{system_, "IOverwriteEventHolder"}, service_context{system_,
"IOverwriteEventHolder"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IOverwriteEventHolder::Get>, "Get"},
};
// clang-format on
RegisterHandlers(functions);
: ServiceFramework{system_, "IOverwriteEventHolder"}
, service_context{system_, "IOverwriteEventHolder"} {
overwrite_event = service_context.CreateEvent("IOverwriteEventHolder::OverwriteEvent");
}
@@ -26,6 +26,12 @@ public:
private:
Result Get(OutCopyHandle<Kernel::KReadableEvent> out_event);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IOverwriteEventHolder::Get>, "Get"}
);
Kernel::KEvent* overwrite_event;
KernelHelpers::ServiceContext service_context;
};
@@ -13,17 +13,6 @@ namespace Service::News {
IServiceCreator::IServiceCreator(Core::System& system_, u32 permissions_, const char* name_)
: ServiceFramework{system_, name_}, permissions{permissions_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IServiceCreator::CreateNewsService>, "CreateNewsService"},
{1, D<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"},
{2, D<&IServiceCreator::CreateNewsDataService>, "CreateNewsDataService"},
{3, D<&IServiceCreator::CreateNewsDatabaseService>, "CreateNewsDatabaseService"},
{4, D<&IServiceCreator::CreateOverwriteEventHolder>, "CreateOverwriteEventHolder"},
};
// clang-format on
RegisterHandlers(functions);
}
IServiceCreator::~IServiceCreator() = default;
@@ -29,6 +29,16 @@ private:
Result CreateNewsDatabaseService(OutInterface<INewsDatabaseService> out_interface);
Result CreateOverwriteEventHolder(OutInterface<IOverwriteEventHolder> out_interface);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IServiceCreator::CreateNewsService>, "CreateNewsService"},
FunctionInfo{1, D<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"},
FunctionInfo{2, D<&IServiceCreator::CreateNewsDataService>, "CreateNewsDataService"},
FunctionInfo{3, D<&IServiceCreator::CreateNewsDatabaseService>, "CreateNewsDatabaseService"},
FunctionInfo{4, D<&IServiceCreator::CreateOverwriteEventHolder>, "CreateOverwriteEventHolder"}
);
u32 permissions;
};
+1 -14
View File
@@ -20,20 +20,7 @@ std::unique_ptr<BcatBackend> CreateBackendFromSettings([[maybe_unused]] Core::Sy
IServiceCreator::IServiceCreator(Core::System& system_, const char* name_)
: ServiceFramework{system_, name_}, fsc{system.GetFileSystemController()} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IServiceCreator::CreateBcatService>, "CreateBcatService"},
{1, D<&IServiceCreator::CreateDeliveryCacheStorageService>, "CreateDeliveryCacheStorageService"},
{2, D<&IServiceCreator::CreateDeliveryCacheStorageServiceWithApplicationId>, "CreateDeliveryCacheStorageServiceWithApplicationId"},
{3, nullptr, "CreateDeliveryCacheProgressService"},
{4, nullptr, "CreateDeliveryCacheProgressServiceWithApplicationId"},
};
// clang-format on
RegisterHandlers(functions);
backend =
CreateBackendFromSettings(system_, [this](u64 tid) { return fsc.GetBCATDirectory(tid); });
backend = CreateBackendFromSettings(system_, [this](u64 tid) { return fsc.GetBCATDirectory(tid); });
}
IServiceCreator::~IServiceCreator() = default;
@@ -33,6 +33,16 @@ private:
Result CreateDeliveryCacheStorageServiceWithApplicationId(
u64 application_id, OutInterface<IDeliveryCacheStorageService> out_interface);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, D<&IServiceCreator::CreateBcatService>, "CreateBcatService"},
FunctionInfo{1, D<&IServiceCreator::CreateDeliveryCacheStorageService>, "CreateDeliveryCacheStorageService"},
FunctionInfo{2, D<&IServiceCreator::CreateDeliveryCacheStorageServiceWithApplicationId>, "CreateDeliveryCacheStorageServiceWithApplicationId"},
FunctionInfo{3, nullptr, "CreateDeliveryCacheProgressService"},
FunctionInfo{4, nullptr, "CreateDeliveryCacheProgressServiceWithApplicationId"}
);
std::unique_ptr<BcatBackend> backend;
Service::FileSystem::FileSystemController& fsc;
};
-24
View File
@@ -9,30 +9,6 @@
namespace Service::BTM {
IBtmDebug::IBtmDebug(Core::System& system_) : ServiceFramework{system_, "btm:dbg"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "AcquireDiscoveryEvent"},
{1, nullptr, "StartDiscovery"},
{2, nullptr, "CancelDiscovery"},
{3, nullptr, "GetDeviceProperty"},
{4, nullptr, "CreateBond"},
{5, nullptr, "CancelBond"},
{6, nullptr, "SetTsiMode"},
{7, nullptr, "GeneralTest"},
{8, nullptr, "HidConnect"},
{9, nullptr, "GeneralGet"}, //5.0.0+
{10, nullptr, "GetGattClientDisconnectionReason"}, //5.0.0+
{11, nullptr, "GetBleConnectionParameter"}, //5.1.0+
{12, nullptr, "GetBleConnectionParameterRequest"}, //5.1.0+
{13, nullptr, "GetDiscoveredDevice"}, //12.0.0+
{14, nullptr, "SleepAwakeLoopTest"}, //15.0.0+
{15, nullptr, "SleepTest"}, //15.0.0+
{16, nullptr, "MinimumAwakeTest"}, //15.0.0+
{17, nullptr, "ForceEnableBtm"}, //15.0.0+
};
// clang-format on
RegisterHandlers(functions);
}
IBtmDebug::~IBtmDebug() = default;
+24
View File
@@ -16,6 +16,30 @@ class IBtmDebug final : public ServiceFramework<IBtmDebug> {
public:
explicit IBtmDebug(Core::System& system_);
~IBtmDebug() override;
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, nullptr, "AcquireDiscoveryEvent"},
FunctionInfo{1, nullptr, "StartDiscovery"},
FunctionInfo{2, nullptr, "CancelDiscovery"},
FunctionInfo{3, nullptr, "GetDeviceProperty"},
FunctionInfo{4, nullptr, "CreateBond"},
FunctionInfo{5, nullptr, "CancelBond"},
FunctionInfo{6, nullptr, "SetTsiMode"},
FunctionInfo{7, nullptr, "GeneralTest"},
FunctionInfo{8, nullptr, "HidConnect"},
FunctionInfo{9, nullptr, "GeneralGet"}, //5.0.0+
FunctionInfo{10, nullptr, "GetGattClientDisconnectionReason"}, //5.0.0+
FunctionInfo{11, nullptr, "GetBleConnectionParameter"}, //5.1.0+
FunctionInfo{12, nullptr, "GetBleConnectionParameterRequest"}, //5.1.0+
FunctionInfo{13, nullptr, "GetDiscoveredDevice"}, //12.0.0+
FunctionInfo{14, nullptr, "SleepAwakeLoopTest"}, //15.0.0+
FunctionInfo{15, nullptr, "SleepTest"}, //15.0.0+
FunctionInfo{16, nullptr, "MinimumAwakeTest"}, //15.0.0+
FunctionInfo{17, nullptr, "ForceEnableBtm"}, //15.0.0+
);
};
} // namespace Service::BTM
-7
View File
@@ -13,13 +13,6 @@
namespace Service::BTM {
IBtmSystem::IBtmSystem(Core::System& system_) : ServiceFramework{system_, "btm:sys"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, C<&IBtmSystem::GetCore>, "GetCore"},
};
// clang-format on
RegisterHandlers(functions);
}
IBtmSystem::~IBtmSystem() = default;
+7
View File
@@ -20,6 +20,13 @@ public:
private:
Result GetCore(OutInterface<IBtmSystemCore> out_interface);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, C<&IBtmSystem::GetCore>, "GetCore"}
);
};
} // namespace Service::BTM
+2 -35
View File
@@ -14,42 +14,9 @@ namespace Service::BTM {
IBtmSystemCore::IBtmSystemCore(Core::System& system_)
: ServiceFramework{system_, "IBtmSystemCore"}, service_context{system_, "IBtmSystemCore"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, C<&IBtmSystemCore::StartGamepadPairing>, "StartGamepadPairing"},
{1, C<&IBtmSystemCore::CancelGamepadPairing>, "CancelGamepadPairing"},
{2, nullptr, "ClearGamepadPairingDatabase"},
{3, nullptr, "GetPairedGamepadCount"},
{4, C<&IBtmSystemCore::EnableRadio>, "EnableRadio"},
{5, C<&IBtmSystemCore::DisableRadio>, "DisableRadio"},
{6, C<&IBtmSystemCore::IsRadioEnabled>, "IsRadioEnabled"},
{7, C<&IBtmSystemCore::AcquireRadioEvent>, "AcquireRadioEvent"},
{8, nullptr, "AcquireGamepadPairingEvent"},
{9, nullptr, "IsGamepadPairingStarted"},
{10, nullptr, "StartAudioDeviceDiscovery"},
{11, nullptr, "StopAudioDeviceDiscovery"},
{12, nullptr, "IsDiscoveryingAudioDevice"},
{13, C<&IBtmSystemCore::GetDiscoveredAudioDevice>, "GetDiscoveredAudioDevice"},
{14, C<&IBtmSystemCore::AcquireAudioDeviceConnectionEvent>, "AcquireAudioDeviceConnectionEvent"},
{15, nullptr, "ConnectAudioDevice"},
{16, nullptr, "IsConnectingAudioDevice"},
{17, C<&IBtmSystemCore::GetConnectedAudioDevices>, "GetConnectedAudioDevices"},
{18, nullptr, "DisconnectAudioDevice"},
{19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"},
{20, C<&IBtmSystemCore::GetPairedAudioDevices>, "GetPairedAudioDevices"},
{21, nullptr, "RemoveAudioDevicePairing"},
{22, C<&IBtmSystemCore::RequestAudioDeviceConnectionRejection>, "RequestAudioDeviceConnectionRejection"},
{23, C<&IBtmSystemCore::CancelAudioDeviceConnectionRejection>, "CancelAudioDeviceConnectionRejection"}
};
// clang-format on
RegisterHandlers(functions);
radio_event = service_context.CreateEvent("IBtmSystemCore::RadioEvent");
audio_device_connection_event =
service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent");
m_set_sys =
system.ServiceManager().GetService<Service::Set::ISystemSettingsServer>("set:sys", true);
audio_device_connection_event = service_context.CreateEvent("IBtmSystemCore::AudioDeviceConnectionEvent");
m_set_sys = system.ServiceManager().GetService<Service::Set::ISystemSettingsServer>("set:sys", true);
}
IBtmSystemCore::~IBtmSystemCore() {
+29 -1
View File
@@ -52,8 +52,36 @@ private:
Result RequestAudioDeviceConnectionRejection(ClientAppletResourceUserId aruid);
Result CancelAudioDeviceConnectionRejection(ClientAppletResourceUserId aruid);
FunctionInfoBase const* FindRequest(u32 key) override {
return HandlerTableGenerateWithFind(key, functions);
}
static constexpr auto functions = CreateStaticMap(
FunctionInfo{0, C<&IBtmSystemCore::StartGamepadPairing>, "StartGamepadPairing"},
FunctionInfo{1, C<&IBtmSystemCore::CancelGamepadPairing>, "CancelGamepadPairing"},
FunctionInfo{2, nullptr, "ClearGamepadPairingDatabase"},
FunctionInfo{3, nullptr, "GetPairedGamepadCount"},
FunctionInfo{4, C<&IBtmSystemCore::EnableRadio>, "EnableRadio"},
FunctionInfo{5, C<&IBtmSystemCore::DisableRadio>, "DisableRadio"},
FunctionInfo{6, C<&IBtmSystemCore::IsRadioEnabled>, "IsRadioEnabled"},
FunctionInfo{7, C<&IBtmSystemCore::AcquireRadioEvent>, "AcquireRadioEvent"},
FunctionInfo{8, nullptr, "AcquireGamepadPairingEvent"},
FunctionInfo{9, nullptr, "IsGamepadPairingStarted"},
FunctionInfo{10, nullptr, "StartAudioDeviceDiscovery"},
FunctionInfo{11, nullptr, "StopAudioDeviceDiscovery"},
FunctionInfo{12, nullptr, "IsDiscoveryingAudioDevice"},
FunctionInfo{13, C<&IBtmSystemCore::GetDiscoveredAudioDevice>, "GetDiscoveredAudioDevice"},
FunctionInfo{14, C<&IBtmSystemCore::AcquireAudioDeviceConnectionEvent>, "AcquireAudioDeviceConnectionEvent"},
FunctionInfo{15, nullptr, "ConnectAudioDevice"},
FunctionInfo{16, nullptr, "IsConnectingAudioDevice"},
FunctionInfo{17, C<&IBtmSystemCore::GetConnectedAudioDevices>, "GetConnectedAudioDevices"},
FunctionInfo{18, nullptr, "DisconnectAudioDevice"},
FunctionInfo{19, nullptr, "AcquirePairedAudioDeviceInfoChangedEvent"},
FunctionInfo{20, C<&IBtmSystemCore::GetPairedAudioDevices>, "GetPairedAudioDevices"},
FunctionInfo{21, nullptr, "RemoveAudioDevicePairing"},
FunctionInfo{22, C<&IBtmSystemCore::RequestAudioDeviceConnectionRejection>, "RequestAudioDeviceConnectionRejection"},
FunctionInfo{23, C<&IBtmSystemCore::CancelAudioDeviceConnectionRejection>, "CancelAudioDeviceConnectionRejection"}
);
KernelHelpers::ServiceContext service_context;
Kernel::KEvent* radio_event;
Kernel::KEvent* audio_device_connection_event;
std::shared_ptr<Service::Set::ISystemSettingsServer> m_set_sys;

Some files were not shown because too many files have changed in this diff Show More