cosmic_settings_daemon/
lib.rs

1//! # DBus interface proxy for: `com.system76.CosmicSettingsDaemon`
2//!
3//! This code was generated by `zbus-xmlgen` `3.1.1` from DBus introspection data.
4//! Source: `Interface '/com/system76/CosmicSettingsDaemon' from service 'com.system76.CosmicSettingsDaemon' on session bus`.
5//!
6//! You may prefer to adapt it, instead of using it verbatim.
7//!
8//! More information can be found in the
9//! [Writing a client proxy](https://dbus.pages.freedesktop.org/zbus/client.html)
10//! section of the zbus documentation.
11//!
12//! This DBus object implements
13//! [standard DBus interfaces](https://dbus.freedesktop.org/doc/dbus-specification.html),
14//! (`org.freedesktop.DBus.*`) for which the following zbus proxies can be used:
15//!
16//! * [`zbus::fdo::PeerProxy`]
17//! * [`zbus::fdo::PropertiesProxy`]
18//! * [`zbus::fdo::IntrospectableProxy`]
19//!
20//! …consequently `zbus-xmlgen` did not generate code for the above interfaces.
21
22use zbus::{names::OwnedWellKnownName, proxy};
23
24#[proxy(
25	interface = "com.system76.CosmicSettingsDaemon",
26	default_service = "com.system76.CosmicSettingsDaemon",
27	default_path = "/com/system76/CosmicSettingsDaemon"
28)]
29pub trait CosmicSettingsDaemon {
30	/// DecreaseDisplayBrightness method
31	fn decrease_display_brightness(&self) -> zbus::Result<()>;
32
33	/// DecreaseKeyboardBrightness method
34	fn decrease_keyboard_brightness(&self) -> zbus::Result<()>;
35
36	/// IncreaseDisplayBrightness method
37	fn increase_display_brightness(&self) -> zbus::Result<()>;
38
39	/// IncreaseKeyboardBrightness method
40	fn increase_keyboard_brightness(&self) -> zbus::Result<()>;
41
42	/// WatchConfig method
43	fn watch_config(
44		&self,
45		id: &str,
46		version: u64,
47	) -> zbus::Result<(zbus::zvariant::OwnedObjectPath, OwnedWellKnownName)>;
48
49	/// WatchState method
50	fn watch_state(
51		&self,
52		id: &str,
53		version: u64,
54	) -> zbus::Result<(zbus::zvariant::OwnedObjectPath, OwnedWellKnownName)>;
55
56	/// DisplayBrightness property
57	#[zbus(property)]
58	fn display_brightness(&self) -> zbus::Result<i32>;
59	fn set_display_brightness(&self, value: i32) -> zbus::Result<()>;
60
61	/// KeyboardBrightness property
62	#[zbus(property)]
63	fn keyboard_brightness(&self) -> zbus::Result<i32>;
64	fn set_keyboard_brightness(&self, value: i32) -> zbus::Result<()>;
65}
66
67#[proxy(
68	interface = "com.system76.CosmicSettingsDaemon.Config",
69	default_service = "com.system76.CosmicSettingsDaemon.Config"
70)]
71pub trait Config {
72	/// Changed signal
73	#[zbus(signal)]
74	async fn changed(&self, id: String, key: String) -> zbus::Result<()>;
75}