monitord/dbus/
zbus_machine.rs1#![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 fn bind_mount(
32 &self,
33 source: &str,
34 destination: &str,
35 read_only: bool,
36 mkdir: bool,
37 ) -> zbus::Result<()>;
38
39 fn copy_from(&self, source: &str, destination: &str) -> zbus::Result<()>;
41
42 fn copy_from_with_flags(&self, source: &str, destination: &str, flags: u64)
44 -> zbus::Result<()>;
45
46 fn copy_to(&self, source: &str, destination: &str) -> zbus::Result<()>;
48
49 fn copy_to_with_flags(&self, source: &str, destination: &str, flags: u64) -> zbus::Result<()>;
51
52 fn get_addresses(&self) -> zbus::Result<Vec<(i32, Vec<u8>)>>;
54
55 #[zbus(name = "GetOSRelease")]
57 fn get_osrelease(&self) -> zbus::Result<std::collections::HashMap<String, String>>;
58
59 #[zbus(name = "GetUIDShift")]
61 fn get_uidshift(&self) -> zbus::Result<u32>;
62
63 fn kill(&self, who: &str, signal: i32) -> zbus::Result<()>;
65
66 fn open_login(&self) -> zbus::Result<(zbus::zvariant::OwnedFd, String)>;
68
69 #[zbus(name = "OpenPTY")]
71 fn open_pty(&self) -> zbus::Result<(zbus::zvariant::OwnedFd, String)>;
72
73 fn open_root_directory(&self) -> zbus::Result<zbus::zvariant::OwnedFd>;
75
76 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 fn terminate(&self) -> zbus::Result<()>;
87
88 #[zbus(property)]
90 fn class(&self) -> zbus::Result<String>;
91
92 #[zbus(property)]
94 fn id(&self) -> zbus::Result<Vec<u8>>;
95
96 #[zbus(property)]
98 fn leader(&self) -> zbus::Result<u32>;
99
100 #[zbus(property)]
102 fn name(&self) -> zbus::Result<String>;
103
104 #[zbus(property)]
106 fn network_interfaces(&self) -> zbus::Result<Vec<i32>>;
107
108 #[zbus(property)]
110 fn root_directory(&self) -> zbus::Result<String>;
111
112 #[zbus(property)]
114 fn service(&self) -> zbus::Result<String>;
115
116 #[zbus(property)]
118 fn state(&self) -> zbus::Result<String>;
119
120 #[zbus(property)]
122 fn timestamp(&self) -> zbus::Result<u64>;
123
124 #[zbus(property)]
126 fn timestamp_monotonic(&self) -> zbus::Result<u64>;
127
128 #[zbus(property)]
130 fn unit(&self) -> zbus::Result<String>;
131}