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
#![allow(missing_docs)]
pub trait OrgFreedesktopDBusPeer {
fn ping(&self) -> Result<(), super::Error>;
fn get_machine_id(&self) -> Result<String, super::Error>;
}
impl<'a, C: ::std::ops::Deref<Target=super::Connection>> OrgFreedesktopDBusPeer for super::ConnPath<'a, C> {
fn ping(&self) -> Result<(), super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.Peer".into(), &"Ping".into(), |_| {
}));
try!(m.as_result());
Ok(())
}
fn get_machine_id(&self) -> Result<String, super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.Peer".into(), &"GetMachineId".into(), |_| {
}));
try!(m.as_result());
let mut i = m.iter_init();
let a0: String = try!(i.read());
Ok(a0)
}
}
pub trait OrgFreedesktopDBusIntrospectable {
fn introspect(&self) -> Result<String, super::Error>;
}
impl<'a, C: ::std::ops::Deref<Target=super::Connection>> OrgFreedesktopDBusIntrospectable for super::ConnPath<'a, C> {
fn introspect(&self) -> Result<String, super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.Introspectable".into(), &"Introspect".into(), |_| {
}));
try!(m.as_result());
let mut i = m.iter_init();
let a0: String = try!(i.read());
Ok(a0)
}
}
pub trait OrgFreedesktopDBusProperties {
fn get(&self, interfacename: &str, propertyname: &str) -> Result<super::arg::Variant<Box<super::arg::RefArg>>, super::Error>;
fn get_all(&self, interfacename: &str) -> Result<::std::collections::HashMap<String, super::arg::Variant<Box<super::arg::RefArg>>>, super::Error>;
fn set(&self, interfacename: &str, propertyname: &str, value: super::arg::Variant<Box<super::arg::RefArg>>) -> Result<(), super::Error>;
}
impl<'a, C: ::std::ops::Deref<Target=super::Connection>> OrgFreedesktopDBusProperties for super::ConnPath<'a, C> {
fn get(&self, interfacename: &str, propertyname: &str) -> Result<super::arg::Variant<Box<super::arg::RefArg>>, super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| {
let mut i = super::arg::IterAppend::new(msg);
i.append(interfacename);
i.append(propertyname);
}));
try!(m.as_result());
let mut i = m.iter_init();
let a0: super::arg::Variant<Box<super::arg::RefArg>> = try!(i.read());
Ok(a0)
}
fn get_all(&self, interfacename: &str) -> Result<::std::collections::HashMap<String, super::arg::Variant<Box<super::arg::RefArg>>>, super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| {
let mut i = super::arg::IterAppend::new(msg);
i.append(interfacename);
}));
try!(m.as_result());
let mut i = m.iter_init();
let a0: ::std::collections::HashMap<String, super::arg::Variant<Box<super::arg::RefArg>>> = try!(i.read());
Ok(a0)
}
fn set(&self, interfacename: &str, propertyname: &str, value: super::arg::Variant<Box<super::arg::RefArg>>) -> Result<(), super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| {
let mut i = super::arg::IterAppend::new(msg);
i.append(interfacename);
i.append(propertyname);
i.append(value);
}));
try!(m.as_result());
Ok(())
}
}
pub trait OrgFreedesktopDBusObjectManager {
fn get_managed_objects(&self) -> Result<::std::collections::HashMap<super::Path<'static>, ::std::collections::HashMap<String, ::std::collections::HashMap<String, super::arg::Variant<Box<super::arg::RefArg>>>>>, super::Error>;
}
impl<'a, C: ::std::ops::Deref<Target=super::Connection>> OrgFreedesktopDBusObjectManager for super::ConnPath<'a, C> {
fn get_managed_objects(&self) -> Result<::std::collections::HashMap<super::Path<'static>, ::std::collections::HashMap<String, ::std::collections::HashMap<String, super::arg::Variant<Box<super::arg::RefArg>>>>>, super::Error> {
let mut m = try!(self.method_call_with_args(&"org.freedesktop.DBus.ObjectManager".into(), &"GetManagedObjects".into(), |_| {
}));
try!(m.as_result());
let mut i = m.iter_init();
let a0 = try!(i.read());
Ok(a0)
}
}