Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Public Member Functions | |
std::string | toString () const override |
~JNIAdapterStatusListener () override | |
JNIAdapterStatusListener (JNIEnv *env, BTAdapter *adapter, jclass listenerClazz, jobject statusListenerObj, jmethodID statusListenerNotifyDeleted, const BTDevice *_deviceMatchRef) | |
bool | matchDevice (const BTDevice &device) override |
Custom filter for all 'device*' notification methods, which will not be called if this method returns false. More... | |
void | adapterSettingsChanged (BTAdapter &a, const AdapterSetting oldmask, const AdapterSetting newmask, const AdapterSetting changedmask, const uint64_t timestamp) override |
BTAdapter setting(s) changed. More... | |
void | discoveringChanged (BTAdapter &a, const ScanType currentMeta, const ScanType changedType, const bool changedEnabled, const bool keepAlive, const uint64_t timestamp) override |
BTAdapter's discovery state has changed, i.e. More... | |
bool | deviceFound (std::shared_ptr< BTDevice > device, const uint64_t timestamp) override |
A BTDevice has been newly discovered. More... | |
void | deviceUpdated (std::shared_ptr< BTDevice > device, const EIRDataType updateMask, const uint64_t timestamp) override |
An already discovered BTDevice has been updated. More... | |
void | deviceConnected (std::shared_ptr< BTDevice > device, const uint16_t handle, const uint64_t timestamp) override |
BTDevice got connected. More... | |
void | devicePairingState (std::shared_ptr< BTDevice > device, const SMPPairingState state, const PairingMode mode, const uint64_t timestamp) override |
An already connected BTDevice's ::SMPPairingState has changed. More... | |
void | deviceReady (std::shared_ptr< BTDevice > device, const uint64_t timestamp) override |
BTDevice is ready for user (GATT) processing, i.e. More... | |
void | deviceDisconnected (std::shared_ptr< BTDevice > device, const HCIStatusCode reason, const uint16_t handle, const uint64_t timestamp) override |
BTDevice got disconnected. More... | |
Public Member Functions inherited from direct_bt::AdapterStatusListener | |
virtual | ~AdapterStatusListener () |
virtual bool | operator== (const AdapterStatusListener &rhs) const |
Default comparison operator, merely testing for same memory reference. More... | |
bool | operator!= (const AdapterStatusListener &rhs) const |
Definition at line 62 of file DBTAdapter.cxx.
|
inlineoverride |
Definition at line 122 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
BTAdapter setting(s) changed.
adapter | the adapter which settings have changed. |
oldmask | the previous settings mask. AdapterSetting::NONE indicates the initial setting notification, see BTAdapter::addStatusListener(). |
newmask | the new settings mask |
changedmask | the changes settings mask. AdapterSetting::NONE indicates the initial setting notification, see BTAdapter::addStatusListener(). |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 311 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
BTDevice got connected.
device | the device which has been connected, holding the new connection handle. |
handle | the new connection handle, which has been assigned to the device already |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 414 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
BTDevice got disconnected.
device | the device which has been disconnected with zeroed connection handle. |
reason | the HCIStatusCode reason for disconnection |
handle | the disconnected connection handle, which has been unassigned from the device already |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 471 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
A BTDevice has been newly discovered.
The boolean return value informs the adapter whether the device shall be made persistent for connection true
, or that it can be discarded false
.
If no registered AdapterStatusListener::deviceFound() implementation returns true
, the device instance will be removed from all internal lists and can no longer being used.
If any registered AdapterStatusListener::deviceFound() implementation returns true
, the device will be made persistent, is ready to connect and BTDevice::remove() shall be called after usage.
device | the found device |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 379 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
An already connected BTDevice's ::SMPPairingState has changed.
device | the device which PairingMode has been changed. |
state | the current ::SMPPairingState of the connected device, see BTDevice::getCurrentPairingState() |
mode | the current ::PairingMode of the connected device, see BTDevice::getCurrentPairingMode() |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 435 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
BTDevice is ready for user (GATT) processing, i.e.
already connected, optionally paired and ATT MTU size negotiated via connected GATT.
Method is being called from a dedicated native thread, hence restrictions on method duration and complex mutable operations don't apply here.
device | the device ready to use |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 457 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
An already discovered BTDevice has been updated.
device | the updated device |
updateMask | the update mask of changed data |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 396 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
BTAdapter's discovery state has changed, i.e.
enabled or disabled.
adapter | the adapter which discovering state has changed. |
currentMeta | the current meta ScanType |
changedType | denotes the changed ScanType |
changedEnabled | denotes whether the changed ScanType has been enabled or disabled |
keepAlive | if true , the denoted changed ScanType will be re-enabled if disabled by the underlying Bluetooth implementation. |
timestamp | the time in monotonic milliseconds when this event occurred. See BasicTypes::getCurrentMilliseconds(). |
changeScanType(const ScanType current, const bool enable, const ScanType enableChanged) noexcept {
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 335 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
Custom filter for all 'device*' notification methods, which will not be called if this method returns false.
User may override this method to test whether the 'device*' methods shall be called for the given device.
Defaults to true;
Reimplemented from direct_bt::AdapterStatusListener.
Definition at line 304 of file DBTAdapter.cxx.
|
inlineoverridevirtual |
Implements direct_bt::AdapterStatusListener.
Definition at line 117 of file DBTAdapter.cxx.