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

Side by Side Diff: extensions/common/api/bluetooth_private.json

Issue 1397653007: bluetooth_private -> IDL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 2 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 | « extensions/common/api/bluetooth_private.idl ('k') | extensions/common/api/schemas.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 [
2 {
3 "namespace": "bluetoothPrivate",
4 "description": " Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth\n adapter state and handle device pairing.",
5 "compiler_options": {
6 "implemented_in": "extensions/browser/api/bluetooth/bluetooth_private_api. h"
7 },
8 "functions": [
9 {
10 "name": "setAdapterState",
11 "type": "function",
12 "description": "Changes the state of the Bluetooth adapter.",
13 "parameters": [
14 {
15 "name": "adapterState",
16 "$ref": "NewAdapterState"
17 },
18 {
19 "name": "callback",
20 "type": "function",
21 "parameters": []
22 }
23 ]
24 },
25 {
26 "name": "setPairingResponse",
27 "type": "function",
28 "parameters": [
29 {
30 "name": "options",
31 "$ref": "SetPairingResponseOptions"
32 },
33 {
34 "name": "callback",
35 "type": "function",
36 "parameters": []
37 }
38 ]
39 },
40 {
41 "name": "disconnectAll",
42 "type": "function",
43 "description": "Tears down all connections to the given device.",
44 "parameters": [
45 {
46 "name": "deviceAddress",
47 "type": "string"
48 },
49 {
50 "name": "callback",
51 "type": "function",
52 "parameters": []
53 }
54 ]
55 },
56 {
57 "name": "setDiscoveryFilter",
58 "type": "function",
59 "description": "Set or clear discovery filter",
60 "parameters": [
61 {
62 "name": "discoveryFilter",
63 "$ref": "DiscoveryFilter"
64 },
65 {
66 "name": "callback",
67 "type": "function",
68 "optional": true,
69 "parameters": []
70 }
71 ]
72 },
73 {
74 "name": "pair",
75 "type": "function",
76 "description": "Pairs the given device",
77 "parameters": [
78 {
79 "name": "deviceAddress",
80 "type": "string"
81 },
82 {
83 "name": "callback",
84 "type": "function",
85 "parameters": []
86 }
87 ]
88 }
89 ],
90 "events": [
91 {
92 "name": "onPairing",
93 "type": "function",
94 "description": "Fired when a pairing event occurs.",
95 "parameters": [
96 {
97 "name": "pairingEvent",
98 "description": "A pairing event.",
99 "$ref": "PairingEvent"
100 }
101 ],
102 "options":
103 {
104 "maxListeners": 1
105 }
106 }
107 ],
108 "types": [
109 {
110 "type": "string",
111 "id": "PairingEventType",
112 "description": "Events that can occur during pairing. The method used fo r pairing varies depending on the capability of the two devices.",
113 "enum": [
114 {
115 "name": "requestPincode",
116 "description": "An alphanumeric PIN code is required to be entered b y the user."
117 },
118 {
119 "name": "displayPincode",
120 "description": "Display a PIN code to the user."
121 },
122 {
123 "name": "requestPasskey",
124 "description": "A numeric passkey is required to be entered by the u ser."
125 },
126 {
127 "name": "displayPasskey",
128 "description": "Display a zero padded 6 digit numeric passkey that t he user entered on the remote device. This event may occur multiple times during pairing to update the entered passkey."
129 },
130 {
131 "name": "keysEntered",
132 "description": "The number of keys inputted by the user on the remot e device when entering a passkey. This event may be called multiple times during pairing to update the number of keys inputted."
133 },
134 {
135 "name": "confirmPasskey",
136 "description": "Requests that a 6 digit passkey be displayed and the user confirms that both devies show the same passkey."
137 },
138 {
139 "name": "requestAuthorization",
140 "description": "Requests authorization for a pairing under the just- works model. It is up to the app to ask for user confirmation."
141 },
142 {
143 "name": "complete",
144 "description": "Pairing is completed"
145 }
146 ]
147 },
148 {
149 "type": "string",
150 "id": "PairingResponse",
151 "description": "Valid pairing responses.",
152 "enum": [ "confirm", "reject", "cancel"]
153 },
154 {
155 "type": "object",
156 "id": "PairingEvent",
157 "description": "A pairing event received from a Bluetooth device.",
158 "properties": {
159 "pairing": {
160 "name": "pairing",
161 "$ref": "PairingEventType"
162 },
163 "device": {
164 "name": "device",
165 "$ref": "bluetooth.Device"
166 },
167 "pincode": {
168 "optional": true,
169 "name": "pincode",
170 "type": "string"
171 },
172 "passkey": {
173 "optional": true,
174 "name": "passkey",
175 "type": "integer"
176 },
177 "enteredKey": {
178 "optional": true,
179 "name": "enteredKey",
180 "type": "integer"
181 }
182 }
183 },
184 {
185 "type": "object",
186 "id": "NewAdapterState",
187 "properties": {
188 "name": {
189 "optional": true,
190 "name": "name",
191 "type": "string",
192 "description": "The human-readable name of the adapter."
193 },
194 "powered": {
195 "optional": true,
196 "name": "powered",
197 "type": "boolean",
198 "description": "Whether or not the adapter has power."
199 },
200 "discoverable": {
201 "optional": true,
202 "name": "discoverable",
203 "type": "boolean",
204 "description": "Whether the adapter is discoverable by other devices ."
205 }
206 }
207 },
208 {
209 "type": "object",
210 "id": "SetPairingResponseOptions",
211 "properties": {
212 "device": {
213 "name": "device",
214 "$ref": "bluetooth.Device",
215 "description": "The remote device to send the pairing response."
216 },
217 "response": {
218 "optional": true,
219 "name": "response",
220 "$ref": "PairingResponse",
221 "description": "The response type"
222 },
223 "pincode": {
224 "optional": true,
225 "name": "pincode",
226 "type": "string",
227 "description": "A 1-16 character alphanumeric set in response to <co de>requestPincode</code>."
228 },
229 "passkey": {
230 "optional": true,
231 "name": "passkey",
232 "type": "integer",
233 "description": "An integer between 0-999999 set in response to <code >requestPasskey</code>."
234 }
235 }
236 },
237 {
238 "id": "TransportType",
239 "type": "string",
240 "enum": [ "le", "bredr", "dual"]
241 },
242 {
243 "type": "object",
244 "id": "DiscoveryFilter",
245 "properties": {
246 "transport": {
247 "$ref": "TransportType",
248 "optional": true,
249 "name": "transport",
250 "description": "Transport type."
251 },
252 "uuids": {
253 "name": "uuids",
254 "optional": true,
255 "choices": [
256 {"type": "string", "name": "uuid of service"},
257 {"type": "array", "items": {"type": "string"}, "name": "array of uuids"}
258 ]
259 },
260 "rssi": {
261 "optional": true,
262 "name": "rssi",
263 "type": "integer",
264 "description": "RSSI ranging value. Only devices with RSSI higher th an this value will be reported."
265 },
266 "pathloss": {
267 "optional": true,
268 "name": "pathloss",
269 "type": "integer",
270 "description": "Pathloss ranging value. Only devices with pathloss l ower than this value will be reported."
271 }
272 }
273 }
274 ]
275 }
276 ]
OLDNEW
« no previous file with comments | « extensions/common/api/bluetooth_private.idl ('k') | extensions/common/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698