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

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

Issue 2104023002: arc: bluetooth: Add Gatt server mojo API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bump mojo id Created 4 years, 5 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
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 [MinVersion=1] DeregisterForGattNotification@27( 282 [MinVersion=1] DeregisterForGattNotification@27(
283 BluetoothAddress remote_addr, 283 BluetoothAddress remote_addr,
284 BluetoothGattServiceID service_id, 284 BluetoothGattServiceID service_id,
285 BluetoothGattID char_id) 285 BluetoothGattID char_id)
286 => (BluetoothGattStatus status); 286 => (BluetoothGattStatus status);
287 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr) 287 [MinVersion=1] ReadRemoteRssi@28(BluetoothAddress remote_addr)
288 => (int32 rssi); 288 => (int32 rssi);
289 289
290 [MinVersion=2] OpenBluetoothSocket@29() 290 [MinVersion=2] OpenBluetoothSocket@29()
291 => (handle sock); 291 => (handle sock);
292
293 // Bluetooth Gatt Server functions
294 // Copied from Android API
295 // https://source.android.com/devices/halref/bt__gatt__server_8h.html
296 [MinVersion=3] AddService@30(BluetoothGattServiceID service_id,
297 int32 num_handles)
298 => (int32 service_handle);
299 [MinVersion=3] AddCharacteristic@31(int32 service_handle,
300 BluetoothUUID uuid,
301 int32 properties,
302 int32 permissions)
303 => (int32 characteristic_handle);
304 [MinVersion=3] AddDescriptor@32(int32 service_handle,
305 BluetoothUUID uuid,
306 int32 permissions)
307 => (int32 descriptor_handle);
308 [MinVersion=3] StartService@33(int32 service_handle)
309 => (BluetoothGattStatus status);
310 [MinVersion=3] StopService@34(int32 service_handle)
311 => (BluetoothGattStatus status);
312 [MinVersion=3] DeleteService@35(int32 service_handle)
313 => (BluetoothGattStatus status);
314 [MinVersion=3] SendIndication@36(int32 attribute_handle,
315 BluetoothAddress address,
316 bool confirm,
317 array<uint8> value)
318 => (BluetoothGattStatus status);
292 }; 319 };
293 320
294 interface BluetoothInstance { 321 interface BluetoothInstance {
295 Init@0(BluetoothHost host_ptr); 322 Init@0(BluetoothHost host_ptr);
296 323
297 OnAdapterProperties@1(BluetoothStatus status, 324 OnAdapterProperties@1(BluetoothStatus status,
298 array<BluetoothProperty> properties); 325 array<BluetoothProperty> properties);
299 OnRemoteDeviceProperties@2(BluetoothStatus status, 326 OnRemoteDeviceProperties@2(BluetoothStatus status,
300 BluetoothAddress address, 327 BluetoothAddress address,
301 array<BluetoothProperty> properties); 328 array<BluetoothProperty> properties);
(...skipping 19 matching lines...) Expand all
321 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, 348 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr,
322 uint16 start_handle, 349 uint16 start_handle,
323 uint16 end_handle); 350 uint16 end_handle);
324 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, 351 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr,
325 array<BluetoothGattDBElement> db); 352 array<BluetoothGattDBElement> db);
326 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, 353 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr,
327 BluetoothGattServiceID service_id, 354 BluetoothGattServiceID service_id,
328 BluetoothGattID char_id, 355 BluetoothGattID char_id,
329 bool is_notify, 356 bool is_notify,
330 array<uint8> value); 357 array<uint8> value);
358
359 // Bluetooth Gatt Server functions
360 [MinVersion=3] RequestGattRead@14(BluetoothAddress address,
361 int32 attribute_handle,
362 int32 offset,
363 bool is_long)
364 => (BluetoothGattStatus status, array<uint8> value);
365 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address,
366 int32 attribute_handle,
367 int32 offset,
368 array<uint8> value)
369 => (BluetoothGattStatus status);
331 }; 370 };
OLDNEW
« no previous file with comments | « components/arc/bluetooth/arc_bluetooth_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698