bluez-generated 0.1.0

Generated bindings for talking to BlueZ on Linux.
Documentation
// This code was autogenerated with `dbus-codegen-rust --file=specs/org.bluez.Device1.xml --interfaces=org.bluez.Device1 --client=nonblock --methodtype=none`, see https://github.com/diwic/dbus-rs
use dbus;
#[allow(unused_imports)]
use dbus::arg;
use dbus::nonblock;

pub trait OrgBluezDevice1 {
    fn disconnect(&self) -> nonblock::MethodReply<()>;
    fn connect(&self) -> nonblock::MethodReply<()>;
    fn connect_profile(&self, uuid: &str) -> nonblock::MethodReply<()>;
    fn disconnect_profile(&self, uuid: &str) -> nonblock::MethodReply<()>;
    fn pair(&self) -> nonblock::MethodReply<()>;
    fn cancel_pairing(&self) -> nonblock::MethodReply<()>;
    fn address(&self) -> nonblock::MethodReply<String>;
    fn address_type(&self) -> nonblock::MethodReply<String>;
    fn name(&self) -> nonblock::MethodReply<String>;
    fn alias(&self) -> nonblock::MethodReply<String>;
    fn set_alias(&self, value: String) -> nonblock::MethodReply<()>;
    fn class(&self) -> nonblock::MethodReply<u32>;
    fn appearance(&self) -> nonblock::MethodReply<u16>;
    fn icon(&self) -> nonblock::MethodReply<String>;
    fn paired(&self) -> nonblock::MethodReply<bool>;
    fn trusted(&self) -> nonblock::MethodReply<bool>;
    fn set_trusted(&self, value: bool) -> nonblock::MethodReply<()>;
    fn blocked(&self) -> nonblock::MethodReply<bool>;
    fn set_blocked(&self, value: bool) -> nonblock::MethodReply<()>;
    fn legacy_pairing(&self) -> nonblock::MethodReply<bool>;
    fn rssi(&self) -> nonblock::MethodReply<i16>;
    fn connected(&self) -> nonblock::MethodReply<bool>;
    fn uuids(&self) -> nonblock::MethodReply<Vec<String>>;
    fn modalias(&self) -> nonblock::MethodReply<String>;
    fn adapter(&self) -> nonblock::MethodReply<dbus::Path<'static>>;
    fn manufacturer_data(
        &self,
    ) -> nonblock::MethodReply<
        ::std::collections::HashMap<u16, arg::Variant<Box<dyn arg::RefArg + 'static>>>,
    >;
    fn service_data(
        &self,
    ) -> nonblock::MethodReply<
        ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>,
    >;
    fn tx_power(&self) -> nonblock::MethodReply<i16>;
    fn services_resolved(&self) -> nonblock::MethodReply<bool>;
}

impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>> OrgBluezDevice1
    for nonblock::Proxy<'a, C>
{
    fn disconnect(&self) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Device1", "Disconnect", ())
    }

    fn connect(&self) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Device1", "Connect", ())
    }

    fn connect_profile(&self, uuid: &str) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Device1", "ConnectProfile", (uuid,))
    }

    fn disconnect_profile(&self, uuid: &str) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Device1", "DisconnectProfile", (uuid,))
    }

    fn pair(&self) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Device1", "Pair", ())
    }

    fn cancel_pairing(&self) -> nonblock::MethodReply<()> {
        self.method_call("org.bluez.Device1", "CancelPairing", ())
    }

    fn address(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Address",
        )
    }

    fn address_type(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "AddressType",
        )
    }

    fn name(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Name",
        )
    }

    fn alias(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Alias",
        )
    }

    fn class(&self) -> nonblock::MethodReply<u32> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Class",
        )
    }

    fn appearance(&self) -> nonblock::MethodReply<u16> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Appearance",
        )
    }

    fn icon(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Icon",
        )
    }

    fn paired(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Paired",
        )
    }

    fn trusted(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Trusted",
        )
    }

    fn blocked(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Blocked",
        )
    }

    fn legacy_pairing(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "LegacyPairing",
        )
    }

    fn rssi(&self) -> nonblock::MethodReply<i16> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "RSSI",
        )
    }

    fn connected(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Connected",
        )
    }

    fn uuids(&self) -> nonblock::MethodReply<Vec<String>> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "UUIDs",
        )
    }

    fn modalias(&self) -> nonblock::MethodReply<String> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Modalias",
        )
    }

    fn adapter(&self) -> nonblock::MethodReply<dbus::Path<'static>> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "Adapter",
        )
    }

    fn manufacturer_data(
        &self,
    ) -> nonblock::MethodReply<
        ::std::collections::HashMap<u16, arg::Variant<Box<dyn arg::RefArg + 'static>>>,
    > {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "ManufacturerData",
        )
    }

    fn service_data(
        &self,
    ) -> nonblock::MethodReply<
        ::std::collections::HashMap<String, arg::Variant<Box<dyn arg::RefArg + 'static>>>,
    > {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "ServiceData",
        )
    }

    fn tx_power(&self) -> nonblock::MethodReply<i16> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "TxPower",
        )
    }

    fn services_resolved(&self) -> nonblock::MethodReply<bool> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
            &self,
            "org.bluez.Device1",
            "ServicesResolved",
        )
    }

    fn set_alias(&self, value: String) -> nonblock::MethodReply<()> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::set(
            &self,
            "org.bluez.Device1",
            "Alias",
            value,
        )
    }

    fn set_trusted(&self, value: bool) -> nonblock::MethodReply<()> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::set(
            &self,
            "org.bluez.Device1",
            "Trusted",
            value,
        )
    }

    fn set_blocked(&self, value: bool) -> nonblock::MethodReply<()> {
        <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::set(
            &self,
            "org.bluez.Device1",
            "Blocked",
            value,
        )
    }
}