Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: components/arc/common/bluetooth.mojom

Issue 2149713002: arc: bluetooth: Add SDP host side support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: arc: bluetooth: Add SDP host side support Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 BluetoothSdpAttributeType {
239 NULLTYPE = 0,
240 UINT,
241 INT,
242 UUID,
243 STRING,
244 BOOL,
245 SEQUENCE,
246 URL,
247 };
248
249 /*
250 * A BluetoothSdpAttribute contains either a value or a sequence, where a
251 * sequence is an array of BluetoothSdpAttribute. A multi-layered attribute
252 * design is intended. Note BluetoothSdpAttribute supports up to depth 32 for
253 * the attribute with multi-layer sequences. The attributes within a sequence
254 * which has the depth beyond the maximum supported depth will be invalidated
255 * and ignored.
256 */
257 struct BluetoothSdpAttribute {
258 BluetoothSdpAttributeType type;
259 uint32 type_size;
260 mojo.common.mojom.ListValue value;
261 array<BluetoothSdpAttribute> sequence;
262 };
263
264 struct BluetoothSdpRecord {
265 map<uint16, BluetoothSdpAttribute> attrs;
266 };
267
268 struct BluetoothCreateSdpRecordResult {
269 BluetoothStatus status;
270 uint32 service_handle;
271 };
272
273 // Next Method ID: 40
234 interface BluetoothHost { 274 interface BluetoothHost {
235 EnableAdapter@0() => (BluetoothAdapterState state); 275 EnableAdapter@0() => (BluetoothAdapterState state);
236 DisableAdapter@1() => (BluetoothAdapterState state); 276 DisableAdapter@1() => (BluetoothAdapterState state);
237 GetAdapterProperty@2(BluetoothPropertyType type); 277 GetAdapterProperty@2(BluetoothPropertyType type);
238 SetAdapterProperty@3(BluetoothProperty property); 278 SetAdapterProperty@3(BluetoothProperty property);
239 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, 279 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr,
240 BluetoothPropertyType type); 280 BluetoothPropertyType type);
241 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, 281 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr,
242 BluetoothProperty property); 282 BluetoothProperty property);
243 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, 283 GetRemoteServiceRecord@6(BluetoothAddress remote_addr,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 => (BluetoothGattStatus status); 355 => (BluetoothGattStatus status);
316 [MinVersion=3] StopService@34(int32 service_handle) 356 [MinVersion=3] StopService@34(int32 service_handle)
317 => (BluetoothGattStatus status); 357 => (BluetoothGattStatus status);
318 [MinVersion=3] DeleteService@35(int32 service_handle) 358 [MinVersion=3] DeleteService@35(int32 service_handle)
319 => (BluetoothGattStatus status); 359 => (BluetoothGattStatus status);
320 [MinVersion=3] SendIndication@36(int32 attribute_handle, 360 [MinVersion=3] SendIndication@36(int32 attribute_handle,
321 BluetoothAddress address, 361 BluetoothAddress address,
322 bool confirm, 362 bool confirm,
323 array<uint8> value) 363 array<uint8> value)
324 => (BluetoothGattStatus status); 364 => (BluetoothGattStatus status);
365
366 // Bluetooth SDP functions
367 [MinVersion=5] GetSdpRecords@37(BluetoothAddress remote_addr,
368 BluetoothUUID target_uuid);
369 [MinVersion=5] CreateSdpRecord@38(BluetoothSdpRecord record)
370 => (BluetoothCreateSdpRecordResult result);
371 [MinVersion=5] RemoveSdpRecord@39(uint32 service_handle)
372 => (BluetoothStatus status);
325 }; 373 };
326 374
327 // Next Method ID: 17 375 // Next Method ID: 18
328 interface BluetoothInstance { 376 interface BluetoothInstance {
329 Init@0(BluetoothHost host_ptr); 377 Init@0(BluetoothHost host_ptr);
330 378
331 OnAdapterProperties@1(BluetoothStatus status, 379 OnAdapterProperties@1(BluetoothStatus status,
332 array<BluetoothProperty> properties); 380 array<BluetoothProperty> properties);
333 OnRemoteDeviceProperties@2(BluetoothStatus status, 381 OnRemoteDeviceProperties@2(BluetoothStatus status,
334 BluetoothAddress address, 382 BluetoothAddress address,
335 array<BluetoothProperty> properties); 383 array<BluetoothProperty> properties);
336 OnDeviceFound@3(array<BluetoothProperty> properties); 384 OnDeviceFound@3(array<BluetoothProperty> properties);
337 OnDiscoveryStateChanged@4(BluetoothDiscoveryState state); 385 OnDiscoveryStateChanged@4(BluetoothDiscoveryState state);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 [MinVersion=3] RequestGattRead@14(BluetoothAddress address, 417 [MinVersion=3] RequestGattRead@14(BluetoothAddress address,
370 int32 attribute_handle, 418 int32 attribute_handle,
371 int32 offset, 419 int32 offset,
372 bool is_long) 420 bool is_long)
373 => (BluetoothGattStatus status, array<uint8> value); 421 => (BluetoothGattStatus status, array<uint8> value);
374 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, 422 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address,
375 int32 attribute_handle, 423 int32 attribute_handle,
376 int32 offset, 424 int32 offset,
377 array<uint8> value) 425 array<uint8> value)
378 => (BluetoothGattStatus status); 426 => (BluetoothGattStatus status);
427
428 // Bluetooth SDP function
429 [MinVersion=5] OnGetSdpRecords@17(BluetoothStatus status,
430 BluetoothAddress remove_addr,
431 BluetoothUUID target_uuid,
432 array<BluetoothSdpRecord> records);
379 }; 433 };
OLDNEW
« no previous file with comments | « components/arc/bluetooth/bluetooth_type_converters_unittest.cc ('k') | components/arc/common/bluetooth.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698