Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
A thread safe singleton handler of the BTAdapter manager, e.g. More...
Classes | |
interface | ChangedAdapterSetListener |
Event listener to receive change events regarding the system's BTAdapter set, e.g. More... | |
Public Member Functions | |
void | addChangedAdapterSetListener (final ChangedAdapterSetListener l) |
Add the given ChangedAdapterSetListener to this manager. More... | |
BTAdapter | getAdapter (final int dev_id) |
Returns the BluetoothAdapter matching the given dev_id or null if not found. More... | |
List< BTAdapter > | getAdapters () |
Returns a list of BluetoothAdapters available in the system. More... | |
BTAdapter | getDefaultAdapter () |
Gets the default adapter to use for discovery. More... | |
int | removeAllChangedAdapterSetListener () |
Remove all added ChangedAdapterSetListener entries from this manager. More... | |
int | removeChangedAdapterSetListener (final ChangedAdapterSetListener l) |
Remove the given ChangedAdapterSetListener from this manager. More... | |
boolean | setDefaultAdapter (BTAdapter adapter) |
Sets a default adapter to use for discovery. More... | |
void | shutdown () |
Release the native memory associated with this object and all related Bluetooth resources. More... | |
A thread safe singleton handler of the BTAdapter manager, e.g.
Linux Kernel's BlueZ manager control channel.
Definition at line 35 of file BTManager.java.
List< BTAdapter > org.direct_bt.BTManager.getAdapters | ( | ) |
Returns a list of BluetoothAdapters available in the system.
Implemented in jau.direct_bt.DBTManager.
BTAdapter org.direct_bt.BTManager.getAdapter | ( | final int | dev_id | ) |
Returns the BluetoothAdapter matching the given dev_id or null if not found.
The adapters internal device id is constant across the adapter lifecycle, but may change after its destruction.
dev_id | the internal temporary adapter device id |
Implemented in jau.direct_bt.DBTManager.
boolean org.direct_bt.BTManager.setDefaultAdapter | ( | BTAdapter | adapter | ) |
Sets a default adapter to use for discovery.
Implemented in jau.direct_bt.DBTManager.
BTAdapter org.direct_bt.BTManager.getDefaultAdapter | ( | ) |
Gets the default adapter to use for discovery.
The default adapter is either the first powered
BTAdapter
, or function returns nullptr if none is enabled.
Implemented in jau.direct_bt.DBTManager.
void org.direct_bt.BTManager.addChangedAdapterSetListener | ( | final ChangedAdapterSetListener | l | ) |
Add the given ChangedAdapterSetListener
to this manager.
When a new callback is added, all available adapter's will be reported as added, this allows a fully event driven workflow.
The callback is performed on a dedicated thread, allowing the user to perform complex operations.
Implemented in jau.direct_bt.DBTManager.
int org.direct_bt.BTManager.removeChangedAdapterSetListener | ( | final ChangedAdapterSetListener | l | ) |
Remove the given ChangedAdapterSetListener
from this manager.
l | the to be removed element |
Implemented in jau.direct_bt.DBTManager.
int org.direct_bt.BTManager.removeAllChangedAdapterSetListener | ( | ) |
Remove all added ChangedAdapterSetListener
entries from this manager.
Implemented in jau.direct_bt.DBTManager.
void org.direct_bt.BTManager.shutdown | ( | ) |
Release the native memory associated with this object and all related Bluetooth resources.
The object should not be used following a call to close
Shutdown method is intended to allow a clean Bluetooth state at program exist.
Implemented in jau.direct_bt.DBTManager.