diff options
Diffstat (limited to 'src/pa_eq/dbus_api/equalizing_manager.rs')
-rw-r--r-- | src/pa_eq/dbus_api/equalizing_manager.rs | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/pa_eq/dbus_api/equalizing_manager.rs b/src/pa_eq/dbus_api/equalizing_manager.rs index 1ea6111..a9eb7bc 100644 --- a/src/pa_eq/dbus_api/equalizing_manager.rs +++ b/src/pa_eq/dbus_api/equalizing_manager.rs | |||
@@ -44,12 +44,12 @@ where | |||
44 | D::Method: Default, | 44 | D::Method: Default, |
45 | D::Property: Default, | 45 | D::Property: Default, |
46 | T: OrgPulseAudioExtEqualizing1Manager<Err=tree::MethodErr>, | 46 | T: OrgPulseAudioExtEqualizing1Manager<Err=tree::MethodErr>, |
47 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<tree::MTFn<D>, D>) -> & 'z T, | 47 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T, |
48 | { | 48 | { |
49 | let i = factory.interface("org.PulseAudio.Ext.Equalizing1.Manager", data); | 49 | let i = factory.interface("org.PulseAudio.Ext.Equalizing1.Manager", data); |
50 | let f = ::std::sync::Arc::new(f); | 50 | let f = ::std::sync::Arc::new(f); |
51 | let fclone = f.clone(); | 51 | let fclone = f.clone(); |
52 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 52 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
53 | let mut i = minfo.msg.iter_init(); | 53 | let mut i = minfo.msg.iter_init(); |
54 | let name: &str = r#try!(i.read()); | 54 | let name: &str = r#try!(i.read()); |
55 | let d = fclone(minfo); | 55 | let d = fclone(minfo); |
@@ -72,7 +72,7 @@ where | |||
72 | }); | 72 | }); |
73 | let i = i.add_p(p); | 73 | let i = i.add_p(p); |
74 | 74 | ||
75 | let p = factory.property::<Vec<dbus::Path>, _>("EqualizedSinks", Default::default()); | 75 | let p = factory.property::<Vec<dbus::Path<'_>>, _>("EqualizedSinks", Default::default()); |
76 | let p = p.access(tree::Access::Read); | 76 | let p = p.access(tree::Access::Read); |
77 | let fclone = f.clone(); | 77 | let fclone = f.clone(); |
78 | let p = p.on_get(move |a, pinfo| { | 78 | let p = p.on_get(move |a, pinfo| { |
@@ -104,10 +104,10 @@ pub struct OrgPulseAudioExtEqualizing1ManagerSinkAdded { | |||
104 | impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerSinkAdded { | 104 | impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerSinkAdded { |
105 | const NAME: &'static str = "SinkAdded"; | 105 | const NAME: &'static str = "SinkAdded"; |
106 | const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager"; | 106 | const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager"; |
107 | fn append(&self, i: &mut arg::IterAppend) { | 107 | fn append(&self, i: &mut arg::IterAppend<'_>) { |
108 | (&self.sink as &arg::RefArg).append(i); | 108 | (&self.sink as &dyn arg::RefArg).append(i); |
109 | } | 109 | } |
110 | fn get(&mut self, i: &mut arg::Iter) -> Result<(), arg::TypeMismatchError> { | 110 | fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> { |
111 | self.sink = r#try!(i.read()); | 111 | self.sink = r#try!(i.read()); |
112 | Ok(()) | 112 | Ok(()) |
113 | } | 113 | } |
@@ -121,10 +121,10 @@ pub struct OrgPulseAudioExtEqualizing1ManagerSinkRemoved { | |||
121 | impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerSinkRemoved { | 121 | impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerSinkRemoved { |
122 | const NAME: &'static str = "SinkRemoved"; | 122 | const NAME: &'static str = "SinkRemoved"; |
123 | const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager"; | 123 | const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager"; |
124 | fn append(&self, i: &mut arg::IterAppend) { | 124 | fn append(&self, i: &mut arg::IterAppend<'_>) { |
125 | (&self.sink as &arg::RefArg).append(i); | 125 | (&self.sink as &dyn arg::RefArg).append(i); |
126 | } | 126 | } |
127 | fn get(&mut self, i: &mut arg::Iter) -> Result<(), arg::TypeMismatchError> { | 127 | fn get(&mut self, i: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> { |
128 | self.sink = r#try!(i.read()); | 128 | self.sink = r#try!(i.read()); |
129 | Ok(()) | 129 | Ok(()) |
130 | } | 130 | } |
@@ -137,9 +137,9 @@ pub struct OrgPulseAudioExtEqualizing1ManagerProfilesChanged { | |||
137 | impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerProfilesChanged { | 137 | impl dbus::SignalArgs for OrgPulseAudioExtEqualizing1ManagerProfilesChanged { |
138 | const NAME: &'static str = "ProfilesChanged"; | 138 | const NAME: &'static str = "ProfilesChanged"; |
139 | const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager"; | 139 | const INTERFACE: &'static str = "org.PulseAudio.Ext.Equalizing1.Manager"; |
140 | fn append(&self, _: &mut arg::IterAppend) { | 140 | fn append(&self, _: &mut arg::IterAppend<'_>) { |
141 | } | 141 | } |
142 | fn get(&mut self, _: &mut arg::Iter) -> Result<(), arg::TypeMismatchError> { | 142 | fn get(&mut self, _: &mut arg::Iter<'_>) -> Result<(), arg::TypeMismatchError> { |
143 | Ok(()) | 143 | Ok(()) |
144 | } | 144 | } |
145 | } | 145 | } |
@@ -167,12 +167,12 @@ where | |||
167 | D: tree::DataType, | 167 | D: tree::DataType, |
168 | D::Method: Default, | 168 | D::Method: Default, |
169 | T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>, | 169 | T: OrgFreedesktopDBusIntrospectable<Err=tree::MethodErr>, |
170 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<tree::MTFn<D>, D>) -> & 'z T, | 170 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T, |
171 | { | 171 | { |
172 | let i = factory.interface("org.freedesktop.DBus.Introspectable", data); | 172 | let i = factory.interface("org.freedesktop.DBus.Introspectable", data); |
173 | let f = ::std::sync::Arc::new(f); | 173 | let f = ::std::sync::Arc::new(f); |
174 | let fclone = f.clone(); | 174 | let fclone = f.clone(); |
175 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 175 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
176 | let d = fclone(minfo); | 176 | let d = fclone(minfo); |
177 | let data = r#try!(d.introspect()); | 177 | let data = r#try!(d.introspect()); |
178 | let rm = minfo.msg.method_return(); | 178 | let rm = minfo.msg.method_return(); |
@@ -187,15 +187,15 @@ where | |||
187 | 187 | ||
188 | pub trait OrgFreedesktopDBusProperties { | 188 | pub trait OrgFreedesktopDBusProperties { |
189 | type Err; | 189 | type Err; |
190 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<arg::RefArg>>, Self::Err>; | 190 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err>; |
191 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<arg::RefArg>>) -> Result<(), Self::Err>; | 191 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err>; |
192 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<arg::RefArg>>>, Self::Err>; | 192 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err>; |
193 | } | 193 | } |
194 | 194 | ||
195 | impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> { | 195 | impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProperties for dbus::ConnPath<'a, C> { |
196 | type Err = dbus::Error; | 196 | type Err = dbus::Error; |
197 | 197 | ||
198 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<arg::RefArg>>, Self::Err> { | 198 | fn get(&self, interface_name: &str, property_name: &str) -> Result<arg::Variant<Box<dyn arg::RefArg>>, Self::Err> { |
199 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| { | 199 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Get".into(), |msg| { |
200 | let mut i = arg::IterAppend::new(msg); | 200 | let mut i = arg::IterAppend::new(msg); |
201 | i.append(interface_name); | 201 | i.append(interface_name); |
@@ -203,11 +203,11 @@ impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProper | |||
203 | })); | 203 | })); |
204 | r#try!(m.as_result()); | 204 | r#try!(m.as_result()); |
205 | let mut i = m.iter_init(); | 205 | let mut i = m.iter_init(); |
206 | let value: arg::Variant<Box<arg::RefArg>> = r#try!(i.read()); | 206 | let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read()); |
207 | Ok(value) | 207 | Ok(value) |
208 | } | 208 | } |
209 | 209 | ||
210 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<arg::RefArg>>) -> Result<(), Self::Err> { | 210 | fn set(&self, interface_name: &str, property_name: &str, value: arg::Variant<Box<dyn arg::RefArg>>) -> Result<(), Self::Err> { |
211 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| { | 211 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"Set".into(), |msg| { |
212 | let mut i = arg::IterAppend::new(msg); | 212 | let mut i = arg::IterAppend::new(msg); |
213 | i.append(interface_name); | 213 | i.append(interface_name); |
@@ -218,14 +218,14 @@ impl<'a, C: ::std::ops::Deref<Target=dbus::Connection>> OrgFreedesktopDBusProper | |||
218 | Ok(()) | 218 | Ok(()) |
219 | } | 219 | } |
220 | 220 | ||
221 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<arg::RefArg>>>, Self::Err> { | 221 | fn get_all(&self, interface_name: &str) -> Result<::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>>, Self::Err> { |
222 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| { | 222 | let mut m = r#try!(self.method_call_with_args(&"org.freedesktop.DBus.Properties".into(), &"GetAll".into(), |msg| { |
223 | let mut i = arg::IterAppend::new(msg); | 223 | let mut i = arg::IterAppend::new(msg); |
224 | i.append(interface_name); | 224 | i.append(interface_name); |
225 | })); | 225 | })); |
226 | r#try!(m.as_result()); | 226 | r#try!(m.as_result()); |
227 | let mut i = m.iter_init(); | 227 | let mut i = m.iter_init(); |
228 | let props: ::std::collections::HashMap<String, arg::Variant<Box<arg::RefArg>>> = r#try!(i.read()); | 228 | let props: ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg>>> = r#try!(i.read()); |
229 | Ok(props) | 229 | Ok(props) |
230 | } | 230 | } |
231 | } | 231 | } |
@@ -235,12 +235,12 @@ where | |||
235 | D: tree::DataType, | 235 | D: tree::DataType, |
236 | D::Method: Default, | 236 | D::Method: Default, |
237 | T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>, | 237 | T: OrgFreedesktopDBusProperties<Err=tree::MethodErr>, |
238 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<tree::MTFn<D>, D>) -> & 'z T, | 238 | F: 'static + for <'z> Fn(& 'z tree::MethodInfo<'_, tree::MTFn<D>, D>) -> & 'z T, |
239 | { | 239 | { |
240 | let i = factory.interface("org.freedesktop.DBus.Properties", data); | 240 | let i = factory.interface("org.freedesktop.DBus.Properties", data); |
241 | let f = ::std::sync::Arc::new(f); | 241 | let f = ::std::sync::Arc::new(f); |
242 | let fclone = f.clone(); | 242 | let fclone = f.clone(); |
243 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 243 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
244 | let mut i = minfo.msg.iter_init(); | 244 | let mut i = minfo.msg.iter_init(); |
245 | let interface_name: &str = r#try!(i.read()); | 245 | let interface_name: &str = r#try!(i.read()); |
246 | let property_name: &str = r#try!(i.read()); | 246 | let property_name: &str = r#try!(i.read()); |
@@ -257,11 +257,11 @@ where | |||
257 | let i = i.add_m(m); | 257 | let i = i.add_m(m); |
258 | 258 | ||
259 | let fclone = f.clone(); | 259 | let fclone = f.clone(); |
260 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 260 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
261 | let mut i = minfo.msg.iter_init(); | 261 | let mut i = minfo.msg.iter_init(); |
262 | let interface_name: &str = r#try!(i.read()); | 262 | let interface_name: &str = r#try!(i.read()); |
263 | let property_name: &str = r#try!(i.read()); | 263 | let property_name: &str = r#try!(i.read()); |
264 | let value: arg::Variant<Box<arg::RefArg>> = r#try!(i.read()); | 264 | let value: arg::Variant<Box<dyn arg::RefArg>> = r#try!(i.read()); |
265 | let d = fclone(minfo); | 265 | let d = fclone(minfo); |
266 | r#try!(d.set(interface_name, property_name, value)); | 266 | r#try!(d.set(interface_name, property_name, value)); |
267 | let rm = minfo.msg.method_return(); | 267 | let rm = minfo.msg.method_return(); |
@@ -274,7 +274,7 @@ where | |||
274 | let i = i.add_m(m); | 274 | let i = i.add_m(m); |
275 | 275 | ||
276 | let fclone = f.clone(); | 276 | let fclone = f.clone(); |
277 | let h = move |minfo: &tree::MethodInfo<tree::MTFn<D>, D>| { | 277 | let h = move |minfo: &tree::MethodInfo<'_, tree::MTFn<D>, D>| { |
278 | let mut i = minfo.msg.iter_init(); | 278 | let mut i = minfo.msg.iter_init(); |
279 | let interface_name: &str = r#try!(i.read()); | 279 | let interface_name: &str = r#try!(i.read()); |
280 | let d = fclone(minfo); | 280 | let d = fclone(minfo); |