#[allow(unused_imports)]
use dbus::arg;
use dbus::nonblock;
pub trait OrgBluezLEAdvertisingManager1 {
fn register_advertisement(
&self,
advertisement: dbus::Path,
options: arg::PropMap,
) -> nonblock::MethodReply<()>;
fn unregister_advertisement(&self, service: dbus::Path) -> nonblock::MethodReply<()>;
fn active_instances(&self) -> nonblock::MethodReply<u8>;
fn supported_instances(&self) -> nonblock::MethodReply<u8>;
fn supported_includes(&self) -> nonblock::MethodReply<Vec<String>>;
fn supported_secondary_channels(&self) -> nonblock::MethodReply<Vec<String>>;
}
pub const ORG_BLUEZ_LEADVERTISING_MANAGER1_NAME: &str = "org.bluez.LEAdvertisingManager1";
#[derive(Copy, Clone, Debug)]
pub struct OrgBluezLEAdvertisingManager1Properties<'a>(pub &'a arg::PropMap);
impl<'a> OrgBluezLEAdvertisingManager1Properties<'a> {
pub fn from_interfaces(
interfaces: &'a ::std::collections::HashMap<String, arg::PropMap>,
) -> Option<Self> {
interfaces.get("org.bluez.LEAdvertisingManager1").map(Self)
}
pub fn active_instances(&self) -> Option<u8> {
arg::prop_cast(self.0, "ActiveInstances").copied()
}
pub fn supported_instances(&self) -> Option<u8> {
arg::prop_cast(self.0, "SupportedInstances").copied()
}
pub fn supported_includes(&self) -> Option<&Vec<String>> {
arg::prop_cast(self.0, "SupportedIncludes")
}
pub fn supported_secondary_channels(&self) -> Option<&Vec<String>> {
arg::prop_cast(self.0, "SupportedSecondaryChannels")
}
}
impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>> OrgBluezLEAdvertisingManager1
for nonblock::Proxy<'a, C>
{
fn register_advertisement(
&self,
advertisement: dbus::Path,
options: arg::PropMap,
) -> nonblock::MethodReply<()> {
self.method_call(
"org.bluez.LEAdvertisingManager1",
"RegisterAdvertisement",
(advertisement, options),
)
}
fn unregister_advertisement(&self, service: dbus::Path) -> nonblock::MethodReply<()> {
self.method_call(
"org.bluez.LEAdvertisingManager1",
"UnregisterAdvertisement",
(service,),
)
}
fn active_instances(&self) -> nonblock::MethodReply<u8> {
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
&self,
"org.bluez.LEAdvertisingManager1",
"ActiveInstances",
)
}
fn supported_instances(&self) -> nonblock::MethodReply<u8> {
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
&self,
"org.bluez.LEAdvertisingManager1",
"SupportedInstances",
)
}
fn supported_includes(&self) -> nonblock::MethodReply<Vec<String>> {
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
&self,
"org.bluez.LEAdvertisingManager1",
"SupportedIncludes",
)
}
fn supported_secondary_channels(&self) -> nonblock::MethodReply<Vec<String>> {
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
&self,
"org.bluez.LEAdvertisingManager1",
"SupportedSecondaryChannels",
)
}
}