summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/omm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/omm/omm.cpp22
-rw-r--r--src/core/hle/service/omm/omm.h14
-rw-r--r--src/core/hle/service/omm/operation_mode_manager.cpp (renamed from src/core/hle/service/am/omm.cpp)11
-rw-r--r--src/core/hle/service/omm/operation_mode_manager.h20
-rw-r--r--src/core/hle/service/omm/policy_manager_system.cpp (renamed from src/core/hle/service/am/idle.cpp)11
-rw-r--r--src/core/hle/service/omm/policy_manager_system.h20
-rw-r--r--src/core/hle/service/omm/power_state_interface.cpp (renamed from src/core/hle/service/am/spsm.cpp)11
-rw-r--r--src/core/hle/service/omm/power_state_interface.h20
8 files changed, 114 insertions, 15 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/am/omm.cpp b/src/core/hle/service/omm/operation_mode_manager.cpp
index 66824e495..fe7ed84a7 100644
--- a/src/core/hle/service/am/omm.cpp
+++ b/src/core/hle/service/omm/operation_mode_manager.cpp
@@ -1,11 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/am/omm.h"
+#include "core/hle/service/omm/operation_mode_manager.h"
-namespace Service::AM {
+namespace Service::OMM {
-OMM::OMM(Core::System& system_) : ServiceFramework{system_, "omm"} {
+IOperationModeManager::IOperationModeManager(Core::System& system_)
+ : ServiceFramework{system_, "omm"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "GetOperationMode"},
@@ -43,6 +44,6 @@ OMM::OMM(Core::System& system_) : ServiceFramework{system_, "omm"} {
RegisterHandlers(functions);
}
-OMM::~OMM() = default;
+IOperationModeManager::~IOperationModeManager() = default;
-} // namespace Service::AM
+} // 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/am/idle.cpp b/src/core/hle/service/omm/policy_manager_system.cpp
index 603515284..1cd6fd807 100644
--- a/src/core/hle/service/am/idle.cpp
+++ b/src/core/hle/service/omm/policy_manager_system.cpp
@@ -1,11 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/am/idle.h"
+#include "core/hle/service/omm/policy_manager_system.h"
-namespace Service::AM {
+namespace Service::OMM {
-IdleSys::IdleSys(Core::System& system_) : ServiceFramework{system_, "idle:sys"} {
+IPolicyManagerSystem::IPolicyManagerSystem(Core::System& system_)
+ : ServiceFramework{system_, "idle:sys"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "GetAutoPowerDownEvent"},
@@ -20,6 +21,6 @@ IdleSys::IdleSys(Core::System& system_) : ServiceFramework{system_, "idle:sys"}
RegisterHandlers(functions);
}
-IdleSys::~IdleSys() = default;
+IPolicyManagerSystem::~IPolicyManagerSystem() = default;
-} // namespace Service::AM
+} // 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/am/spsm.cpp b/src/core/hle/service/omm/power_state_interface.cpp
index ec581e32b..22cac8259 100644
--- a/src/core/hle/service/am/spsm.cpp
+++ b/src/core/hle/service/omm/power_state_interface.cpp
@@ -1,11 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/am/spsm.h"
+#include "core/hle/service/omm/power_state_interface.h"
-namespace Service::AM {
+namespace Service::OMM {
-SPSM::SPSM(Core::System& system_) : ServiceFramework{system_, "spsm"} {
+IPowerStateInterface::IPowerStateInterface(Core::System& system_)
+ : ServiceFramework{system_, "spsm"} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "GetState"},
@@ -26,6 +27,6 @@ SPSM::SPSM(Core::System& system_) : ServiceFramework{system_, "spsm"} {
RegisterHandlers(functions);
}
-SPSM::~SPSM() = default;
+IPowerStateInterface::~IPowerStateInterface() = default;
-} // namespace Service::AM
+} // 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