| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See also jaulib commit 9160f9a4b74f5e5ae07f715025ea4d3aafdf6ab3
Details:
- Using 'const T&' as method argument type where applicable, i.e. not when required to pass value off-thread.
- Notable: Can also hold a default value!
- Using `const T&` in range-loop where applicable
- Drop std::move for trivial types
- ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
redundant and unrelated BTGattDesc::Type
|
|
|
|
| |
part of the value
|
|
|
|
| |
standing bit and equality operations
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
cleanup & reduce string representation.
Inspired by fix of BTGattHandler::discoverCharacteristics(..),
where we actually have passed the char-handle but service-handle was required (bug).
Dropping service_handle altogether, hence.
|
|
|
|
|
|
|
|
|
|
|
|
| |
derivations require a RTTI alike typeid to cast and compare.
We utilize jau::type_name_cue for this task,
providing simple access and provision of a typename string representation
at compile time like RTTI.
Note: We don't require RTTI to be included.
The jau::type_name_cue idea is inspired by clang's (???) previous fast RTTI replacement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BTGattChar::disableIndicationNotification(); On the Java ..
On the Java side the implementation had to be a little different.
The wrapping BTGattCharListener from addCharListener() can't be repeated as it holds the
native instance handle.
Here addCharListener() needs to return the wrapping BTGattCharListener object,
which the user shall reference if intending a later BTGattChar::removeCharListener().
This avoid maintaining a map(BTGattChar::Listener -> BTGattCharListener )
and hence the user takes the costs if desired only.
|
|
|
|
| |
Java/C++
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BTGattChar::Listener and have implementation handle the BTGattChar association match for notifications
Turns out previous API and code moved the burden to user to only have the calling BTGattChar object to be matched,
which is not only not intuitive, but also a potential source of issues.
Now we provide a naive interface BTGattChar::Listener to be passed
and BTGattChar::addCharListener(..) wraps its instance in a BTGattCharListener to be delegated.
BTGattChar::removeCharListener(..) has been removed due to high implementation
burden on the Java side. This shall not cause harm to the user, as it isn't useful in a user application.
BTGattChar::removeAllAssociatedCharListener(..) is available on the C++ and Java side,
i.e. fixed API in C++ where we had BTGattChar::removeAllCharListener(..).
Tested and demonstrated in dbt_scanner10.cpp and DBTScanner10.java, as usual.
Both examples also print the service, characteristic and declaration in a more readable fashion.
|
|
|
|
| |
explicitly declare enum class name
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
direct_bt::to_string() Patch [2/2]
This goes along with jaulib's 'hex and decimal string conversion'.
API schema for to string conversion:
1 - free function: to_string(type)
2 - main member function: toString()
3 - sub-type member function: getTypeString(Type)
3 avoid overload collision w/ potential virtual toString() method.
Additional, 1 is provided for 3 as well
|
|
|
|
| |
refactoring with Eclipse
|
|
Char] etc (align naming with direct_bt == java; reduce java code footprint and too long code lines)
|