mirror of
https://git.zaroz.cloud/nintendo-back-up/yuzu/yuzu-mainline.git
synced 2026-01-02 00:07:15 +00:00
am: move out omm interfaces to new module
This commit is contained in:
22
src/core/hle/service/omm/omm.cpp
Normal file
22
src/core/hle/service/omm/omm.cpp
Normal file
@@ -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
|
||||
14
src/core/hle/service/omm/omm.h
Normal file
14
src/core/hle/service/omm/omm.h
Normal file
@@ -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
|
||||
49
src/core/hle/service/omm/operation_mode_manager.cpp
Normal file
49
src/core/hle/service/omm/operation_mode_manager.cpp
Normal file
@@ -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
|
||||
20
src/core/hle/service/omm/operation_mode_manager.h
Normal file
20
src/core/hle/service/omm/operation_mode_manager.h
Normal file
@@ -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
|
||||
26
src/core/hle/service/omm/policy_manager_system.cpp
Normal file
26
src/core/hle/service/omm/policy_manager_system.cpp
Normal file
@@ -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
|
||||
20
src/core/hle/service/omm/policy_manager_system.h
Normal file
20
src/core/hle/service/omm/policy_manager_system.h
Normal file
@@ -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
|
||||
32
src/core/hle/service/omm/power_state_interface.cpp
Normal file
32
src/core/hle/service/omm/power_state_interface.cpp
Normal file
@@ -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
|
||||
20
src/core/hle/service/omm/power_state_interface.h
Normal file
20
src/core/hle/service/omm/power_state_interface.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user