mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Forwarded error from ProfileProxy::profile_names instead of 'expecting' there. Handled error up in main by logging. Reorganized code in ctrl_fan_cpu to keep consistent code structure
This commit is contained in:
@@ -41,6 +41,9 @@ trait Daemon {
|
||||
/// Profiles method
|
||||
fn profiles(&self) -> zbus::Result<String>;
|
||||
|
||||
/// ProfileNames method
|
||||
fn profile_names(&self) -> zbus::Result<String>;
|
||||
|
||||
/// SetProfile method
|
||||
fn set_profile(&self, profile: &str) -> zbus::Result<()>;
|
||||
|
||||
@@ -82,6 +85,11 @@ impl<'a> ProfileProxy<'a> {
|
||||
self.0.set_profile(&serde_json::to_string(cmd).unwrap())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn profile_names(&self) -> Result<String> {
|
||||
self.0.profile_names()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn connect_notify_profile(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user