summaryrefslogtreecommitdiffstats
path: root/api/direct_bt/BTGattCmd.hpp
Commit message (Collapse)AuthorAgeFilesLines
* clang-tidy: cover modernize-pass-by-value, handle modernize-use-equals-deleteSven Gothel2022-11-271-8/+8
|
* clang-tidy fixes part-1Sven Gothel2022-11-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Details - Use 'size_type' instead of 'int', propagate same 'size_type' into 'darray' etc. - Use 'std::make_shared', 'std::make_unique' - Use range-based for loops - Remove redundant 'virtual', use 'override' in derived classes - Use 'nullptr' - Use default impl for dtor, ctor (incomplete) - Use copy and std::move (incomplete) - Explcitly catch std::bad_alloc in 'new' in 'noexcept' -> 'abort' - 'abort' was issued implicitly in noexcept methods - L2CAPServer, L2CAPClient, NopGattServerHandler, DBGattServerHandler, FwdGattServerHandler - Use local close_impl(), usable in virtual destructor - L2CAPClient::read, HCIComm::read - preset 'poll' result 'n', avoid garbage comparison - BTAdapter::enableListening - loop through addMgmtEventCallback() result - JNI code - explicit size_type is cast to jsize or jint w/o check - unchanged semantics
* Adding C++ module/groups to separate the C++ API levels for the user; Adding ↵v2.7.1Sven Gothel2022-05-221-0/+8
| | | | reference to perihperal-server mode to overview.
* JNI Lifecycle Fix: BTGattCharListener: Adopt full Java/Native link via ↵Sven Gothel2022-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | DBTNativeDownlink and JavaUplink like AdapterStatusListener change, clean listener API + impl. AdapterStatusListener adopted fully linked via DBTNativeDownlink (java->native) and JavaUplink (native->java). This allows intrinsic lifecycle management. Native destruction leads to its reference removal from the java object and destruction of the java object removes its reference from the native object. Both reference removals may lead to their destruction if reaching zero. (was commit 9c5f25ccd1637728d6e79592279e4b38ecd32f59) Same applies to BTGattCharListener: - This removed BTGattChar::Listener, simply use BTGattCharListener - Using private BTGattHandler::GattCharListenerPair struct for BTGattChar mapping - No more manual or exposed BTGattChar mapping - Java: An added BTGattCharListener instance can be used for removal now, no more wrapper object magic returned. Further: - moved removed `namespace impl`, moved StatusListenerPair into private BTAdapter - have all add/remove*Listener methods noexcept Unit tests validating BTGattCharListener add and remove.
* Adopt to JavaUplink::checkValidInstance(): ↵Sven Gothel2022-05-051-1/+1
| | | | BTObject::{isValid()->isValidInstance()} for clarity; BTAdapter adds `adapter_operational` flag for its own isValid()
* Bump jaulib v0.9.1 and adopt to fraction changes, use wait_until() w/ ↵Sven Gothel2022-05-011-2/+3
| | | | out-of-loop absolute timeout_time, avoiding deadlocks
* BTGattCmd: Refine API docSven Gothel2021-11-081-3/+5
|
* Add BTGattCmd (C++/Java): Conveniently maps a GATT command and optionally ↵Sven Gothel2021-11-081-0/+284
its asynchronous response to a synchronous atomic operation Examples, see dbt_scanner10 and DBTScanner10