summaryrefslogtreecommitdiff
path: root/src/core/hle/service/omm
diff options
context:
space:
mode:
authorGravatar Liam2024-02-11 21:01:19 -0500
committerGravatar Liam2024-02-12 09:18:29 -0500
commitbca698a17ae4b39106cd7f8c7eef06ccc7c8d6dd (patch)
treecdb54c90d4ef48e0efc9c4d47d49fd64ea3d7875 /src/core/hle/service/omm
parentam: rewrite IApplicationCreator (diff)
downloadyuzu-bca698a17ae4b39106cd7f8c7eef06ccc7c8d6dd.tar.gz
yuzu-bca698a17ae4b39106cd7f8c7eef06ccc7c8d6dd.tar.xz
yuzu-bca698a17ae4b39106cd7f8c7eef06ccc7c8d6dd.zip
am: move out omm interfaces to new module
Diffstat (limited to 'src/core/hle/service/omm')
-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.cpp49
-rw-r--r--src/core/hle/service/omm/operation_mode_manager.h20
-rw-r--r--src/core/hle/service/omm/policy_manager_system.cpp26
-rw-r--r--src/core/hle/service/omm/policy_manager_system.h20
-rw-r--r--src/core/hle/service/omm/power_state_interface.cpp32
-rw-r--r--src/core/hle/service/omm/power_state_interface.h20
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 @@
1// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/omm/omm.h"
5#include "core/hle/service/omm/operation_mode_manager.h"
6#include "core/hle/service/omm/policy_manager_system.h"
7#include "core/hle/service/omm/power_state_interface.h"
8#include "core/hle/service/server_manager.h"
9
10namespace Service::OMM {
11
12void LoopProcess(Core::System& system) {
13 auto server_manager = std::make_unique<ServerManager>(system);
14
15 server_manager->RegisterNamedService("idle:sys",
16 std::make_shared<IPolicyManagerSystem>(system));
17 server_manager->RegisterNamedService("omm", std::make_shared<IOperationModeManager>(system));
18 server_manager->RegisterNamedService("spsm", std::make_shared<IPowerStateInterface>(system));
19 ServerManager::RunServer(std::move(server_manager));
20}
21
22} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6namespace Core {
7class System;
8}
9
10namespace Service::OMM {
11
12void LoopProcess(Core::System& system);
13
14} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/omm/operation_mode_manager.h"
5
6namespace Service::OMM {
7
8IOperationModeManager::IOperationModeManager(Core::System& system_)
9 : ServiceFramework{system_, "omm"} {
10 // clang-format off
11 static const FunctionInfo functions[] = {
12 {0, nullptr, "GetOperationMode"},
13 {1, nullptr, "GetOperationModeChangeEvent"},
14 {2, nullptr, "EnableAudioVisual"},
15 {3, nullptr, "DisableAudioVisual"},
16 {4, nullptr, "EnterSleepAndWait"},
17 {5, nullptr, "GetCradleStatus"},
18 {6, nullptr, "FadeInDisplay"},
19 {7, nullptr, "FadeOutDisplay"},
20 {8, nullptr, "GetCradleFwVersion"},
21 {9, nullptr, "NotifyCecSettingsChanged"},
22 {10, nullptr, "SetOperationModePolicy"},
23 {11, nullptr, "GetDefaultDisplayResolution"},
24 {12, nullptr, "GetDefaultDisplayResolutionChangeEvent"},
25 {13, nullptr, "UpdateDefaultDisplayResolution"},
26 {14, nullptr, "ShouldSleepOnBoot"},
27 {15, nullptr, "NotifyHdcpApplicationExecutionStarted"},
28 {16, nullptr, "NotifyHdcpApplicationExecutionFinished"},
29 {17, nullptr, "NotifyHdcpApplicationDrawingStarted"},
30 {18, nullptr, "NotifyHdcpApplicationDrawingFinished"},
31 {19, nullptr, "GetHdcpAuthenticationFailedEvent"},
32 {20, nullptr, "GetHdcpAuthenticationFailedEmulationEnabled"},
33 {21, nullptr, "SetHdcpAuthenticationFailedEmulation"},
34 {22, nullptr, "GetHdcpStateChangeEvent"},
35 {23, nullptr, "GetHdcpState"},
36 {24, nullptr, "ShowCardUpdateProcessing"},
37 {25, nullptr, "SetApplicationCecSettingsAndNotifyChanged"},
38 {26, nullptr, "GetOperationModeSystemInfo"},
39 {27, nullptr, "GetAppletFullAwakingSystemEvent"},
40 {28, nullptr, "CreateCradleFirmwareUpdater"},
41 };
42 // clang-format on
43
44 RegisterHandlers(functions);
45}
46
47IOperationModeManager::~IOperationModeManager() = default;
48
49} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "core/hle/service/service.h"
7
8namespace Core {
9class System;
10}
11
12namespace Service::OMM {
13
14class IOperationModeManager final : public ServiceFramework<IOperationModeManager> {
15public:
16 explicit IOperationModeManager(Core::System& system_);
17 ~IOperationModeManager() override;
18};
19
20} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/omm/policy_manager_system.h"
5
6namespace Service::OMM {
7
8IPolicyManagerSystem::IPolicyManagerSystem(Core::System& system_)
9 : ServiceFramework{system_, "idle:sys"} {
10 // clang-format off
11 static const FunctionInfo functions[] = {
12 {0, nullptr, "GetAutoPowerDownEvent"},
13 {1, nullptr, "IsAutoPowerDownRequested"},
14 {2, nullptr, "Unknown2"},
15 {3, nullptr, "SetHandlingContext"},
16 {4, nullptr, "LoadAndApplySettings"},
17 {5, nullptr, "ReportUserIsActive"},
18 };
19 // clang-format on
20
21 RegisterHandlers(functions);
22}
23
24IPolicyManagerSystem::~IPolicyManagerSystem() = default;
25
26} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "core/hle/service/service.h"
7
8namespace Core {
9class System;
10}
11
12namespace Service::OMM {
13
14class IPolicyManagerSystem final : public ServiceFramework<IPolicyManagerSystem> {
15public:
16 explicit IPolicyManagerSystem(Core::System& system_);
17 ~IPolicyManagerSystem() override;
18};
19
20} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include "core/hle/service/omm/power_state_interface.h"
5
6namespace Service::OMM {
7
8IPowerStateInterface::IPowerStateInterface(Core::System& system_)
9 : ServiceFramework{system_, "spsm"} {
10 // clang-format off
11 static const FunctionInfo functions[] = {
12 {0, nullptr, "GetState"},
13 {1, nullptr, "EnterSleep"},
14 {2, nullptr, "GetLastWakeReason"},
15 {3, nullptr, "Shutdown"},
16 {4, nullptr, "GetNotificationMessageEventHandle"},
17 {5, nullptr, "ReceiveNotificationMessage"},
18 {6, nullptr, "AnalyzeLogForLastSleepWakeSequence"},
19 {7, nullptr, "ResetEventLog"},
20 {8, nullptr, "AnalyzePerformanceLogForLastSleepWakeSequence"},
21 {9, nullptr, "ChangeHomeButtonLongPressingTime"},
22 {10, nullptr, "PutErrorState"},
23 {11, nullptr, "InvalidateCurrentHomeButtonPressing"},
24 };
25 // clang-format on
26
27 RegisterHandlers(functions);
28}
29
30IPowerStateInterface::~IPowerStateInterface() = default;
31
32} // 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 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include "core/hle/service/service.h"
7
8namespace Core {
9class System;
10}
11
12namespace Service::OMM {
13
14class IPowerStateInterface final : public ServiceFramework<IPowerStateInterface> {
15public:
16 explicit IPowerStateInterface(Core::System& system_);
17 ~IPowerStateInterface() override;
18};
19
20} // namespace Service::OMM