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
// This code was autogenerated with `dbus-codegen-rust --file=specs/org.bluez.Media1.xml --interfaces=org.bluez.Media1 --client=nonblock --methodtype=none`, see https://github.com/diwic/dbus-rs
use dbus;
#[allow(unused_imports)]
use dbus::arg;
use dbus::nonblock;

pub trait OrgBluezMedia1 {
    fn register_endpoint(
        &self,
        endpoint: dbus::Path,
        properties: ::std::collections::HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
    ) -> nonblock::MethodReply<()>;
    fn unregister_endpoint(&self, endpoint: dbus::Path) -> nonblock::MethodReply<()>;
    fn register_player(
        &self,
        player: dbus::Path,
        properties: ::std::collections::HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
    ) -> nonblock::MethodReply<()>;
    fn unregister_player(&self, player: dbus::Path) -> nonblock::MethodReply<()>;
}

impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>> OrgBluezMedia1
    for nonblock::Proxy<'a, C>
{
    fn register_endpoint(
        &self,
        endpoint: dbus::Path,
        properties: ::std::collections::HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
    ) -> nonblock::MethodReply<()> {
        self.method_call(
            "org.bluez.Media1",
            "RegisterEndpoint",
            (endpoint, properties),
        )
    }

    fn unregister_endpoint(&self, endpoint: dbus::Path) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Media1", "UnregisterEndpoint", (endpoint,))
    }

    fn register_player(
        &self,
        player: dbus::Path,
        properties: ::std::collections::HashMap<&str, arg::Variant<Box<dyn arg::RefArg>>>,
    ) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Media1", "RegisterPlayer", (player, properties))
    }

    fn unregister_player(&self, player: dbus::Path) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Media1", "UnregisterPlayer", (player,))
    }
}