Use the chrome.bluetoothPrivate API to control the Bluetooth adapter state and handle device pairing. NOTE: This IDL is dependent on bluetooth.idl.
Use the chrome.bluetoothPrivate API to control the Bluetooth adapter state and handle device pairing. NOTE: This IDL is dependent on bluetooth.idl. * available since Chrome 36
(connect device-address)
Connects to the given device. This will only throw an error if the device address is invalid or the device is already connected. Otherwise this will succeed and invoke |callback| with ConnectResultType.
|device-address| - ?
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [result] where:
|result| - ?
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Connects to the given device. This will only throw an error if the device address is invalid or the device is already connected. Otherwise this will succeed and invoke |callback| with ConnectResultType. |device-address| - ? This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [result] where: |result| - ? In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(disconnect-all device-address)
Tears down all connections to the given device.
|device-address| - ?
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Tears down all connections to the given device. |device-address| - ? This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(forget-device device-address)
Forgets the given device.
|device-address| - ?
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Forgets the given device. |device-address| - ? This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(pair device-address)
Pairs the given device.
|device-address| - ?
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Pairs the given device. |device-address| - ? This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(record-device-selection selection-duration-ms was-paired transport)
Record that a user selected a device to connect to.
|selection-duration-ms| - ? |was-paired| - ? |transport| - ?
Record that a user selected a device to connect to. |selection-duration-ms| - ? |was-paired| - ? |transport| - ?
(record-device-selection* config selection-duration-ms was-paired transport)
(record-pairing transport pairing-duration-ms)
(record-pairing transport pairing-duration-ms result)
Record that a pairing attempt finished. Ignores cancellations.
|transport| - ? |pairing-duration-ms| - ? |result| - ?
Record that a pairing attempt finished. Ignores cancellations. |transport| - ? |pairing-duration-ms| - ? |result| - ?
(record-reconnection)
(record-reconnection result)
Record that a user-initiated reconnection attempt to an already paired device finished. Ignores cancellations.
|result| - ?
Record that a user-initiated reconnection attempt to an already paired device finished. Ignores cancellations. |result| - ?
(set-adapter-state adapter-state)
Changes the state of the Bluetooth adapter.
|adapter-state| - The new state of the adapter.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Changes the state of the Bluetooth adapter. |adapter-state| - The new state of the adapter. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(set-discovery-filter discovery-filter)
Set or clear discovery filter.
|discovery-filter| - ?
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
Set or clear discovery filter. |discovery-filter| - ? This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(set-pairing-response options)
|options| - ?
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
|options| - ? This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is []. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.bluetooth-private namespace.
Taps all valid non-deprecated events in chromex.app.bluetooth-private namespace.
(tap-on-device-address-changed-events channel & args)
Fired when a Bluetooth device changed its address.
Events will be put on the |channel| with signature [::on-device-address-changed [device old-address]] where:
|device| - ? |old-address| - ?
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
Fired when a Bluetooth device changed its address. Events will be put on the |channel| with signature [::on-device-address-changed [device old-address]] where: |device| - ? |old-address| - ? Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
(tap-on-pairing-events channel & args)
Fired when a pairing event occurs.
Events will be put on the |channel| with signature [::on-pairing [pairing-event]] where:
|pairing-event| - A pairing event.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
Fired when a pairing event occurs. Events will be put on the |channel| with signature [::on-pairing [pairing-event]] where: |pairing-event| - A pairing event. Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close