mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Minor test of platform attributes
This commit is contained in:
65
rog-dbus/src/asus_armoury.rs
Normal file
65
rog-dbus/src/asus_armoury.rs
Normal file
@@ -0,0 +1,65 @@
|
||||
//! # D-Bus interface proxy for: `xyz.ljones.AsusArmoury`
|
||||
//!
|
||||
//! This code was generated by `zbus-xmlgen` `5.0.1` from D-Bus introspection data.
|
||||
//! Source: `Interface '/xyz/ljones/asus_armoury/nv_temp_target' from service 'xyz.ljones.Asusd' on system bus`.
|
||||
//!
|
||||
//! You may prefer to adapt it, instead of using it verbatim.
|
||||
//!
|
||||
//! More information can be found in the [Writing a client proxy] section of the zbus
|
||||
//! documentation.
|
||||
//!
|
||||
//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
|
||||
//! following zbus API can be used:
|
||||
//!
|
||||
//! * [`zbus::fdo::IntrospectableProxy`]
|
||||
//! * [`zbus::fdo::PropertiesProxy`]
|
||||
//! * [`zbus::fdo::PeerProxy`]
|
||||
//!
|
||||
//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
|
||||
//!
|
||||
//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
|
||||
//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
|
||||
use zbus::proxy;
|
||||
#[proxy(
|
||||
interface = "xyz.ljones.AsusArmoury",
|
||||
default_service = "xyz.ljones.Asusd",
|
||||
default_path = "/xyz/ljones/asus_armoury/nv_temp_target"
|
||||
)]
|
||||
pub trait AsusArmoury {
|
||||
/// A list of the properties this attribute actually uses. Any property
|
||||
/// not listed will return either an empty array or `-1`
|
||||
#[zbus(property)]
|
||||
fn available_attrs(&self) -> zbus::Result<Vec<String>>;
|
||||
|
||||
/// CurrentValue property
|
||||
#[zbus(property)]
|
||||
fn current_value(&self) -> zbus::Result<i32>;
|
||||
#[zbus(property)]
|
||||
fn set_current_value(&self, value: i32) -> zbus::Result<()>;
|
||||
|
||||
/// DefaultValue property
|
||||
#[zbus(property)]
|
||||
fn default_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// MaxValue property. Maximum allowed current_value. Returns `-1` if unused or not set.
|
||||
#[zbus(property)]
|
||||
fn max_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// MinValue property. Minimum allowed current_value. Returns `-1` if unused or not set.
|
||||
#[zbus(property)]
|
||||
fn min_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// PossibleValues property. Return the allowed values for `current_value` if used or set,
|
||||
/// otherwise the array is empty.
|
||||
#[zbus(property)]
|
||||
fn possible_values(&self) -> zbus::Result<Vec<i32>>;
|
||||
|
||||
/// Name property
|
||||
#[zbus(property)]
|
||||
fn name(&self) -> zbus::Result<String>;
|
||||
|
||||
/// ScalarIncrement property. The increment steps that `current_value` may take. Returns
|
||||
/// `-1` if not used or set.
|
||||
#[zbus(property)]
|
||||
fn scalar_increment(&self) -> zbus::Result<i32>;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
//! Path for iface is such as "/xyz/ljones/asus_armoury/boot_sound"
|
||||
use zbus::proxy;
|
||||
#[proxy(
|
||||
interface = "xyz.ljones.AsusArmoury",
|
||||
default_service = "xyz.ljones.Asusd"
|
||||
)]
|
||||
pub trait AsusArmoury {
|
||||
/// CurrentValue property
|
||||
#[zbus(property)]
|
||||
fn current_value(&self) -> zbus::Result<i32>;
|
||||
#[zbus(property)]
|
||||
fn set_current_value(&self, value: i32) -> zbus::Result<()>;
|
||||
|
||||
/// DefaultValue property
|
||||
#[zbus(property)]
|
||||
fn default_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// MaxValue property
|
||||
#[zbus(property)]
|
||||
fn max_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// MinValue property
|
||||
#[zbus(property)]
|
||||
fn min_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// Name property
|
||||
#[zbus(property)]
|
||||
fn name(&self) -> zbus::Result<String>;
|
||||
|
||||
/// ScalarIncrement property
|
||||
#[zbus(property)]
|
||||
fn scalar_increment(&self) -> zbus::Result<i32>;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
//! Path for iface is such as "/xyz/ljones/asus_armoury/boot_sound"
|
||||
use zbus::proxy;
|
||||
#[proxy(
|
||||
interface = "xyz.ljones.AsusArmoury",
|
||||
default_service = "xyz.ljones.Asusd"
|
||||
)]
|
||||
pub trait AsusArmoury {
|
||||
/// CurrentValue property
|
||||
#[zbus(property)]
|
||||
fn current_value(&self) -> zbus::Result<String>;
|
||||
#[zbus(property)]
|
||||
fn set_current_value(&self, value: String) -> zbus::Result<()>;
|
||||
|
||||
/// DefaultValue property
|
||||
#[zbus(property)]
|
||||
fn default_value(&self) -> zbus::Result<String>;
|
||||
|
||||
/// Name property
|
||||
#[zbus(property)]
|
||||
fn name(&self) -> zbus::Result<String>;
|
||||
|
||||
/// PossibleValues property
|
||||
#[zbus(property)]
|
||||
fn possible_values(&self) -> zbus::Result<Vec<String>>;
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
use zbus::proxy;
|
||||
#[proxy(
|
||||
interface = "xyz.ljones.AsusArmoury",
|
||||
default_service = "xyz.ljones.Asusd",
|
||||
default_path = "/xyz/ljones/asus_armoury/boot_sound"
|
||||
)]
|
||||
pub trait AsusArmoury {
|
||||
/// CurrentValue property
|
||||
#[zbus(property)]
|
||||
fn current_value(&self) -> zbus::Result<i32>;
|
||||
#[zbus(property)]
|
||||
fn set_current_value(&self, value: i32) -> zbus::Result<()>;
|
||||
|
||||
/// DefaultValue property
|
||||
#[zbus(property)]
|
||||
fn default_value(&self) -> zbus::Result<i32>;
|
||||
|
||||
/// Name property
|
||||
#[zbus(property)]
|
||||
fn name(&self) -> zbus::Result<String>;
|
||||
|
||||
/// PossibleValues property
|
||||
#[zbus(property)]
|
||||
fn possible_values(&self) -> zbus::Result<Vec<i32>>;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
pub mod attr_enum_int;
|
||||
pub mod attr_enum_str;
|
||||
pub mod attr_int;
|
||||
Reference in New Issue
Block a user