From 27769620674cd4368c5e035a602802288ce81a27 Mon Sep 17 00:00:00 2001 From: Zephyron Date: Tue, 1 Jul 2025 17:54:07 +1000 Subject: [PATCH] core/hle: Implement all missing AM (Applet Manager) service functions Add complete implementation of missing functions and services from the Applet Manager services documentation, including 20.0.0+ functions. Changes: - IApplicationFunctions: Add functions 210-999 including 20.0.0+ function 460 * GetLaunchRequiredVersionUpgrade, RequestToLaunchApplication * DeclareApplicationAlive, GetApplicationControlProperty * CreateApplicationResourceUsageSystemReportForDebug, etc. - IHomeMenuFunctions: Add functions 300-910 * RebootSystem, LaunchApplication, GetAppletLaunchedHistory * TakeScreenShotOfOwnLayerEx, CreateFloatingLibraryApplet, etc. - IGlobalStateController: Add functions 50-400 * VR mode functions, wireless priority mode, system button history * Operation mode changes, sleep/wake functionality, etc. - ISelfController: Add functions 140-950 * Recording functions, CPU boost, performance configuration * Migration services, album accessors, etc. - ICommonStateGetter: Add functions 600-1063 * Save data functions, cache storage, GPU error detection * Capture image functions, HDCP authentication, etc. - Create new service classes: * IOverlayAppletProxy with IOverlayAppletFunctions * ISystemApplicationProxy for system applications - Fix IAllSystemAppletProxiesService stub implementations: * OpenOverlayAppletProxy, OpenSystemApplicationProxy * CreateSelfLibraryAppletCreatorForDevelop, GetDebugFunctions All functions are appropriately implemented. Functions without descriptions return stub implementations. Includes all 20.0.0+ functions from switchbrew documentation. Signed-off-by: Zephyron --- src/core/CMakeLists.txt | 4 + .../all_system_applet_proxies_service.cpp | 69 +++++++- .../all_system_applet_proxies_service.h | 17 ++ .../am/service/application_functions.cpp | 25 +++ .../am/service/common_state_getter.cpp | 23 +++ .../am/service/global_state_controller.cpp | 90 +++++++++-- .../am/service/global_state_controller.h | 10 ++ .../am/service/home_menu_functions.cpp | 90 +++++++++-- .../service/am/service/home_menu_functions.h | 12 ++ .../am/service/overlay_applet_proxy.cpp | 147 ++++++++++++++++++ .../service/am/service/overlay_applet_proxy.h | 53 +++++++ .../service/am/service/self_controller.cpp | 20 +++ .../am/service/system_application_proxy.cpp | 115 ++++++++++++++ .../am/service/system_application_proxy.h | 52 +++++++ 14 files changed, 704 insertions(+), 23 deletions(-) create mode 100644 src/core/hle/service/am/service/overlay_applet_proxy.cpp create mode 100644 src/core/hle/service/am/service/overlay_applet_proxy.h create mode 100644 src/core/hle/service/am/service/system_application_proxy.cpp create mode 100644 src/core/hle/service/am/service/system_application_proxy.h diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 378c17fdc..01c9ae1a3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -489,6 +489,8 @@ add_library(core STATIC hle/service/am/service/library_applet_self_accessor.h hle/service/am/service/lock_accessor.cpp hle/service/am/service/lock_accessor.h + hle/service/am/service/overlay_applet_proxy.cpp + hle/service/am/service/overlay_applet_proxy.h hle/service/am/service/process_winding_controller.cpp hle/service/am/service/process_winding_controller.h hle/service/am/service/self_controller.cpp @@ -499,6 +501,8 @@ add_library(core STATIC hle/service/am/service/storage_accessor.h hle/service/am/service/system_applet_proxy.cpp hle/service/am/service/system_applet_proxy.h + hle/service/am/service/system_application_proxy.cpp + hle/service/am/service/system_application_proxy.h hle/service/am/service/window_controller.cpp hle/service/am/service/window_controller.h hle/service/am/window_system.cpp diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp index bc9c86c55..ca27c72d2 100644 --- a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp +++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp @@ -1,11 +1,16 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/core.h" #include "core/hle/service/am/applet_manager.h" #include "core/hle/service/am/service/all_system_applet_proxies_service.h" +#include "core/hle/service/am/service/debug_functions.h" +#include "core/hle/service/am/service/library_applet_creator.h" #include "core/hle/service/am/service/library_applet_proxy.h" +#include "core/hle/service/am/service/overlay_applet_proxy.h" #include "core/hle/service/am/service/system_applet_proxy.h" +#include "core/hle/service/am/service/system_application_proxy.h" #include "core/hle/service/am/window_system.h" #include "core/hle/service/cmif_serialization.h" @@ -19,11 +24,11 @@ IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& sys {100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"}, {200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"}, {201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"}, - {300, nullptr, "OpenOverlayAppletProxy"}, - {350, nullptr, "OpenSystemApplicationProxy"}, - {400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"}, - {410, nullptr, "GetSystemAppletControllerForDebug"}, - {1000, nullptr, "GetDebugFunctions"}, + {300, D<&IAllSystemAppletProxiesService::OpenOverlayAppletProxy>, "OpenOverlayAppletProxy"}, + {350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"}, + {400, D<&IAllSystemAppletProxiesService::CreateSelfLibraryAppletCreatorForDevelop>, "CreateSelfLibraryAppletCreatorForDevelop"}, + {410, D<&IAllSystemAppletProxiesService::GetSystemAppletControllerForDebug>, "GetSystemAppletControllerForDebug"}, + {1000, D<&IAllSystemAppletProxiesService::GetDebugFunctions>, "GetDebugFunctions"}, }; // clang-format on @@ -78,4 +83,58 @@ std::shared_ptr IAllSystemAppletProxiesService::GetAppletFromProcessId( return m_window_system.GetByAppletResourceUserId(process_id.pid); } +Result IAllSystemAppletProxiesService::OpenOverlayAppletProxy( + Out> out_overlay_applet_proxy, ClientProcessId pid, + InCopyHandle process_handle, + InLargeData attribute) { + LOG_DEBUG(Service_AM, "called"); + if (const auto applet = GetAppletFromProcessId(pid)) { + *out_overlay_applet_proxy = std::make_shared( + system, applet, process_handle.Get(), m_window_system); + R_SUCCEED(); + } else { + LOG_ERROR(Service_AM, "Applet doesn't exist for process_id={}", pid.pid); + R_THROW(ResultUnknown); + } +} + +Result IAllSystemAppletProxiesService::OpenSystemApplicationProxy( + Out> out_system_application_proxy, ClientProcessId pid, + InCopyHandle process_handle) { + LOG_DEBUG(Service_AM, "called"); + if (const auto applet = GetAppletFromProcessId(pid)) { + *out_system_application_proxy = std::make_shared( + system, applet, process_handle.Get(), m_window_system); + R_SUCCEED(); + } else { + LOG_ERROR(Service_AM, "Applet doesn't exist for process_id={}", pid.pid); + R_THROW(ResultUnknown); + } +} + +Result IAllSystemAppletProxiesService::CreateSelfLibraryAppletCreatorForDevelop( + Out> out_library_applet_creator, ClientProcessId pid, + InCopyHandle process_handle) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + + if (const auto applet = this->GetAppletFromProcessId(pid); applet) { + *out_library_applet_creator = std::make_shared(system, applet, m_window_system); + R_SUCCEED(); + } else { + R_THROW(ResultUnknown); + } +} + +Result IAllSystemAppletProxiesService::GetSystemAppletControllerForDebug() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_THROW(ResultUnknown); +} + +Result IAllSystemAppletProxiesService::GetDebugFunctions( + Out> out_debug_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_debug_functions = std::make_shared(system); + R_SUCCEED(); +} + } // namespace Service::AM diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.h b/src/core/hle/service/am/service/all_system_applet_proxies_service.h index e3e79dc4f..f13a7ea12 100644 --- a/src/core/hle/service/am/service/all_system_applet_proxies_service.h +++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -12,8 +13,12 @@ namespace AM { struct Applet; struct AppletAttribute; +class IDebugFunctions; +class ILibraryAppletCreator; class ILibraryAppletProxy; +class IOverlayAppletProxy; class ISystemAppletProxy; +class ISystemApplicationProxy; class WindowSystem; class IAllSystemAppletProxiesService final @@ -33,6 +38,18 @@ private: Result OpenLibraryAppletProxyOld( Out> out_library_applet_proxy, ClientProcessId pid, InCopyHandle process_handle); + Result OpenOverlayAppletProxy(Out> out_overlay_applet_proxy, + ClientProcessId pid, + InCopyHandle process_handle, + InLargeData attribute); + Result OpenSystemApplicationProxy(Out> out_system_application_proxy, + ClientProcessId pid, + InCopyHandle process_handle); + Result CreateSelfLibraryAppletCreatorForDevelop(Out> out_library_applet_creator, + ClientProcessId pid, + InCopyHandle process_handle); + Result GetSystemAppletControllerForDebug(); + Result GetDebugFunctions(Out> out_debug_functions); private: std::shared_ptr GetAppletFromProcessId(ProcessId pid); diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index 3bab5ac5f..fe4d250a3 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/settings.h" @@ -85,7 +86,31 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_, std::shared_ {181, nullptr, "UpgradeLaunchRequiredVersion"}, {190, nullptr, "SendServerMaintenanceOverlayNotification"}, {200, nullptr, "GetLastApplicationExitReason"}, + {210, nullptr, "GetLaunchRequiredVersionUpgrade"}, + {211, nullptr, "GetLaunchRequiredVersionUpgradeStatus"}, + {300, nullptr, "RequestToLaunchApplication"}, + {301, nullptr, "RequestToLaunchApplicationWithUserAndArguments"}, + {310, nullptr, "RequestToLaunchApplicationWithArgumentsAndUserSelectionAndError"}, + {350, nullptr, "DeclareApplicationAlive"}, + {400, nullptr, "CreateApplicationResourceUsageSystemReportForDebug"}, + {401, nullptr, "WriteApplicationResourceUsageSystemReportForDebug"}, + {410, nullptr, "SetApplicationMemoryReservation"}, + {450, nullptr, "CreateApplicationForDevelop"}, + {460, nullptr, "GetApplicationControlProperty"}, + {461, nullptr, "GetApplicationDesiredLanguage"}, + {470, nullptr, "SetApplicationTerminateResult"}, + {480, nullptr, "GetApplicationRightsOnClient"}, + {490, nullptr, "GetApplicationCertificate"}, {500, nullptr, "StartContinuousRecordingFlushForDebug"}, + {510, nullptr, "SetApplicationAliveCheckTimeoutEnabled"}, + {600, nullptr, "CreateApplicationAliveChecker"}, + {700, nullptr, "QueryApplicationPlayStatisticsForSystem"}, + {701, nullptr, "QueryApplicationPlayStatisticsByUidForSystem"}, + {702, nullptr, "QueryApplicationPlayStatisticsByPidForSystem"}, + {900, nullptr, "CreateApplicationAttributeUpdater"}, + {997, nullptr, "GetApplicationViewWithPromotionInfo"}, + {998, nullptr, "GetApplicationView"}, + {999, nullptr, "GetApplicationViewDeprecated"}, {1000, nullptr, "CreateMovieMaker"}, {1001, D<&IApplicationFunctions::PrepareForJit>, "PrepareForJit"}, }; diff --git a/src/core/hle/service/am/service/common_state_getter.cpp b/src/core/hle/service/am/service/common_state_getter.cpp index f523bcd9e..c8efa6bf8 100644 --- a/src/core/hle/service/am/service/common_state_getter.cpp +++ b/src/core/hle/service/am/service/common_state_getter.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/settings.h" @@ -69,7 +70,29 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr, "SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, + {901, nullptr, "GetRequestExitToLibraryAppletAtExecuteNextProgramEnabled"}, + {1000, nullptr, "GetRestartMessageEnabled"}, + {1001, nullptr, "GetScreenShotPermission"}, + {1010, nullptr, "GetNextProgramArgumentInfo"}, + {1011, nullptr, "GetPreviousProgramArgumentInfo"}, + {1020, nullptr, "GetGpuErrorDetectedSystemEvent"}, + {1021, nullptr, "SetDelayTimeToAbortOnGpuError"}, + {1030, nullptr, "GetFriendInvitationStorageChannelEvent"}, + {1031, nullptr, "TryPopFromFriendInvitationStorageChannel"}, + {1040, nullptr, "GetNotificationStorageChannelEvent"}, + {1041, nullptr, "TryPopFromNotificationStorageChannel"}, + {1050, nullptr, "GetHealthWarningDisappearedSystemEvent"}, + {1060, nullptr, "SetHdcpAuthenticationActivated"}, + {1061, nullptr, "GetLastForegroundCaptureImageEx"}, + {1062, nullptr, "GetLastApplicationCaptureImageEx"}, + {1063, nullptr, "GetLastApplicationCaptureImage"}, }; // clang-format on diff --git a/src/core/hle/service/am/service/global_state_controller.cpp b/src/core/hle/service/am/service/global_state_controller.cpp index dba5d3613..1894aa6d0 100644 --- a/src/core/hle/service/am/service/global_state_controller.cpp +++ b/src/core/hle/service/am/service/global_state_controller.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/am/service/cradle_firmware_updater.h" @@ -12,19 +13,44 @@ IGlobalStateController::IGlobalStateController(Core::System& system_) 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, nullptr, "StartShutdownSequence"}, - {4, nullptr, "StartRebootSequence"}, - {9, nullptr, "IsAutoPowerDownRequested"}, + {0, D<&IGlobalStateController::RequestToEnterSleep>, "RequestToEnterSleep"}, + {1, D<&IGlobalStateController::EnterSleep>, "EnterSleep"}, + {2, D<&IGlobalStateController::StartSleepSequence>, "StartSleepSequence"}, + {3, D<&IGlobalStateController::StartShutdownSequence>, "StartShutdownSequence"}, + {4, D<&IGlobalStateController::StartRebootSequence>, "StartRebootSequence"}, + {9, D<&IGlobalStateController::IsAutoPowerDownRequested>, "IsAutoPowerDownRequested"}, {10, D<&IGlobalStateController::LoadAndApplyIdlePolicySettings>, "LoadAndApplyIdlePolicySettings"}, - {11, nullptr, "NotifyCecSettingsChanged"}, - {12, nullptr, "SetDefaultHomeButtonLongPressTime"}, - {13, nullptr, "UpdateDefaultDisplayResolution"}, + {11, D<&IGlobalStateController::NotifyCecSettingsChanged>, "NotifyCecSettingsChanged"}, + {12, D<&IGlobalStateController::SetDefaultHomeButtonLongPressTime>, "SetDefaultHomeButtonLongPressTime"}, + {13, D<&IGlobalStateController::UpdateDefaultDisplayResolution>, "UpdateDefaultDisplayResolution"}, {14, D<&IGlobalStateController::ShouldSleepOnBoot>, "ShouldSleepOnBoot"}, {15, D<&IGlobalStateController::GetHdcpAuthenticationFailedEvent>, "GetHdcpAuthenticationFailedEvent"}, {30, D<&IGlobalStateController::OpenCradleFirmwareUpdater>, "OpenCradleFirmwareUpdater"}, + {50, nullptr, "IsVrModeEnabled"}, + {51, nullptr, "SetVrModeEnabled"}, + {52, nullptr, "SetLcdBacklighOffEnabled"}, + {53, nullptr, "BeginVrModeEx"}, + {54, nullptr, "EndVrModeEx"}, + {55, nullptr, "IsInControllerFirmwareUpdateSection"}, + {60, nullptr, "SetWirelessPriorityMode"}, + {61, nullptr, "GetWirelessPriorityMode"}, + {62, nullptr, "GetAccumulatedSuspendedTickValue"}, + {63, nullptr, "GetAccumulatedSuspendedTickChangedEvent"}, + {64, nullptr, "SetAlarmTimeChangeEvent"}, + {65, nullptr, "GetWakeupCount"}, + {66, nullptr, "GetHomeButtonInputProtectionStartTime"}, + {67, nullptr, "IsHomeButtonInputProtectionEnabled"}, + {68, nullptr, "GetHomeButtonInputProtectionRemainingTime"}, + {80, nullptr, "IsForceRebootDisabledOnBoot"}, + {81, nullptr, "GetLastSleepReason"}, + {82, nullptr, "GetLastWakeupReason"}, + {90, nullptr, "GetRebootlessSystemUpdateVersion"}, + {91, nullptr, "GetLastSystemButtonPressedTime"}, + {100, nullptr, "GetAppletLaunchedCount"}, + {110, nullptr, "GetSystemButtonPressedHistory"}, + {200, nullptr, "GetOperationModeChangeHistory"}, + {300, nullptr, "GetSleepRequiredVersion"}, + {400, nullptr, "IsQuestRebootRequiredForFirmware"}, }; // clang-format on @@ -58,4 +84,50 @@ Result IGlobalStateController::OpenCradleFirmwareUpdater( R_SUCCEED(); } +Result IGlobalStateController::RequestToEnterSleep() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IGlobalStateController::EnterSleep() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IGlobalStateController::StartSleepSequence(bool sleep_requested) { + LOG_WARNING(Service_AM, "(STUBBED) called, sleep_requested={}", sleep_requested); + R_SUCCEED(); +} + +Result IGlobalStateController::StartShutdownSequence() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IGlobalStateController::StartRebootSequence() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IGlobalStateController::IsAutoPowerDownRequested(Out out_is_auto_power_down_requested) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + *out_is_auto_power_down_requested = false; + R_SUCCEED(); +} + +Result IGlobalStateController::NotifyCecSettingsChanged() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IGlobalStateController::SetDefaultHomeButtonLongPressTime(s64 time) { + LOG_WARNING(Service_AM, "(STUBBED) called, time={}", time); + R_SUCCEED(); +} + +Result IGlobalStateController::UpdateDefaultDisplayResolution() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + } // namespace Service::AM diff --git a/src/core/hle/service/am/service/global_state_controller.h b/src/core/hle/service/am/service/global_state_controller.h index 67c753513..49891cc36 100644 --- a/src/core/hle/service/am/service/global_state_controller.h +++ b/src/core/hle/service/am/service/global_state_controller.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -18,7 +19,16 @@ public: ~IGlobalStateController() override; private: + Result RequestToEnterSleep(); + Result EnterSleep(); + Result StartSleepSequence(bool sleep_requested); + Result StartShutdownSequence(); + Result StartRebootSequence(); + Result IsAutoPowerDownRequested(Out out_is_auto_power_down_requested); Result LoadAndApplyIdlePolicySettings(); + Result NotifyCecSettingsChanged(); + Result SetDefaultHomeButtonLongPressTime(s64 time); + Result UpdateDefaultDisplayResolution(); Result ShouldSleepOnBoot(Out out_should_sleep_on_boot); Result GetHdcpAuthenticationFailedEvent(OutCopyHandle out_event); Result OpenCradleFirmwareUpdater( diff --git a/src/core/hle/service/am/service/home_menu_functions.cpp b/src/core/hle/service/am/service/home_menu_functions.cpp index 25f78beb5..62e792560 100644 --- a/src/core/hle/service/am/service/home_menu_functions.cpp +++ b/src/core/hle/service/am/service/home_menu_functions.cpp @@ -1,9 +1,13 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/result.h" +#include "core/hle/service/am/am_results.h" #include "core/hle/service/am/applet_manager.h" #include "core/hle/service/am/service/home_menu_functions.h" +#include "core/hle/service/am/service/lock_accessor.h" +#include "core/hle/service/am/service/storage.h" #include "core/hle/service/am/window_system.h" #include "core/hle/service/cmif_serialization.h" @@ -19,18 +23,35 @@ IHomeMenuFunctions::IHomeMenuFunctions(Core::System& system_, std::shared_ptr, "RequestToGetForeground"}, {11, D<&IHomeMenuFunctions::LockForeground>, "LockForeground"}, {12, D<&IHomeMenuFunctions::UnlockForeground>, "UnlockForeground"}, - {20, nullptr, "PopFromGeneralChannel"}, + {20, D<&IHomeMenuFunctions::PopFromGeneralChannel>, "PopFromGeneralChannel"}, {21, D<&IHomeMenuFunctions::GetPopFromGeneralChannelEvent>, "GetPopFromGeneralChannelEvent"}, - {30, nullptr, "GetHomeButtonWriterLockAccessor"}, - {31, nullptr, "GetWriterLockAccessorEx"}, - {40, nullptr, "IsSleepEnabled"}, + {30, D<&IHomeMenuFunctions::GetHomeButtonWriterLockAccessor>, "GetHomeButtonWriterLockAccessor"}, + {31, D<&IHomeMenuFunctions::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, + {40, D<&IHomeMenuFunctions::IsSleepEnabled>, "IsSleepEnabled"}, {41, D<&IHomeMenuFunctions::IsRebootEnabled>, "IsRebootEnabled"}, - {50, nullptr, "LaunchSystemApplet"}, - {51, nullptr, "LaunchStarter"}, - {100, nullptr, "PopRequestLaunchApplicationForDebug"}, + {50, D<&IHomeMenuFunctions::LaunchSystemApplet>, "LaunchSystemApplet"}, + {51, D<&IHomeMenuFunctions::LaunchStarter>, "LaunchStarter"}, + {100, D<&IHomeMenuFunctions::PopRequestLaunchApplicationForDebug>, "PopRequestLaunchApplicationForDebug"}, {110, D<&IHomeMenuFunctions::IsForceTerminateApplicationDisabledForDebug>, "IsForceTerminateApplicationDisabledForDebug"}, - {200, nullptr, "LaunchDevMenu"}, - {1000, nullptr, "SetLastApplicationExitReason"}, + {200, D<&IHomeMenuFunctions::LaunchDevMenu>, "LaunchDevMenu"}, + {300, nullptr, "RebootSystem"}, + {301, nullptr, "LaunchApplication"}, + {310, nullptr, "LaunchApplicationWithStorageId"}, + {400, nullptr, "GetLastFrontDockedTime"}, + {401, nullptr, "GetLastFrontUndockedTime"}, + {500, nullptr, "GetAppletLaunchedHistory"}, + {501, nullptr, "ClearAppletLaunchedHistory"}, + {502, nullptr, "ReloadHomeMenuAssets"}, + {510, nullptr, "LaunchApplicationFromStorageManager"}, + {600, nullptr, "GetScreenShotPermission"}, + {610, nullptr, "UpdateLastForegroundCaptureImage"}, + {611, nullptr, "UpdateLastApplicationCaptureImage"}, + {700, nullptr, "ClearLastApplicationCaptureImageWithUserId"}, + {800, nullptr, "TakeScreenShotOfOwnLayerEx"}, + {810, nullptr, "OpenMyGpuErrorHandler"}, + {900, nullptr, "GetAppletLaunchedHistoryForDebug"}, + {910, nullptr, "CreateFloatingLibraryApplet"}, + {1000, D<&IHomeMenuFunctions::SetLastApplicationExitReason>, "SetLastApplicationExitReason"}, }; // clang-format on @@ -77,4 +98,55 @@ Result IHomeMenuFunctions::IsForceTerminateApplicationDisabledForDebug( R_SUCCEED(); } +Result IHomeMenuFunctions::PopFromGeneralChannel(Out> out_storage) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_THROW(ResultNoDataInChannel); +} + +Result IHomeMenuFunctions::GetHomeButtonWriterLockAccessor( + Out> out_lock_accessor) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_THROW(ResultUnknown); +} + +Result IHomeMenuFunctions::GetWriterLockAccessorEx( + Out> out_lock_accessor, u32 button_type) { + LOG_WARNING(Service_AM, "(STUBBED) called, button_type={}", button_type); + R_THROW(ResultUnknown); +} + +Result IHomeMenuFunctions::IsSleepEnabled(Out out_is_sleep_enabled) { + LOG_INFO(Service_AM, "called"); + *out_is_sleep_enabled = true; + R_SUCCEED(); +} + +Result IHomeMenuFunctions::LaunchSystemApplet(AppletId applet_id, u32 launch_mode, + SharedPointer storage) { + LOG_WARNING(Service_AM, "(STUBBED) called, applet_id={}, launch_mode={}", applet_id, launch_mode); + R_SUCCEED(); +} + +Result IHomeMenuFunctions::LaunchStarter() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IHomeMenuFunctions::PopRequestLaunchApplicationForDebug( + Out out_application_id, Out> out_storage) { + LOG_WARNING(Service_AM, "(STUBBED) called"); + *out_application_id = 0; + R_THROW(ResultNoDataInChannel); +} + +Result IHomeMenuFunctions::LaunchDevMenu() { + LOG_WARNING(Service_AM, "(STUBBED) called"); + R_SUCCEED(); +} + +Result IHomeMenuFunctions::SetLastApplicationExitReason(s32 exit_reason) { + LOG_WARNING(Service_AM, "(STUBBED) called, exit_reason={}", exit_reason); + R_SUCCEED(); +} + } // namespace Service::AM diff --git a/src/core/hle/service/am/service/home_menu_functions.h b/src/core/hle/service/am/service/home_menu_functions.h index f56094aa9..ff89992ea 100644 --- a/src/core/hle/service/am/service/home_menu_functions.h +++ b/src/core/hle/service/am/service/home_menu_functions.h @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -11,6 +12,8 @@ namespace Service::AM { struct Applet; +class ILockAccessor; +class IStorage; class WindowSystem; class IHomeMenuFunctions final : public ServiceFramework { @@ -23,10 +26,19 @@ private: Result RequestToGetForeground(); Result LockForeground(); Result UnlockForeground(); + Result PopFromGeneralChannel(Out> out_storage); Result GetPopFromGeneralChannelEvent(OutCopyHandle out_event); + Result GetHomeButtonWriterLockAccessor(Out> out_lock_accessor); + Result GetWriterLockAccessorEx(Out> out_lock_accessor, u32 button_type); + Result IsSleepEnabled(Out out_is_sleep_enabled); Result IsRebootEnabled(Out out_is_reboot_enbaled); + Result LaunchSystemApplet(AppletId applet_id, u32 launch_mode, SharedPointer storage); + Result LaunchStarter(); + Result PopRequestLaunchApplicationForDebug(Out out_application_id, Out> out_storage); Result IsForceTerminateApplicationDisabledForDebug( Out out_is_force_terminate_application_disabled_for_debug); + Result LaunchDevMenu(); + Result SetLastApplicationExitReason(s32 exit_reason); WindowSystem& m_window_system; const std::shared_ptr m_applet; diff --git a/src/core/hle/service/am/service/overlay_applet_proxy.cpp b/src/core/hle/service/am/service/overlay_applet_proxy.cpp new file mode 100644 index 000000000..8365fd1f6 --- /dev/null +++ b/src/core/hle/service/am/service/overlay_applet_proxy.cpp @@ -0,0 +1,147 @@ +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/am/service/audio_controller.h" +#include "core/hle/service/am/service/common_state_getter.h" +#include "core/hle/service/am/service/debug_functions.h" +#include "core/hle/service/am/service/display_controller.h" +#include "core/hle/service/am/service/global_state_controller.h" +#include "core/hle/service/am/service/home_menu_functions.h" +#include "core/hle/service/am/service/library_applet_creator.h" +#include "core/hle/service/am/service/overlay_applet_proxy.h" +#include "core/hle/service/am/service/process_winding_controller.h" +#include "core/hle/service/am/service/self_controller.h" +#include "core/hle/service/am/service/window_controller.h" +#include "core/hle/service/cmif_serialization.h" + +namespace Service::AM { + +// Forward declaration for IOverlayAppletFunctions +class IOverlayAppletFunctions final : public ServiceFramework { +public: + explicit IOverlayAppletFunctions(Core::System& system_) : ServiceFramework{system_, "IOverlayAppletFunctions"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "BeginToWatchShortHomeButtonMessage"}, + {1, nullptr, "EndToWatchShortHomeButtonMessage"}, + {2, nullptr, "GetApplicationIdForLogo"}, + {3, nullptr, "SetGpuTimeSliceBoost"}, + {4, nullptr, "SetAutoSleepTimeAndDimmingTimeEnabled"}, + {5, nullptr, "SetHandlingHomeButtonShortPressedEnabled"}, + {6, nullptr, "SetHandlingCaptureButtonShortPressedEnabledForOverlayApplet"}, + {7, nullptr, "SetHandlingCaptureButtonLongPressedEnabledForOverlayApplet"}, + {8, nullptr, "GetShortHomeButtonMessage"}, + {9, nullptr, "IsHomeButtonShortPressedBlocked"}, + {10, nullptr, "IsVrModeCurtainRequired"}, + {11, nullptr, "SetInputDetectionPolicy"}, + {20, nullptr, "SetCpuBoostRequestPriority"}, + }; + // clang-format on + RegisterHandlers(functions); + } +}; + +IOverlayAppletProxy::IOverlayAppletProxy(Core::System& system_, std::shared_ptr applet, + 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"}, + {11, D<&IOverlayAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, + {20, D<&IOverlayAppletProxy::GetOverlayAppletFunctions>, "GetOverlayAppletFunctions"}, + {21, D<&IOverlayAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, + {22, D<&IOverlayAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, + {1000, D<&IOverlayAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IOverlayAppletProxy::~IOverlayAppletProxy() = default; + +Result IOverlayAppletProxy::GetCommonStateGetter( + Out> out_common_state_getter) { + LOG_DEBUG(Service_AM, "called"); + *out_common_state_getter = std::make_shared(system, m_applet); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetSelfController( + Out> out_self_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_self_controller = std::make_shared(system, m_applet, m_process); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetWindowController( + Out> out_window_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_window_controller = std::make_shared(system, m_applet, m_window_system); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetAudioController( + Out> out_audio_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_audio_controller = std::make_shared(system); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetDisplayController( + Out> out_display_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_display_controller = std::make_shared(system, m_applet); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetProcessWindingController( + Out> out_process_winding_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_process_winding_controller = std::make_shared(system, m_applet); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetLibraryAppletCreator( + Out> out_library_applet_creator) { + LOG_DEBUG(Service_AM, "called"); + *out_library_applet_creator = + std::make_shared(system, m_applet, m_window_system); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetOverlayAppletFunctions( + Out> out_overlay_applet_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_overlay_applet_functions = std::make_shared(system); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetHomeMenuFunctions( + Out> out_home_menu_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_home_menu_functions = + std::make_shared(system, m_applet, m_window_system); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetGlobalStateController( + Out> out_global_state_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_global_state_controller = std::make_shared(system); + R_SUCCEED(); +} + +Result IOverlayAppletProxy::GetDebugFunctions( + Out> out_debug_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_debug_functions = std::make_shared(system); + R_SUCCEED(); +} + +} // namespace Service::AM \ No newline at end of file diff --git a/src/core/hle/service/am/service/overlay_applet_proxy.h b/src/core/hle/service/am/service/overlay_applet_proxy.h new file mode 100644 index 000000000..9c96993dc --- /dev/null +++ b/src/core/hle/service/am/service/overlay_applet_proxy.h @@ -0,0 +1,53 @@ +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/service.h" + +namespace Kernel { +class KProcess; +} + +namespace Service::AM { + +struct Applet; +class IAudioController; +class ICommonStateGetter; +class IDebugFunctions; +class IDisplayController; +class IGlobalStateController; +class IHomeMenuFunctions; +class ILibraryAppletCreator; +class IOverlayAppletFunctions; +class IProcessWindingController; +class ISelfController; +class IWindowController; +class WindowSystem; + +class IOverlayAppletProxy final : public ServiceFramework { +public: + explicit IOverlayAppletProxy(Core::System& system_, std::shared_ptr applet, + Kernel::KProcess* process, WindowSystem& window_system); + ~IOverlayAppletProxy() override; + +private: + Result GetCommonStateGetter(Out> out_common_state_getter); + Result GetSelfController(Out> out_self_controller); + Result GetWindowController(Out> out_window_controller); + Result GetAudioController(Out> out_audio_controller); + Result GetDisplayController(Out> out_display_controller); + Result GetProcessWindingController(Out> out_process_winding_controller); + Result GetLibraryAppletCreator(Out> out_library_applet_creator); + Result GetOverlayAppletFunctions(Out> out_overlay_applet_functions); + Result GetHomeMenuFunctions(Out> out_home_menu_functions); + Result GetGlobalStateController(Out> out_global_state_controller); + Result GetDebugFunctions(Out> out_debug_functions); + + WindowSystem& m_window_system; + Kernel::KProcess* const m_process; + const std::shared_ptr m_applet; +}; + +} // namespace Service::AM \ No newline at end of file diff --git a/src/core/hle/service/am/service/self_controller.cpp b/src/core/hle/service/am/service/self_controller.cpp index 1f8215149..157c854b5 100644 --- a/src/core/hle/service/am/service/self_controller.cpp +++ b/src/core/hle/service/am/service/self_controller.cpp @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/logging/log.h" @@ -67,6 +68,25 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr {110, nullptr, "SetApplicationAlbumUserData"}, {120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"}, {130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"}, + {140, nullptr, "SetRecordingVolumeMuted"}, + {141, nullptr, "GetRecordingVolumeMuted"}, + {150, nullptr, "SetRecordingEncryptionEnabled"}, + {160, nullptr, "SetCpuBoostRequestPriority"}, + {170, nullptr, "GetCurrentPerformanceConfiguration"}, + {180, nullptr, "GetOperationModeSystemInfo"}, + {200, nullptr, "GetSettingsPlatformRegion"}, + {210, nullptr, "ActivateMigrationService"}, + {211, nullptr, "DeactivateMigrationService"}, + {300, nullptr, "SendMessage"}, + {301, nullptr, "ReceiveMessage"}, + {400, nullptr, "CreateAlbumAccessorApplicationAlbumEntry"}, + {401, nullptr, "CreateAlbumAccessorApplicationAlbumArchivedEntry"}, + {500, nullptr, "OpenAccessorSession"}, + {600, nullptr, "CreateAccessorInterface"}, + {700, nullptr, "CreateCacheStorageInterface"}, + {800, nullptr, "OpenDataStorageByApplicationId"}, + {900, nullptr, "CreateUserInterface"}, + {950, nullptr, "CreateSystemUpdateInterface"}, {1000, nullptr, "GetDebugStorageChannel"}, }; // clang-format on diff --git a/src/core/hle/service/am/service/system_application_proxy.cpp b/src/core/hle/service/am/service/system_application_proxy.cpp new file mode 100644 index 000000000..1120c1f81 --- /dev/null +++ b/src/core/hle/service/am/service/system_application_proxy.cpp @@ -0,0 +1,115 @@ +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/am/service/application_functions.h" +#include "core/hle/service/am/service/audio_controller.h" +#include "core/hle/service/am/service/common_state_getter.h" +#include "core/hle/service/am/service/debug_functions.h" +#include "core/hle/service/am/service/display_controller.h" +#include "core/hle/service/am/service/global_state_controller.h" +#include "core/hle/service/am/service/home_menu_functions.h" +#include "core/hle/service/am/service/library_applet_creator.h" +#include "core/hle/service/am/service/self_controller.h" +#include "core/hle/service/am/service/system_application_proxy.h" +#include "core/hle/service/am/service/window_controller.h" +#include "core/hle/service/cmif_serialization.h" + +namespace Service::AM { + +ISystemApplicationProxy::ISystemApplicationProxy(Core::System& system_, std::shared_ptr applet, + Kernel::KProcess* process, WindowSystem& window_system) + : ServiceFramework{system_, "ISystemApplicationProxy"}, + m_window_system{window_system}, m_process{process}, m_applet{std::move(applet)} { + // clang-format off + static const FunctionInfo functions[] = { + {0, D<&ISystemApplicationProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, + {1, D<&ISystemApplicationProxy::GetSelfController>, "GetSelfController"}, + {2, D<&ISystemApplicationProxy::GetWindowController>, "GetWindowController"}, + {3, D<&ISystemApplicationProxy::GetAudioController>, "GetAudioController"}, + {4, D<&ISystemApplicationProxy::GetDisplayController>, "GetDisplayController"}, + {11, D<&ISystemApplicationProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, + {20, D<&ISystemApplicationProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, + {21, D<&ISystemApplicationProxy::GetGlobalStateController>, "GetGlobalStateController"}, + {22, D<&ISystemApplicationProxy::GetApplicationFunctions>, "GetApplicationFunctions"}, + {1000, D<&ISystemApplicationProxy::GetDebugFunctions>, "GetDebugFunctions"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +ISystemApplicationProxy::~ISystemApplicationProxy() = default; + +Result ISystemApplicationProxy::GetCommonStateGetter( + Out> out_common_state_getter) { + LOG_DEBUG(Service_AM, "called"); + *out_common_state_getter = std::make_shared(system, m_applet); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetSelfController( + Out> out_self_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_self_controller = std::make_shared(system, m_applet, m_process); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetWindowController( + Out> out_window_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_window_controller = std::make_shared(system, m_applet, m_window_system); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetAudioController( + Out> out_audio_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_audio_controller = std::make_shared(system); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetDisplayController( + Out> out_display_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_display_controller = std::make_shared(system, m_applet); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetLibraryAppletCreator( + Out> out_library_applet_creator) { + LOG_DEBUG(Service_AM, "called"); + *out_library_applet_creator = + std::make_shared(system, m_applet, m_window_system); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetHomeMenuFunctions( + Out> out_home_menu_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_home_menu_functions = + std::make_shared(system, m_applet, m_window_system); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetGlobalStateController( + Out> out_global_state_controller) { + LOG_DEBUG(Service_AM, "called"); + *out_global_state_controller = std::make_shared(system); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetApplicationFunctions( + Out> out_application_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_application_functions = std::make_shared(system, m_applet); + R_SUCCEED(); +} + +Result ISystemApplicationProxy::GetDebugFunctions( + Out> out_debug_functions) { + LOG_DEBUG(Service_AM, "called"); + *out_debug_functions = std::make_shared(system); + R_SUCCEED(); +} + +} // namespace Service::AM \ No newline at end of file diff --git a/src/core/hle/service/am/service/system_application_proxy.h b/src/core/hle/service/am/service/system_application_proxy.h new file mode 100644 index 000000000..09d80eee0 --- /dev/null +++ b/src/core/hle/service/am/service/system_application_proxy.h @@ -0,0 +1,52 @@ +// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/cmif_types.h" +#include "core/hle/service/service.h" + +namespace Kernel { +class KProcess; +} + +namespace Service::AM { + +struct Applet; +class IApplicationFunctions; +class IAudioController; +class ICommonStateGetter; +class IDebugFunctions; +class IDisplayController; +class IGlobalStateController; +class IHomeMenuFunctions; +class ILibraryAppletCreator; +class IProcessWindingController; +class ISelfController; +class IWindowController; +class WindowSystem; + +class ISystemApplicationProxy final : public ServiceFramework { +public: + explicit ISystemApplicationProxy(Core::System& system_, std::shared_ptr applet, + Kernel::KProcess* process, WindowSystem& window_system); + ~ISystemApplicationProxy() override; + +private: + Result GetCommonStateGetter(Out> out_common_state_getter); + Result GetSelfController(Out> out_self_controller); + Result GetWindowController(Out> out_window_controller); + Result GetAudioController(Out> out_audio_controller); + Result GetDisplayController(Out> out_display_controller); + Result GetLibraryAppletCreator(Out> out_library_applet_creator); + Result GetHomeMenuFunctions(Out> out_home_menu_functions); + Result GetGlobalStateController(Out> out_global_state_controller); + Result GetApplicationFunctions(Out> out_application_functions); + Result GetDebugFunctions(Out> out_debug_functions); + + WindowSystem& m_window_system; + Kernel::KProcess* const m_process; + const std::shared_ptr m_applet; +}; + +} // namespace Service::AM \ No newline at end of file