From eafaa5511d5aaafebd595fe12f7400aad475a452 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 11 Feb 2024 19:41:53 -0500 Subject: am: move IDebugFunctions --- src/core/CMakeLists.txt | 4 +- src/core/hle/service/am/debug_functions.cpp | 44 ---------------------- src/core/hle/service/am/debug_functions.h | 16 -------- .../hle/service/am/service/application_proxy.cpp | 2 +- .../hle/service/am/service/debug_functions.cpp | 43 +++++++++++++++++++++ src/core/hle/service/am/service/debug_functions.h | 16 ++++++++ .../service/am/service/library_applet_proxy.cpp | 2 +- .../hle/service/am/service/system_applet_proxy.cpp | 2 +- 8 files changed, 64 insertions(+), 65 deletions(-) delete mode 100644 src/core/hle/service/am/debug_functions.cpp delete mode 100644 src/core/hle/service/am/debug_functions.h create mode 100644 src/core/hle/service/am/service/debug_functions.cpp create mode 100644 src/core/hle/service/am/service/debug_functions.h (limited to 'src') diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 781be7c10..ad9831979 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -425,8 +425,6 @@ add_library(core STATIC hle/service/am/applet_message_queue.h hle/service/am/application_creator.cpp hle/service/am/application_creator.h - hle/service/am/debug_functions.cpp - hle/service/am/debug_functions.h hle/service/am/display_controller.cpp hle/service/am/display_controller.h hle/service/am/global_state_controller.cpp @@ -471,6 +469,8 @@ add_library(core STATIC hle/service/am/service/audio_controller.h hle/service/am/service/common_state_getter.cpp hle/service/am/service/common_state_getter.h + hle/service/am/service/debug_functions.cpp + hle/service/am/service/debug_functions.h hle/service/am/service/library_applet_proxy.cpp hle/service/am/service/library_applet_proxy.h hle/service/am/service/system_applet_proxy.cpp diff --git a/src/core/hle/service/am/debug_functions.cpp b/src/core/hle/service/am/debug_functions.cpp deleted file mode 100644 index f80b970f2..000000000 --- a/src/core/hle/service/am/debug_functions.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "core/hle/service/am/debug_functions.h" -#include "core/hle/service/ipc_helpers.h" - -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; - -} // namespace Service::AM diff --git a/src/core/hle/service/am/debug_functions.h b/src/core/hle/service/am/debug_functions.h deleted file mode 100644 index d55968743..000000000 --- a/src/core/hle/service/am/debug_functions.h +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include "core/hle/service/service.h" - -namespace Service::AM { - -class IDebugFunctions final : public ServiceFramework { -public: - explicit IDebugFunctions(Core::System& system_); - ~IDebugFunctions() override; -}; - -} // namespace Service::AM diff --git a/src/core/hle/service/am/service/application_proxy.cpp b/src/core/hle/service/am/service/application_proxy.cpp index 2d46299e0..6cd6df2d0 100644 --- a/src/core/hle/service/am/service/application_proxy.cpp +++ b/src/core/hle/service/am/service/application_proxy.cpp @@ -1,7 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "core/hle/service/am/debug_functions.h" #include "core/hle/service/am/display_controller.h" #include "core/hle/service/am/library_applet_creator.h" #include "core/hle/service/am/library_applet_self_accessor.h" @@ -12,6 +11,7 @@ #include "core/hle/service/am/service/application_proxy.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/window_controller.h" #include "core/hle/service/cmif_serialization.h" diff --git a/src/core/hle/service/am/service/debug_functions.cpp b/src/core/hle/service/am/service/debug_functions.cpp new file mode 100644 index 000000000..fcac4776d --- /dev/null +++ b/src/core/hle/service/am/service/debug_functions.cpp @@ -0,0 +1,43 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/am/service/debug_functions.h" + +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; + +} // namespace Service::AM diff --git a/src/core/hle/service/am/service/debug_functions.h b/src/core/hle/service/am/service/debug_functions.h new file mode 100644 index 000000000..d55968743 --- /dev/null +++ b/src/core/hle/service/am/service/debug_functions.h @@ -0,0 +1,16 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Service::AM { + +class IDebugFunctions final : public ServiceFramework { +public: + explicit IDebugFunctions(Core::System& system_); + ~IDebugFunctions() override; +}; + +} // namespace Service::AM diff --git a/src/core/hle/service/am/service/library_applet_proxy.cpp b/src/core/hle/service/am/service/library_applet_proxy.cpp index 28886b0c3..d609871fb 100644 --- a/src/core/hle/service/am/service/library_applet_proxy.cpp +++ b/src/core/hle/service/am/service/library_applet_proxy.cpp @@ -1,7 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include "core/hle/service/am/debug_functions.h" #include "core/hle/service/am/display_controller.h" #include "core/hle/service/am/global_state_controller.h" #include "core/hle/service/am/home_menu_functions.h" @@ -12,6 +11,7 @@ #include "core/hle/service/am/service/applet_common_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/library_applet_proxy.h" #include "core/hle/service/am/window_controller.h" #include "core/hle/service/cmif_serialization.h" diff --git a/src/core/hle/service/am/service/system_applet_proxy.cpp b/src/core/hle/service/am/service/system_applet_proxy.cpp index ea23bef94..d4ebe3ae0 100644 --- a/src/core/hle/service/am/service/system_applet_proxy.cpp +++ b/src/core/hle/service/am/service/system_applet_proxy.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/am/application_creator.h" -#include "core/hle/service/am/debug_functions.h" #include "core/hle/service/am/display_controller.h" #include "core/hle/service/am/global_state_controller.h" #include "core/hle/service/am/home_menu_functions.h" @@ -13,6 +12,7 @@ #include "core/hle/service/am/service/applet_common_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/system_applet_proxy.h" #include "core/hle/service/am/window_controller.h" #include "core/hle/service/cmif_serialization.h" -- cgit v1.2.3