OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module arc.mojom; | 5 module arc.mojom; |
6 | 6 |
7 [Extensible] | 7 [Extensible] |
8 enum BluetoothAdapterState { | 8 enum BluetoothAdapterState { |
9 OFF = 0, | 9 OFF = 0, |
10 ON | 10 ON |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 uint16 start_handle; | 218 uint16 start_handle; |
219 uint16 end_handle; | 219 uint16 end_handle; |
220 | 220 |
221 /* | 221 /* |
222 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of | 222 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of |
223 * the characteristic. | 223 * the characteristic. |
224 */ | 224 */ |
225 uint8 properties; | 225 uint8 properties; |
226 }; | 226 }; |
227 | 227 |
228 // Bluetooth SDP types | |
229 enum BluetoothSdpAttrType { | |
Luis Héctor Chávez
2016/07/13 18:52:46
Does this need an [Exetnsible] attribute?
Miao
2016/07/15 08:39:21
Done.
| |
230 NULLTYPE = 0, | |
231 UINT, | |
232 INT, | |
233 UUID, | |
234 STRING, | |
235 BOOL, | |
236 SEQUENCE, | |
237 URL, | |
238 }; | |
239 | |
240 struct BluetoothSdpServiceAttr { | |
241 BluetoothSdpAttrType type; | |
242 uint32 type_size; | |
243 array<uint8> value; | |
244 array<BluetoothSdpServiceAttr> sequence; | |
245 }; | |
246 | |
247 struct BluetoothSdpRecord { | |
248 BluetoothSdpServiceAttr browse_group_list; | |
249 BluetoothSdpServiceAttr service_class_id_list; | |
250 BluetoothSdpServiceAttr protocol_desc_list; | |
251 BluetoothSdpServiceAttr profile_desc_list; | |
252 BluetoothSdpServiceAttr name; | |
253 }; | |
254 | |
255 struct BluetoothGetSdpRecordsResult { | |
256 BluetoothStatus status; | |
257 array<BluetoothSdpRecord> records; | |
258 }; | |
259 | |
260 struct BluetoothCreateSdpRecordResult { | |
261 BluetoothStatus status; | |
262 uint32 service_handle; | |
263 }; | |
264 | |
228 interface BluetoothHost { | 265 interface BluetoothHost { |
229 EnableAdapter@0() => (BluetoothAdapterState state); | 266 EnableAdapter@0() => (BluetoothAdapterState state); |
230 DisableAdapter@1() => (BluetoothAdapterState state); | 267 DisableAdapter@1() => (BluetoothAdapterState state); |
231 GetAdapterProperty@2(BluetoothPropertyType type); | 268 GetAdapterProperty@2(BluetoothPropertyType type); |
232 SetAdapterProperty@3(BluetoothProperty property); | 269 SetAdapterProperty@3(BluetoothProperty property); |
233 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, | 270 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, |
234 BluetoothPropertyType type); | 271 BluetoothPropertyType type); |
235 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, | 272 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, |
236 BluetoothProperty property); | 273 BluetoothProperty property); |
237 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, | 274 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 BluetoothGattID char_id) | 317 BluetoothGattID char_id) |
281 => (BluetoothGattStatus status); | 318 => (BluetoothGattStatus status); |
282 [MinVersion=1] DeregisterForGattNotification@27( | 319 [MinVersion=1] DeregisterForGattNotification@27( |
283 BluetoothAddress remote_addr, | 320 BluetoothAddress remote_addr, |
284 BluetoothGattServiceID service_id, | 321 BluetoothGattServiceID service_id, |
285 BluetoothGattID char_id) | 322 BluetoothGattID char_id) |
286 => (BluetoothGattStatus status); | 323 => (BluetoothGattStatus status); |
287 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) | 324 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) |
288 => (int32 rssi); | 325 => (int32 rssi); |
289 | 326 |
327 // Bluetooth SDP functions | |
328 GetSdpRecords@29(BluetoothAddress remote_addr) => (BluetoothGetSdpRecordsResul t result); | |
329 CreateSdpRecord@30(BluetoothSdpRecord record) => (BluetoothCreateSdpRecordResu lt result); | |
330 RemoveSdpRecord@31(uint32 service_handle) => (BluetoothStatus status); | |
290 }; | 331 }; |
291 | 332 |
292 interface BluetoothInstance { | 333 interface BluetoothInstance { |
293 Init@0(BluetoothHost host_ptr); | 334 Init@0(BluetoothHost host_ptr); |
294 | 335 |
295 OnAdapterProperties@1(BluetoothStatus status, | 336 OnAdapterProperties@1(BluetoothStatus status, |
296 array<BluetoothProperty> properties); | 337 array<BluetoothProperty> properties); |
297 OnRemoteDeviceProperties@2(BluetoothStatus status, | 338 OnRemoteDeviceProperties@2(BluetoothStatus status, |
298 BluetoothAddress address, | 339 BluetoothAddress address, |
299 array<BluetoothProperty> properties); | 340 array<BluetoothProperty> properties); |
(...skipping 20 matching lines...) Expand all Loading... | |
320 uint16 start_handle, | 361 uint16 start_handle, |
321 uint16 end_handle); | 362 uint16 end_handle); |
322 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, | 363 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, |
323 array<BluetoothGattDBElement> db); | 364 array<BluetoothGattDBElement> db); |
324 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, | 365 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, |
325 BluetoothGattServiceID service_id, | 366 BluetoothGattServiceID service_id, |
326 BluetoothGattID char_id, | 367 BluetoothGattID char_id, |
327 bool is_notify, | 368 bool is_notify, |
328 array<uint8> value); | 369 array<uint8> value); |
329 }; | 370 }; |
OLD | NEW |