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

Side by Side Diff: device/bluetooth/public/interfaces/adapter.mojom

Issue 2727683003: bluetooth: Clean up connection errors (Closed)
Patch Set: format Created 3 years, 9 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 bluetooth.mojom; 5 module bluetooth.mojom;
6 6
7 import "device/bluetooth/public/interfaces/device.mojom"; 7 import "device/bluetooth/public/interfaces/device.mojom";
8 8
9 // Possible errors sent as a response by Adapter.ConnectToDevice on a Device 9 // Possible errors sent as a response by Adapter.ConnectToDevice on a Device
10 // connection request. 10 // connection request.
11 enum ConnectResult { 11 enum ConnectResult {
12 SUCCESS, 12 SUCCESS,
13 ATTRIBUTE_LENGTH_INVALID,
14 AUTH_CANCELED, 13 AUTH_CANCELED,
15 AUTH_FAILED, 14 AUTH_FAILED,
16 AUTH_REJECTED, 15 AUTH_REJECTED,
17 AUTH_TIMEOUT, 16 AUTH_TIMEOUT,
18 CONNECTION_CONGESTED,
19 FAILED, 17 FAILED,
20 INPROGRESS, 18 INPROGRESS,
21 INSUFFICIENT_ENCRYPTION,
22 OFFSET_INVALID,
23 READ_NOT_PERMITTED,
24 REQUEST_NOT_SUPPORTED,
25 UNKNOWN, 19 UNKNOWN,
26 UNSUPPORTED_DEVICE, 20 UNSUPPORTED_DEVICE,
27 WRITE_NOT_PERMITTED,
28 DEVICE_NO_LONGER_IN_RANGE, 21 DEVICE_NO_LONGER_IN_RANGE,
29 UNTRANSLATED_CONNECT_ERROR_CODE
30 }; 22 };
31 23
32 struct AdapterInfo { 24 struct AdapterInfo {
33 string address; 25 string address;
34 string name; 26 string name;
35 bool initialized; 27 bool initialized;
36 bool present; 28 bool present;
37 bool powered; 29 bool powered;
38 bool discoverable; 30 bool discoverable;
39 bool discovering; 31 bool discovering;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 DeviceChanged(DeviceInfo device); 99 DeviceChanged(DeviceInfo device);
108 100
109 // Called after the device hasn't been seen for 3 minutes. 101 // Called after the device hasn't been seen for 3 minutes.
110 DeviceRemoved(DeviceInfo device); 102 DeviceRemoved(DeviceInfo device);
111 }; 103 };
112 104
113 interface AdapterFactory { 105 interface AdapterFactory {
114 // Gets an Adapter interface. Returns null if Bluetooth is not supported. 106 // Gets an Adapter interface. Returns null if Bluetooth is not supported.
115 GetAdapter() => (Adapter? adapter); 107 GetAdapter() => (Adapter? adapter);
116 }; 108 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698