monitord/dbus/
zbus_machine.rs

1//! # D-Bus interface proxy for: `org.freedesktop.machine1.Machine`
2//!
3//! This code was generated by `zbus-xmlgen` `4.1.0` from D-Bus introspection data.
4//! Source: `Interface '/org/freedesktop/machine1/machine/fedora39' from service 'org.freedesktop.machine1' on system bus`.
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//! This type implements the [D-Bus standard interfaces], (`org.freedesktop.DBus.*`) for which the
12//! following zbus API can be used:
13//!
14//! * [`zbus::fdo::PeerProxy`]
15//! * [`zbus::fdo::IntrospectableProxy`]
16//! * [`zbus::fdo::PropertiesProxy`]
17//!
18//! Consequently `zbus-xmlgen` did not generate code for the above interfaces.
19//!
20//! [Writing a client proxy]: https://dbus2.github.io/zbus/client.html
21//! [D-Bus standard interfaces]: https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces,
22#![allow(warnings)]
23use zbus::proxy;
24
25#[proxy(
26    interface = "org.freedesktop.machine1.Machine",
27    default_service = "org.freedesktop.machine1"
28)]
29pub trait Machine {
30    /// BindMount method
31    fn bind_mount(
32        &self,
33        source: &str,
34        destination: &str,
35        read_only: bool,
36        mkdir: bool,
37    ) -> zbus::Result<()>;
38
39    /// CopyFrom method
40    fn copy_from(&self, source: &str, destination: &str) -> zbus::Result<()>;
41
42    /// CopyFromWithFlags method
43    fn copy_from_with_flags(&self, source: &str, destination: &str, flags: u64)
44        -> zbus::Result<()>;
45
46    /// CopyTo method
47    fn copy_to(&self, source: &str, destination: &str) -> zbus::Result<()>;
48
49    /// CopyToWithFlags method
50    fn copy_to_with_flags(&self, source: &str, destination: &str, flags: u64) -> zbus::Result<()>;
51
52    /// GetAddresses method
53    fn get_addresses(&self) -> zbus::Result<Vec<(i32, Vec<u8>)>>;
54
55    /// GetOSRelease method
56    #[zbus(name = "GetOSRelease")]
57    fn get_osrelease(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
58
59    /// GetUIDShift method
60    #[zbus(name = "GetUIDShift")]
61    fn get_uidshift(&self) -> zbus::Result<u32>;
62
63    /// Kill method
64    fn kill(&self, who: &str, signal: i32) -> zbus::Result<()>;
65
66    /// OpenLogin method
67    fn open_login(&self) -> zbus::Result<(zbus::zvariant::OwnedFd, String)>;
68
69    /// OpenPTY method
70    #[zbus(name = "OpenPTY")]
71    fn open_pty(&self) -> zbus::Result<(zbus::zvariant::OwnedFd, String)>;
72
73    /// OpenRootDirectory method
74    fn open_root_directory(&self) -> zbus::Result<zbus::zvariant::OwnedFd>;
75
76    /// OpenShell method
77    fn open_shell(
78        &self,
79        user: &str,
80        path: &str,
81        args: &[&str],
82        environment: &[&str],
83    ) -> zbus::Result<(zbus::zvariant::OwnedFd, String)>;
84
85    /// Terminate method
86    fn terminate(&self) -> zbus::Result<()>;
87
88    /// Class property
89    #[zbus(property)]
90    fn class(&self) -> zbus::Result<String>;
91
92    /// Id property
93    #[zbus(property)]
94    fn id(&self) -> zbus::Result<Vec<u8>>;
95
96    /// Leader property
97    #[zbus(property)]
98    fn leader(&self) -> zbus::Result<u32>;
99
100    /// Name property
101    #[zbus(property)]
102    fn name(&self) -> zbus::Result<String>;
103
104    /// NetworkInterfaces property
105    #[zbus(property)]
106    fn network_interfaces(&self) -> zbus::Result<Vec<i32>>;
107
108    /// RootDirectory property
109    #[zbus(property)]
110    fn root_directory(&self) -> zbus::Result<String>;
111
112    /// Service property
113    #[zbus(property)]
114    fn service(&self) -> zbus::Result<String>;
115
116    /// State property
117    #[zbus(property)]
118    fn state(&self) -> zbus::Result<String>;
119
120    /// Timestamp property
121    #[zbus(property)]
122    fn timestamp(&self) -> zbus::Result<u64>;
123
124    /// TimestampMonotonic property
125    #[zbus(property)]
126    fn timestamp_monotonic(&self) -> zbus::Result<u64>;
127
128    /// Unit property
129    #[zbus(property)]
130    fn unit(&self) -> zbus::Result<String>;
131}