| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
setObjectRef<T>(..)
Generic getField(..) allows convenient fetching of object fields.
getObjectRef<T>(..) and setObjectRef<T>(..) allows get/set of jlong references
of any user type pointer (reference).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Utilize new EIRDataType in BluetoothDeviceStatusListener
- DBTAdapter: Add null checks for java callbacks
- JNI: Adapt to EIRDataType on deviceUpdated.
- DBTManager: Implement getAdapterListImpl(), supporting multiple adapter.
JNI Implementation uses proper lambda for java-object ctor
and fixed 'convert_vector_to_jobject'.
- JNI: Fix 'convert_vector_to_jobject' using vector<unique_ptr<..>>
as we cannot escape from a shared_ptr, i.e. no release() of ownership.
- Working ScannerTinyB01 (discovery + connect using multiple adapter)
|
|
|
|
| |
InternalError for exceptions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++/JNI exception handling
- HCISession: Handle multiple connections
- DBTDevice holds le_conn_handle and provides the le_disconnect as well
- HCISession maintains a vector of connected devices
- HCISession/DBTAdapter: Cleanup shutdown and refine lifecycle
- DBTDevice/DBTAdapter: Drop explicit HCISession argument,
simply use the attached HCISession of DBTAdapter.
- Refine API doc in general
+++
- Device Java/JNI: Add a few more methods to test connect/disconnect.
+++
Refine C++ and C++/JNI exception handling:
- Use new java_exception_check_and_throw(..):
Throw C++ exception on pending Java exception, retrieving toString() message.
- Use new java_exception_check(..):
Return immediately from JNI on pending Java exception.
- Replace macro CATCH_EXCEPTION_AND_RAISE_JAVA(..)
with new rethrow_and_raise_java_exception(..), re-trhowing exception
and raising detailed Java exception.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example ScannerTinyB01 demonstrates efficient scanning devices using the new BluetoothDeviceDiscoveryListener interface.
The C++ HCIObject extends JavaUplink, which handles the java object references
via 'std::shared_ptr<JavaAnonObj>', where JavaAnonObj relies on later polymorph specialization.
JavaAnonObj gets derived in the java/jni of direct_bt, where the JNI header + libraries are available.
+++
The java inplementing NativeDownlink implementations
store the nativeInstance to the C++ instances
as well as handle their java references within the native instances.
The C++ JavaUplink and Java NativeDownlink interfaces are complete
the cross referencing java <-> native.
+++
Native libraries are now split into pairs:
- tinyb + javatinyb
- direct_bt + javadirect_bt
TODO: BluetoothFactory must chose the proper bundle!
+++
The Java Adapter received a BluetoothDeviceDiscoveryListener hook,
matching C++ Adapter's HCIDeviceDiscoveryListener.
Since the Java Adapter implements its own discovery thread,
using the BluetoothDeviceDiscoveryListener is more efficient then polling
over a list of Devices fetched.
++++
TODO: Align Java and C++ class names, foremost in the C++ direct_bt space.
TODO: Bind the whole C++ GATT functionality
More testing.
|
|
C++ tinyb namespace is for the original D-Bus implementation,
hence providing the base helper explicitly.
Add static BluetoothFactory.getNativeAPIVersion().
|