diff options
Diffstat (limited to 'src/pa_eq/dbus_api/server_lookup.rs')
-rw-r--r-- | src/pa_eq/dbus_api/server_lookup.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/pa_eq/dbus_api/server_lookup.rs b/src/pa_eq/dbus_api/server_lookup.rs index 8451024..c959df8 100644 --- a/src/pa_eq/dbus_api/server_lookup.rs +++ b/src/pa_eq/dbus_api/server_lookup.rs | |||
@@ -24,7 +24,7 @@ where | |||
24 | D::Method: Default, | 24 | D::Method: Default, |
25 | D::Property: Default, | 25 | D::Property: Default, |
26 | T: OrgPulseAudioServerLookup1<Err=tree::MethodErr>, | 26 | T: OrgPulseAudioServerLookup1<Err=tree::MethodErr>, |
27 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<tree::MTFn<D>, D>) -> & 'z T, | 27 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T, |
28 | { | 28 | { |
29 | let i = factory.interface("org.PulseAudio.ServerLookup1", data); | 29 | let i = factory.interface("org.PulseAudio.ServerLookup1", data); |
30 | let f = ::std::sync::Arc::new(f); | 30 | let f = ::std::sync::Arc::new(f); |
@@ -64,12 +64,12 @@ where | |||
64 | D: tree::DataType, | 64 | D: tree::DataType, |
65 | D::Method: Default, | 65 | D::Method: Default, |
66 | T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>, | 66 | T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>, |
67 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<tree::MTFn<D>, D>) -> & 'z T, | 67 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T, |
68 | { | 68 | { |
69 | let i = factory.interface("org.freedesktop.DBus.Introspectable", data); | 69 | let i = factory.interface("org.freedesktop.DBus.Introspectable", data); |
70 | let f = ::std::sync::Arc::new(f); | 70 | let f = ::std::sync::Arc::new(f); |
71 | let fclone = f.clone(); | 71 | let fclone = f.clone(); |
72 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 72 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
73 | let d = fclone(minfo); | 73 | let d = fclone(minfo); |
74 | let data = r#try!(d.introspect()); | 74 | let data = r#try!(d.introspect()); |
75 | let rm = minfo.msg.method_return(); | 75 | let rm = minfo.msg.method_return(); |
@@ -84,15 +84,15 @@ where | |||
84 | 84 | ||
85 | pub trait OrgFreedesktopDBusProperties { | 85 | pub trait OrgFreedesktopDBusProperties { |
86 | type Err; | 86 | type Err; |
87 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<arg::RefArg>>, Self::Err>; | 87 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err>; |
88 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<arg::RefArg>>) -> Result<(), Self::Err>; | 88 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err>; |
89 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<arg::RefArg>>>, Self::Err>; | 89 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err>; |
90 | } | 90 | } |
91 | 91 | ||
92 | impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> { | 92 | impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> { |
93 | type Err = dbus::Error; | 93 | type Err = dbus::Error; |
94 | 94 | ||
95 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<arg::RefArg>>, Self::Err> { | 95 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err> { |
96 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| { | 96 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| { |
97 | let mut i = arg::IterAppend::new(msg); | 97 | let mut i = arg::IterAppend::new(msg); |
98 | i.append(interface_name); | 98 | i.append(interface_name); |
@@ -100,11 +100,11 @@ impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProper | |||
100 | })); | 100 | })); |
101 | r#try!(m.as_result()); | 101 | r#try!(m.as_result()); |
102 | let mut i = m.iter_init(); | 102 | let mut i = m.iter_init(); |
103 | let value: arg::Variant<Box<arg::RefArg>> = r#try!(i.read()); | 103 | let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read()); |
104 | Ok(value) | 104 | Ok(value) |
105 | } | 105 | } |
106 | 106 | ||
107 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<arg::RefArg>>) -> Result<(), Self::Err> { | 107 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err> { |
108 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| { | 108 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| { |
109 | let mut i = arg::IterAppend::new(msg); | 109 | let mut i = arg::IterAppend::new(msg); |
110 | i.append(interface_name); | 110 | i.append(interface_name); |
@@ -115,14 +115,14 @@ impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProper | |||
115 | Ok(()) | 115 | Ok(()) |
116 | } | 116 | } |
117 | 117 | ||
118 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<arg::RefArg>>>, Self::Err> { | 118 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err> { |
119 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| { | 119 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| { |
120 | let mut i = arg::IterAppend::new(msg); | 120 | let mut i = arg::IterAppend::new(msg); |
121 | i.append(interface_name); | 121 | i.append(interface_name); |
122 | })); | 122 | })); |
123 | r#try!(m.as_result()); | 123 | r#try!(m.as_result()); |
124 | let mut i = m.iter_init(); | 124 | let mut i = m.iter_init(); |
125 | let props: ::std::collections::HashMap<String, arg::Variant<Box<arg::RefArg>>> = r#try!(i.read()); | 125 | let props: ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>> = r#try!(i.read()); |
126 | Ok(props) | 126 | Ok(props) |
127 | } | 127 | } |
128 | } | 128 | } |
@@ -132,12 +132,12 @@ where | |||
132 | D: tree::DataType, | 132 | D: tree::DataType, |
133 | D::Method: Default, | 133 | D::Method: Default, |
134 | T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>, | 134 | T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>, |
135 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<tree::MTFn<D>, D>) -> & 'z T, | 135 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T, |
136 | { | 136 | { |
137 | let i = factory.interface("org.freedesktop.DBus.Properties", data); | 137 | let i = factory.interface("org.freedesktop.DBus.Properties", data); |
138 | let f = ::std::sync::Arc::new(f); | 138 | let f = ::std::sync::Arc::new(f); |
139 | let fclone = f.clone(); | 139 | let fclone = f.clone(); |
140 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 140 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
141 | let mut i = minfo.msg.iter_init(); | 141 | let mut i = minfo.msg.iter_init(); |
142 | let interface_name: &str = r#try!(i.read()); | 142 | let interface_name: &str = r#try!(i.read()); |
143 | let property_name: &str = r#try!(i.read()); | 143 | let property_name: &str = r#try!(i.read()); |
@@ -154,11 +154,11 @@ where | |||
154 | let i = i.add_m(m); | 154 | let i = i.add_m(m); |
155 | 155 | ||
156 | let fclone = f.clone(); | 156 | let fclone = f.clone(); |
157 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 157 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
158 | let mut i = minfo.msg.iter_init(); | 158 | let mut i = minfo.msg.iter_init(); |
159 | let interface_name: &str = r#try!(i.read()); | 159 | let interface_name: &str = r#try!(i.read()); |
160 | let property_name: &str = r#try!(i.read()); | 160 | let property_name: &str = r#try!(i.read()); |
161 | let value: arg::Variant<Box<arg::RefArg>> = r#try!(i.read()); | 161 | let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read()); |
162 | let d = fclone(minfo); | 162 | let d = fclone(minfo); |
163 | r#try!(d.set(interface_name, property_name, value)); | 163 | r#try!(d.set(interface_name, property_name, value)); |
164 | let rm = minfo.msg.method_return(); | 164 | let rm = minfo.msg.method_return(); |
@@ -171,7 +171,7 @@ where | |||
171 | let i = i.add_m(m); | 171 | let i = i.add_m(m); |
172 | 172 | ||
173 | let fclone = f.clone(); | 173 | let fclone = f.clone(); |
174 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 174 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
175 | let mut i = minfo.msg.iter_init(); | 175 | let mut i = minfo.msg.iter_init(); |
176 | let interface_name: &str = r#try!(i.read()); | 176 | let interface_name: &str = r#try!(i.read()); |
177 | let d = fclone(minfo); | 177 | let d = fclone(minfo); |