OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This file was generated by: |
| 6 // ./tools/json_schema_compiler/compiler.py. |
| 7 // NOTE: The format of types has changed. 'FooType' is now |
| 8 // 'chrome.bluetoothPrivate.FooType'. |
| 9 // Please run the closure compiler before committing changes. |
| 10 // See https://code.google.com/p/chromium/wiki/ClosureCompilation. |
| 11 |
| 12 // IMPORTANT: |
| 13 // s/chrome.bluetoothPrivate.bluetooth.device/chrome.bluetooth.device/ |
| 14 |
| 15 /** @fileoverview Externs generated from namespace: bluetoothPrivate */ |
| 16 |
| 17 /** |
| 18 * @const |
| 19 */ |
| 20 chrome.bluetoothPrivate = {}; |
| 21 |
| 22 /** |
| 23 * @enum {string} |
| 24 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve
ntType |
| 25 */ |
| 26 chrome.bluetoothPrivate.PairingEventType = { |
| 27 REQUEST_PINCODE: 'requestPincode', |
| 28 DISPLAY_PINCODE: 'displayPincode', |
| 29 REQUEST_PASSKEY: 'requestPasskey', |
| 30 DISPLAY_PASSKEY: 'displayPasskey', |
| 31 KEYS_ENTERED: 'keysEntered', |
| 32 CONFIRM_PASSKEY: 'confirmPasskey', |
| 33 REQUEST_AUTHORIZATION: 'requestAuthorization', |
| 34 COMPLETE: 'complete', |
| 35 }; |
| 36 |
| 37 /** |
| 38 * @enum {string} |
| 39 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingRes
ponse |
| 40 */ |
| 41 chrome.bluetoothPrivate.PairingResponse = { |
| 42 CONFIRM: 'confirm', |
| 43 REJECT: 'reject', |
| 44 CANCEL: 'cancel', |
| 45 }; |
| 46 |
| 47 /** |
| 48 * @typedef {{ |
| 49 * pairing: !chrome.bluetoothPrivate.PairingEventType, |
| 50 * device: !chrome.bluetooth.Device, |
| 51 * pincode: (string|undefined), |
| 52 * passkey: (number|undefined), |
| 53 * enteredKey: (number|undefined) |
| 54 * }} |
| 55 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-PairingEve
nt |
| 56 */ |
| 57 chrome.bluetoothPrivate.PairingEvent; |
| 58 |
| 59 /** |
| 60 * @typedef {{ |
| 61 * name: (string|undefined), |
| 62 * powered: (boolean|undefined), |
| 63 * discoverable: (boolean|undefined) |
| 64 * }} |
| 65 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-NewAdapter
State |
| 66 */ |
| 67 chrome.bluetoothPrivate.NewAdapterState; |
| 68 |
| 69 /** |
| 70 * @typedef {{ |
| 71 * device: !chrome.bluetooth.Device, |
| 72 * response: (!chrome.bluetoothPrivate.PairingResponse|undefined), |
| 73 * pincode: (string|undefined), |
| 74 * passkey: (number|undefined) |
| 75 * }} |
| 76 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-SetPairing
ResponseOptions |
| 77 */ |
| 78 chrome.bluetoothPrivate.SetPairingResponseOptions; |
| 79 |
| 80 /** |
| 81 * @enum {string} |
| 82 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-TransportT
ype |
| 83 */ |
| 84 chrome.bluetoothPrivate.TransportType = { |
| 85 LE: 'le', |
| 86 BREDR: 'bredr', |
| 87 DUAL: 'dual', |
| 88 }; |
| 89 |
| 90 /** |
| 91 * @typedef {{ |
| 92 * transport: (!chrome.bluetoothPrivate.TransportType|undefined), |
| 93 * uuids: ((string|!Array<string>)|undefined), |
| 94 * rssi: (number|undefined), |
| 95 * pathloss: (number|undefined) |
| 96 * }} |
| 97 * @see https://developer.chrome.com/extensions/bluetoothPrivate#type-DiscoveryF
ilter |
| 98 */ |
| 99 chrome.bluetoothPrivate.DiscoveryFilter; |
| 100 |
| 101 /** |
| 102 * Changes the state of the Bluetooth adapter. |
| 103 * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState |
| 104 * @param {function():void=} callback |
| 105 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setAdapt
erState |
| 106 */ |
| 107 chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {}; |
| 108 |
| 109 /** |
| 110 * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options |
| 111 * @param {function():void=} callback |
| 112 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setPairi
ngResponse |
| 113 */ |
| 114 chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {}; |
| 115 |
| 116 /** |
| 117 * Tears down all connections to the given device. |
| 118 * @param {string} deviceAddress |
| 119 * @param {function():void=} callback |
| 120 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-disconne
ctAll |
| 121 */ |
| 122 chrome.bluetoothPrivate.disconnectAll = function(deviceAddress, callback) {}; |
| 123 |
| 124 /** |
| 125 * Set or clear discovery filter. |
| 126 * @param {!chrome.bluetoothPrivate.DiscoveryFilter} discoveryFilter |
| 127 * @param {function():void=} callback |
| 128 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-setDisco
veryFilter |
| 129 */ |
| 130 chrome.bluetoothPrivate.setDiscoveryFilter = function(discoveryFilter, callback)
{}; |
| 131 |
| 132 /** |
| 133 * Pairs the given device. |
| 134 * @param {string} deviceAddress |
| 135 * @param {function():void=} callback |
| 136 * @see https://developer.chrome.com/extensions/bluetoothPrivate#method-pair |
| 137 */ |
| 138 chrome.bluetoothPrivate.pair = function(deviceAddress, callback) {}; |
| 139 |
| 140 /** |
| 141 * Fired when a pairing event occurs. |
| 142 * @type {!ChromeEvent} |
| 143 * @see https://developer.chrome.com/extensions/bluetoothPrivate#event-onPairing |
| 144 */ |
| 145 chrome.bluetoothPrivate.onPairing; |
OLD | NEW |