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

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: fix patch#2 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
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 BluetoothGattID char_id) 280 BluetoothGattID char_id)
281 => (BluetoothGattStatus status); 281 => (BluetoothGattStatus status);
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 // Bluetooth Gatt Server functions
291 // Copy from Android API
292 // https://source.android.com/devices/halref/bt__gatt__server_8h.html
293 [MinVersion=3] AddService@29(BluetoothGattServiceID service_id,
294 int32 num_handles)
295 => (int32 service_handle);
296 [MinVersion=3] AddCharacteristic@30(int32 service_handle,
297 BluetoothUUID uuid,
298 int32 properties,
299 int32 permissions)
300 => (int32 characteristic_handle);
301 [MinVersion=3] AddDescriptor@31(int32 service_handle,
302 BluetoothUUID uuid,
303 int32 permissions)
304 => (int32 descriptor_handle);
305 [MinVersion=3] StartService@32(int32 service_handle,
306 BluetoothDeviceType device_type)
307 => (BluetoothGattStatus status);
308 [MinVersion=3] StopService@33(int32 service_handle)
309 => (BluetoothGattStatus status);
310 [MinVersion=3] DeleteService@34(int32 service_handle)
311 => (BluetoothGattStatus status);
312 [MinVersion=3] SendIndication@35(int32 attribute_handle,
313 BluetoothAddress address,
314 bool confirm,
315 array<uint8> value)
316 => (BluetoothGattStatus status);
317 [MinVersion=3] SendResponse@36(int32 trans_id,
318 int32 status,
319 array<uint8> value)
320 => (BluetoothGattStatus status);
321
290 }; 322 };
291 323
292 interface BluetoothInstance { 324 interface BluetoothInstance {
293 Init@0(BluetoothHost host_ptr); 325 Init@0(BluetoothHost host_ptr);
294 326
295 OnAdapterProperties@1(BluetoothStatus status, 327 OnAdapterProperties@1(BluetoothStatus status,
296 array<BluetoothProperty> properties); 328 array<BluetoothProperty> properties);
297 OnRemoteDeviceProperties@2(BluetoothStatus status, 329 OnRemoteDeviceProperties@2(BluetoothStatus status,
298 BluetoothAddress address, 330 BluetoothAddress address,
299 array<BluetoothProperty> properties); 331 array<BluetoothProperty> properties);
(...skipping 19 matching lines...) Expand all
319 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr, 351 [MinVersion=1] OnServicesRemoved@11(BluetoothAddress remote_addr,
320 uint16 start_handle, 352 uint16 start_handle,
321 uint16 end_handle); 353 uint16 end_handle);
322 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr, 354 [MinVersion=1] OnServicesAdded@12(BluetoothAddress remote_addr,
323 array<BluetoothGattDBElement> db); 355 array<BluetoothGattDBElement> db);
324 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr, 356 [MinVersion=2] OnGattNotify@13(BluetoothAddress remote_addr,
325 BluetoothGattServiceID service_id, 357 BluetoothGattServiceID service_id,
326 BluetoothGattID char_id, 358 BluetoothGattID char_id,
327 bool is_notify, 359 bool is_notify,
328 array<uint8> value); 360 array<uint8> value);
361
362 // Bluetooth Gatt Server functions
363 [MinVersion=3] RequestGattRead@14(BluetoothAddress address,
364 int32 transaction_id,
365 int32 attribute_handle,
366 int32 offset,
367 bool is_long);
368 [MinVersion=3] RequestGattWrite@15(BluetoothAddress address,
369 int32 transaction_id,
370 int32 attribute_handle,
371 int32 offset,
372 array<uint8> value);
329 }; 373 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698