1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#![allow(missing_docs)]
use crate as dbus;
use crate::arg;
use crate::nonblock;
pub trait DBus {
fn hello(&self) -> nonblock::MethodReply<String>;
fn request_name(&self, arg0: &str, arg1: u32) -> nonblock::MethodReply<u32>;
fn release_name(&self, arg0: &str) -> nonblock::MethodReply<u32>;
fn start_service_by_name(&self, arg0: &str, arg1: u32) -> nonblock::MethodReply<u32>;
fn update_activation_environment(&self, arg0: ::std::collections::HashMap<&str, &str>) -> nonblock::MethodReply<()>;
fn name_has_owner(&self, arg0: &str) -> nonblock::MethodReply<bool>;
fn list_names(&self) -> nonblock::MethodReply<Vec<String>>;
fn list_activatable_names(&self) -> nonblock::MethodReply<Vec<String>>;
fn add_match(&self, arg0: &str) -> nonblock::MethodReply<()>;
fn remove_match(&self, arg0: &str) -> nonblock::MethodReply<()>;
fn get_name_owner(&self, arg0: &str) -> nonblock::MethodReply<String>;
fn list_queued_owners(&self, arg0: &str) -> nonblock::MethodReply<Vec<String>>;
fn get_connection_unix_user(&self, arg0: &str) -> nonblock::MethodReply<u32>;
fn get_connection_unix_process_id(&self, arg0: &str) -> nonblock::MethodReply<u32>;
fn get_adt_audit_session_data(&self, arg0: &str) -> nonblock::MethodReply<Vec<u8>>;
fn get_connection_selinux_security_context(&self, arg0: &str) -> nonblock::MethodReply<Vec<u8>>;
fn reload_config(&self) -> nonblock::MethodReply<()>;
fn get_id(&self) -> nonblock::MethodReply<String>;
fn get_connection_credentials(&self, arg0: &str) -> nonblock::MethodReply<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>>;
fn features(&self) -> nonblock::MethodReply<Vec<String>>;
fn interfaces(&self) -> nonblock::MethodReply<Vec<String>>;
}
impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target=T>> DBus for nonblock::Proxy<'a, C> {
fn hello(&self) -> nonblock::MethodReply<String> {
self.method_call("org.freedesktop.DBus", "Hello", ())
.and_then(|r: (String, )| Ok(r.0, ))
}
fn request_name(&self, arg0: &str, arg1: u32) -> nonblock::MethodReply<u32> {
self.method_call("org.freedesktop.DBus", "RequestName", (arg0, arg1, ))
.and_then(|r: (u32, )| Ok(r.0, ))
}
fn release_name(&self, arg0: &str) -> nonblock::MethodReply<u32> {
self.method_call("org.freedesktop.DBus", "ReleaseName", (arg0, ))
.and_then(|r: (u32, )| Ok(r.0, ))
}
fn start_service_by_name(&self, arg0: &str, arg1: u32) -> nonblock::MethodReply<u32> {
self.method_call("org.freedesktop.DBus", "StartServiceByName", (arg0, arg1, ))
.and_then(|r: (u32, )| Ok(r.0, ))
}
fn update_activation_environment(&self, arg0: ::std::collections::HashMap<&str, &str>) -> nonblock::MethodReply<()> {
self.method_call("org.freedesktop.DBus", "UpdateActivationEnvironment", (arg0, ))
}
fn name_has_owner(&self, arg0: &str) -> nonblock::MethodReply<bool> {
self.method_call("org.freedesktop.DBus", "NameHasOwner", (arg0, ))
.and_then(|r: (bool, )| Ok(r.0, ))
}
fn list_names(&self) -> nonblock::MethodReply<Vec<String>> {
self.method_call("org.freedesktop.DBus", "ListNames", ())
.and_then(|r: (Vec<String>, )| Ok(r.0, ))
}
fn list_activatable_names(&self) -> nonblock::MethodReply<Vec<String>> {
self.method_call("org.freedesktop.DBus", "ListActivatableNames", ())
.and_then(|r: (Vec<String>, )| Ok(r.0, ))
}
fn add_match(&self, arg0: &str) -> nonblock::MethodReply<()> {
self.method_call("org.freedesktop.DBus", "AddMatch", (arg0, ))
}
fn remove_match(&self, arg0: &str) -> nonblock::MethodReply<()> {
self.method_call("org.freedesktop.DBus", "RemoveMatch", (arg0, ))
}
fn get_name_owner(&self, arg0: &str) -> nonblock::MethodReply<String> {
self.method_call("org.freedesktop.DBus", "GetNameOwner", (arg0, ))
.and_then(|r: (String, )| Ok(r.0, ))
}
fn list_queued_owners(&self, arg0: &str) -> nonblock::MethodReply<Vec<String>> {
self.method_call("org.freedesktop.DBus", "ListQueuedOwners", (arg0, ))
.and_then(|r: (Vec<String>, )| Ok(r.0, ))
}
fn get_connection_unix_user(&self, arg0: &str) -> nonblock::MethodReply<u32> {
self.method_call("org.freedesktop.DBus", "GetConnectionUnixUser", (arg0, ))
.and_then(|r: (u32, )| Ok(r.0, ))
}
fn get_connection_unix_process_id(&self, arg0: &str) -> nonblock::MethodReply<u32> {
self.method_call("org.freedesktop.DBus", "GetConnectionUnixProcessID", (arg0, ))
.and_then(|r: (u32, )| Ok(r.0, ))
}
fn get_adt_audit_session_data(&self, arg0: &str) -> nonblock::MethodReply<Vec<u8>> {
self.method_call("org.freedesktop.DBus", "GetAdtAuditSessionData", (arg0, ))
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn get_connection_selinux_security_context(&self, arg0: &str) -> nonblock::MethodReply<Vec<u8>> {
self.method_call("org.freedesktop.DBus", "GetConnectionSELinuxSecurityContext", (arg0, ))
.and_then(|r: (Vec<u8>, )| Ok(r.0, ))
}
fn reload_config(&self) -> nonblock::MethodReply<()> {
self.method_call("org.freedesktop.DBus", "ReloadConfig", ())
}
fn get_id(&self) -> nonblock::MethodReply<String> {
self.method_call("org.freedesktop.DBus", "GetId", ())
.and_then(|r: (String, )| Ok(r.0, ))
}
fn get_connection_credentials(&self, arg0: &str) -> nonblock::MethodReply<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>> {
self.method_call("org.freedesktop.DBus", "GetConnectionCredentials", (arg0, ))
.and_then(|r: (::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>, )| Ok(r.0, ))
}
fn features(&self) -> nonblock::MethodReply<Vec<String>> {
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.freedesktop.DBus", "Features")
}
fn interfaces(&self) -> nonblock::MethodReply<Vec<String>> {
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(&self, "org.freedesktop.DBus", "Interfaces")
}
}
#[derive(Debug)]
pub struct DBusNameOwnerChanged {
pub arg0: String,
pub arg1: String,
pub arg2: String,
}
impl arg::AppendAll for DBusNameOwnerChanged {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.arg0, i);
arg::RefArg::append(&self.arg1, i);
arg::RefArg::append(&self.arg2, i);
}
}
impl arg::ReadAll for DBusNameOwnerChanged {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(DBusNameOwnerChanged {
arg0: i.read()?,
arg1: i.read()?,
arg2: i.read()?,
})
}
}
impl dbus::message::SignalArgs for DBusNameOwnerChanged {
const NAME: &'static str = "NameOwnerChanged";
const INTERFACE: &'static str = "org.freedesktop.DBus";
}
#[derive(Debug)]
pub struct DBusNameLost {
pub arg0: String,
}
impl arg::AppendAll for DBusNameLost {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.arg0, i);
}
}
impl arg::ReadAll for DBusNameLost {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(DBusNameLost {
arg0: i.read()?,
})
}
}
impl dbus::message::SignalArgs for DBusNameLost {
const NAME: &'static str = "NameLost";
const INTERFACE: &'static str = "org.freedesktop.DBus";
}
#[derive(Debug)]
pub struct DBusNameAcquired {
pub arg0: String,
}
impl arg::AppendAll for DBusNameAcquired {
fn append(&self, i: &mut arg::IterAppend) {
arg::RefArg::append(&self.arg0, i);
}
}
impl arg::ReadAll for DBusNameAcquired {
fn read(i: &mut arg::Iter) -> Result<Self, arg::TypeMismatchError> {
Ok(DBusNameAcquired {
arg0: i.read()?,
})
}
}
impl dbus::message::SignalArgs for DBusNameAcquired {
const NAME: &'static str = "NameAcquired";
const INTERFACE: &'static str = "org.freedesktop.DBus";
}