]> git.proxmox.com Git - rustc.git/blob - vendor/windows/src/Windows/Devices/Bluetooth/Advertisement/mod.rs
cfde18793c275c9611dc0e4ff0d32bdda9afac21
[rustc.git] / vendor / windows / src / Windows / Devices / Bluetooth / Advertisement / mod.rs
1 #[doc(hidden)]
2 #[repr(transparent)]
3 pub struct IBluetoothLEAdvertisement(::windows::core::IUnknown);
4 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisement {
5 type Vtable = IBluetoothLEAdvertisement_Vtbl;
6 }
7 impl ::core::clone::Clone for IBluetoothLEAdvertisement {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11 }
12 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisement {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x066fb2b7_33d1_4e7d_8367_cf81d0f79653);
14 }
15 #[repr(C)]
16 #[doc(hidden)]
17 pub struct IBluetoothLEAdvertisement_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 #[cfg(feature = "Foundation")]
20 pub Flags: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
21 #[cfg(not(feature = "Foundation"))]
22 Flags: usize,
23 #[cfg(feature = "Foundation")]
24 pub SetFlags: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
25 #[cfg(not(feature = "Foundation"))]
26 SetFlags: usize,
27 pub LocalName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
28 pub SetLocalName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: ::std::mem::MaybeUninit<::windows::core::HSTRING>) -> ::windows::core::HRESULT,
29 #[cfg(feature = "Foundation_Collections")]
30 pub ServiceUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
31 #[cfg(not(feature = "Foundation_Collections"))]
32 ServiceUuids: usize,
33 #[cfg(feature = "Foundation_Collections")]
34 pub ManufacturerData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
35 #[cfg(not(feature = "Foundation_Collections"))]
36 ManufacturerData: usize,
37 #[cfg(feature = "Foundation_Collections")]
38 pub DataSections: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
39 #[cfg(not(feature = "Foundation_Collections"))]
40 DataSections: usize,
41 #[cfg(feature = "Foundation_Collections")]
42 pub GetManufacturerDataByCompanyId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, companyid: u16, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
43 #[cfg(not(feature = "Foundation_Collections"))]
44 GetManufacturerDataByCompanyId: usize,
45 #[cfg(feature = "Foundation_Collections")]
46 pub GetSectionsByType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, r#type: u8, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
47 #[cfg(not(feature = "Foundation_Collections"))]
48 GetSectionsByType: usize,
49 }
50 #[doc(hidden)]
51 #[repr(transparent)]
52 pub struct IBluetoothLEAdvertisementBytePattern(::windows::core::IUnknown);
53 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementBytePattern {
54 type Vtable = IBluetoothLEAdvertisementBytePattern_Vtbl;
55 }
56 impl ::core::clone::Clone for IBluetoothLEAdvertisementBytePattern {
57 fn clone(&self) -> Self {
58 Self(self.0.clone())
59 }
60 }
61 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementBytePattern {
62 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfbfad7f2_b9c5_4a08_bc51_502f8ef68a79);
63 }
64 #[repr(C)]
65 #[doc(hidden)]
66 pub struct IBluetoothLEAdvertisementBytePattern_Vtbl {
67 pub base__: ::windows::core::IInspectable_Vtbl,
68 pub DataType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
69 pub SetDataType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: u8) -> ::windows::core::HRESULT,
70 pub Offset: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i16) -> ::windows::core::HRESULT,
71 pub SetOffset: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: i16) -> ::windows::core::HRESULT,
72 #[cfg(feature = "Storage_Streams")]
73 pub Data: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
74 #[cfg(not(feature = "Storage_Streams"))]
75 Data: usize,
76 #[cfg(feature = "Storage_Streams")]
77 pub SetData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
78 #[cfg(not(feature = "Storage_Streams"))]
79 SetData: usize,
80 }
81 #[doc(hidden)]
82 #[repr(transparent)]
83 pub struct IBluetoothLEAdvertisementBytePatternFactory(::windows::core::IUnknown);
84 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementBytePatternFactory {
85 type Vtable = IBluetoothLEAdvertisementBytePatternFactory_Vtbl;
86 }
87 impl ::core::clone::Clone for IBluetoothLEAdvertisementBytePatternFactory {
88 fn clone(&self) -> Self {
89 Self(self.0.clone())
90 }
91 }
92 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementBytePatternFactory {
93 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc2e24d73_fd5c_4ec3_be2a_9ca6fa11b7bd);
94 }
95 #[repr(C)]
96 #[doc(hidden)]
97 pub struct IBluetoothLEAdvertisementBytePatternFactory_Vtbl {
98 pub base__: ::windows::core::IInspectable_Vtbl,
99 #[cfg(feature = "Storage_Streams")]
100 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, datatype: u8, offset: i16, data: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
101 #[cfg(not(feature = "Storage_Streams"))]
102 Create: usize,
103 }
104 #[doc(hidden)]
105 #[repr(transparent)]
106 pub struct IBluetoothLEAdvertisementDataSection(::windows::core::IUnknown);
107 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementDataSection {
108 type Vtable = IBluetoothLEAdvertisementDataSection_Vtbl;
109 }
110 impl ::core::clone::Clone for IBluetoothLEAdvertisementDataSection {
111 fn clone(&self) -> Self {
112 Self(self.0.clone())
113 }
114 }
115 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementDataSection {
116 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd7213314_3a43_40f9_b6f0_92bfefc34ae3);
117 }
118 #[repr(C)]
119 #[doc(hidden)]
120 pub struct IBluetoothLEAdvertisementDataSection_Vtbl {
121 pub base__: ::windows::core::IInspectable_Vtbl,
122 pub DataType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
123 pub SetDataType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: u8) -> ::windows::core::HRESULT,
124 #[cfg(feature = "Storage_Streams")]
125 pub Data: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
126 #[cfg(not(feature = "Storage_Streams"))]
127 Data: usize,
128 #[cfg(feature = "Storage_Streams")]
129 pub SetData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
130 #[cfg(not(feature = "Storage_Streams"))]
131 SetData: usize,
132 }
133 #[doc(hidden)]
134 #[repr(transparent)]
135 pub struct IBluetoothLEAdvertisementDataSectionFactory(::windows::core::IUnknown);
136 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementDataSectionFactory {
137 type Vtable = IBluetoothLEAdvertisementDataSectionFactory_Vtbl;
138 }
139 impl ::core::clone::Clone for IBluetoothLEAdvertisementDataSectionFactory {
140 fn clone(&self) -> Self {
141 Self(self.0.clone())
142 }
143 }
144 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementDataSectionFactory {
145 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe7a40942_a845_4045_bf7e_3e9971db8a6b);
146 }
147 #[repr(C)]
148 #[doc(hidden)]
149 pub struct IBluetoothLEAdvertisementDataSectionFactory_Vtbl {
150 pub base__: ::windows::core::IInspectable_Vtbl,
151 #[cfg(feature = "Storage_Streams")]
152 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, datatype: u8, data: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
153 #[cfg(not(feature = "Storage_Streams"))]
154 Create: usize,
155 }
156 #[doc(hidden)]
157 #[repr(transparent)]
158 pub struct IBluetoothLEAdvertisementDataTypesStatics(::windows::core::IUnknown);
159 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementDataTypesStatics {
160 type Vtable = IBluetoothLEAdvertisementDataTypesStatics_Vtbl;
161 }
162 impl ::core::clone::Clone for IBluetoothLEAdvertisementDataTypesStatics {
163 fn clone(&self) -> Self {
164 Self(self.0.clone())
165 }
166 }
167 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementDataTypesStatics {
168 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3bb6472f_0606_434b_a76e_74159f0684d3);
169 }
170 #[repr(C)]
171 #[doc(hidden)]
172 pub struct IBluetoothLEAdvertisementDataTypesStatics_Vtbl {
173 pub base__: ::windows::core::IInspectable_Vtbl,
174 pub Flags: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
175 pub IncompleteService16BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
176 pub CompleteService16BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
177 pub IncompleteService32BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
178 pub CompleteService32BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
179 pub IncompleteService128BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
180 pub CompleteService128BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
181 pub ShortenedLocalName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
182 pub CompleteLocalName: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
183 pub TxPowerLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
184 pub PeripheralConnectionIntervalRange: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
185 pub ServiceSolicitation16BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
186 pub ServiceSolicitation32BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
187 pub ServiceSolicitation128BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
188 pub ServiceData16BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
189 pub ServiceData32BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
190 pub ServiceData128BitUuids: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
191 pub PublicTargetAddress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
192 pub RandomTargetAddress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
193 pub Appearance: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
194 pub AdvertisingInterval: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
195 pub ManufacturerSpecificData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u8) -> ::windows::core::HRESULT,
196 }
197 #[doc(hidden)]
198 #[repr(transparent)]
199 pub struct IBluetoothLEAdvertisementFilter(::windows::core::IUnknown);
200 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementFilter {
201 type Vtable = IBluetoothLEAdvertisementFilter_Vtbl;
202 }
203 impl ::core::clone::Clone for IBluetoothLEAdvertisementFilter {
204 fn clone(&self) -> Self {
205 Self(self.0.clone())
206 }
207 }
208 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementFilter {
209 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x131eb0d3_d04e_47b1_837e_49405bf6f80f);
210 }
211 #[repr(C)]
212 #[doc(hidden)]
213 pub struct IBluetoothLEAdvertisementFilter_Vtbl {
214 pub base__: ::windows::core::IInspectable_Vtbl,
215 pub Advertisement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
216 pub SetAdvertisement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
217 #[cfg(feature = "Foundation_Collections")]
218 pub BytePatterns: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
219 #[cfg(not(feature = "Foundation_Collections"))]
220 BytePatterns: usize,
221 }
222 #[doc(hidden)]
223 #[repr(transparent)]
224 pub struct IBluetoothLEAdvertisementPublisher(::windows::core::IUnknown);
225 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementPublisher {
226 type Vtable = IBluetoothLEAdvertisementPublisher_Vtbl;
227 }
228 impl ::core::clone::Clone for IBluetoothLEAdvertisementPublisher {
229 fn clone(&self) -> Self {
230 Self(self.0.clone())
231 }
232 }
233 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementPublisher {
234 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xcde820f9_d9fa_43d6_a264_ddd8b7da8b78);
235 }
236 #[repr(C)]
237 #[doc(hidden)]
238 pub struct IBluetoothLEAdvertisementPublisher_Vtbl {
239 pub base__: ::windows::core::IInspectable_Vtbl,
240 pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BluetoothLEAdvertisementPublisherStatus) -> ::windows::core::HRESULT,
241 pub Advertisement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
242 pub Start: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
243 pub Stop: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
244 #[cfg(feature = "Foundation")]
245 pub StatusChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
246 #[cfg(not(feature = "Foundation"))]
247 StatusChanged: usize,
248 #[cfg(feature = "Foundation")]
249 pub RemoveStatusChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
250 #[cfg(not(feature = "Foundation"))]
251 RemoveStatusChanged: usize,
252 }
253 #[doc(hidden)]
254 #[repr(transparent)]
255 pub struct IBluetoothLEAdvertisementPublisher2(::windows::core::IUnknown);
256 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementPublisher2 {
257 type Vtable = IBluetoothLEAdvertisementPublisher2_Vtbl;
258 }
259 impl ::core::clone::Clone for IBluetoothLEAdvertisementPublisher2 {
260 fn clone(&self) -> Self {
261 Self(self.0.clone())
262 }
263 }
264 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementPublisher2 {
265 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xfbdb545e_56f1_510f_a434_217fbd9e7bd2);
266 }
267 #[repr(C)]
268 #[doc(hidden)]
269 pub struct IBluetoothLEAdvertisementPublisher2_Vtbl {
270 pub base__: ::windows::core::IInspectable_Vtbl,
271 #[cfg(feature = "Foundation")]
272 pub PreferredTransmitPowerLevelInDBm: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
273 #[cfg(not(feature = "Foundation"))]
274 PreferredTransmitPowerLevelInDBm: usize,
275 #[cfg(feature = "Foundation")]
276 pub SetPreferredTransmitPowerLevelInDBm: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
277 #[cfg(not(feature = "Foundation"))]
278 SetPreferredTransmitPowerLevelInDBm: usize,
279 pub UseExtendedAdvertisement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
280 pub SetUseExtendedAdvertisement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
281 pub IsAnonymous: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
282 pub SetIsAnonymous: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
283 pub IncludeTransmitPowerLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
284 pub SetIncludeTransmitPowerLevel: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
285 }
286 #[doc(hidden)]
287 #[repr(transparent)]
288 pub struct IBluetoothLEAdvertisementPublisherFactory(::windows::core::IUnknown);
289 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementPublisherFactory {
290 type Vtable = IBluetoothLEAdvertisementPublisherFactory_Vtbl;
291 }
292 impl ::core::clone::Clone for IBluetoothLEAdvertisementPublisherFactory {
293 fn clone(&self) -> Self {
294 Self(self.0.clone())
295 }
296 }
297 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementPublisherFactory {
298 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x5c5f065e_b863_4981_a1af_1c544d8b0c0d);
299 }
300 #[repr(C)]
301 #[doc(hidden)]
302 pub struct IBluetoothLEAdvertisementPublisherFactory_Vtbl {
303 pub base__: ::windows::core::IInspectable_Vtbl,
304 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, advertisement: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
305 }
306 #[doc(hidden)]
307 #[repr(transparent)]
308 pub struct IBluetoothLEAdvertisementPublisherStatusChangedEventArgs(::windows::core::IUnknown);
309 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementPublisherStatusChangedEventArgs {
310 type Vtable = IBluetoothLEAdvertisementPublisherStatusChangedEventArgs_Vtbl;
311 }
312 impl ::core::clone::Clone for IBluetoothLEAdvertisementPublisherStatusChangedEventArgs {
313 fn clone(&self) -> Self {
314 Self(self.0.clone())
315 }
316 }
317 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementPublisherStatusChangedEventArgs {
318 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x09c2bd9f_2dff_4b23_86ee_0d14fb94aeae);
319 }
320 #[repr(C)]
321 #[doc(hidden)]
322 pub struct IBluetoothLEAdvertisementPublisherStatusChangedEventArgs_Vtbl {
323 pub base__: ::windows::core::IInspectable_Vtbl,
324 pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BluetoothLEAdvertisementPublisherStatus) -> ::windows::core::HRESULT,
325 pub Error: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::BluetoothError) -> ::windows::core::HRESULT,
326 }
327 #[doc(hidden)]
328 #[repr(transparent)]
329 pub struct IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2(::windows::core::IUnknown);
330 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2 {
331 type Vtable = IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2_Vtbl;
332 }
333 impl ::core::clone::Clone for IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2 {
334 fn clone(&self) -> Self {
335 Self(self.0.clone())
336 }
337 }
338 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2 {
339 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x8f62790e_dc88_5c8b_b34e_10b321850f88);
340 }
341 #[repr(C)]
342 #[doc(hidden)]
343 pub struct IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2_Vtbl {
344 pub base__: ::windows::core::IInspectable_Vtbl,
345 #[cfg(feature = "Foundation")]
346 pub SelectedTransmitPowerLevelInDBm: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
347 #[cfg(not(feature = "Foundation"))]
348 SelectedTransmitPowerLevelInDBm: usize,
349 }
350 #[doc(hidden)]
351 #[repr(transparent)]
352 pub struct IBluetoothLEAdvertisementReceivedEventArgs(::windows::core::IUnknown);
353 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementReceivedEventArgs {
354 type Vtable = IBluetoothLEAdvertisementReceivedEventArgs_Vtbl;
355 }
356 impl ::core::clone::Clone for IBluetoothLEAdvertisementReceivedEventArgs {
357 fn clone(&self) -> Self {
358 Self(self.0.clone())
359 }
360 }
361 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementReceivedEventArgs {
362 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x27987ddf_e596_41be_8d43_9e6731d4a913);
363 }
364 #[repr(C)]
365 #[doc(hidden)]
366 pub struct IBluetoothLEAdvertisementReceivedEventArgs_Vtbl {
367 pub base__: ::windows::core::IInspectable_Vtbl,
368 pub RawSignalStrengthInDBm: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i16) -> ::windows::core::HRESULT,
369 pub BluetoothAddress: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u64) -> ::windows::core::HRESULT,
370 pub AdvertisementType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BluetoothLEAdvertisementType) -> ::windows::core::HRESULT,
371 #[cfg(feature = "Foundation")]
372 pub Timestamp: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::DateTime) -> ::windows::core::HRESULT,
373 #[cfg(not(feature = "Foundation"))]
374 Timestamp: usize,
375 pub Advertisement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
376 }
377 #[doc(hidden)]
378 #[repr(transparent)]
379 pub struct IBluetoothLEAdvertisementReceivedEventArgs2(::windows::core::IUnknown);
380 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementReceivedEventArgs2 {
381 type Vtable = IBluetoothLEAdvertisementReceivedEventArgs2_Vtbl;
382 }
383 impl ::core::clone::Clone for IBluetoothLEAdvertisementReceivedEventArgs2 {
384 fn clone(&self) -> Self {
385 Self(self.0.clone())
386 }
387 }
388 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementReceivedEventArgs2 {
389 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x12d9c87b_0399_5f0e_a348_53b02b6b162e);
390 }
391 #[repr(C)]
392 #[doc(hidden)]
393 pub struct IBluetoothLEAdvertisementReceivedEventArgs2_Vtbl {
394 pub base__: ::windows::core::IInspectable_Vtbl,
395 pub BluetoothAddressType: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::BluetoothAddressType) -> ::windows::core::HRESULT,
396 #[cfg(feature = "Foundation")]
397 pub TransmitPowerLevelInDBm: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
398 #[cfg(not(feature = "Foundation"))]
399 TransmitPowerLevelInDBm: usize,
400 pub IsAnonymous: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
401 pub IsConnectable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
402 pub IsScannable: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
403 pub IsDirected: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
404 pub IsScanResponse: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
405 }
406 #[doc(hidden)]
407 #[repr(transparent)]
408 pub struct IBluetoothLEAdvertisementWatcher(::windows::core::IUnknown);
409 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementWatcher {
410 type Vtable = IBluetoothLEAdvertisementWatcher_Vtbl;
411 }
412 impl ::core::clone::Clone for IBluetoothLEAdvertisementWatcher {
413 fn clone(&self) -> Self {
414 Self(self.0.clone())
415 }
416 }
417 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementWatcher {
418 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xa6ac336f_f3d3_4297_8d6c_c81ea6623f40);
419 }
420 #[repr(C)]
421 #[doc(hidden)]
422 pub struct IBluetoothLEAdvertisementWatcher_Vtbl {
423 pub base__: ::windows::core::IInspectable_Vtbl,
424 #[cfg(feature = "Foundation")]
425 pub MinSamplingInterval: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
426 #[cfg(not(feature = "Foundation"))]
427 MinSamplingInterval: usize,
428 #[cfg(feature = "Foundation")]
429 pub MaxSamplingInterval: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
430 #[cfg(not(feature = "Foundation"))]
431 MaxSamplingInterval: usize,
432 #[cfg(feature = "Foundation")]
433 pub MinOutOfRangeTimeout: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
434 #[cfg(not(feature = "Foundation"))]
435 MinOutOfRangeTimeout: usize,
436 #[cfg(feature = "Foundation")]
437 pub MaxOutOfRangeTimeout: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT,
438 #[cfg(not(feature = "Foundation"))]
439 MaxOutOfRangeTimeout: usize,
440 pub Status: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BluetoothLEAdvertisementWatcherStatus) -> ::windows::core::HRESULT,
441 pub ScanningMode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut BluetoothLEScanningMode) -> ::windows::core::HRESULT,
442 pub SetScanningMode: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: BluetoothLEScanningMode) -> ::windows::core::HRESULT,
443 pub SignalStrengthFilter: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
444 pub SetSignalStrengthFilter: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
445 pub AdvertisementFilter: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
446 pub SetAdvertisementFilter: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
447 pub Start: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
448 pub Stop: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
449 #[cfg(feature = "Foundation")]
450 pub Received: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
451 #[cfg(not(feature = "Foundation"))]
452 Received: usize,
453 #[cfg(feature = "Foundation")]
454 pub RemoveReceived: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
455 #[cfg(not(feature = "Foundation"))]
456 RemoveReceived: usize,
457 #[cfg(feature = "Foundation")]
458 pub Stopped: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
459 #[cfg(not(feature = "Foundation"))]
460 Stopped: usize,
461 #[cfg(feature = "Foundation")]
462 pub RemoveStopped: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
463 #[cfg(not(feature = "Foundation"))]
464 RemoveStopped: usize,
465 }
466 #[doc(hidden)]
467 #[repr(transparent)]
468 pub struct IBluetoothLEAdvertisementWatcher2(::windows::core::IUnknown);
469 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementWatcher2 {
470 type Vtable = IBluetoothLEAdvertisementWatcher2_Vtbl;
471 }
472 impl ::core::clone::Clone for IBluetoothLEAdvertisementWatcher2 {
473 fn clone(&self) -> Self {
474 Self(self.0.clone())
475 }
476 }
477 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementWatcher2 {
478 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x01bf26bc_b164_5805_90a3_e8a7997ff225);
479 }
480 #[repr(C)]
481 #[doc(hidden)]
482 pub struct IBluetoothLEAdvertisementWatcher2_Vtbl {
483 pub base__: ::windows::core::IInspectable_Vtbl,
484 pub AllowExtendedAdvertisements: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
485 pub SetAllowExtendedAdvertisements: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
486 }
487 #[doc(hidden)]
488 #[repr(transparent)]
489 pub struct IBluetoothLEAdvertisementWatcherFactory(::windows::core::IUnknown);
490 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementWatcherFactory {
491 type Vtable = IBluetoothLEAdvertisementWatcherFactory_Vtbl;
492 }
493 impl ::core::clone::Clone for IBluetoothLEAdvertisementWatcherFactory {
494 fn clone(&self) -> Self {
495 Self(self.0.clone())
496 }
497 }
498 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementWatcherFactory {
499 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x9aaf2d56_39ac_453e_b32a_85c657e017f1);
500 }
501 #[repr(C)]
502 #[doc(hidden)]
503 pub struct IBluetoothLEAdvertisementWatcherFactory_Vtbl {
504 pub base__: ::windows::core::IInspectable_Vtbl,
505 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, advertisementfilter: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
506 }
507 #[doc(hidden)]
508 #[repr(transparent)]
509 pub struct IBluetoothLEAdvertisementWatcherStoppedEventArgs(::windows::core::IUnknown);
510 unsafe impl ::windows::core::Interface for IBluetoothLEAdvertisementWatcherStoppedEventArgs {
511 type Vtable = IBluetoothLEAdvertisementWatcherStoppedEventArgs_Vtbl;
512 }
513 impl ::core::clone::Clone for IBluetoothLEAdvertisementWatcherStoppedEventArgs {
514 fn clone(&self) -> Self {
515 Self(self.0.clone())
516 }
517 }
518 unsafe impl ::windows::core::ComInterface for IBluetoothLEAdvertisementWatcherStoppedEventArgs {
519 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdd40f84d_e7b9_43e3_9c04_0685d085fd8c);
520 }
521 #[repr(C)]
522 #[doc(hidden)]
523 pub struct IBluetoothLEAdvertisementWatcherStoppedEventArgs_Vtbl {
524 pub base__: ::windows::core::IInspectable_Vtbl,
525 pub Error: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut super::BluetoothError) -> ::windows::core::HRESULT,
526 }
527 #[doc(hidden)]
528 #[repr(transparent)]
529 pub struct IBluetoothLEManufacturerData(::windows::core::IUnknown);
530 unsafe impl ::windows::core::Interface for IBluetoothLEManufacturerData {
531 type Vtable = IBluetoothLEManufacturerData_Vtbl;
532 }
533 impl ::core::clone::Clone for IBluetoothLEManufacturerData {
534 fn clone(&self) -> Self {
535 Self(self.0.clone())
536 }
537 }
538 unsafe impl ::windows::core::ComInterface for IBluetoothLEManufacturerData {
539 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x912dba18_6963_4533_b061_4694dafb34e5);
540 }
541 #[repr(C)]
542 #[doc(hidden)]
543 pub struct IBluetoothLEManufacturerData_Vtbl {
544 pub base__: ::windows::core::IInspectable_Vtbl,
545 pub CompanyId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut u16) -> ::windows::core::HRESULT,
546 pub SetCompanyId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: u16) -> ::windows::core::HRESULT,
547 #[cfg(feature = "Storage_Streams")]
548 pub Data: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
549 #[cfg(not(feature = "Storage_Streams"))]
550 Data: usize,
551 #[cfg(feature = "Storage_Streams")]
552 pub SetData: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
553 #[cfg(not(feature = "Storage_Streams"))]
554 SetData: usize,
555 }
556 #[doc(hidden)]
557 #[repr(transparent)]
558 pub struct IBluetoothLEManufacturerDataFactory(::windows::core::IUnknown);
559 unsafe impl ::windows::core::Interface for IBluetoothLEManufacturerDataFactory {
560 type Vtable = IBluetoothLEManufacturerDataFactory_Vtbl;
561 }
562 impl ::core::clone::Clone for IBluetoothLEManufacturerDataFactory {
563 fn clone(&self) -> Self {
564 Self(self.0.clone())
565 }
566 }
567 unsafe impl ::windows::core::ComInterface for IBluetoothLEManufacturerDataFactory {
568 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xc09b39f8_319a_441e_8de5_66a81e877a6c);
569 }
570 #[repr(C)]
571 #[doc(hidden)]
572 pub struct IBluetoothLEManufacturerDataFactory_Vtbl {
573 pub base__: ::windows::core::IInspectable_Vtbl,
574 #[cfg(feature = "Storage_Streams")]
575 pub Create: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, companyid: u16, data: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
576 #[cfg(not(feature = "Storage_Streams"))]
577 Create: usize,
578 }
579 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
580 #[repr(transparent)]
581 pub struct BluetoothLEAdvertisement(::windows::core::IUnknown);
582 impl BluetoothLEAdvertisement {
583 pub fn new() -> ::windows::core::Result<Self> {
584 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
585 }
586 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
587 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisement, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
588 SHARED.call(callback)
589 }
590 #[doc = "*Required features: `\"Foundation\"`*"]
591 #[cfg(feature = "Foundation")]
592 pub fn Flags(&self) -> ::windows::core::Result<super::super::super::Foundation::IReference<BluetoothLEAdvertisementFlags>> {
593 let this = self;
594 unsafe {
595 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IReference<BluetoothLEAdvertisementFlags>>();
596 (::windows::core::Interface::vtable(this).Flags)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
597 }
598 }
599 #[doc = "*Required features: `\"Foundation\"`*"]
600 #[cfg(feature = "Foundation")]
601 pub fn SetFlags<P0>(&self, value: P0) -> ::windows::core::Result<()>
602 where
603 P0: ::windows::core::TryIntoParam<super::super::super::Foundation::IReference<BluetoothLEAdvertisementFlags>>,
604 {
605 let this = self;
606 unsafe { (::windows::core::Interface::vtable(this).SetFlags)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
607 }
608 pub fn LocalName(&self) -> ::windows::core::Result<::windows::core::HSTRING> {
609 let this = self;
610 unsafe {
611 let mut result__ = ::windows::core::zeroed::<::windows::core::HSTRING>();
612 (::windows::core::Interface::vtable(this).LocalName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
613 }
614 }
615 pub fn SetLocalName(&self, value: &::windows::core::HSTRING) -> ::windows::core::Result<()> {
616 let this = self;
617 unsafe { (::windows::core::Interface::vtable(this).SetLocalName)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
618 }
619 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
620 #[cfg(feature = "Foundation_Collections")]
621 pub fn ServiceUuids(&self) -> ::windows::core::Result<super::super::super::Foundation::Collections::IVector<::windows::core::GUID>> {
622 let this = self;
623 unsafe {
624 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVector<::windows::core::GUID>>();
625 (::windows::core::Interface::vtable(this).ServiceUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
626 }
627 }
628 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
629 #[cfg(feature = "Foundation_Collections")]
630 pub fn ManufacturerData(&self) -> ::windows::core::Result<super::super::super::Foundation::Collections::IVector<BluetoothLEManufacturerData>> {
631 let this = self;
632 unsafe {
633 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVector<BluetoothLEManufacturerData>>();
634 (::windows::core::Interface::vtable(this).ManufacturerData)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
635 }
636 }
637 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
638 #[cfg(feature = "Foundation_Collections")]
639 pub fn DataSections(&self) -> ::windows::core::Result<super::super::super::Foundation::Collections::IVector<BluetoothLEAdvertisementDataSection>> {
640 let this = self;
641 unsafe {
642 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVector<BluetoothLEAdvertisementDataSection>>();
643 (::windows::core::Interface::vtable(this).DataSections)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
644 }
645 }
646 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
647 #[cfg(feature = "Foundation_Collections")]
648 pub fn GetManufacturerDataByCompanyId(&self, companyid: u16) -> ::windows::core::Result<super::super::super::Foundation::Collections::IVectorView<BluetoothLEManufacturerData>> {
649 let this = self;
650 unsafe {
651 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVectorView<BluetoothLEManufacturerData>>();
652 (::windows::core::Interface::vtable(this).GetManufacturerDataByCompanyId)(::windows::core::Interface::as_raw(this), companyid, &mut result__).from_abi(result__)
653 }
654 }
655 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
656 #[cfg(feature = "Foundation_Collections")]
657 pub fn GetSectionsByType(&self, r#type: u8) -> ::windows::core::Result<super::super::super::Foundation::Collections::IVectorView<BluetoothLEAdvertisementDataSection>> {
658 let this = self;
659 unsafe {
660 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVectorView<BluetoothLEAdvertisementDataSection>>();
661 (::windows::core::Interface::vtable(this).GetSectionsByType)(::windows::core::Interface::as_raw(this), r#type, &mut result__).from_abi(result__)
662 }
663 }
664 }
665 impl ::core::cmp::PartialEq for BluetoothLEAdvertisement {
666 fn eq(&self, other: &Self) -> bool {
667 self.0 == other.0
668 }
669 }
670 impl ::core::cmp::Eq for BluetoothLEAdvertisement {}
671 impl ::core::fmt::Debug for BluetoothLEAdvertisement {
672 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
673 f.debug_tuple("BluetoothLEAdvertisement").field(&self.0).finish()
674 }
675 }
676 impl ::windows::core::RuntimeType for BluetoothLEAdvertisement {
677 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisement;{066fb2b7-33d1-4e7d-8367-cf81d0f79653})");
678 }
679 impl ::core::clone::Clone for BluetoothLEAdvertisement {
680 fn clone(&self) -> Self {
681 Self(self.0.clone())
682 }
683 }
684 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisement {
685 type Vtable = IBluetoothLEAdvertisement_Vtbl;
686 }
687 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisement {
688 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisement as ::windows::core::ComInterface>::IID;
689 }
690 impl ::windows::core::RuntimeName for BluetoothLEAdvertisement {
691 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisement";
692 }
693 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisement, ::windows::core::IUnknown, ::windows::core::IInspectable);
694 unsafe impl ::core::marker::Send for BluetoothLEAdvertisement {}
695 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisement {}
696 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
697 #[repr(transparent)]
698 pub struct BluetoothLEAdvertisementBytePattern(::windows::core::IUnknown);
699 impl BluetoothLEAdvertisementBytePattern {
700 pub fn new() -> ::windows::core::Result<Self> {
701 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
702 }
703 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
704 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementBytePattern, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
705 SHARED.call(callback)
706 }
707 pub fn DataType(&self) -> ::windows::core::Result<u8> {
708 let this = self;
709 unsafe {
710 let mut result__ = ::windows::core::zeroed::<u8>();
711 (::windows::core::Interface::vtable(this).DataType)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
712 }
713 }
714 pub fn SetDataType(&self, value: u8) -> ::windows::core::Result<()> {
715 let this = self;
716 unsafe { (::windows::core::Interface::vtable(this).SetDataType)(::windows::core::Interface::as_raw(this), value).ok() }
717 }
718 pub fn Offset(&self) -> ::windows::core::Result<i16> {
719 let this = self;
720 unsafe {
721 let mut result__ = ::windows::core::zeroed::<i16>();
722 (::windows::core::Interface::vtable(this).Offset)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
723 }
724 }
725 pub fn SetOffset(&self, value: i16) -> ::windows::core::Result<()> {
726 let this = self;
727 unsafe { (::windows::core::Interface::vtable(this).SetOffset)(::windows::core::Interface::as_raw(this), value).ok() }
728 }
729 #[doc = "*Required features: `\"Storage_Streams\"`*"]
730 #[cfg(feature = "Storage_Streams")]
731 pub fn Data(&self) -> ::windows::core::Result<super::super::super::Storage::Streams::IBuffer> {
732 let this = self;
733 unsafe {
734 let mut result__ = ::windows::core::zeroed::<super::super::super::Storage::Streams::IBuffer>();
735 (::windows::core::Interface::vtable(this).Data)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
736 }
737 }
738 #[doc = "*Required features: `\"Storage_Streams\"`*"]
739 #[cfg(feature = "Storage_Streams")]
740 pub fn SetData<P0>(&self, value: P0) -> ::windows::core::Result<()>
741 where
742 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
743 {
744 let this = self;
745 unsafe { (::windows::core::Interface::vtable(this).SetData)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
746 }
747 #[doc = "*Required features: `\"Storage_Streams\"`*"]
748 #[cfg(feature = "Storage_Streams")]
749 pub fn Create<P0>(datatype: u8, offset: i16, data: P0) -> ::windows::core::Result<BluetoothLEAdvertisementBytePattern>
750 where
751 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
752 {
753 Self::IBluetoothLEAdvertisementBytePatternFactory(|this| unsafe {
754 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementBytePattern>();
755 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), datatype, offset, data.try_into_param()?.abi(), &mut result__).from_abi(result__)
756 })
757 }
758 #[doc(hidden)]
759 pub fn IBluetoothLEAdvertisementBytePatternFactory<R, F: FnOnce(&IBluetoothLEAdvertisementBytePatternFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
760 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementBytePattern, IBluetoothLEAdvertisementBytePatternFactory> = ::windows::imp::FactoryCache::new();
761 SHARED.call(callback)
762 }
763 }
764 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementBytePattern {
765 fn eq(&self, other: &Self) -> bool {
766 self.0 == other.0
767 }
768 }
769 impl ::core::cmp::Eq for BluetoothLEAdvertisementBytePattern {}
770 impl ::core::fmt::Debug for BluetoothLEAdvertisementBytePattern {
771 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
772 f.debug_tuple("BluetoothLEAdvertisementBytePattern").field(&self.0).finish()
773 }
774 }
775 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementBytePattern {
776 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementBytePattern;{fbfad7f2-b9c5-4a08-bc51-502f8ef68a79})");
777 }
778 impl ::core::clone::Clone for BluetoothLEAdvertisementBytePattern {
779 fn clone(&self) -> Self {
780 Self(self.0.clone())
781 }
782 }
783 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementBytePattern {
784 type Vtable = IBluetoothLEAdvertisementBytePattern_Vtbl;
785 }
786 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementBytePattern {
787 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementBytePattern as ::windows::core::ComInterface>::IID;
788 }
789 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementBytePattern {
790 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementBytePattern";
791 }
792 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementBytePattern, ::windows::core::IUnknown, ::windows::core::IInspectable);
793 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementBytePattern {}
794 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementBytePattern {}
795 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
796 #[repr(transparent)]
797 pub struct BluetoothLEAdvertisementDataSection(::windows::core::IUnknown);
798 impl BluetoothLEAdvertisementDataSection {
799 pub fn new() -> ::windows::core::Result<Self> {
800 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
801 }
802 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
803 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementDataSection, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
804 SHARED.call(callback)
805 }
806 pub fn DataType(&self) -> ::windows::core::Result<u8> {
807 let this = self;
808 unsafe {
809 let mut result__ = ::windows::core::zeroed::<u8>();
810 (::windows::core::Interface::vtable(this).DataType)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
811 }
812 }
813 pub fn SetDataType(&self, value: u8) -> ::windows::core::Result<()> {
814 let this = self;
815 unsafe { (::windows::core::Interface::vtable(this).SetDataType)(::windows::core::Interface::as_raw(this), value).ok() }
816 }
817 #[doc = "*Required features: `\"Storage_Streams\"`*"]
818 #[cfg(feature = "Storage_Streams")]
819 pub fn Data(&self) -> ::windows::core::Result<super::super::super::Storage::Streams::IBuffer> {
820 let this = self;
821 unsafe {
822 let mut result__ = ::windows::core::zeroed::<super::super::super::Storage::Streams::IBuffer>();
823 (::windows::core::Interface::vtable(this).Data)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
824 }
825 }
826 #[doc = "*Required features: `\"Storage_Streams\"`*"]
827 #[cfg(feature = "Storage_Streams")]
828 pub fn SetData<P0>(&self, value: P0) -> ::windows::core::Result<()>
829 where
830 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
831 {
832 let this = self;
833 unsafe { (::windows::core::Interface::vtable(this).SetData)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
834 }
835 #[doc = "*Required features: `\"Storage_Streams\"`*"]
836 #[cfg(feature = "Storage_Streams")]
837 pub fn Create<P0>(datatype: u8, data: P0) -> ::windows::core::Result<BluetoothLEAdvertisementDataSection>
838 where
839 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
840 {
841 Self::IBluetoothLEAdvertisementDataSectionFactory(|this| unsafe {
842 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementDataSection>();
843 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), datatype, data.try_into_param()?.abi(), &mut result__).from_abi(result__)
844 })
845 }
846 #[doc(hidden)]
847 pub fn IBluetoothLEAdvertisementDataSectionFactory<R, F: FnOnce(&IBluetoothLEAdvertisementDataSectionFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
848 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementDataSection, IBluetoothLEAdvertisementDataSectionFactory> = ::windows::imp::FactoryCache::new();
849 SHARED.call(callback)
850 }
851 }
852 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementDataSection {
853 fn eq(&self, other: &Self) -> bool {
854 self.0 == other.0
855 }
856 }
857 impl ::core::cmp::Eq for BluetoothLEAdvertisementDataSection {}
858 impl ::core::fmt::Debug for BluetoothLEAdvertisementDataSection {
859 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
860 f.debug_tuple("BluetoothLEAdvertisementDataSection").field(&self.0).finish()
861 }
862 }
863 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementDataSection {
864 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementDataSection;{d7213314-3a43-40f9-b6f0-92bfefc34ae3})");
865 }
866 impl ::core::clone::Clone for BluetoothLEAdvertisementDataSection {
867 fn clone(&self) -> Self {
868 Self(self.0.clone())
869 }
870 }
871 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementDataSection {
872 type Vtable = IBluetoothLEAdvertisementDataSection_Vtbl;
873 }
874 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementDataSection {
875 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementDataSection as ::windows::core::ComInterface>::IID;
876 }
877 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementDataSection {
878 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementDataSection";
879 }
880 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementDataSection, ::windows::core::IUnknown, ::windows::core::IInspectable);
881 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementDataSection {}
882 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementDataSection {}
883 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
884 pub struct BluetoothLEAdvertisementDataTypes;
885 impl BluetoothLEAdvertisementDataTypes {
886 pub fn Flags() -> ::windows::core::Result<u8> {
887 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
888 let mut result__ = ::windows::core::zeroed::<u8>();
889 (::windows::core::Interface::vtable(this).Flags)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
890 })
891 }
892 pub fn IncompleteService16BitUuids() -> ::windows::core::Result<u8> {
893 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
894 let mut result__ = ::windows::core::zeroed::<u8>();
895 (::windows::core::Interface::vtable(this).IncompleteService16BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
896 })
897 }
898 pub fn CompleteService16BitUuids() -> ::windows::core::Result<u8> {
899 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
900 let mut result__ = ::windows::core::zeroed::<u8>();
901 (::windows::core::Interface::vtable(this).CompleteService16BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
902 })
903 }
904 pub fn IncompleteService32BitUuids() -> ::windows::core::Result<u8> {
905 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
906 let mut result__ = ::windows::core::zeroed::<u8>();
907 (::windows::core::Interface::vtable(this).IncompleteService32BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
908 })
909 }
910 pub fn CompleteService32BitUuids() -> ::windows::core::Result<u8> {
911 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
912 let mut result__ = ::windows::core::zeroed::<u8>();
913 (::windows::core::Interface::vtable(this).CompleteService32BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
914 })
915 }
916 pub fn IncompleteService128BitUuids() -> ::windows::core::Result<u8> {
917 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
918 let mut result__ = ::windows::core::zeroed::<u8>();
919 (::windows::core::Interface::vtable(this).IncompleteService128BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
920 })
921 }
922 pub fn CompleteService128BitUuids() -> ::windows::core::Result<u8> {
923 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
924 let mut result__ = ::windows::core::zeroed::<u8>();
925 (::windows::core::Interface::vtable(this).CompleteService128BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
926 })
927 }
928 pub fn ShortenedLocalName() -> ::windows::core::Result<u8> {
929 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
930 let mut result__ = ::windows::core::zeroed::<u8>();
931 (::windows::core::Interface::vtable(this).ShortenedLocalName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
932 })
933 }
934 pub fn CompleteLocalName() -> ::windows::core::Result<u8> {
935 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
936 let mut result__ = ::windows::core::zeroed::<u8>();
937 (::windows::core::Interface::vtable(this).CompleteLocalName)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
938 })
939 }
940 pub fn TxPowerLevel() -> ::windows::core::Result<u8> {
941 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
942 let mut result__ = ::windows::core::zeroed::<u8>();
943 (::windows::core::Interface::vtable(this).TxPowerLevel)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
944 })
945 }
946 pub fn PeripheralConnectionIntervalRange() -> ::windows::core::Result<u8> {
947 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
948 let mut result__ = ::windows::core::zeroed::<u8>();
949 (::windows::core::Interface::vtable(this).PeripheralConnectionIntervalRange)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
950 })
951 }
952 pub fn ServiceSolicitation16BitUuids() -> ::windows::core::Result<u8> {
953 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
954 let mut result__ = ::windows::core::zeroed::<u8>();
955 (::windows::core::Interface::vtable(this).ServiceSolicitation16BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
956 })
957 }
958 pub fn ServiceSolicitation32BitUuids() -> ::windows::core::Result<u8> {
959 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
960 let mut result__ = ::windows::core::zeroed::<u8>();
961 (::windows::core::Interface::vtable(this).ServiceSolicitation32BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
962 })
963 }
964 pub fn ServiceSolicitation128BitUuids() -> ::windows::core::Result<u8> {
965 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
966 let mut result__ = ::windows::core::zeroed::<u8>();
967 (::windows::core::Interface::vtable(this).ServiceSolicitation128BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
968 })
969 }
970 pub fn ServiceData16BitUuids() -> ::windows::core::Result<u8> {
971 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
972 let mut result__ = ::windows::core::zeroed::<u8>();
973 (::windows::core::Interface::vtable(this).ServiceData16BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
974 })
975 }
976 pub fn ServiceData32BitUuids() -> ::windows::core::Result<u8> {
977 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
978 let mut result__ = ::windows::core::zeroed::<u8>();
979 (::windows::core::Interface::vtable(this).ServiceData32BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
980 })
981 }
982 pub fn ServiceData128BitUuids() -> ::windows::core::Result<u8> {
983 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
984 let mut result__ = ::windows::core::zeroed::<u8>();
985 (::windows::core::Interface::vtable(this).ServiceData128BitUuids)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
986 })
987 }
988 pub fn PublicTargetAddress() -> ::windows::core::Result<u8> {
989 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
990 let mut result__ = ::windows::core::zeroed::<u8>();
991 (::windows::core::Interface::vtable(this).PublicTargetAddress)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
992 })
993 }
994 pub fn RandomTargetAddress() -> ::windows::core::Result<u8> {
995 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
996 let mut result__ = ::windows::core::zeroed::<u8>();
997 (::windows::core::Interface::vtable(this).RandomTargetAddress)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
998 })
999 }
1000 pub fn Appearance() -> ::windows::core::Result<u8> {
1001 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
1002 let mut result__ = ::windows::core::zeroed::<u8>();
1003 (::windows::core::Interface::vtable(this).Appearance)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1004 })
1005 }
1006 pub fn AdvertisingInterval() -> ::windows::core::Result<u8> {
1007 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
1008 let mut result__ = ::windows::core::zeroed::<u8>();
1009 (::windows::core::Interface::vtable(this).AdvertisingInterval)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1010 })
1011 }
1012 pub fn ManufacturerSpecificData() -> ::windows::core::Result<u8> {
1013 Self::IBluetoothLEAdvertisementDataTypesStatics(|this| unsafe {
1014 let mut result__ = ::windows::core::zeroed::<u8>();
1015 (::windows::core::Interface::vtable(this).ManufacturerSpecificData)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1016 })
1017 }
1018 #[doc(hidden)]
1019 pub fn IBluetoothLEAdvertisementDataTypesStatics<R, F: FnOnce(&IBluetoothLEAdvertisementDataTypesStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1020 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementDataTypes, IBluetoothLEAdvertisementDataTypesStatics> = ::windows::imp::FactoryCache::new();
1021 SHARED.call(callback)
1022 }
1023 }
1024 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementDataTypes {
1025 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementDataTypes";
1026 }
1027 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1028 #[repr(transparent)]
1029 pub struct BluetoothLEAdvertisementFilter(::windows::core::IUnknown);
1030 impl BluetoothLEAdvertisementFilter {
1031 pub fn new() -> ::windows::core::Result<Self> {
1032 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1033 }
1034 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1035 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementFilter, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1036 SHARED.call(callback)
1037 }
1038 pub fn Advertisement(&self) -> ::windows::core::Result<BluetoothLEAdvertisement> {
1039 let this = self;
1040 unsafe {
1041 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisement>();
1042 (::windows::core::Interface::vtable(this).Advertisement)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1043 }
1044 }
1045 pub fn SetAdvertisement(&self, value: &BluetoothLEAdvertisement) -> ::windows::core::Result<()> {
1046 let this = self;
1047 unsafe { (::windows::core::Interface::vtable(this).SetAdvertisement)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1048 }
1049 #[doc = "*Required features: `\"Foundation_Collections\"`*"]
1050 #[cfg(feature = "Foundation_Collections")]
1051 pub fn BytePatterns(&self) -> ::windows::core::Result<super::super::super::Foundation::Collections::IVector<BluetoothLEAdvertisementBytePattern>> {
1052 let this = self;
1053 unsafe {
1054 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::Collections::IVector<BluetoothLEAdvertisementBytePattern>>();
1055 (::windows::core::Interface::vtable(this).BytePatterns)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1056 }
1057 }
1058 }
1059 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementFilter {
1060 fn eq(&self, other: &Self) -> bool {
1061 self.0 == other.0
1062 }
1063 }
1064 impl ::core::cmp::Eq for BluetoothLEAdvertisementFilter {}
1065 impl ::core::fmt::Debug for BluetoothLEAdvertisementFilter {
1066 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1067 f.debug_tuple("BluetoothLEAdvertisementFilter").field(&self.0).finish()
1068 }
1069 }
1070 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementFilter {
1071 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementFilter;{131eb0d3-d04e-47b1-837e-49405bf6f80f})");
1072 }
1073 impl ::core::clone::Clone for BluetoothLEAdvertisementFilter {
1074 fn clone(&self) -> Self {
1075 Self(self.0.clone())
1076 }
1077 }
1078 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementFilter {
1079 type Vtable = IBluetoothLEAdvertisementFilter_Vtbl;
1080 }
1081 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementFilter {
1082 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementFilter as ::windows::core::ComInterface>::IID;
1083 }
1084 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementFilter {
1085 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementFilter";
1086 }
1087 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementFilter, ::windows::core::IUnknown, ::windows::core::IInspectable);
1088 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementFilter {}
1089 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementFilter {}
1090 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1091 #[repr(transparent)]
1092 pub struct BluetoothLEAdvertisementPublisher(::windows::core::IUnknown);
1093 impl BluetoothLEAdvertisementPublisher {
1094 pub fn new() -> ::windows::core::Result<Self> {
1095 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1096 }
1097 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1098 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementPublisher, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1099 SHARED.call(callback)
1100 }
1101 pub fn Status(&self) -> ::windows::core::Result<BluetoothLEAdvertisementPublisherStatus> {
1102 let this = self;
1103 unsafe {
1104 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementPublisherStatus>();
1105 (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1106 }
1107 }
1108 pub fn Advertisement(&self) -> ::windows::core::Result<BluetoothLEAdvertisement> {
1109 let this = self;
1110 unsafe {
1111 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisement>();
1112 (::windows::core::Interface::vtable(this).Advertisement)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1113 }
1114 }
1115 pub fn Start(&self) -> ::windows::core::Result<()> {
1116 let this = self;
1117 unsafe { (::windows::core::Interface::vtable(this).Start)(::windows::core::Interface::as_raw(this)).ok() }
1118 }
1119 pub fn Stop(&self) -> ::windows::core::Result<()> {
1120 let this = self;
1121 unsafe { (::windows::core::Interface::vtable(this).Stop)(::windows::core::Interface::as_raw(this)).ok() }
1122 }
1123 #[doc = "*Required features: `\"Foundation\"`*"]
1124 #[cfg(feature = "Foundation")]
1125 pub fn StatusChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler<BluetoothLEAdvertisementPublisher, BluetoothLEAdvertisementPublisherStatusChangedEventArgs>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> {
1126 let this = self;
1127 unsafe {
1128 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>();
1129 (::windows::core::Interface::vtable(this).StatusChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1130 }
1131 }
1132 #[doc = "*Required features: `\"Foundation\"`*"]
1133 #[cfg(feature = "Foundation")]
1134 pub fn RemoveStatusChanged(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1135 let this = self;
1136 unsafe { (::windows::core::Interface::vtable(this).RemoveStatusChanged)(::windows::core::Interface::as_raw(this), token).ok() }
1137 }
1138 #[doc = "*Required features: `\"Foundation\"`*"]
1139 #[cfg(feature = "Foundation")]
1140 pub fn PreferredTransmitPowerLevelInDBm(&self) -> ::windows::core::Result<super::super::super::Foundation::IReference<i16>> {
1141 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1142 unsafe {
1143 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IReference<i16>>();
1144 (::windows::core::Interface::vtable(this).PreferredTransmitPowerLevelInDBm)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1145 }
1146 }
1147 #[doc = "*Required features: `\"Foundation\"`*"]
1148 #[cfg(feature = "Foundation")]
1149 pub fn SetPreferredTransmitPowerLevelInDBm<P0>(&self, value: P0) -> ::windows::core::Result<()>
1150 where
1151 P0: ::windows::core::TryIntoParam<super::super::super::Foundation::IReference<i16>>,
1152 {
1153 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1154 unsafe { (::windows::core::Interface::vtable(this).SetPreferredTransmitPowerLevelInDBm)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
1155 }
1156 pub fn UseExtendedAdvertisement(&self) -> ::windows::core::Result<bool> {
1157 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1158 unsafe {
1159 let mut result__ = ::windows::core::zeroed::<bool>();
1160 (::windows::core::Interface::vtable(this).UseExtendedAdvertisement)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1161 }
1162 }
1163 pub fn SetUseExtendedAdvertisement(&self, value: bool) -> ::windows::core::Result<()> {
1164 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1165 unsafe { (::windows::core::Interface::vtable(this).SetUseExtendedAdvertisement)(::windows::core::Interface::as_raw(this), value).ok() }
1166 }
1167 pub fn IsAnonymous(&self) -> ::windows::core::Result<bool> {
1168 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1169 unsafe {
1170 let mut result__ = ::windows::core::zeroed::<bool>();
1171 (::windows::core::Interface::vtable(this).IsAnonymous)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1172 }
1173 }
1174 pub fn SetIsAnonymous(&self, value: bool) -> ::windows::core::Result<()> {
1175 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1176 unsafe { (::windows::core::Interface::vtable(this).SetIsAnonymous)(::windows::core::Interface::as_raw(this), value).ok() }
1177 }
1178 pub fn IncludeTransmitPowerLevel(&self) -> ::windows::core::Result<bool> {
1179 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1180 unsafe {
1181 let mut result__ = ::windows::core::zeroed::<bool>();
1182 (::windows::core::Interface::vtable(this).IncludeTransmitPowerLevel)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1183 }
1184 }
1185 pub fn SetIncludeTransmitPowerLevel(&self, value: bool) -> ::windows::core::Result<()> {
1186 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisher2>(self)?;
1187 unsafe { (::windows::core::Interface::vtable(this).SetIncludeTransmitPowerLevel)(::windows::core::Interface::as_raw(this), value).ok() }
1188 }
1189 pub fn Create(advertisement: &BluetoothLEAdvertisement) -> ::windows::core::Result<BluetoothLEAdvertisementPublisher> {
1190 Self::IBluetoothLEAdvertisementPublisherFactory(|this| unsafe {
1191 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementPublisher>();
1192 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(advertisement), &mut result__).from_abi(result__)
1193 })
1194 }
1195 #[doc(hidden)]
1196 pub fn IBluetoothLEAdvertisementPublisherFactory<R, F: FnOnce(&IBluetoothLEAdvertisementPublisherFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1197 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementPublisher, IBluetoothLEAdvertisementPublisherFactory> = ::windows::imp::FactoryCache::new();
1198 SHARED.call(callback)
1199 }
1200 }
1201 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementPublisher {
1202 fn eq(&self, other: &Self) -> bool {
1203 self.0 == other.0
1204 }
1205 }
1206 impl ::core::cmp::Eq for BluetoothLEAdvertisementPublisher {}
1207 impl ::core::fmt::Debug for BluetoothLEAdvertisementPublisher {
1208 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1209 f.debug_tuple("BluetoothLEAdvertisementPublisher").field(&self.0).finish()
1210 }
1211 }
1212 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementPublisher {
1213 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementPublisher;{cde820f9-d9fa-43d6-a264-ddd8b7da8b78})");
1214 }
1215 impl ::core::clone::Clone for BluetoothLEAdvertisementPublisher {
1216 fn clone(&self) -> Self {
1217 Self(self.0.clone())
1218 }
1219 }
1220 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementPublisher {
1221 type Vtable = IBluetoothLEAdvertisementPublisher_Vtbl;
1222 }
1223 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementPublisher {
1224 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementPublisher as ::windows::core::ComInterface>::IID;
1225 }
1226 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementPublisher {
1227 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementPublisher";
1228 }
1229 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementPublisher, ::windows::core::IUnknown, ::windows::core::IInspectable);
1230 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementPublisher {}
1231 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementPublisher {}
1232 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1233 #[repr(transparent)]
1234 pub struct BluetoothLEAdvertisementPublisherStatusChangedEventArgs(::windows::core::IUnknown);
1235 impl BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1236 pub fn Status(&self) -> ::windows::core::Result<BluetoothLEAdvertisementPublisherStatus> {
1237 let this = self;
1238 unsafe {
1239 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementPublisherStatus>();
1240 (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1241 }
1242 }
1243 pub fn Error(&self) -> ::windows::core::Result<super::BluetoothError> {
1244 let this = self;
1245 unsafe {
1246 let mut result__ = ::windows::core::zeroed::<super::BluetoothError>();
1247 (::windows::core::Interface::vtable(this).Error)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1248 }
1249 }
1250 #[doc = "*Required features: `\"Foundation\"`*"]
1251 #[cfg(feature = "Foundation")]
1252 pub fn SelectedTransmitPowerLevelInDBm(&self) -> ::windows::core::Result<super::super::super::Foundation::IReference<i16>> {
1253 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementPublisherStatusChangedEventArgs2>(self)?;
1254 unsafe {
1255 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IReference<i16>>();
1256 (::windows::core::Interface::vtable(this).SelectedTransmitPowerLevelInDBm)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1257 }
1258 }
1259 }
1260 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1261 fn eq(&self, other: &Self) -> bool {
1262 self.0 == other.0
1263 }
1264 }
1265 impl ::core::cmp::Eq for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {}
1266 impl ::core::fmt::Debug for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1267 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1268 f.debug_tuple("BluetoothLEAdvertisementPublisherStatusChangedEventArgs").field(&self.0).finish()
1269 }
1270 }
1271 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1272 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementPublisherStatusChangedEventArgs;{09c2bd9f-2dff-4b23-86ee-0d14fb94aeae})");
1273 }
1274 impl ::core::clone::Clone for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1275 fn clone(&self) -> Self {
1276 Self(self.0.clone())
1277 }
1278 }
1279 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1280 type Vtable = IBluetoothLEAdvertisementPublisherStatusChangedEventArgs_Vtbl;
1281 }
1282 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1283 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementPublisherStatusChangedEventArgs as ::windows::core::ComInterface>::IID;
1284 }
1285 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {
1286 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementPublisherStatusChangedEventArgs";
1287 }
1288 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementPublisherStatusChangedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
1289 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {}
1290 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementPublisherStatusChangedEventArgs {}
1291 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1292 #[repr(transparent)]
1293 pub struct BluetoothLEAdvertisementReceivedEventArgs(::windows::core::IUnknown);
1294 impl BluetoothLEAdvertisementReceivedEventArgs {
1295 pub fn RawSignalStrengthInDBm(&self) -> ::windows::core::Result<i16> {
1296 let this = self;
1297 unsafe {
1298 let mut result__ = ::windows::core::zeroed::<i16>();
1299 (::windows::core::Interface::vtable(this).RawSignalStrengthInDBm)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1300 }
1301 }
1302 pub fn BluetoothAddress(&self) -> ::windows::core::Result<u64> {
1303 let this = self;
1304 unsafe {
1305 let mut result__ = ::windows::core::zeroed::<u64>();
1306 (::windows::core::Interface::vtable(this).BluetoothAddress)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1307 }
1308 }
1309 pub fn AdvertisementType(&self) -> ::windows::core::Result<BluetoothLEAdvertisementType> {
1310 let this = self;
1311 unsafe {
1312 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementType>();
1313 (::windows::core::Interface::vtable(this).AdvertisementType)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1314 }
1315 }
1316 #[doc = "*Required features: `\"Foundation\"`*"]
1317 #[cfg(feature = "Foundation")]
1318 pub fn Timestamp(&self) -> ::windows::core::Result<super::super::super::Foundation::DateTime> {
1319 let this = self;
1320 unsafe {
1321 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::DateTime>();
1322 (::windows::core::Interface::vtable(this).Timestamp)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1323 }
1324 }
1325 pub fn Advertisement(&self) -> ::windows::core::Result<BluetoothLEAdvertisement> {
1326 let this = self;
1327 unsafe {
1328 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisement>();
1329 (::windows::core::Interface::vtable(this).Advertisement)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1330 }
1331 }
1332 pub fn BluetoothAddressType(&self) -> ::windows::core::Result<super::BluetoothAddressType> {
1333 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1334 unsafe {
1335 let mut result__ = ::windows::core::zeroed::<super::BluetoothAddressType>();
1336 (::windows::core::Interface::vtable(this).BluetoothAddressType)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1337 }
1338 }
1339 #[doc = "*Required features: `\"Foundation\"`*"]
1340 #[cfg(feature = "Foundation")]
1341 pub fn TransmitPowerLevelInDBm(&self) -> ::windows::core::Result<super::super::super::Foundation::IReference<i16>> {
1342 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1343 unsafe {
1344 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IReference<i16>>();
1345 (::windows::core::Interface::vtable(this).TransmitPowerLevelInDBm)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1346 }
1347 }
1348 pub fn IsAnonymous(&self) -> ::windows::core::Result<bool> {
1349 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1350 unsafe {
1351 let mut result__ = ::windows::core::zeroed::<bool>();
1352 (::windows::core::Interface::vtable(this).IsAnonymous)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1353 }
1354 }
1355 pub fn IsConnectable(&self) -> ::windows::core::Result<bool> {
1356 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1357 unsafe {
1358 let mut result__ = ::windows::core::zeroed::<bool>();
1359 (::windows::core::Interface::vtable(this).IsConnectable)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1360 }
1361 }
1362 pub fn IsScannable(&self) -> ::windows::core::Result<bool> {
1363 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1364 unsafe {
1365 let mut result__ = ::windows::core::zeroed::<bool>();
1366 (::windows::core::Interface::vtable(this).IsScannable)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1367 }
1368 }
1369 pub fn IsDirected(&self) -> ::windows::core::Result<bool> {
1370 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1371 unsafe {
1372 let mut result__ = ::windows::core::zeroed::<bool>();
1373 (::windows::core::Interface::vtable(this).IsDirected)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1374 }
1375 }
1376 pub fn IsScanResponse(&self) -> ::windows::core::Result<bool> {
1377 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementReceivedEventArgs2>(self)?;
1378 unsafe {
1379 let mut result__ = ::windows::core::zeroed::<bool>();
1380 (::windows::core::Interface::vtable(this).IsScanResponse)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1381 }
1382 }
1383 }
1384 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementReceivedEventArgs {
1385 fn eq(&self, other: &Self) -> bool {
1386 self.0 == other.0
1387 }
1388 }
1389 impl ::core::cmp::Eq for BluetoothLEAdvertisementReceivedEventArgs {}
1390 impl ::core::fmt::Debug for BluetoothLEAdvertisementReceivedEventArgs {
1391 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1392 f.debug_tuple("BluetoothLEAdvertisementReceivedEventArgs").field(&self.0).finish()
1393 }
1394 }
1395 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementReceivedEventArgs {
1396 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementReceivedEventArgs;{27987ddf-e596-41be-8d43-9e6731d4a913})");
1397 }
1398 impl ::core::clone::Clone for BluetoothLEAdvertisementReceivedEventArgs {
1399 fn clone(&self) -> Self {
1400 Self(self.0.clone())
1401 }
1402 }
1403 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementReceivedEventArgs {
1404 type Vtable = IBluetoothLEAdvertisementReceivedEventArgs_Vtbl;
1405 }
1406 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementReceivedEventArgs {
1407 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementReceivedEventArgs as ::windows::core::ComInterface>::IID;
1408 }
1409 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementReceivedEventArgs {
1410 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementReceivedEventArgs";
1411 }
1412 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementReceivedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
1413 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementReceivedEventArgs {}
1414 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementReceivedEventArgs {}
1415 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1416 #[repr(transparent)]
1417 pub struct BluetoothLEAdvertisementWatcher(::windows::core::IUnknown);
1418 impl BluetoothLEAdvertisementWatcher {
1419 pub fn new() -> ::windows::core::Result<Self> {
1420 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1421 }
1422 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1423 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementWatcher, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1424 SHARED.call(callback)
1425 }
1426 #[doc = "*Required features: `\"Foundation\"`*"]
1427 #[cfg(feature = "Foundation")]
1428 pub fn MinSamplingInterval(&self) -> ::windows::core::Result<super::super::super::Foundation::TimeSpan> {
1429 let this = self;
1430 unsafe {
1431 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::TimeSpan>();
1432 (::windows::core::Interface::vtable(this).MinSamplingInterval)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1433 }
1434 }
1435 #[doc = "*Required features: `\"Foundation\"`*"]
1436 #[cfg(feature = "Foundation")]
1437 pub fn MaxSamplingInterval(&self) -> ::windows::core::Result<super::super::super::Foundation::TimeSpan> {
1438 let this = self;
1439 unsafe {
1440 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::TimeSpan>();
1441 (::windows::core::Interface::vtable(this).MaxSamplingInterval)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1442 }
1443 }
1444 #[doc = "*Required features: `\"Foundation\"`*"]
1445 #[cfg(feature = "Foundation")]
1446 pub fn MinOutOfRangeTimeout(&self) -> ::windows::core::Result<super::super::super::Foundation::TimeSpan> {
1447 let this = self;
1448 unsafe {
1449 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::TimeSpan>();
1450 (::windows::core::Interface::vtable(this).MinOutOfRangeTimeout)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1451 }
1452 }
1453 #[doc = "*Required features: `\"Foundation\"`*"]
1454 #[cfg(feature = "Foundation")]
1455 pub fn MaxOutOfRangeTimeout(&self) -> ::windows::core::Result<super::super::super::Foundation::TimeSpan> {
1456 let this = self;
1457 unsafe {
1458 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::TimeSpan>();
1459 (::windows::core::Interface::vtable(this).MaxOutOfRangeTimeout)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1460 }
1461 }
1462 pub fn Status(&self) -> ::windows::core::Result<BluetoothLEAdvertisementWatcherStatus> {
1463 let this = self;
1464 unsafe {
1465 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementWatcherStatus>();
1466 (::windows::core::Interface::vtable(this).Status)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1467 }
1468 }
1469 pub fn ScanningMode(&self) -> ::windows::core::Result<BluetoothLEScanningMode> {
1470 let this = self;
1471 unsafe {
1472 let mut result__ = ::windows::core::zeroed::<BluetoothLEScanningMode>();
1473 (::windows::core::Interface::vtable(this).ScanningMode)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1474 }
1475 }
1476 pub fn SetScanningMode(&self, value: BluetoothLEScanningMode) -> ::windows::core::Result<()> {
1477 let this = self;
1478 unsafe { (::windows::core::Interface::vtable(this).SetScanningMode)(::windows::core::Interface::as_raw(this), value).ok() }
1479 }
1480 pub fn SignalStrengthFilter(&self) -> ::windows::core::Result<super::BluetoothSignalStrengthFilter> {
1481 let this = self;
1482 unsafe {
1483 let mut result__ = ::windows::core::zeroed::<super::BluetoothSignalStrengthFilter>();
1484 (::windows::core::Interface::vtable(this).SignalStrengthFilter)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1485 }
1486 }
1487 pub fn SetSignalStrengthFilter(&self, value: &super::BluetoothSignalStrengthFilter) -> ::windows::core::Result<()> {
1488 let this = self;
1489 unsafe { (::windows::core::Interface::vtable(this).SetSignalStrengthFilter)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1490 }
1491 pub fn AdvertisementFilter(&self) -> ::windows::core::Result<BluetoothLEAdvertisementFilter> {
1492 let this = self;
1493 unsafe {
1494 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementFilter>();
1495 (::windows::core::Interface::vtable(this).AdvertisementFilter)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1496 }
1497 }
1498 pub fn SetAdvertisementFilter(&self, value: &BluetoothLEAdvertisementFilter) -> ::windows::core::Result<()> {
1499 let this = self;
1500 unsafe { (::windows::core::Interface::vtable(this).SetAdvertisementFilter)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(value)).ok() }
1501 }
1502 pub fn Start(&self) -> ::windows::core::Result<()> {
1503 let this = self;
1504 unsafe { (::windows::core::Interface::vtable(this).Start)(::windows::core::Interface::as_raw(this)).ok() }
1505 }
1506 pub fn Stop(&self) -> ::windows::core::Result<()> {
1507 let this = self;
1508 unsafe { (::windows::core::Interface::vtable(this).Stop)(::windows::core::Interface::as_raw(this)).ok() }
1509 }
1510 #[doc = "*Required features: `\"Foundation\"`*"]
1511 #[cfg(feature = "Foundation")]
1512 pub fn Received(&self, handler: &super::super::super::Foundation::TypedEventHandler<BluetoothLEAdvertisementWatcher, BluetoothLEAdvertisementReceivedEventArgs>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> {
1513 let this = self;
1514 unsafe {
1515 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>();
1516 (::windows::core::Interface::vtable(this).Received)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1517 }
1518 }
1519 #[doc = "*Required features: `\"Foundation\"`*"]
1520 #[cfg(feature = "Foundation")]
1521 pub fn RemoveReceived(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1522 let this = self;
1523 unsafe { (::windows::core::Interface::vtable(this).RemoveReceived)(::windows::core::Interface::as_raw(this), token).ok() }
1524 }
1525 #[doc = "*Required features: `\"Foundation\"`*"]
1526 #[cfg(feature = "Foundation")]
1527 pub fn Stopped(&self, handler: &super::super::super::Foundation::TypedEventHandler<BluetoothLEAdvertisementWatcher, BluetoothLEAdvertisementWatcherStoppedEventArgs>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> {
1528 let this = self;
1529 unsafe {
1530 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>();
1531 (::windows::core::Interface::vtable(this).Stopped)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
1532 }
1533 }
1534 #[doc = "*Required features: `\"Foundation\"`*"]
1535 #[cfg(feature = "Foundation")]
1536 pub fn RemoveStopped(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
1537 let this = self;
1538 unsafe { (::windows::core::Interface::vtable(this).RemoveStopped)(::windows::core::Interface::as_raw(this), token).ok() }
1539 }
1540 pub fn AllowExtendedAdvertisements(&self) -> ::windows::core::Result<bool> {
1541 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementWatcher2>(self)?;
1542 unsafe {
1543 let mut result__ = ::windows::core::zeroed::<bool>();
1544 (::windows::core::Interface::vtable(this).AllowExtendedAdvertisements)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1545 }
1546 }
1547 pub fn SetAllowExtendedAdvertisements(&self, value: bool) -> ::windows::core::Result<()> {
1548 let this = &::windows::core::ComInterface::cast::<IBluetoothLEAdvertisementWatcher2>(self)?;
1549 unsafe { (::windows::core::Interface::vtable(this).SetAllowExtendedAdvertisements)(::windows::core::Interface::as_raw(this), value).ok() }
1550 }
1551 pub fn Create(advertisementfilter: &BluetoothLEAdvertisementFilter) -> ::windows::core::Result<BluetoothLEAdvertisementWatcher> {
1552 Self::IBluetoothLEAdvertisementWatcherFactory(|this| unsafe {
1553 let mut result__ = ::windows::core::zeroed::<BluetoothLEAdvertisementWatcher>();
1554 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(advertisementfilter), &mut result__).from_abi(result__)
1555 })
1556 }
1557 #[doc(hidden)]
1558 pub fn IBluetoothLEAdvertisementWatcherFactory<R, F: FnOnce(&IBluetoothLEAdvertisementWatcherFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1559 static SHARED: ::windows::imp::FactoryCache<BluetoothLEAdvertisementWatcher, IBluetoothLEAdvertisementWatcherFactory> = ::windows::imp::FactoryCache::new();
1560 SHARED.call(callback)
1561 }
1562 }
1563 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementWatcher {
1564 fn eq(&self, other: &Self) -> bool {
1565 self.0 == other.0
1566 }
1567 }
1568 impl ::core::cmp::Eq for BluetoothLEAdvertisementWatcher {}
1569 impl ::core::fmt::Debug for BluetoothLEAdvertisementWatcher {
1570 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1571 f.debug_tuple("BluetoothLEAdvertisementWatcher").field(&self.0).finish()
1572 }
1573 }
1574 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementWatcher {
1575 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher;{a6ac336f-f3d3-4297-8d6c-c81ea6623f40})");
1576 }
1577 impl ::core::clone::Clone for BluetoothLEAdvertisementWatcher {
1578 fn clone(&self) -> Self {
1579 Self(self.0.clone())
1580 }
1581 }
1582 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementWatcher {
1583 type Vtable = IBluetoothLEAdvertisementWatcher_Vtbl;
1584 }
1585 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementWatcher {
1586 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementWatcher as ::windows::core::ComInterface>::IID;
1587 }
1588 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementWatcher {
1589 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher";
1590 }
1591 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementWatcher, ::windows::core::IUnknown, ::windows::core::IInspectable);
1592 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementWatcher {}
1593 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementWatcher {}
1594 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1595 #[repr(transparent)]
1596 pub struct BluetoothLEAdvertisementWatcherStoppedEventArgs(::windows::core::IUnknown);
1597 impl BluetoothLEAdvertisementWatcherStoppedEventArgs {
1598 pub fn Error(&self) -> ::windows::core::Result<super::BluetoothError> {
1599 let this = self;
1600 unsafe {
1601 let mut result__ = ::windows::core::zeroed::<super::BluetoothError>();
1602 (::windows::core::Interface::vtable(this).Error)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1603 }
1604 }
1605 }
1606 impl ::core::cmp::PartialEq for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1607 fn eq(&self, other: &Self) -> bool {
1608 self.0 == other.0
1609 }
1610 }
1611 impl ::core::cmp::Eq for BluetoothLEAdvertisementWatcherStoppedEventArgs {}
1612 impl ::core::fmt::Debug for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1613 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1614 f.debug_tuple("BluetoothLEAdvertisementWatcherStoppedEventArgs").field(&self.0).finish()
1615 }
1616 }
1617 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1618 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcherStoppedEventArgs;{dd40f84d-e7b9-43e3-9c04-0685d085fd8c})");
1619 }
1620 impl ::core::clone::Clone for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1621 fn clone(&self) -> Self {
1622 Self(self.0.clone())
1623 }
1624 }
1625 unsafe impl ::windows::core::Interface for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1626 type Vtable = IBluetoothLEAdvertisementWatcherStoppedEventArgs_Vtbl;
1627 }
1628 unsafe impl ::windows::core::ComInterface for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1629 const IID: ::windows::core::GUID = <IBluetoothLEAdvertisementWatcherStoppedEventArgs as ::windows::core::ComInterface>::IID;
1630 }
1631 impl ::windows::core::RuntimeName for BluetoothLEAdvertisementWatcherStoppedEventArgs {
1632 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcherStoppedEventArgs";
1633 }
1634 ::windows::imp::interface_hierarchy!(BluetoothLEAdvertisementWatcherStoppedEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
1635 unsafe impl ::core::marker::Send for BluetoothLEAdvertisementWatcherStoppedEventArgs {}
1636 unsafe impl ::core::marker::Sync for BluetoothLEAdvertisementWatcherStoppedEventArgs {}
1637 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1638 #[repr(transparent)]
1639 pub struct BluetoothLEManufacturerData(::windows::core::IUnknown);
1640 impl BluetoothLEManufacturerData {
1641 pub fn new() -> ::windows::core::Result<Self> {
1642 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
1643 }
1644 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1645 static SHARED: ::windows::imp::FactoryCache<BluetoothLEManufacturerData, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
1646 SHARED.call(callback)
1647 }
1648 pub fn CompanyId(&self) -> ::windows::core::Result<u16> {
1649 let this = self;
1650 unsafe {
1651 let mut result__ = ::windows::core::zeroed::<u16>();
1652 (::windows::core::Interface::vtable(this).CompanyId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1653 }
1654 }
1655 pub fn SetCompanyId(&self, value: u16) -> ::windows::core::Result<()> {
1656 let this = self;
1657 unsafe { (::windows::core::Interface::vtable(this).SetCompanyId)(::windows::core::Interface::as_raw(this), value).ok() }
1658 }
1659 #[doc = "*Required features: `\"Storage_Streams\"`*"]
1660 #[cfg(feature = "Storage_Streams")]
1661 pub fn Data(&self) -> ::windows::core::Result<super::super::super::Storage::Streams::IBuffer> {
1662 let this = self;
1663 unsafe {
1664 let mut result__ = ::windows::core::zeroed::<super::super::super::Storage::Streams::IBuffer>();
1665 (::windows::core::Interface::vtable(this).Data)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
1666 }
1667 }
1668 #[doc = "*Required features: `\"Storage_Streams\"`*"]
1669 #[cfg(feature = "Storage_Streams")]
1670 pub fn SetData<P0>(&self, value: P0) -> ::windows::core::Result<()>
1671 where
1672 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
1673 {
1674 let this = self;
1675 unsafe { (::windows::core::Interface::vtable(this).SetData)(::windows::core::Interface::as_raw(this), value.try_into_param()?.abi()).ok() }
1676 }
1677 #[doc = "*Required features: `\"Storage_Streams\"`*"]
1678 #[cfg(feature = "Storage_Streams")]
1679 pub fn Create<P0>(companyid: u16, data: P0) -> ::windows::core::Result<BluetoothLEManufacturerData>
1680 where
1681 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
1682 {
1683 Self::IBluetoothLEManufacturerDataFactory(|this| unsafe {
1684 let mut result__ = ::windows::core::zeroed::<BluetoothLEManufacturerData>();
1685 (::windows::core::Interface::vtable(this).Create)(::windows::core::Interface::as_raw(this), companyid, data.try_into_param()?.abi(), &mut result__).from_abi(result__)
1686 })
1687 }
1688 #[doc(hidden)]
1689 pub fn IBluetoothLEManufacturerDataFactory<R, F: FnOnce(&IBluetoothLEManufacturerDataFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
1690 static SHARED: ::windows::imp::FactoryCache<BluetoothLEManufacturerData, IBluetoothLEManufacturerDataFactory> = ::windows::imp::FactoryCache::new();
1691 SHARED.call(callback)
1692 }
1693 }
1694 impl ::core::cmp::PartialEq for BluetoothLEManufacturerData {
1695 fn eq(&self, other: &Self) -> bool {
1696 self.0 == other.0
1697 }
1698 }
1699 impl ::core::cmp::Eq for BluetoothLEManufacturerData {}
1700 impl ::core::fmt::Debug for BluetoothLEManufacturerData {
1701 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1702 f.debug_tuple("BluetoothLEManufacturerData").field(&self.0).finish()
1703 }
1704 }
1705 impl ::windows::core::RuntimeType for BluetoothLEManufacturerData {
1706 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.Devices.Bluetooth.Advertisement.BluetoothLEManufacturerData;{912dba18-6963-4533-b061-4694dafb34e5})");
1707 }
1708 impl ::core::clone::Clone for BluetoothLEManufacturerData {
1709 fn clone(&self) -> Self {
1710 Self(self.0.clone())
1711 }
1712 }
1713 unsafe impl ::windows::core::Interface for BluetoothLEManufacturerData {
1714 type Vtable = IBluetoothLEManufacturerData_Vtbl;
1715 }
1716 unsafe impl ::windows::core::ComInterface for BluetoothLEManufacturerData {
1717 const IID: ::windows::core::GUID = <IBluetoothLEManufacturerData as ::windows::core::ComInterface>::IID;
1718 }
1719 impl ::windows::core::RuntimeName for BluetoothLEManufacturerData {
1720 const NAME: &'static str = "Windows.Devices.Bluetooth.Advertisement.BluetoothLEManufacturerData";
1721 }
1722 ::windows::imp::interface_hierarchy!(BluetoothLEManufacturerData, ::windows::core::IUnknown, ::windows::core::IInspectable);
1723 unsafe impl ::core::marker::Send for BluetoothLEManufacturerData {}
1724 unsafe impl ::core::marker::Sync for BluetoothLEManufacturerData {}
1725 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1726 #[repr(transparent)]
1727 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1728 pub struct BluetoothLEAdvertisementFlags(pub u32);
1729 impl BluetoothLEAdvertisementFlags {
1730 pub const None: Self = Self(0u32);
1731 pub const LimitedDiscoverableMode: Self = Self(1u32);
1732 pub const GeneralDiscoverableMode: Self = Self(2u32);
1733 pub const ClassicNotSupported: Self = Self(4u32);
1734 pub const DualModeControllerCapable: Self = Self(8u32);
1735 pub const DualModeHostCapable: Self = Self(16u32);
1736 }
1737 impl ::core::marker::Copy for BluetoothLEAdvertisementFlags {}
1738 impl ::core::clone::Clone for BluetoothLEAdvertisementFlags {
1739 fn clone(&self) -> Self {
1740 *self
1741 }
1742 }
1743 impl ::core::default::Default for BluetoothLEAdvertisementFlags {
1744 fn default() -> Self {
1745 Self(0)
1746 }
1747 }
1748 impl ::windows::core::TypeKind for BluetoothLEAdvertisementFlags {
1749 type TypeKind = ::windows::core::CopyType;
1750 }
1751 impl ::core::fmt::Debug for BluetoothLEAdvertisementFlags {
1752 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1753 f.debug_tuple("BluetoothLEAdvertisementFlags").field(&self.0).finish()
1754 }
1755 }
1756 impl BluetoothLEAdvertisementFlags {
1757 pub const fn contains(&self, other: Self) -> bool {
1758 self.0 & other.0 == other.0
1759 }
1760 }
1761 impl ::core::ops::BitOr for BluetoothLEAdvertisementFlags {
1762 type Output = Self;
1763 fn bitor(self, other: Self) -> Self {
1764 Self(self.0 | other.0)
1765 }
1766 }
1767 impl ::core::ops::BitAnd for BluetoothLEAdvertisementFlags {
1768 type Output = Self;
1769 fn bitand(self, other: Self) -> Self {
1770 Self(self.0 & other.0)
1771 }
1772 }
1773 impl ::core::ops::BitOrAssign for BluetoothLEAdvertisementFlags {
1774 fn bitor_assign(&mut self, other: Self) {
1775 self.0.bitor_assign(other.0)
1776 }
1777 }
1778 impl ::core::ops::BitAndAssign for BluetoothLEAdvertisementFlags {
1779 fn bitand_assign(&mut self, other: Self) {
1780 self.0.bitand_assign(other.0)
1781 }
1782 }
1783 impl ::core::ops::Not for BluetoothLEAdvertisementFlags {
1784 type Output = Self;
1785 fn not(self) -> Self {
1786 Self(self.0.not())
1787 }
1788 }
1789 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementFlags {
1790 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementFlags;u4)");
1791 }
1792 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1793 #[repr(transparent)]
1794 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1795 pub struct BluetoothLEAdvertisementPublisherStatus(pub i32);
1796 impl BluetoothLEAdvertisementPublisherStatus {
1797 pub const Created: Self = Self(0i32);
1798 pub const Waiting: Self = Self(1i32);
1799 pub const Started: Self = Self(2i32);
1800 pub const Stopping: Self = Self(3i32);
1801 pub const Stopped: Self = Self(4i32);
1802 pub const Aborted: Self = Self(5i32);
1803 }
1804 impl ::core::marker::Copy for BluetoothLEAdvertisementPublisherStatus {}
1805 impl ::core::clone::Clone for BluetoothLEAdvertisementPublisherStatus {
1806 fn clone(&self) -> Self {
1807 *self
1808 }
1809 }
1810 impl ::core::default::Default for BluetoothLEAdvertisementPublisherStatus {
1811 fn default() -> Self {
1812 Self(0)
1813 }
1814 }
1815 impl ::windows::core::TypeKind for BluetoothLEAdvertisementPublisherStatus {
1816 type TypeKind = ::windows::core::CopyType;
1817 }
1818 impl ::core::fmt::Debug for BluetoothLEAdvertisementPublisherStatus {
1819 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1820 f.debug_tuple("BluetoothLEAdvertisementPublisherStatus").field(&self.0).finish()
1821 }
1822 }
1823 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementPublisherStatus {
1824 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementPublisherStatus;i4)");
1825 }
1826 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1827 #[repr(transparent)]
1828 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1829 pub struct BluetoothLEAdvertisementType(pub i32);
1830 impl BluetoothLEAdvertisementType {
1831 pub const ConnectableUndirected: Self = Self(0i32);
1832 pub const ConnectableDirected: Self = Self(1i32);
1833 pub const ScannableUndirected: Self = Self(2i32);
1834 pub const NonConnectableUndirected: Self = Self(3i32);
1835 pub const ScanResponse: Self = Self(4i32);
1836 pub const Extended: Self = Self(5i32);
1837 }
1838 impl ::core::marker::Copy for BluetoothLEAdvertisementType {}
1839 impl ::core::clone::Clone for BluetoothLEAdvertisementType {
1840 fn clone(&self) -> Self {
1841 *self
1842 }
1843 }
1844 impl ::core::default::Default for BluetoothLEAdvertisementType {
1845 fn default() -> Self {
1846 Self(0)
1847 }
1848 }
1849 impl ::windows::core::TypeKind for BluetoothLEAdvertisementType {
1850 type TypeKind = ::windows::core::CopyType;
1851 }
1852 impl ::core::fmt::Debug for BluetoothLEAdvertisementType {
1853 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1854 f.debug_tuple("BluetoothLEAdvertisementType").field(&self.0).finish()
1855 }
1856 }
1857 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementType {
1858 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementType;i4)");
1859 }
1860 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1861 #[repr(transparent)]
1862 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1863 pub struct BluetoothLEAdvertisementWatcherStatus(pub i32);
1864 impl BluetoothLEAdvertisementWatcherStatus {
1865 pub const Created: Self = Self(0i32);
1866 pub const Started: Self = Self(1i32);
1867 pub const Stopping: Self = Self(2i32);
1868 pub const Stopped: Self = Self(3i32);
1869 pub const Aborted: Self = Self(4i32);
1870 }
1871 impl ::core::marker::Copy for BluetoothLEAdvertisementWatcherStatus {}
1872 impl ::core::clone::Clone for BluetoothLEAdvertisementWatcherStatus {
1873 fn clone(&self) -> Self {
1874 *self
1875 }
1876 }
1877 impl ::core::default::Default for BluetoothLEAdvertisementWatcherStatus {
1878 fn default() -> Self {
1879 Self(0)
1880 }
1881 }
1882 impl ::windows::core::TypeKind for BluetoothLEAdvertisementWatcherStatus {
1883 type TypeKind = ::windows::core::CopyType;
1884 }
1885 impl ::core::fmt::Debug for BluetoothLEAdvertisementWatcherStatus {
1886 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1887 f.debug_tuple("BluetoothLEAdvertisementWatcherStatus").field(&self.0).finish()
1888 }
1889 }
1890 impl ::windows::core::RuntimeType for BluetoothLEAdvertisementWatcherStatus {
1891 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcherStatus;i4)");
1892 }
1893 #[doc = "*Required features: `\"Devices_Bluetooth_Advertisement\"`*"]
1894 #[repr(transparent)]
1895 #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)]
1896 pub struct BluetoothLEScanningMode(pub i32);
1897 impl BluetoothLEScanningMode {
1898 pub const Passive: Self = Self(0i32);
1899 pub const Active: Self = Self(1i32);
1900 pub const None: Self = Self(2i32);
1901 }
1902 impl ::core::marker::Copy for BluetoothLEScanningMode {}
1903 impl ::core::clone::Clone for BluetoothLEScanningMode {
1904 fn clone(&self) -> Self {
1905 *self
1906 }
1907 }
1908 impl ::core::default::Default for BluetoothLEScanningMode {
1909 fn default() -> Self {
1910 Self(0)
1911 }
1912 }
1913 impl ::windows::core::TypeKind for BluetoothLEScanningMode {
1914 type TypeKind = ::windows::core::CopyType;
1915 }
1916 impl ::core::fmt::Debug for BluetoothLEScanningMode {
1917 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1918 f.debug_tuple("BluetoothLEScanningMode").field(&self.0).finish()
1919 }
1920 }
1921 impl ::windows::core::RuntimeType for BluetoothLEScanningMode {
1922 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"enum(Windows.Devices.Bluetooth.Advertisement.BluetoothLEScanningMode;i4)");
1923 }
1924 #[cfg(feature = "implement")]
1925 ::core::include!("impl.rs");