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

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: Update bluetooth.mojom and change type converter accordingly Created 4 years, 4 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 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
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 [Extensible]
230 enum BluetoothSdpAttrType {
231 NULLTYPE = 0,
232 UINT,
233 INT,
234 UUID,
235 STRING,
236 BOOL,
237 SEQUENCE,
238 URL,
239 };
240
241 struct BluetoothSdpServiceAttr {
242 BluetoothSdpAttrType type;
243 uint32 type_size;
244 array<uint8> value;
245 array<BluetoothSdpServiceAttr> sequence;
246 };
247
248 struct BluetoothSdpRecord {
249 map<uint16, BluetoothSdpServiceAttr> attrs;
250 };
251
252 struct BluetoothGetSdpRecordsResult {
253 BluetoothStatus status;
254 array<BluetoothSdpRecord> records;
255 };
256
257 struct BluetoothCreateSdpRecordResult {
258 BluetoothStatus status;
259 uint32 service_handle;
260 };
261
228 interface BluetoothHost { 262 interface BluetoothHost {
229 EnableAdapter@0() => (BluetoothAdapterState state); 263 EnableAdapter@0() => (BluetoothAdapterState state);
230 DisableAdapter@1() => (BluetoothAdapterState state); 264 DisableAdapter@1() => (BluetoothAdapterState state);
231 GetAdapterProperty@2(BluetoothPropertyType type); 265 GetAdapterProperty@2(BluetoothPropertyType type);
232 SetAdapterProperty@3(BluetoothProperty property); 266 SetAdapterProperty@3(BluetoothProperty property);
233 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr, 267 GetRemoteDeviceProperty@4(BluetoothAddress remote_addr,
234 BluetoothPropertyType type); 268 BluetoothPropertyType type);
235 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr, 269 SetRemoteDeviceProperty@5(BluetoothAddress remote_addr,
236 BluetoothProperty property); 270 BluetoothProperty property);
237 GetRemoteServiceRecord@6(BluetoothAddress remote_addr, 271 GetRemoteServiceRecord@6(BluetoothAddress remote_addr,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 => (BluetoothGattStatus status); 343 => (BluetoothGattStatus status);
310 [MinVersion=3] StopService@34(int32 service_handle) 344 [MinVersion=3] StopService@34(int32 service_handle)
311 => (BluetoothGattStatus status); 345 => (BluetoothGattStatus status);
312 [MinVersion=3] DeleteService@35(int32 service_handle) 346 [MinVersion=3] DeleteService@35(int32 service_handle)
313 => (BluetoothGattStatus status); 347 => (BluetoothGattStatus status);
314 [MinVersion=3] SendIndication@36(int32 attribute_handle, 348 [MinVersion=3] SendIndication@36(int32 attribute_handle,
315 BluetoothAddress address, 349 BluetoothAddress address,
316 bool confirm, 350 bool confirm,
317 array<uint8> value) 351 array<uint8> value)
318 => (BluetoothGattStatus status); 352 => (BluetoothGattStatus status);
353
354 // Bluetooth SDP functions
355 [MinVersion=4] GetSdpRecords@37(BluetoothAddress remote_addr)
356 => (BluetoothGetSdpRecordsResult result);
357 [MinVersion=4] CreateSdpRecord@38(BluetoothSdpRecord record)
358 => (BluetoothCreateSdpRecordResult result);
359 [MinVersion=4] RemoveSdpRecord@39(uint32 service_handle)
360 => (BluetoothStatus status);
319 }; 361 };
320 362
321 interface BluetoothInstance { 363 interface BluetoothInstance {
322 Init@0(BluetoothHost host_ptr); 364 Init@0(BluetoothHost host_ptr);
323 365
324 OnAdapterProperties@1(BluetoothStatus status, 366 OnAdapterProperties@1(BluetoothStatus status,
325 array<BluetoothProperty> properties); 367 array<BluetoothProperty> properties);
326 OnRemoteDeviceProperties@2(BluetoothStatus status, 368 OnRemoteDeviceProperties@2(BluetoothStatus status,
327 BluetoothAddress address, 369 BluetoothAddress address,
328 array<BluetoothProperty> properties); 370 array<BluetoothProperty> properties);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 int32 attribute_handle, 403 int32 attribute_handle,
362 int32 offset, 404 int32 offset,
363 bool is_long) 405 bool is_long)
364 => (BluetoothGattStatus status, array<uint8> value); 406 => (BluetoothGattStatus status, array<uint8> value);
365 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address, 407 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address,
366 int32 attribute_handle, 408 int32 attribute_handle,
367 int32 offset, 409 int32 offset,
368 array<uint8> value) 410 array<uint8> value)
369 => (BluetoothGattStatus status); 411 => (BluetoothGattStatus status);
370 }; 412 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698