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

Unified 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: . 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/api/bluetooth_private.json
diff --git a/extensions/common/api/bluetooth_private.json b/extensions/common/api/bluetooth_private.json
deleted file mode 100644
index c973b400e6d248d6d4c39f602b5abfc1edef6b6f..0000000000000000000000000000000000000000
--- a/extensions/common/api/bluetooth_private.json
+++ /dev/null
@@ -1,276 +0,0 @@
-[
- {
- "namespace": "bluetoothPrivate",
- "description": " Use the <code>chrome.bluetoothPrivate</code> API to control the Bluetooth\n adapter state and handle device pairing.",
- "compiler_options": {
- "implemented_in": "extensions/browser/api/bluetooth/bluetooth_private_api.h"
- },
- "functions": [
- {
- "name": "setAdapterState",
- "type": "function",
- "description": "Changes the state of the Bluetooth adapter.",
- "parameters": [
- {
- "name": "adapterState",
- "$ref": "NewAdapterState"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- },
- {
- "name": "setPairingResponse",
- "type": "function",
- "parameters": [
- {
- "name": "options",
- "$ref": "SetPairingResponseOptions"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- },
- {
- "name": "disconnectAll",
- "type": "function",
- "description": "Tears down all connections to the given device.",
- "parameters": [
- {
- "name": "deviceAddress",
- "type": "string"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- },
- {
- "name": "setDiscoveryFilter",
- "type": "function",
- "description": "Set or clear discovery filter",
- "parameters": [
- {
- "name": "discoveryFilter",
- "$ref": "DiscoveryFilter"
- },
- {
- "name": "callback",
- "type": "function",
- "optional": true,
- "parameters": []
- }
- ]
- },
- {
- "name": "pair",
- "type": "function",
- "description": "Pairs the given device",
- "parameters": [
- {
- "name": "deviceAddress",
- "type": "string"
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": []
- }
- ]
- }
- ],
- "events": [
- {
- "name": "onPairing",
- "type": "function",
- "description": "Fired when a pairing event occurs.",
- "parameters": [
- {
- "name": "pairingEvent",
- "description": "A pairing event.",
- "$ref": "PairingEvent"
- }
- ],
- "options":
- {
- "maxListeners": 1
- }
- }
- ],
- "types": [
- {
- "type": "string",
- "id": "PairingEventType",
- "description": "Events that can occur during pairing. The method used for pairing varies depending on the capability of the two devices.",
- "enum": [
- {
- "name": "requestPincode",
- "description": "An alphanumeric PIN code is required to be entered by the user."
- },
- {
- "name": "displayPincode",
- "description": "Display a PIN code to the user."
- },
- {
- "name": "requestPasskey",
- "description": "A numeric passkey is required to be entered by the user."
- },
- {
- "name": "displayPasskey",
- "description": "Display a zero padded 6 digit numeric passkey that the user entered on the remote device. This event may occur multiple times during pairing to update the entered passkey."
- },
- {
- "name": "keysEntered",
- "description": "The number of keys inputted by the user on the remote device when entering a passkey. This event may be called multiple times during pairing to update the number of keys inputted."
- },
- {
- "name": "confirmPasskey",
- "description": "Requests that a 6 digit passkey be displayed and the user confirms that both devies show the same passkey."
- },
- {
- "name": "requestAuthorization",
- "description": "Requests authorization for a pairing under the just-works model. It is up to the app to ask for user confirmation."
- },
- {
- "name": "complete",
- "description": "Pairing is completed"
- }
- ]
- },
- {
- "type": "string",
- "id": "PairingResponse",
- "description": "Valid pairing responses.",
- "enum": [ "confirm", "reject", "cancel"]
- },
- {
- "type": "object",
- "id": "PairingEvent",
- "description": "A pairing event received from a Bluetooth device.",
- "properties": {
- "pairing": {
- "name": "pairing",
- "$ref": "PairingEventType"
- },
- "device": {
- "name": "device",
- "$ref": "bluetooth.Device"
- },
- "pincode": {
- "optional": true,
- "name": "pincode",
- "type": "string"
- },
- "passkey": {
- "optional": true,
- "name": "passkey",
- "type": "integer"
- },
- "enteredKey": {
- "optional": true,
- "name": "enteredKey",
- "type": "integer"
- }
- }
- },
- {
- "type": "object",
- "id": "NewAdapterState",
- "properties": {
- "name": {
- "optional": true,
- "name": "name",
- "type": "string",
- "description": "The human-readable name of the adapter."
- },
- "powered": {
- "optional": true,
- "name": "powered",
- "type": "boolean",
- "description": "Whether or not the adapter has power."
- },
- "discoverable": {
- "optional": true,
- "name": "discoverable",
- "type": "boolean",
- "description": "Whether the adapter is discoverable by other devices."
- }
- }
- },
- {
- "type": "object",
- "id": "SetPairingResponseOptions",
- "properties": {
- "device": {
- "name": "device",
- "$ref": "bluetooth.Device",
- "description": "The remote device to send the pairing response."
- },
- "response": {
- "optional": true,
- "name": "response",
- "$ref": "PairingResponse",
- "description": "The response type"
- },
- "pincode": {
- "optional": true,
- "name": "pincode",
- "type": "string",
- "description": "A 1-16 character alphanumeric set in response to <code>requestPincode</code>."
- },
- "passkey": {
- "optional": true,
- "name": "passkey",
- "type": "integer",
- "description": "An integer between 0-999999 set in response to <code>requestPasskey</code>."
- }
- }
- },
- {
- "id": "TransportType",
- "type": "string",
- "enum": [ "le", "bredr", "dual"]
- },
- {
- "type": "object",
- "id": "DiscoveryFilter",
- "properties": {
- "transport": {
- "$ref": "TransportType",
- "optional": true,
- "name": "transport",
- "description": "Transport type."
- },
- "uuids": {
- "name": "uuids",
- "optional": true,
- "choices": [
- {"type": "string", "name": "uuid of service"},
- {"type": "array", "items": {"type": "string"}, "name": "array of uuids"}
- ]
- },
- "rssi": {
- "optional": true,
- "name": "rssi",
- "type": "integer",
- "description": "RSSI ranging value. Only devices with RSSI higher than this value will be reported."
- },
- "pathloss": {
- "optional": true,
- "name": "pathloss",
- "type": "integer",
- "description": "Pathloss ranging value. Only devices with pathloss lower than this value will be reported."
- }
- }
- }
- ]
- }
-]

Powered by Google App Engine
This is Rietveld 408576698