diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2024-02-14 18:02:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-14 18:02:38 +0100 |
commit | 1e8554b01f007d86e0740e44ab50c59d12d5c9f5 (patch) | |
tree | c8749abcba107559141113f2b997238087b18d52 /src/core/hle/service/omm | |
parent | Merge pull request #13009 from t895/message-dialog-fix (diff) | |
parent | am: move out omm interfaces to new module (diff) | |
download | yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.gz yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.bz2 yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.lz yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.xz yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.tar.zst yuzu-1e8554b01f007d86e0740e44ab50c59d12d5c9f5.zip |
Diffstat (limited to 'src/core/hle/service/omm')
-rw-r--r-- | src/core/hle/service/omm/omm.cpp | 22 | ||||
-rw-r--r-- | src/core/hle/service/omm/omm.h | 14 | ||||
-rw-r--r-- | src/core/hle/service/omm/operation_mode_manager.cpp | 49 | ||||
-rw-r--r-- | src/core/hle/service/omm/operation_mode_manager.h | 20 | ||||
-rw-r--r-- | src/core/hle/service/omm/policy_manager_system.cpp | 26 | ||||
-rw-r--r-- | src/core/hle/service/omm/policy_manager_system.h | 20 | ||||
-rw-r--r-- | src/core/hle/service/omm/power_state_interface.cpp | 32 | ||||
-rw-r--r-- | src/core/hle/service/omm/power_state_interface.h | 20 |
8 files changed, 203 insertions, 0 deletions
diff --git a/src/core/hle/service/omm/omm.cpp b/src/core/hle/service/omm/omm.cpp new file mode 100644 index 000000000..b95319e26 --- /dev/null +++ b/src/core/hle/service/omm/omm.cpp @@ -0,0 +1,22 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/omm/omm.h" +#include "core/hle/service/omm/operation_mode_manager.h" +#include "core/hle/service/omm/policy_manager_system.h" +#include "core/hle/service/omm/power_state_interface.h" +#include "core/hle/service/server_manager.h" + +namespace Service::OMM { + +void LoopProcess(Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + + server_manager->RegisterNamedService("idle:sys", + std::make_shared<IPolicyManagerSystem>(system)); + server_manager->RegisterNamedService("omm", std::make_shared<IOperationModeManager>(system)); + server_manager->RegisterNamedService("spsm", std::make_shared<IPowerStateInterface>(system)); + ServerManager::RunServer(std::move(server_manager)); +} + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/omm.h b/src/core/hle/service/omm/omm.h new file mode 100644 index 000000000..7bf04688a --- /dev/null +++ b/src/core/hle/service/omm/omm.h @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +namespace Core { +class System; +} + +namespace Service::OMM { + +void LoopProcess(Core::System& system); + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/operation_mode_manager.cpp b/src/core/hle/service/omm/operation_mode_manager.cpp new file mode 100644 index 000000000..fe7ed84a7 --- /dev/null +++ b/src/core/hle/service/omm/operation_mode_manager.cpp @@ -0,0 +1,49 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/omm/operation_mode_manager.h" + +namespace Service::OMM { + +IOperationModeManager::IOperationModeManager(Core::System& system_) + : ServiceFramework{system_, "omm"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "GetOperationMode"}, + {1, nullptr, "GetOperationModeChangeEvent"}, + {2, nullptr, "EnableAudioVisual"}, + {3, nullptr, "DisableAudioVisual"}, + {4, nullptr, "EnterSleepAndWait"}, + {5, nullptr, "GetCradleStatus"}, + {6, nullptr, "FadeInDisplay"}, + {7, nullptr, "FadeOutDisplay"}, + {8, nullptr, "GetCradleFwVersion"}, + {9, nullptr, "NotifyCecSettingsChanged"}, + {10, nullptr, "SetOperationModePolicy"}, + {11, nullptr, "GetDefaultDisplayResolution"}, + {12, nullptr, "GetDefaultDisplayResolutionChangeEvent"}, + {13, nullptr, "UpdateDefaultDisplayResolution"}, + {14, nullptr, "ShouldSleepOnBoot"}, + {15, nullptr, "NotifyHdcpApplicationExecutionStarted"}, + {16, nullptr, "NotifyHdcpApplicationExecutionFinished"}, + {17, nullptr, "NotifyHdcpApplicationDrawingStarted"}, + {18, nullptr, "NotifyHdcpApplicationDrawingFinished"}, + {19, nullptr, "GetHdcpAuthenticationFailedEvent"}, + {20, nullptr, "GetHdcpAuthenticationFailedEmulationEnabled"}, + {21, nullptr, "SetHdcpAuthenticationFailedEmulation"}, + {22, nullptr, "GetHdcpStateChangeEvent"}, + {23, nullptr, "GetHdcpState"}, + {24, nullptr, "ShowCardUpdateProcessing"}, + {25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"}, + {26, nullptr, "GetOperationModeSystemInfo"}, + {27, nullptr, "GetAppletFullAwakingSystemEvent"}, + {28, nullptr, "CreateCradleFirmwareUpdater"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IOperationModeManager::~IOperationModeManager() = default; + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/operation_mode_manager.h b/src/core/hle/service/omm/operation_mode_manager.h new file mode 100644 index 000000000..32bc7b2f9 --- /dev/null +++ b/src/core/hle/service/omm/operation_mode_manager.h @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::OMM { + +class IOperationModeManager final : public ServiceFramework<IOperationModeManager> { +public: + explicit IOperationModeManager(Core::System& system_); + ~IOperationModeManager() override; +}; + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/policy_manager_system.cpp b/src/core/hle/service/omm/policy_manager_system.cpp new file mode 100644 index 000000000..1cd6fd807 --- /dev/null +++ b/src/core/hle/service/omm/policy_manager_system.cpp @@ -0,0 +1,26 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/omm/policy_manager_system.h" + +namespace Service::OMM { + +IPolicyManagerSystem::IPolicyManagerSystem(Core::System& system_) + : ServiceFramework{system_, "idle:sys"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "GetAutoPowerDownEvent"}, + {1, nullptr, "IsAutoPowerDownRequested"}, + {2, nullptr, "Unknown2"}, + {3, nullptr, "SetHandlingContext"}, + {4, nullptr, "LoadAndApplySettings"}, + {5, nullptr, "ReportUserIsActive"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IPolicyManagerSystem::~IPolicyManagerSystem() = default; + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/policy_manager_system.h b/src/core/hle/service/omm/policy_manager_system.h new file mode 100644 index 000000000..151ca0d2e --- /dev/null +++ b/src/core/hle/service/omm/policy_manager_system.h @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::OMM { + +class IPolicyManagerSystem final : public ServiceFramework<IPolicyManagerSystem> { +public: + explicit IPolicyManagerSystem(Core::System& system_); + ~IPolicyManagerSystem() override; +}; + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/power_state_interface.cpp b/src/core/hle/service/omm/power_state_interface.cpp new file mode 100644 index 000000000..22cac8259 --- /dev/null +++ b/src/core/hle/service/omm/power_state_interface.cpp @@ -0,0 +1,32 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/omm/power_state_interface.h" + +namespace Service::OMM { + +IPowerStateInterface::IPowerStateInterface(Core::System& system_) + : ServiceFramework{system_, "spsm"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "GetState"}, + {1, nullptr, "EnterSleep"}, + {2, nullptr, "GetLastWakeReason"}, + {3, nullptr, "Shutdown"}, + {4, nullptr, "GetNotificationMessageEventHandle"}, + {5, nullptr, "ReceiveNotificationMessage"}, + {6, nullptr, "AnalyzeLogForLastSleepWakeSequence"}, + {7, nullptr, "ResetEventLog"}, + {8, nullptr, "AnalyzePerformanceLogForLastSleepWakeSequence"}, + {9, nullptr, "ChangeHomeButtonLongPressingTime"}, + {10, nullptr, "PutErrorState"}, + {11, nullptr, "InvalidateCurrentHomeButtonPressing"}, + }; + // clang-format on + + RegisterHandlers(functions); +} + +IPowerStateInterface::~IPowerStateInterface() = default; + +} // namespace Service::OMM diff --git a/src/core/hle/service/omm/power_state_interface.h b/src/core/hle/service/omm/power_state_interface.h new file mode 100644 index 000000000..825a6512d --- /dev/null +++ b/src/core/hle/service/omm/power_state_interface.h @@ -0,0 +1,20 @@ +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "core/hle/service/service.h" + +namespace Core { +class System; +} + +namespace Service::OMM { + +class IPowerStateInterface final : public ServiceFramework<IPowerStateInterface> { +public: + explicit IPowerStateInterface(Core::System& system_); + ~IPowerStateInterface() override; +}; + +} // namespace Service::OMM |