Debian Codegraph @

mingw-w64-headers/include/windows.devices.bluetooth.genericattributeprofile.idl

raw
1 /*
2 * Copyright 2025 Vibhav Pant
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #ifdef __WIDL__
20 #pragma winrt ns_prefix
21 #endif
22
23 import "inspectable.idl";
24 import "asyncinfo.idl";
25 import "eventtoken.idl";
26 import "windowscontracts.idl";
27 import "windows.foundation.idl";
28 import "windows.storage.streams.idl";
29 import "windows.devices.bluetooth.idl";
30 import "windows.devices.enumeration.idl";
31
32 namespace Windows.Devices.Bluetooth {
33 typedef enum BluetoothCacheMode BluetoothCacheMode;
34 typedef enum BluetoothError BluetoothError;
35
36 runtimeclass BluetoothLEDevice;
37 runtimeclass BluetoothDeviceId;
38 }
39
40 namespace Windows.Devices.Bluetooth.GenericAttributeProfile {
41 typedef enum GattCommunicationStatus GattCommunicationStatus;
42 typedef enum GattCharacteristicProperties GattCharacteristicProperties;
43 typedef enum GattProtectionLevel GattProtectionLevel;
44 typedef enum GattWriteOption GattWriteOption;
45 typedef enum GattClientCharacteristicConfigurationDescriptorValue GattClientCharacteristicConfigurationDescriptorValue;
46 typedef enum GattSharingMode GattSharingMode;
47 typedef enum GattOpenStatus GattOpenStatus;
48 typedef enum GattSessionStatus GattSessionStatus;
49
50 interface IGattDeviceService;
51 interface IGattDeviceService2;
52 interface IGattDeviceService3;
53 interface IGattDeviceServiceStatics;
54 interface IGattDeviceServiceStatics2;
55 interface IGattDeviceServicesResult;
56 interface IGattSession;
57 interface IGattSessionStatusChangedEventArgs;
58 interface IGattSessionStatics;
59 interface IGattCharacteristic;
60 interface IGattCharacteristic2;
61 interface IGattCharacteristic3;
62 interface IGattCharacteristicStatics;
63 interface IGattDescriptorsResult;
64 interface IGattDescriptor;
65 interface IGattDescriptor2;
66 interface IGattDescriptorStatics;
67 interface IGattValueChangedEventArgs;
68 interface IGattReadResult;
69 interface IGattReadResult2;
70 interface IGattWriteResult;
71 interface IGattReadClientCharacteristicConfigurationDescriptorResult;
72 interface IGattReadClientCharacteristicConfigurationDescriptorResult2;
73 interface IGattPresentationFormat;
74 interface IGattPresentationFormatStatics;
75 interface IGattPresentationFormatStatics2;
76
77 runtimeclass GattDeviceService;
78 runtimeclass GattDeviceServicesResult;
79 runtimeclass GattSession;
80 runtimeclass GattSessionStatusChangedEventArgs;
81 runtimeclass GattCharacteristic;
82 runtimeclass GattDescriptorsResult;
83 runtimeclass GattDescriptor;
84 runtimeclass GattPresentationFormat;
85 runtimeclass GattValueChangedEventArgs;
86 runtimeclass GattWriteResult;
87 runtimeclass GattReadResult;
88 runtimeclass GattReadClientCharacteristicConfigurationDescriptorResult;
89 runtimeclass GattReadClientCharacteristicConfigurationDescriptorResult;
90 runtimeclass GattPresentationFormat;
91 runtimeclass GattCharacteristicsResult;
92
93 declare {
94 interface Windows.Foundation.Collections.IIterator<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *>;
95 interface Windows.Foundation.Collections.IIterable<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *>;
96 interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *>;
97 interface Windows.Foundation.Collections.IIterator<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor *>;
98 interface Windows.Foundation.Collections.IIterable<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor *>;
99 interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor *>;
100 interface Windows.Foundation.Collections.IIterator<Windows.Devices.Bluetooth.GenericAttributeProfile.GattPresentationFormat *>;
101 interface Windows.Foundation.Collections.IIterable<Windows.Devices.Bluetooth.GenericAttributeProfile.GattPresentationFormat *>;
102 interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattPresentationFormat *>;
103 interface Windows.Foundation.Collections.IIterator<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *>;
104 interface Windows.Foundation.Collections.IIterable<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *>;
105 interface Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *>;
106 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult *>;
107 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult *>;
108 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult*>;
109 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult*>;
110 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus>;
111 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus>;
112 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadClientCharacteristicConfigurationDescriptorResult *>;
113 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadClientCharacteristicConfigurationDescriptorResult *>;
114 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Enumeration.DeviceAccessStatus>;
115 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceAccessStatus>;
116 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattOpenStatus>;
117 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattOpenStatus>;
118 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult *>;
119 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult *>;
120 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult *>;
121 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult *>;
122 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *>;
123 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *>;
124 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *>;
125 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *>;
126 interface Windows.Foundation.AsyncOperationCompletedHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult *>;
127 interface Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult *>;
128 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *, Windows.Devices.Bluetooth.GenericAttributeProfile.GattValueChangedEventArgs *>;
129 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *, Windows.Devices.Bluetooth.GenericAttributeProfile.GattSessionStatusChangedEventArgs *>;
130 interface Windows.Foundation.TypedEventHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *, IInspectable *>;
131 interface Windows.Foundation.IReference<BYTE>;
132 }
133
134 [
135 contract(Windows.Foundation.UniversalApiContract, 1.0)
136 ]
137 enum GattCommunicationStatus
138 {
139 Success = 0,
140 Unreachable = 1,
141 [contract(Windows.Foundation.UniversalApiContract, 4.0)]
142 ProtocolError = 2,
143 [contract(Windows.Foundation.UniversalApiContract, 4.0)]
144 AccessDenied = 3,
145 };
146
147 [
148 contract(Windows.Foundation.UniversalApiContract, 1.0),
149 flags
150 ]
151 enum GattCharacteristicProperties
152 {
153 None = 0x0000,
154 Broadcast = 0x0001,
155 Read = 0x0002,
156 WriteWithoutResponse = 0x0004,
157 Write = 0x0008,
158 Notify = 0x0010,
159 Indicate = 0x0020,
160 AuthenticatedSignedWrites = 0x0040,
161 ExtendedProperties = 0x0080,
162 ReliableWrites = 0x0100,
163 WritableAuxiliaries = 0x0200,
164 };
165
166 [
167 contract(Windows.Foundation.UniversalApiContract, 1.0)
168 ]
169 enum GattProtectionLevel
170 {
171 Plain = 0,
172 AuthenticationRequired = 1,
173 EncryptionRequired = 2,
174 EncryptionAndAuthenticationRequired = 3,
175 };
176
177 [
178 contract(Windows.Foundation.UniversalApiContract, 1.0)
179 ]
180 enum GattWriteOption
181 {
182 WriteWithResponse = 0,
183 WriteWithoutResponse = 1,
184 };
185
186 [
187 contract(Windows.Foundation.UniversalApiContract, 1.0)
188 ]
189 enum GattClientCharacteristicConfigurationDescriptorValue
190 {
191 None = 0,
192 Notify = 1,
193 Indicate = 2,
194 };
195
196 [
197 contract(Windows.Foundation.UniversalApiContract, 4.0)
198 ]
199 enum GattSharingMode
200 {
201 Unspecified = 0,
202 Exclusive = 1,
203 SharedReadOnly = 2,
204 SharedReadAndWrite = 3,
205 };
206
207 [
208 contract(Windows.Foundation.UniversalApiContract, 4.0)
209 ]
210 enum GattOpenStatus
211 {
212 Unspecified = 0,
213 Success = 1,
214 AlreadyOpened = 2,
215 NotFound = 3,
216 SharingViolation = 4,
217 AccessDenied = 5,
218 };
219
220 [
221 contract(Windows.Foundation.UniversalApiContract, 4.0)
222 ]
223 enum GattSessionStatus
224 {
225 Closed = 0,
226 Active = 1,
227 };
228
229 [
230 contract(Windows.Foundation.UniversalApiContract, 1.0),
231 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService),
232 uuid(ac7b7c05-b33c-47cf-990f-6b8f5577df71)
233 ]
234 interface IGattDeviceService : IInspectable requires Windows.Foundation.IClosable
235 {
236 HRESULT GetCharacteristics([in] GUID uuid,
237 [out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *> **value);
238 HRESULT GetIncludedServices([in] GUID uuid,
239 [out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *> **value);
240 [propget] HRESULT DeviceId([out, retval] HSTRING *value);
241 [propget] HRESULT Uuid([out, retval] GUID *value);
242 [propget] HRESULT AttributeHandle([out, retval] UINT16 *value);
243 }
244
245 [
246 contract(Windows.Foundation.UniversalApiContract, 1.0),
247 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService),
248 uuid(fc54520b-0b0d-4708-bae0-9ffd9489bc59)
249 ]
250 interface IGattDeviceService2 : IInspectable requires Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceService, Windows.Foundation.IClosable
251 {
252 [propget] HRESULT Device([out, retval] Windows.Devices.Bluetooth.BluetoothLEDevice **value);
253 [propget] HRESULT ParentServices([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *> **value);
254 HRESULT GetAllCharacteristics([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *> **value);
255 HRESULT GetAllIncludedServices([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *> **value);
256 }
257
258 [
259 contract(Windows.Foundation.UniversalApiContract, 4.0),
260 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService),
261 uuid(b293a950-0c53-437c-a9b3-5c3210c6e569),
262 ]
263 interface IGattDeviceService3 : IInspectable
264 {
265 [propget] HRESULT DeviceAccessInformation([out, retval] Windows.Devices.Enumeration.DeviceAccessInformation **value);
266 [propget] HRESULT Session([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession **value);
267 [propget] HRESULT SharingMode([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattSharingMode *value);
268 HRESULT RequestAccessAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Enumeration.DeviceAccessStatus> **async);
269 HRESULT OpenAsync([in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattSharingMode mode,
270 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattOpenStatus> **async);
271 [overload("GetCharacteristicsAsync")]
272 HRESULT GetCharacteristicsAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult *> **async);
273 [overload("GetCharacteristicsAsync")]
274 HRESULT GetCharacteristicsWithCacheModeAsync([in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
275 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult *> **async);
276 [overload("GetCharacteristicsForUuidAsync")]
277 HRESULT GetCharacteristicsForUuidAsync([in] GUID uuid,
278 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult *> **async);
279 [overload("GetCharacteristicsForUuidAsync")]
280 HRESULT GetCharacteristicsForUuidWithCacheModeAsync([in] GUID uuid,
281 [in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
282 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult *> **async);
283 [overload("GetIncludedServicesAsync")]
284 HRESULT GetIncludedServicesAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult *> **async);
285 [overload("GetIncludedServicesAsync")]
286 HRESULT GetIncludedServicesWithCacheModeAsync([in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
287 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult *> **async);
288 [overload("GetIncludedServicesForUuidAsync")]
289 HRESULT GetIncludedServicesForUuidAsync([in] GUID uuid,
290 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult *> **async);
291 [overload("GetIncludedServicesForUuidAsync")]
292 HRESULT GetIncludedServicesForUuidWithCacheModeAsync([in] GUID uuid,
293 [in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
294 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult *> **async);
295 }
296
297 [
298 contract(Windows.Foundation.UniversalApiContract, 1.0),
299 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService),
300 uuid(196d0022-faad-45dc-ae5b-2ac3184e84db)
301 ]
302 interface IGattDeviceServiceStatics : IInspectable
303 {
304 [overload("FromIdAsync")]
305 HRESULT FromIdAsync([in] HSTRING id,
306 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *> **async);
307 HRESULT GetDeviceSelectorFromUuid([in] GUID uuid, [out, retval] HSTRING *selector);
308 HRESULT GetDeviceSelectorFromShortId([in] UINT16 id, [out, retval] HSTRING *selector);
309 HRESULT ConvertShortIdToUuid([in] UINT16 id, [out, retval] GUID *value);
310 }
311
312 [
313 contract(Windows.Foundation.UniversalApiContract, 4.0),
314 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService),
315 uuid(0604186e-24a6-4b0d-a2f2-30cc01545d25)
316 ]
317 interface IGattDeviceServiceStatics2 : IInspectable
318 {
319 [overload("FromIdAsync")]
320 HRESULT FromIdWithSharingModeAsync([in] HSTRING id,
321 [in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattSharingMode mode,
322 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *> **async);
323 [overload("GetDeviceSelectorForBluetoothDeviceId")]
324 HRESULT GetDeviceSelectorForBluetoothDeviceId([in] Windows.Devices.Bluetooth.BluetoothDeviceId *id,
325 [out, retval] HSTRING *selector);
326 [overload("GetDeviceSelectorForBluetoothDeviceId")]
327 HRESULT GetDeviceSelectorForBluetoothDeviceIdWithCacheMode([in] Windows.Devices.Bluetooth.BluetoothDeviceId *id,
328 [in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
329 [out, retval] HSTRING *selector);
330 [overload("GetDeviceSelectorForBluetoothDeviceIdAndUuid")]
331 HRESULT GetDeviceSelectorForBluetoothDeviceIdAndUuid([in] Windows.Devices.Bluetooth.BluetoothDeviceId *id,
332 [in] GUID uuid,
333 [out, retval] HSTRING *selector);
334 [overload("GetDeviceSelectorForBluetoothDeviceIdAndUuid")]
335 HRESULT GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode([in] Windows.Devices.Bluetooth.BluetoothDeviceId *id,
336 [in] GUID uuid,
337 [in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
338 [out, retval] HSTRING *selector);
339 }
340
341 [
342 contract(Windows.Foundation.UniversalApiContract, 1.0),
343 marshaling_behavior(agile),
344 static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceServiceStatics, Windows.Foundation.UniversalApiContract, 1.0),
345 static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceServiceStatics2, Windows.Foundation.UniversalApiContract, 4.0),
346 threading(both)
347 ]
348 runtimeclass GattDeviceService
349 {
350 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceService;
351 interface Windows.Foundation.IClosable;
352 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceService2;
353 [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceService3;
354 }
355
356 [
357 contract(Windows.Foundation.UniversalApiContract, 4.0),
358 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceServicesResult),
359 uuid(171dd3ee-016d-419d-838a-576cf475a3d8)
360 ]
361 interface IGattDeviceServicesResult : IInspectable
362 {
363 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus *value);
364 [propget] HRESULT ProtocolError([out, retval] Windows.Foundation.IReference<BYTE> **value);
365 [propget] HRESULT Services([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService *> **value);
366 }
367
368 [
369 contract(Windows.Foundation.UniversalApiContract, 4.0),
370 marshaling_behavior(agile),
371 threading(both)
372 ]
373 runtimeclass GattDeviceServicesResult
374 {
375 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDeviceServicesResult;
376 }
377
378 [
379 contract(Windows.Foundation.UniversalApiContract, 4.0),
380 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession),
381 uuid(d23b5143-e04e-4c24-999c-9c256f9856b1)
382 ]
383 interface IGattSession : IInspectable
384 {
385 [propget] HRESULT DeviceId([out, retval] Windows.Devices.Bluetooth.BluetoothDeviceId **value);
386 [propget] HRESULT CanMaintainConnection([out, retval] boolean *value);
387 [propput] HRESULT MaintainConnection([in] boolean value);
388 [propget] HRESULT MaintainConnection([out, retval] boolean *value);
389 [propget] HRESULT MaxPduSize([out, retval] UINT16 * value);
390 [propget] HRESULT SessionStatus([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattSessionStatus *value);
391 [eventadd] HRESULT MaxPduSizeChanged([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *, IInspectable *> *handler,
392 [out, retval] EventRegistrationToken *token);
393 [eventremove] HRESULT MaxPduSizeChanged([in] EventRegistrationToken token);
394 [eventadd] HRESULT SessionStatusChanged([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *, Windows.Devices.Bluetooth.GenericAttributeProfile.GattSessionStatusChangedEventArgs *> *handler,
395 [out, retval] EventRegistrationToken *token);
396 [eventremove] HRESULT SessionStatusChanged([in] EventRegistrationToken token);
397 }
398
399 [
400 contract(Windows.Foundation.UniversalApiContract, 4.0),
401 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession),
402 uuid(2e65b95c-539f-4db7-82a8-73bdbbf73ebf)
403 ]
404 interface IGattSessionStatics : IInspectable
405 {
406 HRESULT FromDeviceIdAsync([in] Windows.Devices.Bluetooth.BluetoothDeviceId *id,
407 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattSession *> **async);
408 }
409
410 [
411 contract(Windows.Foundation.UniversalApiContract, 4.0),
412 marshaling_behavior(agile),
413 static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattSessionStatics, Windows.Foundation.UniversalApiContract, 4.0),
414 threading(both)
415 ]
416 runtimeclass GattSession
417 {
418 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattSession;
419 interface Windows.Foundation.IClosable;
420 }
421
422 [
423 contract(Windows.Foundation.UniversalApiContract, 4.0),
424 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattSessionStatusChangedEventArgs),
425 uuid(7605b72e-837f-404c-ab34-3163f39ddf32)
426 ]
427 interface IGattSessionStatusChangedEventArgs : IInspectable
428 {
429 [propget] HRESULT Error([out, retval] Windows.Devices.Bluetooth.BluetoothError *value);
430 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattSessionStatus *value);
431 }
432
433 [
434 contract(Windows.Foundation.UniversalApiContract, 4.0),
435 marshaling_behavior(agile),
436 threading(both)
437 ]
438 runtimeclass GattSessionStatusChangedEventArgs
439 {
440 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattSessionStatusChangedEventArgs;
441 }
442
443 [
444 contract(Windows.Foundation.UniversalApiContract, 1.0),
445 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic),
446 uuid(59cb50c1-5934-4f68-a198-eb864fa44e6b),
447 ]
448 interface IGattCharacteristic : IInspectable
449 {
450 HRESULT GetDescriptors([in] GUID uuid,
451 [out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor *> **value);
452 [propget] HRESULT CharacteristicProperties([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicProperties *value);
453 [propget] HRESULT ProtectionLevel([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtectionLevel *value);
454 [propput] HRESULT ProtectionLevel([in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtectionLevel value);
455 [propget] HRESULT UserDescription([out, retval] HSTRING *value);
456 [propget] HRESULT Uuid([out, retval] GUID *value);
457 [propget] HRESULT AttributeHandle([out, retval] UINT16 *value);
458 [propget] HRESULT PresentationFormats([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattPresentationFormat *> **value);
459 [overload("ReadValueAsync")]
460 HRESULT ReadValueAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult *> **value);
461 [overload("ReadValueAsync")]
462 HRESULT ReadValueWithCacheModeAsync([in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
463 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult *> **value);
464 [overload("WriteValueAsync")]
465 HRESULT WriteValueAsync([in] Windows.Storage.Streams.IBuffer *value,
466 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus> **async);
467 [overload("WriteValueAsync")]
468 HRESULT WriteValueWithOptionAsync([in] Windows.Storage.Streams.IBuffer *value,
469 [in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteOption opt,
470 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus> **async);
471 HRESULT ReadClientCharacteristicConfigurationDescriptorAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadClientCharacteristicConfigurationDescriptorResult *> **async);
472 HRESULT WriteClientCharacteristicConfigurationDescriptorAsync([in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattClientCharacteristicConfigurationDescriptorValue value,
473 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus> **async);
474 [eventadd] HRESULT ValueChanged([in] Windows.Foundation.TypedEventHandler<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *, Windows.Devices.Bluetooth.GenericAttributeProfile.GattValueChangedEventArgs *> *handler,
475 [out, retval] EventRegistrationToken *token);
476 [eventremove] HRESULT ValueChanged([in] EventRegistrationToken token);
477 }
478
479 [
480 contract(Windows.Foundation.UniversalApiContract, 1.0),
481 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic),
482 uuid(ae1ab578-ec06-4764-b780-9835a1d35d6e)
483 ]
484 interface IGattCharacteristic2 : IInspectable requires Windows.Devices.Bluetooth.GenericAttributeProfile.IGattCharacteristic
485 {
486 [propget] HRESULT Service([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService **value);
487 HRESULT GetAllDescriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor *> **descriptors);
488 }
489
490 [
491 contract(Windows.Foundation.UniversalApiContract, 4.0),
492 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic),
493 uuid(3f3c663e-93d4-406b-b817-db81f8ed53b3)
494 ]
495 interface IGattCharacteristic3 : IInspectable
496 {
497 [overload("GetDescriptorsAsync")]
498 HRESULT GetDescriptorsAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult *> **async);
499 [overload("GetDescriptorsAsync")]
500 HRESULT GetDescriptorsWithCacheModeAsync([in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
501 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult *> **async);
502 [overload("GetDescriptorsForUuidAsync")]
503 HRESULT GetDescriptorsForUuidAsync([in] GUID uuid,
504 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult *> **async);
505 [overload("GetDescriptorsForUuidAsync")]
506 HRESULT GetDescriptorsForUuidWithCacheModeAsync([in] GUID uuid,
507 [in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
508 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult *> **async);
509 [overload("WriteValueWithResultAsync")]
510 HRESULT WriteValueWithResultAsync([in] Windows.Storage.Streams.IBuffer *value,
511 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult *> **async);
512 [overload("WriteValueWithResultAsync")]
513 HRESULT WriteValueWithResultAndOptionAsync([in] Windows.Storage.Streams.IBuffer *value,
514 [in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteOption option,
515 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult *> **async);
516 HRESULT WriteClientCharacteristicConfigurationDescriptorWithResultAsync([in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattClientCharacteristicConfigurationDescriptorValue value,
517 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult *> **async);
518 }
519
520 [
521 contract(Windows.Foundation.UniversalApiContract, 1.0),
522 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic),
523 uuid(59cb50c3-5934-4f68-a198-eb864fa44e6b)
524 ]
525 interface IGattCharacteristicStatics : IInspectable
526 {
527 HRESULT ConvertShortIdToUuid([in] UINT16 id, [out, retval] GUID *uuid);
528 }
529
530 [
531 contract(Windows.Foundation.UniversalApiContract, 1.0),
532 marshaling_behavior(agile),
533 static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattCharacteristicStatics, Windows.Foundation.UniversalApiContract, 1.0),
534 threading(both)
535 ]
536 runtimeclass GattCharacteristic
537 {
538 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattCharacteristic;
539 [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattCharacteristic2;
540 [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattCharacteristic3;
541 }
542
543 [
544 contract(Windows.Foundation.UniversalApiContract, 4.0),
545 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristicsResult),
546 uuid(1194945C-B257-4F3E-9DB7-F68BC9A9AEF2)
547 ]
548 interface IGattCharacteristicsResult : IInspectable
549 {
550 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus *value);
551 [propget] HRESULT ProtocolError([out, retval] Windows.Foundation.IReference<BYTE> **value);
552 [propget] HRESULT Characteristics([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCharacteristic *> **value);
553 }
554
555 [
556 contract(Windows.Foundation.UniversalApiContract, 4.0),
557 marshaling_behavior(agile),
558 threading(both)
559 ]
560 runtimeclass GattCharacteristicsResult
561 {
562 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattCharacteristicsResult;
563 }
564
565 [
566 contract(Windows.Foundation.UniversalApiContract, 1.0),
567 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor),
568 uuid(92055f2b-8084-4344-b4c2-284de19a8506)
569 ]
570 interface IGattDescriptor : IInspectable
571 {
572 [propget] HRESULT ProtectionLevel([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtectionLevel *value);
573 [propput] HRESULT ProtectionLevel([in] Windows.Devices.Bluetooth.GenericAttributeProfile.GattProtectionLevel value);
574 [propget] HRESULT Uuid([out, retval] GUID *value);
575 [propget] HRESULT AttributeHandle([out, retval] UINT16 *value);
576 [overload("ReadValueAsync")]
577 HRESULT ReadValueAsync([out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult *> **async);
578 [overload("ReadValueAsync")]
579 HRESULT ReadValueWithCacheModeAsync([in] Windows.Devices.Bluetooth.BluetoothCacheMode mode,
580 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult *> **async);
581 HRESULT WriteValueAsync([in] Windows.Storage.Streams.IBuffer *value,
582 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus> **async);
583 }
584
585 [
586 contract(Windows.Foundation.UniversalApiContract, 4.0),
587 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor),
588 uuid(8f563d39-d630-406c-ba11-10cdd16b0e5e)
589 ]
590 interface IGattDescriptor2 : IInspectable
591 {
592 HRESULT WriteValueWithResultAsync([in] Windows.Storage.Streams.IBuffer *value,
593 [out, retval] Windows.Foundation.IAsyncOperation<Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult *> **async);
594 }
595
596 [
597 contract(Windows.Foundation.UniversalApiContract, 1.0),
598 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor),
599 uuid(92055f2d-8084-4344-b4c2-284de19a8506),
600 ]
601 interface IGattDescriptorStatics : IInspectable
602 {
603 HRESULT ConvertShortIdToUuid([in] UINT16 id, [out, retval] GUID *uuid);
604 }
605
606 [
607 contract(Windows.Foundation.UniversalApiContract, 1.0),
608 marshaling_behavior(agile),
609 static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDescriptorStatics, Windows.Foundation.UniversalApiContract, 1.0),
610 threading(both),
611 ]
612 runtimeclass GattDescriptor
613 {
614 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDescriptor;
615 [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDescriptor2;
616 }
617
618 [
619 contract(Windows.Foundation.UniversalApiContract, 4.0),
620 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptorsResult),
621 uuid(9bc091f3-95e7-4489-8d25-ff81955a57b9)
622 ]
623 interface IGattDescriptorsResult : IInspectable
624 {
625 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus *value);
626 [propget] HRESULT ProtocolError([out, retval] Windows.Foundation.IReference<BYTE> **value);
627 [propget] HRESULT Descriptors([out, retval] Windows.Foundation.Collections.IVectorView<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDescriptor *> **value);
628 }
629
630 [
631 contract(Windows.Foundation.UniversalApiContract, 4.0),
632 marshaling_behavior(agile),
633 threading(both),
634 ]
635 runtimeclass GattDescriptorsResult
636 {
637 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattDescriptorsResult;
638 }
639
640 [
641 contract(Windows.Foundation.UniversalApiContract, 1.0),
642 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattValueChangedEventArgs),
643 uuid(d21bdb54-06e3-4ed8-a263-acfac8ba7313)
644 ]
645 interface IGattValueChangedEventArgs : IInspectable
646 {
647 [propget] HRESULT CharacteristicValue([out, retval] Windows.Storage.Streams.IBuffer **value);
648 [propget] HRESULT Timestamp([out, retval] Windows.Foundation.DateTime *value);
649 }
650
651 [
652 contract(Windows.Foundation.UniversalApiContract, 1.0),
653 marshaling_behavior(agile),
654 threading(both)
655 ]
656 runtimeclass GattValueChangedEventArgs
657 {
658 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattValueChangedEventArgs;
659 }
660
661 [
662 contract(Windows.Foundation.UniversalApiContract, 1.0),
663 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadResult),
664 uuid(63a66f08-1aea-4c4c-a50f-97bae474b348)
665 ]
666 interface IGattReadResult : IInspectable
667 {
668 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus *value);
669 [propget] HRESULT Value([out, retval] Windows.Storage.Streams.IBuffer **value);
670 }
671
672 [
673 contract(Windows.Foundation.UniversalApiContract, 1.0),
674 marshaling_behavior(agile),
675 threading(both)
676 ]
677 runtimeclass GattReadResult
678 {
679 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattReadResult;
680 /* [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattReadResult2; */
681 }
682
683 [
684 contract(Windows.Foundation.UniversalApiContract, 4.0),
685 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattWriteResult),
686 uuid(4991ddb1-cb2b-44f7-99fc-d29a2871dc9b)
687 ]
688 interface IGattWriteResult : IInspectable
689 {
690 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus* value);
691 [propget] HRESULT ProtocolError([out, retval] Windows.Foundation.IReference<BYTE>** value);
692 }
693
694 [
695 contract(Windows.Foundation.UniversalApiContract, 1.0),
696 marshaling_behavior(agile),
697 threading(both)
698 ]
699 runtimeclass GattWriteResult
700 {
701 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattWriteResult;
702 }
703
704 [
705 contract(Windows.Foundation.UniversalApiContract, 1.0),
706 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadClientCharacteristicConfigurationDescriptorResult),
707 uuid(63a66f09-1aea-4c4c-a50f-97bae474b348)
708 ]
709
710 interface IGattReadClientCharacteristicConfigurationDescriptorResult : IInspectable
711 {
712 [propget] HRESULT Status([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattCommunicationStatus *value);
713 [propget] HRESULT ClientCharacteristicConfigurationDescriptor([out, retval] Windows.Devices.Bluetooth.GenericAttributeProfile.GattClientCharacteristicConfigurationDescriptorValue *value);
714 }
715
716 [
717 contract(Windows.Foundation.UniversalApiContract, 4.0),
718 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattReadClientCharacteristicConfigurationDescriptorResult),
719 uuid(1bf1a59d-ba4d-4622-8651-f4ee150d0a5d)
720 ]
721 interface IGattReadClientCharacteristicConfigurationDescriptorResult2 : IInspectable
722 {
723 [propget] HRESULT ProtocolError([out, retval] Windows.Foundation.IReference<BYTE>** value);
724 }
725
726 [
727 contract(Windows.Foundation.UniversalApiContract, 1.0),
728 marshaling_behavior(agile),
729 threading(both)
730 ]
731 runtimeclass GattReadClientCharacteristicConfigurationDescriptorResult
732 {
733 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattReadClientCharacteristicConfigurationDescriptorResult;
734 [contract(Windows.Foundation.UniversalApiContract, 4.0)] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattReadClientCharacteristicConfigurationDescriptorResult2;
735 }
736
737 [
738 contract(Windows.Foundation.UniversalApiContract, 1.0),
739 exclusiveto(Windows.Devices.Bluetooth.GenericAttributeProfile.GattPresentationFormat),
740 uuid(196d0021-faad-45dc-ae5b-2ac3184e84db)
741 ]
742 interface IGattPresentationFormat : IInspectable
743 {
744 [propget] HRESULT FormatType([out, retval] BYTE *value);
745 [propget] HRESULT Exponent([out, retval] INT32 *value);
746 [propget] HRESULT Unit([out, retval] UINT16 *value);
747 [propget] HRESULT Namespace([out, retval] BYTE *value);
748 [propget] HRESULT Description([out, retval] UINT16 *value);
749 }
750
751 [
752 contract(Windows.Foundation.UniversalApiContract, 1.0),
753 marshaling_behavior(agile),
754 /* static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattPresentationFormatStatics, Windows.Foundation.UniversalApiContract, 1.0), */
755 /* static(Windows.Devices.Bluetooth.GenericAttributeProfile.IGattPresentationFormatStatics2, Windows.Foundation.UniversalApiContract, 4.0), */
756 threading(both)
757 ]
758 runtimeclass GattPresentationFormat
759 {
760 [default] interface Windows.Devices.Bluetooth.GenericAttributeProfile.IGattPresentationFormat;
761 }
762 }