diff options
| author | 2024-02-11 19:16:36 -0500 | |
|---|---|---|
| committer | 2024-02-11 21:59:33 -0500 | |
| commit | 6fd6c65fd40d2e719cbb62b7e05468d632c04d88 (patch) | |
| tree | 745b0c1be466ec1e51a29f8b2fdc706a79051b16 | |
| parent | am: rewrite ILibraryAppletProxy (diff) | |
| download | yuzu-6fd6c65fd40d2e719cbb62b7e05468d632c04d88.tar.gz yuzu-6fd6c65fd40d2e719cbb62b7e05468d632c04d88.tar.xz yuzu-6fd6c65fd40d2e719cbb62b7e05468d632c04d88.zip | |
am: rewrite ISystemAppletProxy
| -rw-r--r-- | src/core/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/service/all_system_applet_proxies_service.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/am/service/system_applet_proxy.cpp | 132 | ||||
| -rw-r--r-- | src/core/hle/service/am/service/system_applet_proxy.h | 54 | ||||
| -rw-r--r-- | src/core/hle/service/am/system_applet_proxy.cpp | 136 | ||||
| -rw-r--r-- | src/core/hle/service/am/system_applet_proxy.h | 36 |
6 files changed, 191 insertions, 177 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 8fd62e45e..4486a355c 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -473,8 +473,8 @@ add_library(core STATIC | |||
| 473 | hle/service/am/service/application_proxy.h | 473 | hle/service/am/service/application_proxy.h |
| 474 | hle/service/am/service/library_applet_proxy.cpp | 474 | hle/service/am/service/library_applet_proxy.cpp |
| 475 | hle/service/am/service/library_applet_proxy.h | 475 | hle/service/am/service/library_applet_proxy.h |
| 476 | hle/service/am/system_applet_proxy.cpp | 476 | hle/service/am/service/system_applet_proxy.cpp |
| 477 | hle/service/am/system_applet_proxy.h | 477 | hle/service/am/service/system_applet_proxy.h |
| 478 | hle/service/am/system_buffer_manager.cpp | 478 | hle/service/am/system_buffer_manager.cpp |
| 479 | hle/service/am/system_buffer_manager.h | 479 | hle/service/am/system_buffer_manager.h |
| 480 | hle/service/am/spsm.cpp | 480 | hle/service/am/spsm.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 dfefc9310..eebd90ba2 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 | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include "core/hle/service/am/applet_manager.h" | 5 | #include "core/hle/service/am/applet_manager.h" |
| 6 | #include "core/hle/service/am/service/all_system_applet_proxies_service.h" | 6 | #include "core/hle/service/am/service/all_system_applet_proxies_service.h" |
| 7 | #include "core/hle/service/am/service/library_applet_proxy.h" | 7 | #include "core/hle/service/am/service/library_applet_proxy.h" |
| 8 | #include "core/hle/service/am/system_applet_proxy.h" | 8 | #include "core/hle/service/am/service/system_applet_proxy.h" |
| 9 | #include "core/hle/service/cmif_serialization.h" | 9 | #include "core/hle/service/cmif_serialization.h" |
| 10 | 10 | ||
| 11 | namespace Service::AM { | 11 | namespace Service::AM { |
| @@ -37,8 +37,8 @@ Result IAllSystemAppletProxiesService::OpenSystemAppletProxy( | |||
| 37 | LOG_DEBUG(Service_AM, "called"); | 37 | LOG_DEBUG(Service_AM, "called"); |
| 38 | 38 | ||
| 39 | if (const auto applet = this->GetAppletFromProcessId(pid); applet) { | 39 | if (const auto applet = this->GetAppletFromProcessId(pid); applet) { |
| 40 | *out_system_applet_proxy = | 40 | *out_system_applet_proxy = std::make_shared<ISystemAppletProxy>( |
| 41 | std::make_shared<ISystemAppletProxy>(m_nvnflinger, applet, system); | 41 | system, applet, process_handle.Get(), m_nvnflinger); |
| 42 | R_SUCCEED(); | 42 | R_SUCCEED(); |
| 43 | } else { | 43 | } else { |
| 44 | UNIMPLEMENTED(); | 44 | UNIMPLEMENTED(); |
diff --git a/src/core/hle/service/am/service/system_applet_proxy.cpp b/src/core/hle/service/am/service/system_applet_proxy.cpp new file mode 100644 index 000000000..0a69d1502 --- /dev/null +++ b/src/core/hle/service/am/service/system_applet_proxy.cpp | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/am/applet_common_functions.h" | ||
| 5 | #include "core/hle/service/am/application_creator.h" | ||
| 6 | #include "core/hle/service/am/audio_controller.h" | ||
| 7 | #include "core/hle/service/am/common_state_getter.h" | ||
| 8 | #include "core/hle/service/am/debug_functions.h" | ||
| 9 | #include "core/hle/service/am/display_controller.h" | ||
| 10 | #include "core/hle/service/am/global_state_controller.h" | ||
| 11 | #include "core/hle/service/am/home_menu_functions.h" | ||
| 12 | #include "core/hle/service/am/library_applet_creator.h" | ||
| 13 | #include "core/hle/service/am/library_applet_self_accessor.h" | ||
| 14 | #include "core/hle/service/am/process_winding_controller.h" | ||
| 15 | #include "core/hle/service/am/self_controller.h" | ||
| 16 | #include "core/hle/service/am/service/system_applet_proxy.h" | ||
| 17 | #include "core/hle/service/am/window_controller.h" | ||
| 18 | #include "core/hle/service/cmif_serialization.h" | ||
| 19 | |||
| 20 | namespace Service::AM { | ||
| 21 | |||
| 22 | ISystemAppletProxy::ISystemAppletProxy(Core::System& system_, std::shared_ptr<Applet> applet, | ||
| 23 | Kernel::KProcess* process, | ||
| 24 | Nvnflinger::Nvnflinger& nvnflinger) | ||
| 25 | : ServiceFramework{system_, "ISystemAppletProxy"}, | ||
| 26 | m_nvnflinger{nvnflinger}, m_process{process}, m_applet{std::move(applet)} { | ||
| 27 | // clang-format off | ||
| 28 | static const FunctionInfo functions[] = { | ||
| 29 | {0, D<&ISystemAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"}, | ||
| 30 | {1, D<&ISystemAppletProxy::GetSelfController>, "GetSelfController"}, | ||
| 31 | {2, D<&ISystemAppletProxy::GetWindowController>, "GetWindowController"}, | ||
| 32 | {3, D<&ISystemAppletProxy::GetAudioController>, "GetAudioController"}, | ||
| 33 | {4, D<&ISystemAppletProxy::GetDisplayController>, "GetDisplayController"}, | ||
| 34 | {10, D<&ISystemAppletProxy::GetProcessWindingController>, "GetProcessWindingController"}, | ||
| 35 | {11, D<&ISystemAppletProxy::GetLibraryAppletCreator>, "GetLibraryAppletCreator"}, | ||
| 36 | {20, D<&ISystemAppletProxy::GetHomeMenuFunctions>, "GetHomeMenuFunctions"}, | ||
| 37 | {21, D<&ISystemAppletProxy::GetGlobalStateController>, "GetGlobalStateController"}, | ||
| 38 | {22, D<&ISystemAppletProxy::GetApplicationCreator>, "GetApplicationCreator"}, | ||
| 39 | {23, D<&ISystemAppletProxy::GetAppletCommonFunctions>, "GetAppletCommonFunctions"}, | ||
| 40 | {1000, D<&ISystemAppletProxy::GetDebugFunctions>, "GetDebugFunctions"}, | ||
| 41 | }; | ||
| 42 | // clang-format on | ||
| 43 | |||
| 44 | RegisterHandlers(functions); | ||
| 45 | } | ||
| 46 | |||
| 47 | ISystemAppletProxy::~ISystemAppletProxy() = default; | ||
| 48 | |||
| 49 | Result ISystemAppletProxy::GetAudioController( | ||
| 50 | Out<SharedPointer<IAudioController>> out_audio_controller) { | ||
| 51 | LOG_DEBUG(Service_AM, "called"); | ||
| 52 | *out_audio_controller = std::make_shared<IAudioController>(system); | ||
| 53 | R_SUCCEED(); | ||
| 54 | } | ||
| 55 | |||
| 56 | Result ISystemAppletProxy::GetDisplayController( | ||
| 57 | Out<SharedPointer<IDisplayController>> out_display_controller) { | ||
| 58 | LOG_DEBUG(Service_AM, "called"); | ||
| 59 | *out_display_controller = std::make_shared<IDisplayController>(system, m_applet); | ||
| 60 | R_SUCCEED(); | ||
| 61 | } | ||
| 62 | |||
| 63 | Result ISystemAppletProxy::GetProcessWindingController( | ||
| 64 | Out<SharedPointer<IProcessWindingController>> out_process_winding_controller) { | ||
| 65 | LOG_DEBUG(Service_AM, "called"); | ||
| 66 | *out_process_winding_controller = std::make_shared<IProcessWindingController>(system, m_applet); | ||
| 67 | R_SUCCEED(); | ||
| 68 | } | ||
| 69 | |||
| 70 | Result ISystemAppletProxy::GetDebugFunctions( | ||
| 71 | Out<SharedPointer<IDebugFunctions>> out_debug_functions) { | ||
| 72 | LOG_DEBUG(Service_AM, "called"); | ||
| 73 | *out_debug_functions = std::make_shared<IDebugFunctions>(system); | ||
| 74 | R_SUCCEED(); | ||
| 75 | } | ||
| 76 | |||
| 77 | Result ISystemAppletProxy::GetWindowController( | ||
| 78 | Out<SharedPointer<IWindowController>> out_window_controller) { | ||
| 79 | LOG_DEBUG(Service_AM, "called"); | ||
| 80 | *out_window_controller = std::make_shared<IWindowController>(system, m_applet); | ||
| 81 | R_SUCCEED(); | ||
| 82 | } | ||
| 83 | |||
| 84 | Result ISystemAppletProxy::GetSelfController( | ||
| 85 | Out<SharedPointer<ISelfController>> out_self_controller) { | ||
| 86 | LOG_DEBUG(Service_AM, "called"); | ||
| 87 | *out_self_controller = std::make_shared<ISelfController>(system, m_applet, m_nvnflinger); | ||
| 88 | R_SUCCEED(); | ||
| 89 | } | ||
| 90 | |||
| 91 | Result ISystemAppletProxy::GetCommonStateGetter( | ||
| 92 | Out<SharedPointer<ICommonStateGetter>> out_common_state_getter) { | ||
| 93 | LOG_DEBUG(Service_AM, "called"); | ||
| 94 | *out_common_state_getter = std::make_shared<ICommonStateGetter>(system, m_applet); | ||
| 95 | R_SUCCEED(); | ||
| 96 | } | ||
| 97 | |||
| 98 | Result ISystemAppletProxy::GetLibraryAppletCreator( | ||
| 99 | Out<SharedPointer<ILibraryAppletCreator>> out_library_applet_creator) { | ||
| 100 | LOG_DEBUG(Service_AM, "called"); | ||
| 101 | *out_library_applet_creator = std::make_shared<ILibraryAppletCreator>(system, m_applet); | ||
| 102 | R_SUCCEED(); | ||
| 103 | } | ||
| 104 | |||
| 105 | Result ISystemAppletProxy::GetApplicationCreator( | ||
| 106 | Out<SharedPointer<IApplicationCreator>> out_application_creator) { | ||
| 107 | LOG_ERROR(Service_AM, "called"); | ||
| 108 | R_THROW(ResultUnknown); | ||
| 109 | } | ||
| 110 | |||
| 111 | Result ISystemAppletProxy::GetAppletCommonFunctions( | ||
| 112 | Out<SharedPointer<IAppletCommonFunctions>> out_applet_common_functions) { | ||
| 113 | LOG_DEBUG(Service_AM, "called"); | ||
| 114 | *out_applet_common_functions = std::make_shared<IAppletCommonFunctions>(system, m_applet); | ||
| 115 | R_SUCCEED(); | ||
| 116 | } | ||
| 117 | |||
| 118 | Result ISystemAppletProxy::GetHomeMenuFunctions( | ||
| 119 | Out<SharedPointer<IHomeMenuFunctions>> out_home_menu_functions) { | ||
| 120 | LOG_DEBUG(Service_AM, "called"); | ||
| 121 | *out_home_menu_functions = std::make_shared<IHomeMenuFunctions>(system); | ||
| 122 | R_SUCCEED(); | ||
| 123 | } | ||
| 124 | |||
| 125 | Result ISystemAppletProxy::GetGlobalStateController( | ||
| 126 | Out<SharedPointer<IGlobalStateController>> out_global_state_controller) { | ||
| 127 | LOG_DEBUG(Service_AM, "called"); | ||
| 128 | *out_global_state_controller = std::make_shared<IGlobalStateController>(system); | ||
| 129 | R_SUCCEED(); | ||
| 130 | } | ||
| 131 | |||
| 132 | } // namespace Service::AM | ||
diff --git a/src/core/hle/service/am/service/system_applet_proxy.h b/src/core/hle/service/am/service/system_applet_proxy.h new file mode 100644 index 000000000..3d5040315 --- /dev/null +++ b/src/core/hle/service/am/service/system_applet_proxy.h | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/cmif_types.h" | ||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::AM { | ||
| 10 | |||
| 11 | struct Applet; | ||
| 12 | class IAppletCommonFunctions; | ||
| 13 | class IApplicationCreator; | ||
| 14 | class IAudioController; | ||
| 15 | class ICommonStateGetter; | ||
| 16 | class IDebugFunctions; | ||
| 17 | class IDisplayController; | ||
| 18 | class IHomeMenuFunctions; | ||
| 19 | class IGlobalStateController; | ||
| 20 | class ILibraryAppletCreator; | ||
| 21 | class IProcessWindingController; | ||
| 22 | class ISelfController; | ||
| 23 | class IWindowController; | ||
| 24 | |||
| 25 | class ISystemAppletProxy final : public ServiceFramework<ISystemAppletProxy> { | ||
| 26 | public: | ||
| 27 | explicit ISystemAppletProxy(Core::System& system, std::shared_ptr<Applet> applet, | ||
| 28 | Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger); | ||
| 29 | ~ISystemAppletProxy(); | ||
| 30 | |||
| 31 | private: | ||
| 32 | Result GetAudioController(Out<SharedPointer<IAudioController>> out_audio_controller); | ||
| 33 | Result GetDisplayController(Out<SharedPointer<IDisplayController>> out_display_controller); | ||
| 34 | Result GetProcessWindingController( | ||
| 35 | Out<SharedPointer<IProcessWindingController>> out_process_winding_controller); | ||
| 36 | Result GetDebugFunctions(Out<SharedPointer<IDebugFunctions>> out_debug_functions); | ||
| 37 | Result GetWindowController(Out<SharedPointer<IWindowController>> out_window_controller); | ||
| 38 | Result GetSelfController(Out<SharedPointer<ISelfController>> out_self_controller); | ||
| 39 | Result GetCommonStateGetter(Out<SharedPointer<ICommonStateGetter>> out_common_state_getter); | ||
| 40 | Result GetLibraryAppletCreator( | ||
| 41 | Out<SharedPointer<ILibraryAppletCreator>> out_library_applet_creator); | ||
| 42 | Result GetApplicationCreator(Out<SharedPointer<IApplicationCreator>> out_application_creator); | ||
| 43 | Result GetAppletCommonFunctions( | ||
| 44 | Out<SharedPointer<IAppletCommonFunctions>> out_applet_common_functions); | ||
| 45 | Result GetHomeMenuFunctions(Out<SharedPointer<IHomeMenuFunctions>> out_home_menu_functions); | ||
| 46 | Result GetGlobalStateController( | ||
| 47 | Out<SharedPointer<IGlobalStateController>> out_global_state_controller); | ||
| 48 | |||
| 49 | Nvnflinger::Nvnflinger& m_nvnflinger; | ||
| 50 | Kernel::KProcess* const m_process; | ||
| 51 | const std::shared_ptr<Applet> m_applet; | ||
| 52 | }; | ||
| 53 | |||
| 54 | } // namespace Service::AM | ||
diff --git a/src/core/hle/service/am/system_applet_proxy.cpp b/src/core/hle/service/am/system_applet_proxy.cpp deleted file mode 100644 index 38643408e..000000000 --- a/src/core/hle/service/am/system_applet_proxy.cpp +++ /dev/null | |||
| @@ -1,136 +0,0 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #include "core/hle/service/am/applet_common_functions.h" | ||
| 5 | #include "core/hle/service/am/application_creator.h" | ||
| 6 | #include "core/hle/service/am/audio_controller.h" | ||
| 7 | #include "core/hle/service/am/common_state_getter.h" | ||
| 8 | #include "core/hle/service/am/debug_functions.h" | ||
| 9 | #include "core/hle/service/am/display_controller.h" | ||
| 10 | #include "core/hle/service/am/global_state_controller.h" | ||
| 11 | #include "core/hle/service/am/home_menu_functions.h" | ||
| 12 | #include "core/hle/service/am/library_applet_creator.h" | ||
| 13 | #include "core/hle/service/am/library_applet_self_accessor.h" | ||
| 14 | #include "core/hle/service/am/process_winding_controller.h" | ||
| 15 | #include "core/hle/service/am/self_controller.h" | ||
| 16 | #include "core/hle/service/am/system_applet_proxy.h" | ||
| 17 | #include "core/hle/service/am/window_controller.h" | ||
| 18 | #include "core/hle/service/ipc_helpers.h" | ||
| 19 | |||
| 20 | namespace Service::AM { | ||
| 21 | |||
| 22 | ISystemAppletProxy::ISystemAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_, | ||
| 23 | std::shared_ptr<Applet> applet_, Core::System& system_) | ||
| 24 | : ServiceFramework{system_, "ISystemAppletProxy"}, nvnflinger{nvnflinger_}, applet{std::move( | ||
| 25 | applet_)} { | ||
| 26 | // clang-format off | ||
| 27 | static const FunctionInfo functions[] = { | ||
| 28 | {0, &ISystemAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, | ||
| 29 | {1, &ISystemAppletProxy::GetSelfController, "GetSelfController"}, | ||
| 30 | {2, &ISystemAppletProxy::GetWindowController, "GetWindowController"}, | ||
| 31 | {3, &ISystemAppletProxy::GetAudioController, "GetAudioController"}, | ||
| 32 | {4, &ISystemAppletProxy::GetDisplayController, "GetDisplayController"}, | ||
| 33 | {10, nullptr, "GetProcessWindingController"}, | ||
| 34 | {11, &ISystemAppletProxy::GetLibraryAppletCreator, "GetLibraryAppletCreator"}, | ||
| 35 | {20, &ISystemAppletProxy::GetHomeMenuFunctions, "GetHomeMenuFunctions"}, | ||
| 36 | {21, &ISystemAppletProxy::GetGlobalStateController, "GetGlobalStateController"}, | ||
| 37 | {22, &ISystemAppletProxy::GetApplicationCreator, "GetApplicationCreator"}, | ||
| 38 | {23, &ISystemAppletProxy::GetAppletCommonFunctions, "GetAppletCommonFunctions"}, | ||
| 39 | {1000, &ISystemAppletProxy::GetDebugFunctions, "GetDebugFunctions"}, | ||
| 40 | }; | ||
| 41 | // clang-format on | ||
| 42 | |||
| 43 | RegisterHandlers(functions); | ||
| 44 | } | ||
| 45 | |||
| 46 | ISystemAppletProxy::~ISystemAppletProxy() = default; | ||
| 47 | |||
| 48 | void ISystemAppletProxy::GetCommonStateGetter(HLERequestContext& ctx) { | ||
| 49 | LOG_DEBUG(Service_AM, "called"); | ||
| 50 | |||
| 51 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 52 | rb.Push(ResultSuccess); | ||
| 53 | rb.PushIpcInterface<ICommonStateGetter>(system, applet); | ||
| 54 | } | ||
| 55 | |||
| 56 | void ISystemAppletProxy::GetSelfController(HLERequestContext& ctx) { | ||
| 57 | LOG_DEBUG(Service_AM, "called"); | ||
| 58 | |||
| 59 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 60 | rb.Push(ResultSuccess); | ||
| 61 | rb.PushIpcInterface<ISelfController>(system, applet, nvnflinger); | ||
| 62 | } | ||
| 63 | |||
| 64 | void ISystemAppletProxy::GetWindowController(HLERequestContext& ctx) { | ||
| 65 | LOG_DEBUG(Service_AM, "called"); | ||
| 66 | |||
| 67 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 68 | rb.Push(ResultSuccess); | ||
| 69 | rb.PushIpcInterface<IWindowController>(system, applet); | ||
| 70 | } | ||
| 71 | |||
| 72 | void ISystemAppletProxy::GetAudioController(HLERequestContext& ctx) { | ||
| 73 | LOG_DEBUG(Service_AM, "called"); | ||
| 74 | |||
| 75 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 76 | rb.Push(ResultSuccess); | ||
| 77 | rb.PushIpcInterface<IAudioController>(system); | ||
| 78 | } | ||
| 79 | |||
| 80 | void ISystemAppletProxy::GetDisplayController(HLERequestContext& ctx) { | ||
| 81 | LOG_DEBUG(Service_AM, "called"); | ||
| 82 | |||
| 83 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 84 | rb.Push(ResultSuccess); | ||
| 85 | rb.PushIpcInterface<IDisplayController>(system, applet); | ||
| 86 | } | ||
| 87 | |||
| 88 | void ISystemAppletProxy::GetLibraryAppletCreator(HLERequestContext& ctx) { | ||
| 89 | LOG_DEBUG(Service_AM, "called"); | ||
| 90 | |||
| 91 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 92 | rb.Push(ResultSuccess); | ||
| 93 | rb.PushIpcInterface<ILibraryAppletCreator>(system, applet); | ||
| 94 | } | ||
| 95 | |||
| 96 | void ISystemAppletProxy::GetHomeMenuFunctions(HLERequestContext& ctx) { | ||
| 97 | LOG_DEBUG(Service_AM, "called"); | ||
| 98 | |||
| 99 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 100 | rb.Push(ResultSuccess); | ||
| 101 | rb.PushIpcInterface<IHomeMenuFunctions>(system); | ||
| 102 | } | ||
| 103 | |||
| 104 | void ISystemAppletProxy::GetGlobalStateController(HLERequestContext& ctx) { | ||
| 105 | LOG_DEBUG(Service_AM, "called"); | ||
| 106 | |||
| 107 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 108 | rb.Push(ResultSuccess); | ||
| 109 | rb.PushIpcInterface<IGlobalStateController>(system); | ||
| 110 | } | ||
| 111 | |||
| 112 | void ISystemAppletProxy::GetApplicationCreator(HLERequestContext& ctx) { | ||
| 113 | LOG_DEBUG(Service_AM, "called"); | ||
| 114 | |||
| 115 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 116 | rb.Push(ResultSuccess); | ||
| 117 | rb.PushIpcInterface<IApplicationCreator>(system); | ||
| 118 | } | ||
| 119 | |||
| 120 | void ISystemAppletProxy::GetAppletCommonFunctions(HLERequestContext& ctx) { | ||
| 121 | LOG_DEBUG(Service_AM, "called"); | ||
| 122 | |||
| 123 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 124 | rb.Push(ResultSuccess); | ||
| 125 | rb.PushIpcInterface<IAppletCommonFunctions>(system, applet); | ||
| 126 | } | ||
| 127 | |||
| 128 | void ISystemAppletProxy::GetDebugFunctions(HLERequestContext& ctx) { | ||
| 129 | LOG_DEBUG(Service_AM, "called"); | ||
| 130 | |||
| 131 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 132 | rb.Push(ResultSuccess); | ||
| 133 | rb.PushIpcInterface<IDebugFunctions>(system); | ||
| 134 | } | ||
| 135 | |||
| 136 | } // namespace Service::AM | ||
diff --git a/src/core/hle/service/am/system_applet_proxy.h b/src/core/hle/service/am/system_applet_proxy.h deleted file mode 100644 index 0390cd1e5..000000000 --- a/src/core/hle/service/am/system_applet_proxy.h +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include "core/hle/service/am/applet_message_queue.h" | ||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | namespace Service::AM { | ||
| 10 | |||
| 11 | struct Applet; | ||
| 12 | |||
| 13 | class ISystemAppletProxy final : public ServiceFramework<ISystemAppletProxy> { | ||
| 14 | public: | ||
| 15 | explicit ISystemAppletProxy(Nvnflinger::Nvnflinger& nvnflinger_, | ||
| 16 | std::shared_ptr<Applet> applet_, Core::System& system_); | ||
| 17 | ~ISystemAppletProxy(); | ||
| 18 | |||
| 19 | private: | ||
| 20 | void GetCommonStateGetter(HLERequestContext& ctx); | ||
| 21 | void GetSelfController(HLERequestContext& ctx); | ||
| 22 | void GetWindowController(HLERequestContext& ctx); | ||
| 23 | void GetAudioController(HLERequestContext& ctx); | ||
| 24 | void GetDisplayController(HLERequestContext& ctx); | ||
| 25 | void GetLibraryAppletCreator(HLERequestContext& ctx); | ||
| 26 | void GetHomeMenuFunctions(HLERequestContext& ctx); | ||
| 27 | void GetGlobalStateController(HLERequestContext& ctx); | ||
| 28 | void GetApplicationCreator(HLERequestContext& ctx); | ||
| 29 | void GetAppletCommonFunctions(HLERequestContext& ctx); | ||
| 30 | void GetDebugFunctions(HLERequestContext& ctx); | ||
| 31 | |||
| 32 | Nvnflinger::Nvnflinger& nvnflinger; | ||
| 33 | std::shared_ptr<Applet> applet; | ||
| 34 | }; | ||
| 35 | |||
| 36 | } // namespace Service::AM | ||