Skip to main content

cecd_proxy/
cec_device1.rs

1//! # D-Bus interface proxy for: `com.steampowered.CecDaemon1.CecDevice1`
2//!
3//! This code was generated by `zbus-xmlgen` `5.2.0` from D-Bus introspection data.
4//! Source: `com.steampowered.CecDaemon1.CecDevice1.xml`.
5//!
6//! You may prefer to adapt it, instead of using it verbatim.
7//!
8//! More information can be found in the [Writing a client proxy] section of the zbus
9//! documentation.
10//!
11//!
12//! [Writing a client proxy]: https://z-galaxy.github.io/zbus/client.html
13//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
14use zbus::proxy;
15#[proxy(
16    interface = "com.steampowered.CecDaemon1.CecDevice1",
17    default_service = "com.steampowered.CecDaemon1",
18    assume_defaults = true
19)]
20pub trait CecDevice1 {
21    /// GetAudioStatus method
22    fn get_audio_status(&self, target: u8) -> zbus::Result<(u8, bool)>;
23
24    /// Mute method
25    fn mute(&self, target: u8) -> zbus::Result<()>;
26
27    /// Poll method
28    fn poll(&self, target: u8) -> zbus::Result<()>;
29
30    /// PressOnceUserControl method
31    fn press_once_user_control(&self, button: &[u8], target: u8) -> zbus::Result<()>;
32
33    /// PressUserControl method
34    fn press_user_control(&self, button: &[u8], target: u8) -> zbus::Result<()>;
35
36    /// ReleaseUserControl method
37    fn release_user_control(&self, target: u8) -> zbus::Result<()>;
38
39    /// SendRawMessage method
40    fn send_raw_message(&self, raw_message: &[u8], target: u8) -> zbus::Result<u32>;
41
42    /// SendReceiveRawMessage method
43    fn send_receive_raw_message(
44        &self,
45        raw_message: &[u8],
46        target: u8,
47        opcode: u8,
48        timeout: u16,
49    ) -> zbus::Result<Vec<u8>>;
50
51    /// SetActiveSource method
52    fn set_active_source(&self, phys_addr: i32) -> zbus::Result<()>;
53
54    /// SetOsdName method
55    fn set_osd_name(&self, name: &str) -> zbus::Result<()>;
56
57    /// Standby method
58    fn standby(&self, target: u8) -> zbus::Result<()>;
59
60    /// VolumeDown method
61    fn volume_down(&self, target: u8) -> zbus::Result<()>;
62
63    /// VolumeUp method
64    fn volume_up(&self, target: u8) -> zbus::Result<()>;
65
66    /// Wake method
67    fn wake(&self) -> zbus::Result<()>;
68
69    /// ReceivedMessage signal
70    #[zbus(signal)]
71    fn received_message(
72        &self,
73        initiator: u8,
74        destination: u8,
75        timestamp: u64,
76        message: Vec<u8>,
77    ) -> zbus::Result<()>;
78
79    /// UserControlPressed signal
80    #[zbus(signal)]
81    fn user_control_pressed(&self, button: Vec<u8>, initiator: u8) -> zbus::Result<()>;
82
83    /// UserControlReleased signal
84    #[zbus(signal)]
85    fn user_control_released(&self, initiator: u8) -> zbus::Result<()>;
86
87    /// Active property
88    #[zbus(property)]
89    fn active(&self) -> zbus::Result<bool>;
90
91    /// LogicalAddresses property
92    #[zbus(property)]
93    fn logical_addresses(&self) -> zbus::Result<Vec<u8>>;
94
95    /// PhysicalAddress property
96    #[zbus(property)]
97    fn physical_address(&self) -> zbus::Result<u16>;
98
99    /// VendorId property
100    #[zbus(property)]
101    fn vendor_id(&self) -> zbus::Result<i32>;
102}