Rename RogBios bits to Platform. Better GPU MUX support.

This commit is contained in:
Luke D. Jones
2022-08-12 21:51:04 +12:00
parent d35707f2e4
commit a0f7cf3acd
16 changed files with 122 additions and 164 deletions

View File

@@ -6,7 +6,7 @@ pub mod zbus_anime;
pub mod zbus_charge;
pub mod zbus_led;
pub mod zbus_profile;
pub mod zbus_rogbios;
pub mod zbus_platform;
pub mod zbus_supported;
// use rog_anime::AnimePowerStates;
@@ -21,7 +21,7 @@ pub struct DbusProxiesBlocking<'a> {
charge: zbus_charge::ChargeProxyBlocking<'a>,
led: zbus_led::LedProxyBlocking<'a>,
profile: zbus_profile::ProfileProxyBlocking<'a>,
rog_bios: zbus_rogbios::RogBiosProxyBlocking<'a>,
rog_bios: zbus_platform::RogBiosProxyBlocking<'a>,
supported: zbus_supported::SupportedProxyBlocking<'a>,
}
@@ -36,7 +36,7 @@ impl<'a> DbusProxiesBlocking<'a> {
led: zbus_led::LedProxyBlocking::new(&conn)?,
charge: zbus_charge::ChargeProxyBlocking::new(&conn)?,
profile: zbus_profile::ProfileProxyBlocking::new(&conn)?,
rog_bios: zbus_rogbios::RogBiosProxyBlocking::new(&conn)?,
rog_bios: zbus_platform::RogBiosProxyBlocking::new(&conn)?,
supported: zbus_supported::SupportedProxyBlocking::new(&conn)?,
},
conn,
@@ -59,7 +59,7 @@ impl<'a> DbusProxiesBlocking<'a> {
&self.profile
}
pub fn rog_bios(&self) -> &zbus_rogbios::RogBiosProxyBlocking<'a> {
pub fn rog_bios(&self) -> &zbus_platform::RogBiosProxyBlocking<'a> {
&self.rog_bios
}
@@ -90,7 +90,7 @@ pub struct DbusProxies<'a> {
charge: zbus_charge::ChargeProxy<'a>,
led: zbus_led::LedProxy<'a>,
profile: zbus_profile::ProfileProxy<'a>,
rog_bios: zbus_rogbios::RogBiosProxy<'a>,
rog_bios: zbus_platform::RogBiosProxy<'a>,
supported: zbus_supported::SupportedProxy<'a>,
}
@@ -105,7 +105,7 @@ impl<'a> DbusProxies<'a> {
led: zbus_led::LedProxy::new(&conn).await?,
charge: zbus_charge::ChargeProxy::new(&conn).await?,
profile: zbus_profile::ProfileProxy::new(&conn).await?,
rog_bios: zbus_rogbios::RogBiosProxy::new(&conn).await?,
rog_bios: zbus_platform::RogBiosProxy::new(&conn).await?,
supported: zbus_supported::SupportedProxy::new(&conn).await?,
},
conn,
@@ -128,7 +128,7 @@ impl<'a> DbusProxies<'a> {
&self.profile
}
pub fn rog_bios(&self) -> &zbus_rogbios::RogBiosProxy<'a> {
pub fn rog_bios(&self) -> &zbus_platform::RogBiosProxy<'a> {
&self.rog_bios
}

View File

@@ -1,7 +1,7 @@
//! # DBus interface proxy for: `org.asuslinux.Daemon`
//!
//! This code was generated by `zbus-xmlgen` `1.0.0` from DBus introspection data.
//! Source: `Interface '/org/asuslinux/RogBios' from service 'org.asuslinux.Daemon' on system bus`.
//! Source: `Interface '/org/asuslinux/Platform' from service 'org.asuslinux.Daemon' on system bus`.
//!
//! You may prefer to adapt it, instead of using it verbatim.
//!
@@ -19,21 +19,22 @@
//!
//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
use rog_platform::platform::GpuMuxMode;
use zbus_macros::dbus_proxy;
#[dbus_proxy(
interface = "org.asuslinux.Daemon",
default_path = "/org/asuslinux/RogBios"
default_path = "/org/asuslinux/Platform"
)]
trait RogBios {
/// DedicatedGraphicMode method
fn dedicated_graphic_mode(&self) -> zbus::Result<bool>;
fn gpu_mux_mode(&self) -> zbus::Result<GpuMuxMode>;
/// PostBootSound method
fn post_boot_sound(&self) -> zbus::Result<i16>;
/// SetDedicatedGraphicMode method
fn set_dedicated_graphic_mode(&self, dedicated: bool) -> zbus::Result<()>;
fn set_gpu_mux_mode(&self, mode: GpuMuxMode) -> zbus::Result<()>;
/// SetPostBootSound method
fn set_post_boot_sound(&self, on: bool) -> zbus::Result<()>;
@@ -46,7 +47,7 @@ trait RogBios {
/// NotifyDedicatedGraphicMode signal
#[dbus_proxy(signal)]
fn notify_dedicated_graphic_mode(&self, dedicated: bool) -> zbus::Result<()>;
fn notify_gpu_mux_mode(&self, mode: GpuMuxMode) -> zbus::Result<()>;
/// NotifyPostBootSound signal
#[dbus_proxy(signal)]