mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-20 11:34:29 -04:00
service: ptm: Rewrite PSM and add TS
This commit is contained in:
@@ -3,16 +3,29 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::SM {
|
||||
class ServiceManager;
|
||||
}
|
||||
namespace Service::PTM {
|
||||
|
||||
namespace Service::PSM {
|
||||
class PSM final : public ServiceFramework<PSM> {
|
||||
public:
|
||||
explicit PSM(Core::System& system_);
|
||||
~PSM() override;
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
|
||||
private:
|
||||
enum class ChargerType : u32 {
|
||||
Unplugged = 0,
|
||||
RegularCharger = 1,
|
||||
LowPowerCharger = 2,
|
||||
Unknown = 3,
|
||||
};
|
||||
|
||||
} // namespace Service::PSM
|
||||
void GetBatteryChargePercentage(Kernel::HLERequestContext& ctx);
|
||||
void GetChargerType(Kernel::HLERequestContext& ctx);
|
||||
void OpenSession(Kernel::HLERequestContext& ctx);
|
||||
|
||||
u32 battery_charge_percentage{100};
|
||||
ChargerType charger_type{ChargerType::RegularCharger};
|
||||
};
|
||||
|
||||
} // namespace Service::PTM
|
||||
|
||||
Reference in New Issue
Block a user