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 // Next MinVersion: 5 | 5 // Next MinVersion: 6 |
6 | 6 |
7 module arc.mojom; | 7 module arc.mojom; |
8 | 8 |
9 import "mojo/common/common_custom_types.mojom"; | |
10 | |
9 [Extensible] | 11 [Extensible] |
10 enum BluetoothAdapterState { | 12 enum BluetoothAdapterState { |
11 OFF = 0, | 13 OFF = 0, |
12 ON | 14 ON |
13 }; | 15 }; |
14 | 16 |
15 [Extensible] | 17 [Extensible] |
16 enum BluetoothDiscoveryState { | 18 enum BluetoothDiscoveryState { |
17 STOPPED, | 19 STOPPED, |
18 STARTED | 20 STARTED |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 uint16 start_handle; | 226 uint16 start_handle; |
225 uint16 end_handle; | 227 uint16 end_handle; |
226 | 228 |
227 /* | 229 /* |
228 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of | 230 * If |type| is |BTGATT_DB_CHARACTERISTIC|, this contains the properties of |
229 * the characteristic. | 231 * the characteristic. |
230 */ | 232 */ |
231 uint8 properties; | 233 uint8 properties; |
232 }; | 234 }; |
233 | 235 |
236 // Bluetooth SDP types | |
237 [Extensible] | |
238 enum BluetoothSdpAttrType { | |
239 NULLTYPE = 0, | |
240 UINT, | |
241 INT, | |
242 UUID, | |
243 STRING, | |
244 BOOL, | |
245 SEQUENCE, | |
246 URL, | |
247 }; | |
248 | |
249 struct BluetoothSdpServiceAttr { | |
250 BluetoothSdpAttrType type; | |
251 uint32 type_size; | |
252 mojo.common.mojom.ListValue value; | |
253 array<BluetoothSdpServiceAttr> sequence; | |
254 }; | |
255 | |
256 struct BluetoothSdpRecord { | |
257 map<uint16, BluetoothSdpServiceAttr> attrs; | |
258 }; | |
259 | |
260 struct BluetoothCreateSdpRecordResult { | |
261 BluetoothStatus status; | |
262 uint32 service_handle; | |
263 }; | |
264 | |
puthik_chromium
2016/08/19 17:38:53
// Next Method ID: 40
Miao
2016/08/19 18:20:34
Done.
| |
234 interface BluetoothHost { | 265 interface BluetoothHost { |
235 EnableAdapter@0() => (BluetoothAdapterState state); | 266 EnableAdapter@0() => (BluetoothAdapterState state); |
236 DisableAdapter@1() => (BluetoothAdapterState state); | 267 DisableAdapter@1() => (BluetoothAdapterState state); |
237 GetAdapterProperty@2(BluetoothPropertyType type); | 268 GetAdapterProperty@2(BluetoothPropertyType type); |
238 SetAdapterProperty@3(BluetoothProperty property); | 269 SetAdapterProperty@3(BluetoothProperty property); |
239 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, | 270 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, |
240 BluetoothPropertyType type); | 271 BluetoothPropertyType type); |
241 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, | 272 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, |
242 BluetoothProperty property); | 273 BluetoothProperty property); |
243 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, | 274 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
315 => (BluetoothGattStatus status); | 346 => (BluetoothGattStatus status); |
316 [MinVersion=3] StopService@34(int32 service_handle) | 347 [MinVersion=3] StopService@34(int32 service_handle) |
317 => (BluetoothGattStatus status); | 348 => (BluetoothGattStatus status); |
318 [MinVersion=3] DeleteService@35(int32 service_handle) | 349 [MinVersion=3] DeleteService@35(int32 service_handle) |
319 => (BluetoothGattStatus status); | 350 => (BluetoothGattStatus status); |
320 [MinVersion=3] SendIndication@36(int32 attribute_handle, | 351 [MinVersion=3] SendIndication@36(int32 attribute_handle, |
321 BluetoothAddress address, | 352 BluetoothAddress address, |
322 bool confirm, | 353 bool confirm, |
323 array<uint8> value) | 354 array<uint8> value) |
324 => (BluetoothGattStatus status); | 355 => (BluetoothGattStatus status); |
356 | |
357 // Bluetooth SDP functions | |
358 [MinVersion=5] GetSdpRecords@37(BluetoothAddress remote_addr, | |
359 BluetoothUUID target_uuid); | |
360 [MinVersion=5] CreateSdpRecord@38(BluetoothSdpRecord record) | |
361 => (BluetoothCreateSdpRecordResult result); | |
362 [MinVersion=5] RemoveSdpRecord@39(uint32 service_handle) | |
363 => (BluetoothStatus status); | |
325 }; | 364 }; |
326 | 365 |
327 // Next Method ID: 17 | 366 // Next Method ID: 18 |
328 interface BluetoothInstance { | 367 interface BluetoothInstance { |
329 Init@0(BluetoothHost host_ptr); | 368 Init@0(BluetoothHost host_ptr); |
330 | 369 |
331 OnAdapterProperties@1(BluetoothStatus status, | 370 OnAdapterProperties@1(BluetoothStatus status, |
332 array<BluetoothProperty> properties); | 371 array<BluetoothProperty> properties); |
333 OnRemoteDeviceProperties@2(BluetoothStatus status, | 372 OnRemoteDeviceProperties@2(BluetoothStatus status, |
334 BluetoothAddress address, | 373 BluetoothAddress address, |
335 array<BluetoothProperty> properties); | 374 array<BluetoothProperty> properties); |
336 OnDeviceFound@3(array<BluetoothProperty> properties); | 375 OnDeviceFound@3(array<BluetoothProperty> properties); |
337 OnDiscoveryStateChanged@4(BluetoothDiscoveryState state); | 376 OnDiscoveryStateChanged@4(BluetoothDiscoveryState state); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
369 [MinVersion=3] RequestGattRead@14(BluetoothAddress address, | 408 [MinVersion=3] RequestGattRead@14(BluetoothAddress address, |
370 int32 attribute_handle, | 409 int32 attribute_handle, |
371 int32 offset, | 410 int32 offset, |
372 bool is_long) | 411 bool is_long) |
373 => (BluetoothGattStatus status, array<uint8> value); | 412 => (BluetoothGattStatus status, array<uint8> value); |
374 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, | 413 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, |
375 int32 attribute_handle, | 414 int32 attribute_handle, |
376 int32 offset, | 415 int32 offset, |
377 array<uint8> value) | 416 array<uint8> value) |
378 => (BluetoothGattStatus status); | 417 => (BluetoothGattStatus status); |
418 | |
419 // Bluetooth SDP function | |
420 [MinVersion=5] OnGetSdpRecords@17(BluetoothStatus status, | |
421 BluetoothAddress remove_addr, | |
422 BluetoothUUID target_uuid, | |
423 array<BluetoothSdpRecord> records); | |
379 }; | 424 }; |
OLD | NEW |