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 module blink.mojom; | 5 module blink.mojom; |
6 | 6 |
7 import "device/bluetooth/public/interfaces/uuid.mojom"; | 7 import "device/bluetooth/public/interfaces/uuid.mojom"; |
8 | 8 |
9 // Bluetooth Terminology: | 9 // Bluetooth Terminology: |
10 // | 10 // |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // needs a dynamic component, we should add a separate enum so type-checking the | 44 // needs a dynamic component, we should add a separate enum so type-checking the |
45 // IPC ensures the dynamic component is passed. | 45 // IPC ensures the dynamic component is passed. |
46 enum WebBluetoothResult { | 46 enum WebBluetoothResult { |
47 SUCCESS, | 47 SUCCESS, |
48 // AbortError: | 48 // AbortError: |
49 // InvalidModificationError: | 49 // InvalidModificationError: |
50 GATT_INVALID_ATTRIBUTE_LENGTH, | 50 GATT_INVALID_ATTRIBUTE_LENGTH, |
51 // InvalidStateError: | 51 // InvalidStateError: |
52 SERVICE_NO_LONGER_EXISTS, | 52 SERVICE_NO_LONGER_EXISTS, |
53 CHARACTERISTIC_NO_LONGER_EXISTS, | 53 CHARACTERISTIC_NO_LONGER_EXISTS, |
| 54 INVALID_CHARACTERISTIC, |
| 55 INVALID_DESCRIPTOR, |
| 56 INVALID_SERVICE, |
54 // NetworkError: | 57 // NetworkError: |
55 CONNECT_ALREADY_IN_PROGRESS, | 58 CONNECT_ALREADY_IN_PROGRESS, |
56 CONNECT_ATTRIBUTE_LENGTH_INVALID, | 59 CONNECT_ATTRIBUTE_LENGTH_INVALID, |
57 CONNECT_AUTH_CANCELED, | 60 CONNECT_AUTH_CANCELED, |
58 CONNECT_AUTH_FAILED, | 61 CONNECT_AUTH_FAILED, |
59 CONNECT_AUTH_REJECTED, | 62 CONNECT_AUTH_REJECTED, |
60 CONNECT_AUTH_TIMEOUT, | 63 CONNECT_AUTH_TIMEOUT, |
61 CONNECT_CONNECTION_CONGESTED, | 64 CONNECT_CONNECTION_CONGESTED, |
62 CONNECT_INSUFFICIENT_ENCRYPTION, | 65 CONNECT_INSUFFICIENT_ENCRYPTION, |
63 CONNECT_OFFSET_INVALID, | 66 CONNECT_OFFSET_INVALID, |
64 CONNECT_READ_NOT_PERMITTED, | 67 CONNECT_READ_NOT_PERMITTED, |
65 CONNECT_REQUEST_NOT_SUPPORTED, | 68 CONNECT_REQUEST_NOT_SUPPORTED, |
66 CONNECT_UNKNOWN_ERROR, | 69 CONNECT_UNKNOWN_ERROR, |
67 CONNECT_UNKNOWN_FAILURE, | 70 CONNECT_UNKNOWN_FAILURE, |
68 CONNECT_UNSUPPORTED_DEVICE, | 71 CONNECT_UNSUPPORTED_DEVICE, |
69 CONNECT_WRITE_NOT_PERMITTED, | 72 CONNECT_WRITE_NOT_PERMITTED, |
70 DEVICE_NO_LONGER_IN_RANGE, | 73 DEVICE_NO_LONGER_IN_RANGE, |
71 GATT_NOT_PAIRED, | 74 GATT_NOT_PAIRED, |
72 GATT_OPERATION_IN_PROGRESS, | 75 GATT_OPERATION_IN_PROGRESS, |
| 76 GATT_SERVER_DISCONNECTED, |
| 77 GATT_SERVER_NOT_CONNECTED, |
| 78 GATT_SERVER_DISCONNECTED_WHILE_RETRIEVING_CHARACTERISTICS, |
| 79 GATT_SERVER_NOT_CONNECTED_CANNOT_RETRIEVE_CHARACTERISTICS, |
73 UNTRANSLATED_CONNECT_ERROR_CODE, | 80 UNTRANSLATED_CONNECT_ERROR_CODE, |
74 // NotFoundError: | 81 // NotFoundError: |
75 NO_BLUETOOTH_ADAPTER, | 82 NO_BLUETOOTH_ADAPTER, |
76 CHOSEN_DEVICE_VANISHED, | 83 CHOSEN_DEVICE_VANISHED, |
77 CHOOSER_CANCELLED, | 84 CHOOSER_CANCELLED, |
78 CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED, | 85 CHOOSER_NOT_SHOWN_API_GLOBALLY_DISABLED, |
79 CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED, | 86 CHOOSER_NOT_SHOWN_API_LOCALLY_DISABLED, |
80 CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, | 87 CHOOSER_NOT_SHOWN_USER_DENIED_PERMISSION_TO_SCAN, |
81 SERVICE_NOT_FOUND, | 88 SERVICE_NOT_FOUND, |
82 NO_SERVICES_FOUND, | 89 NO_SERVICES_FOUND, |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 // that do this will be notified of device events e.g. device disconnection. | 272 // that do this will be notified of device events e.g. device disconnection. |
266 interface WebBluetoothServiceClient { | 273 interface WebBluetoothServiceClient { |
267 // The characteristic identified by |characteristic_instance_id| has received | 274 // The characteristic identified by |characteristic_instance_id| has received |
268 // a notification of value change. | 275 // a notification of value change. |
269 RemoteCharacteristicValueChanged(string characteristic_instance_id, | 276 RemoteCharacteristicValueChanged(string characteristic_instance_id, |
270 array<uint8> value); | 277 array<uint8> value); |
271 | 278 |
272 // The device identified by |device_id| has been disconnected. | 279 // The device identified by |device_id| has been disconnected. |
273 GattServerDisconnected(WebBluetoothDeviceId device_id); | 280 GattServerDisconnected(WebBluetoothDeviceId device_id); |
274 }; | 281 }; |
OLD | NEW |