mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-14 07:58:34 +00:00
@@ -27,13 +27,7 @@ public:
|
||||
}
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key,
|
||||
FunctionInfo{0, &IPsmSession::BindStateChangeEvent, "BindStateChangeEvent"},
|
||||
FunctionInfo{1, &IPsmSession::UnbindStateChangeEvent, "UnbindStateChangeEvent"},
|
||||
FunctionInfo{2, &IPsmSession::SetChargerTypeChangeEventEnabled, "SetChargerTypeChangeEventEnabled"},
|
||||
FunctionInfo{3, &IPsmSession::SetPowerSupplyChangeEventEnabled, "SetPowerSupplyChangeEventEnabled"},
|
||||
FunctionInfo{4, &IPsmSession::SetBatteryVoltageStateChangeEventEnabled, "SetBatteryVoltageStateChangeEventEnabled"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
~IPsmSession() override {
|
||||
@@ -111,8 +105,15 @@ private:
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
KernelHelpers::ServiceContext service_context;
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, &IPsmSession::BindStateChangeEvent, "BindStateChangeEvent"},
|
||||
FunctionInfo{1, &IPsmSession::UnbindStateChangeEvent, "UnbindStateChangeEvent"},
|
||||
FunctionInfo{2, &IPsmSession::SetChargerTypeChangeEventEnabled, "SetChargerTypeChangeEventEnabled"},
|
||||
FunctionInfo{3, &IPsmSession::SetPowerSupplyChangeEventEnabled, "SetPowerSupplyChangeEventEnabled"},
|
||||
FunctionInfo{4, &IPsmSession::SetBatteryVoltageStateChangeEventEnabled, "SetBatteryVoltageStateChangeEventEnabled"}
|
||||
);
|
||||
|
||||
KernelHelpers::ServiceContext service_context;
|
||||
bool should_signal_charger_type{};
|
||||
bool should_signal_power_supply{};
|
||||
bool should_signal_battery_voltage{};
|
||||
|
||||
@@ -19,12 +19,13 @@ public:
|
||||
explicit PSM_MANU(Core::System& system_)
|
||||
: ServiceFramework{system_, "psm:manu"} {}
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key,
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "EnableVdd50StateControl"},
|
||||
FunctionInfo{1, nullptr, "DisableVdd50StateControl"},
|
||||
FunctionInfo{2, nullptr, "SetVdd50State"}
|
||||
);
|
||||
FunctionInfoBase const* FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,10 +34,11 @@ public:
|
||||
explicit POWCTL(Core::System& system_)
|
||||
: ServiceFramework{system_, "powctl"} {}
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key,
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "OpenSession"}
|
||||
);
|
||||
FunctionInfoBase const* FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,11 +22,7 @@ public:
|
||||
explicit ISession(Core::System& system_) : ServiceFramework{system_, "ISession"} {}
|
||||
|
||||
FunctionInfoBase const* FindRequest(u32 key) override {
|
||||
return HandlerTableGenerateWithFind(key,
|
||||
FunctionInfo{0, nullptr, "GetTemperatureRange"},
|
||||
FunctionInfo{2, nullptr, "SetMeasurementMode"},
|
||||
FunctionInfo{4, &ISession::GetTemperature, "GetTemperature"}
|
||||
);
|
||||
return HandlerTableGenerateWithFind(key, functions);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -37,6 +33,12 @@ private:
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push(temperature);
|
||||
}
|
||||
|
||||
static constexpr auto functions = CreateStaticMap(
|
||||
FunctionInfo{0, nullptr, "GetTemperatureRange"},
|
||||
FunctionInfo{2, nullptr, "SetMeasurementMode"},
|
||||
FunctionInfo{4, &ISession::GetTemperature, "GetTemperature"}
|
||||
);
|
||||
};
|
||||
|
||||
TS::TS(Core::System& system_) : ServiceFramework{system_, "ts"} {
|
||||
|
||||
Reference in New Issue
Block a user