Liking cljdoc? Tell your friends :D

chromex.ext.bluetooth

clj

Use the chrome.bluetooth API to connect to a Bluetooth device. All functions report failures via chrome.runtime.lastError.

Use the chrome.bluetooth API to connect to a Bluetooth
device. All functions report failures via chrome.runtime.lastError.

  * available since Chrome 30
  * https://developer.chrome.com/extensions/bluetooth
raw docstring

api-tableclj

source

gen-callclj

source

gen-wrapclj/smacro

(gen-wrap kind item-id config & args)
source

get-adapter-stateclj/smacro

(get-adapter-state)

Get information about the Bluetooth 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 [adapter-info] where:

|adapter-info| - Object containing the adapter information.

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.

https://developer.chrome.com/extensions/bluetooth#method-getAdapterState.

Get information about the Bluetooth 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 [adapter-info] where:

  |adapter-info| - Object containing the adapter information.

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.

https://developer.chrome.com/extensions/bluetooth#method-getAdapterState.
sourceraw docstring

get-adapter-state*cljs

(get-adapter-state* config)
source

get-deviceclj/smacro

(get-device device-address)

Get information about a Bluetooth device known to the system.

|device-address| - Address of device to get.

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 [device-info] where:

|device-info| - Object containing the device information.

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.

https://developer.chrome.com/extensions/bluetooth#method-getDevice.

Get information about a Bluetooth device known to the system.

  |device-address| - Address of device to get.

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 [device-info] where:

  |device-info| - Object containing the device information.

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.

https://developer.chrome.com/extensions/bluetooth#method-getDevice.
sourceraw docstring

get-device*cljs

(get-device* config device-address)
source

get-devicesclj/smacro

(get-devices)
(get-devices filter)

Get a list of Bluetooth devices known to the system, including paired and recently discovered devices.

|filter| - Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {}, returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for other platforms, a full list is returned.

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 [device-infos] where:

|device-infos| - Array of object containing device information.

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.

https://developer.chrome.com/extensions/bluetooth#method-getDevices.

Get a list of Bluetooth devices known to the system, including paired and recently discovered devices.

  |filter| - Some criteria to filter the list of returned bluetooth devices. If the filter is not set or set to {},
             returned device list will contain all bluetooth devices. Right now this is only supported in ChromeOS, for
             other platforms, a full list is returned.

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 [device-infos] where:

  |device-infos| - Array of object containing device information.

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.

https://developer.chrome.com/extensions/bluetooth#method-getDevices.
sourceraw docstring

get-devices*cljs

(get-devices* config filter)
source

on-adapter-state-changed*cljs

(on-adapter-state-changed* config channel & args)
source

on-device-added*cljs

(on-device-added* config channel & args)
source

on-device-changed*cljs

(on-device-changed* config channel & args)
source

on-device-removed*cljs

(on-device-removed* config channel & args)
source

start-discoveryclj/smacro

(start-discovery)

Start discovery. Newly discovered devices will be returned via the onDeviceAdded event. Previously discovered devices already known to the adapter must be obtained using getDevices and will only be updated using the |onDeviceChanged| event if information about them changes.Discovery will fail to start if this application has already called startDiscovery. Discovery can be resource intensive: stopDiscovery should be called as soon as possible.

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.

https://developer.chrome.com/extensions/bluetooth#method-startDiscovery.

Start discovery. Newly discovered devices will be returned via the onDeviceAdded event. Previously discovered devices
already known to the adapter must be obtained using getDevices and will only be updated using the |onDeviceChanged| event
if information about them changes.Discovery will fail to start if this application has already called startDiscovery.
Discovery can be resource intensive: stopDiscovery should be called as soon as possible.

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.

https://developer.chrome.com/extensions/bluetooth#method-startDiscovery.
sourceraw docstring

start-discovery*cljs

(start-discovery* config)
source

stop-discoveryclj/smacro

(stop-discovery)

Stop discovery.

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.

https://developer.chrome.com/extensions/bluetooth#method-stopDiscovery.

Stop discovery.

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.

https://developer.chrome.com/extensions/bluetooth#method-stopDiscovery.
sourceraw docstring

stop-discovery*cljs

(stop-discovery* config)
source

tap-all-eventsclj/smacro

(tap-all-events chan)

Taps all valid non-deprecated events in chromex.ext.bluetooth namespace.

Taps all valid non-deprecated events in chromex.ext.bluetooth namespace.
sourceraw docstring

tap-on-adapter-state-changed-eventsclj/smacro

(tap-on-adapter-state-changed-events channel & args)

Fired when the state of the Bluetooth adapter changes.

Events will be put on the |channel| with signature [::on-adapter-state-changed [state]] where:

|state| - The new state of the adapter.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onAdapterStateChanged.

Fired when the state of the Bluetooth adapter changes.

Events will be put on the |channel| with signature [::on-adapter-state-changed [state]] where:

  |state| - The new state of the adapter.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onAdapterStateChanged.
sourceraw docstring

tap-on-device-added-eventsclj/smacro

(tap-on-device-added-events channel & args)

Fired when information about a new Bluetooth device is available.

Events will be put on the |channel| with signature [::on-device-added [device]] where:

|device| - https://developer.chrome.com/extensions/bluetooth#property-onDeviceAdded-device.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onDeviceAdded.

Fired when information about a new Bluetooth device is available.

Events will be put on the |channel| with signature [::on-device-added [device]] where:

  |device| - https://developer.chrome.com/extensions/bluetooth#property-onDeviceAdded-device.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onDeviceAdded.
sourceraw docstring

tap-on-device-changed-eventsclj/smacro

(tap-on-device-changed-events channel & args)

Fired when information about a known Bluetooth device has changed.

Events will be put on the |channel| with signature [::on-device-changed [device]] where:

|device| - https://developer.chrome.com/extensions/bluetooth#property-onDeviceChanged-device.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onDeviceChanged.

Fired when information about a known Bluetooth device has changed.

Events will be put on the |channel| with signature [::on-device-changed [device]] where:

  |device| - https://developer.chrome.com/extensions/bluetooth#property-onDeviceChanged-device.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onDeviceChanged.
sourceraw docstring

tap-on-device-removed-eventsclj/smacro

(tap-on-device-removed-events channel & args)

Fired when a Bluetooth device that was previously discovered has been out of range for long enough to be considered unavailable again, and when a paired device is removed.

Events will be put on the |channel| with signature [::on-device-removed [device]] where:

|device| - https://developer.chrome.com/extensions/bluetooth#property-onDeviceRemoved-device.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onDeviceRemoved.

Fired when a Bluetooth device that was previously discovered has been out of range for long enough to be considered
unavailable again, and when a paired device is removed.

Events will be put on the |channel| with signature [::on-device-removed [device]] where:

  |device| - https://developer.chrome.com/extensions/bluetooth#property-onDeviceRemoved-device.

Note: |args| will be passed as additional parameters into Chrome event's .addListener call.

https://developer.chrome.com/extensions/bluetooth#event-onDeviceRemoved.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close