2022-04-23 08:59:50 +00:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2018-10-20 21:22:15 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-06-26 23:48:12 +00:00
|
|
|
#include "core/hle/service/service.h"
|
2020-11-26 20:19:08 +00:00
|
|
|
|
2022-06-26 23:48:12 +00:00
|
|
|
namespace Service::PTM {
|
2018-10-20 21:22:15 +00:00
|
|
|
|
2022-06-26 23:48:12 +00:00
|
|
|
class PSM final : public ServiceFramework<PSM> {
|
|
|
|
public:
|
|
|
|
explicit PSM(Core::System& system_);
|
|
|
|
~PSM() override;
|
2018-10-20 21:22:15 +00:00
|
|
|
|
2022-06-26 23:48:12 +00:00
|
|
|
private:
|
|
|
|
enum class ChargerType : u32 {
|
|
|
|
Unplugged = 0,
|
|
|
|
RegularCharger = 1,
|
|
|
|
LowPowerCharger = 2,
|
|
|
|
Unknown = 3,
|
|
|
|
};
|
2018-10-20 21:22:15 +00:00
|
|
|
|
2023-02-19 19:42:12 +00:00
|
|
|
void GetBatteryChargePercentage(HLERequestContext& ctx);
|
|
|
|
void GetChargerType(HLERequestContext& ctx);
|
|
|
|
void OpenSession(HLERequestContext& ctx);
|
2022-06-26 23:48:12 +00:00
|
|
|
|
|
|
|
u32 battery_charge_percentage{100};
|
|
|
|
ChargerType charger_type{ChargerType::RegularCharger};
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Service::PTM
|