Use AsRefClosure when generating the bindings
This simplifies things significantly \o/
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// This code was autogenerated with `dbus-codegen-rust --file telepathy-spec/spec/Call_Content_Interface_Video_Control.xml -i org.freedesktop.Telepathy -o src/telepathy/call_content_interface_video_control.rs`, see https://github.com/diwic/dbus-rs
|
||||
// This code was autogenerated with `dbus-codegen-rust --file telepathy-spec/spec/Call_Content_Interface_Video_Control.xml -i org.freedesktop.Telepathy -a AsRefClosure -o src/telepathy/call_content_interface_video_control.rs`, see https://github.com/diwic/dbus-rs
|
||||
use dbus;
|
||||
use dbus::arg;
|
||||
use dbus::tree;
|
||||
@@ -21,8 +21,8 @@ where
|
||||
D::Method: Default,
|
||||
D::Property: Default,
|
||||
D::Signal: Default,
|
||||
T: Call1ContentInterfaceVideoControl,
|
||||
F: 'static + for<'z> Fn(&'z tree::MethodInfo<tree::MTFn<D>, D>) -> &'z T,
|
||||
T: AsRef<dyn Call1ContentInterfaceVideoControl>,
|
||||
F: 'static + Fn(&tree::MethodInfo<tree::MTFn<D>, D>) -> T,
|
||||
{
|
||||
let i = factory.interface(
|
||||
"org.freedesktop.Telepathy.Call1.Content.Interface.VideoControl",
|
||||
@@ -34,7 +34,8 @@ where
|
||||
let fclone = f.clone();
|
||||
let p = p.on_get(move |a, pinfo| {
|
||||
let minfo = pinfo.to_method_info();
|
||||
let d = fclone(&minfo);
|
||||
let dd = fclone(&minfo);
|
||||
let d = dd.as_ref();
|
||||
a.append(d.video_resolution()?);
|
||||
Ok(())
|
||||
});
|
||||
@@ -45,7 +46,8 @@ where
|
||||
let fclone = f.clone();
|
||||
let p = p.on_get(move |a, pinfo| {
|
||||
let minfo = pinfo.to_method_info();
|
||||
let d = fclone(&minfo);
|
||||
let dd = fclone(&minfo);
|
||||
let d = dd.as_ref();
|
||||
a.append(d.bitrate()?);
|
||||
Ok(())
|
||||
});
|
||||
@@ -56,7 +58,8 @@ where
|
||||
let fclone = f.clone();
|
||||
let p = p.on_get(move |a, pinfo| {
|
||||
let minfo = pinfo.to_method_info();
|
||||
let d = fclone(&minfo);
|
||||
let dd = fclone(&minfo);
|
||||
let d = dd.as_ref();
|
||||
a.append(d.framerate()?);
|
||||
Ok(())
|
||||
});
|
||||
@@ -67,7 +70,8 @@ where
|
||||
let fclone = f.clone();
|
||||
let p = p.on_get(move |a, pinfo| {
|
||||
let minfo = pinfo.to_method_info();
|
||||
let d = fclone(&minfo);
|
||||
let dd = fclone(&minfo);
|
||||
let d = dd.as_ref();
|
||||
a.append(d.mtu()?);
|
||||
Ok(())
|
||||
});
|
||||
@@ -78,7 +82,8 @@ where
|
||||
let fclone = f.clone();
|
||||
let p = p.on_get(move |a, pinfo| {
|
||||
let minfo = pinfo.to_method_info();
|
||||
let d = fclone(&minfo);
|
||||
let dd = fclone(&minfo);
|
||||
let d = dd.as_ref();
|
||||
a.append(d.manual_key_frames()?);
|
||||
Ok(())
|
||||
});
|
||||
|
Reference in New Issue
Block a user