Check inotify paths are valid. Add dgu/egpu/ac_online checks

This commit is contained in:
Luke D. Jones
2022-09-24 14:34:15 +12:00
parent 30550aaa91
commit 7939b00aa3
17 changed files with 210 additions and 43 deletions

View File

@@ -27,33 +27,53 @@ use zbus_macros::dbus_proxy;
default_path = "/org/asuslinux/Platform"
)]
trait RogBios {
/// DedicatedGraphicMode method
/// DgpuDisable method
fn dgpu_disable(&self) -> zbus::Result<bool>;
/// EgpuEnable method
fn egpu_enable(&self) -> zbus::Result<bool>;
/// GpuMuxMode method
fn gpu_mux_mode(&self) -> zbus::Result<GpuMode>;
/// PanelOd method
fn panel_od(&self) -> zbus::Result<bool>;
/// PostBootSound method
fn post_boot_sound(&self) -> zbus::Result<i16>;
/// SetDedicatedGraphicMode method
/// SetDgpuDisable method
fn set_dgpu_disable(&self, disable: bool) -> zbus::Result<()>;
/// SetEgpuEnable method
fn set_egpu_enable(&self, enable: bool) -> zbus::Result<()>;
/// SetGpuMuxMode method
fn set_gpu_mux_mode(&self, mode: GpuMode) -> zbus::Result<()>;
/// SetPanelOd method
fn set_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// SetPostBootSound method
fn set_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
/// PanelOverdrive method
fn panel_od(&self) -> zbus::Result<bool>;
/// NotifyDgpuDisable signal
#[dbus_proxy(signal)]
fn notify_dgpu_disable(&self, disable: bool) -> zbus::Result<()>;
/// SetPanelOverdrive method
fn set_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// NotifyEgpuEnable signal
#[dbus_proxy(signal)]
fn notify_egpu_enable(&self, enable: bool) -> zbus::Result<()>;
/// NotifyDedicatedGraphicMode signal
/// NotifyGpuMuxMode signal
#[dbus_proxy(signal)]
fn notify_gpu_mux_mode(&self, mode: GpuMode) -> zbus::Result<()>;
/// NotifyPostBootSound signal
#[dbus_proxy(signal)]
fn notify_post_boot_sound(&self, sound: bool) -> zbus::Result<()>;
/// NotifyPanelOverdrive signal
/// NotifyPanelOd signal
#[dbus_proxy(signal)]
fn notify_panel_od(&self, overdrive: bool) -> zbus::Result<()>;
/// NotifyPostBootSound signal
#[dbus_proxy(signal)]
fn notify_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
}

View File

@@ -29,10 +29,17 @@ trait Power {
/// charge_control_end_threshold method
fn charge_control_end_threshold(&self) -> zbus::Result<u8>;
/// MainsOnline method
fn mains_online(&self) -> zbus::Result<bool>;
/// set_charge_control_end_threshold method
fn set_charge_control_end_threshold(&self, limit: u8) -> zbus::Result<()>;
/// NotifyCharge signal
#[dbus_proxy(signal)]
fn notify_charge_control_end_threshold(&self, limit: u8) -> zbus::Result<u8>;
/// NotifyMainsOnline signal
#[dbus_proxy(signal)]
fn notify_mains_online(&self, on: bool) -> zbus::Result<()>;
}