bluez_generated/
leadvertisingmanager1.rs1#[allow(unused_imports)]
3use dbus::arg;
4use dbus::nonblock;
5
6pub trait OrgBluezLEAdvertisingManager1 {
7 fn register_advertisement(
8 &self,
9 advertisement: dbus::Path,
10 options: arg::PropMap,
11 ) -> nonblock::MethodReply<()>;
12 fn unregister_advertisement(&self, service: dbus::Path) -> nonblock::MethodReply<()>;
13 fn active_instances(&self) -> nonblock::MethodReply<u8>;
14 fn supported_instances(&self) -> nonblock::MethodReply<u8>;
15 fn supported_includes(&self) -> nonblock::MethodReply<Vec<String>>;
16 fn supported_secondary_channels(&self) -> nonblock::MethodReply<Vec<String>>;
17}
18
19pub const ORG_BLUEZ_LEADVERTISING_MANAGER1_NAME: &str = "org.bluez.LEAdvertisingManager1";
20
21#[derive(Copy, Clone, Debug)]
22pub struct OrgBluezLEAdvertisingManager1Properties<'a>(pub &'a arg::PropMap);
23
24impl<'a> OrgBluezLEAdvertisingManager1Properties<'a> {
25 pub fn from_interfaces(
26 interfaces: &'a ::std::collections::HashMap<String, arg::PropMap>,
27 ) -> Option<Self> {
28 interfaces.get("org.bluez.LEAdvertisingManager1").map(Self)
29 }
30
31 pub fn active_instances(&self) -> Option<u8> {
32 arg::prop_cast(self.0, "ActiveInstances").copied()
33 }
34
35 pub fn supported_instances(&self) -> Option<u8> {
36 arg::prop_cast(self.0, "SupportedInstances").copied()
37 }
38
39 pub fn supported_includes(&self) -> Option<&Vec<String>> {
40 arg::prop_cast(self.0, "SupportedIncludes")
41 }
42
43 pub fn supported_secondary_channels(&self) -> Option<&Vec<String>> {
44 arg::prop_cast(self.0, "SupportedSecondaryChannels")
45 }
46}
47
48impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>> OrgBluezLEAdvertisingManager1
49 for nonblock::Proxy<'a, C>
50{
51 fn register_advertisement(
52 &self,
53 advertisement: dbus::Path,
54 options: arg::PropMap,
55 ) -> nonblock::MethodReply<()> {
56 self.method_call(
57 "org.bluez.LEAdvertisingManager1",
58 "RegisterAdvertisement",
59 (advertisement, options),
60 )
61 }
62
63 fn unregister_advertisement(&self, service: dbus::Path) -> nonblock::MethodReply<()> {
64 self.method_call(
65 "org.bluez.LEAdvertisingManager1",
66 "UnregisterAdvertisement",
67 (service,),
68 )
69 }
70
71 fn active_instances(&self) -> nonblock::MethodReply<u8> {
72 <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
73 &self,
74 "org.bluez.LEAdvertisingManager1",
75 "ActiveInstances",
76 )
77 }
78
79 fn supported_instances(&self) -> nonblock::MethodReply<u8> {
80 <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
81 &self,
82 "org.bluez.LEAdvertisingManager1",
83 "SupportedInstances",
84 )
85 }
86
87 fn supported_includes(&self) -> nonblock::MethodReply<Vec<String>> {
88 <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
89 &self,
90 "org.bluez.LEAdvertisingManager1",
91 "SupportedIncludes",
92 )
93 }
94
95 fn supported_secondary_channels(&self) -> nonblock::MethodReply<Vec<String>> {
96 <Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
97 &self,
98 "org.bluez.LEAdvertisingManager1",
99 "SupportedSecondaryChannels",
100 )
101 }
102}