summaryrefslogtreecommitdiffstats
path: root/java/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Use jaulib's BasicTypes, PrintUtil and Clock, drop duplicates in BTUtilSven Gothel2022-07-081-0/+2
|
* Moved EUI48, EUI48Sub (C++/Java) and uuid_t, *Octets (C++) to jaulib for ↵Sven Gothel2021-09-181-0/+3
| | | | | | | | | general use. Notable, the java classes EUI48, EUI48Sub and BasicTypes are included in direct_bt's jar file to avoid any inconvenience. Hence BTUtils's byte[s]HexString(..) simply uses jaulib's BasicTypes s' implementation.
* Direct-BT: Remove TinyB and Cleanup Java API (1)Sven Gothel2021-08-311-3/+0
| | | | | | | | | | | | | | | | | | Starting with version 2.3, the previously refactored *TinyB* has been removed completely. Motivation was lack of detailed Bluetooth support, inclusive increasing diversion with *Direct-BT*. Furthermore, work is underway for `BLE slave periphal and GATT server` support and its mapping to *BlueZ D-Bus* is questionable and would be resource intensive. Java API changed as follows: - Objects no more Clonable - Removed dead unsupported code - Removed deprecated code - Added 'GattCharPropertySet', representing property bit mask for BTGattChar, replacing the string array.
* Complete build change: Using jaulib[_fat] if available (for Java) incl. ↵Sven Gothel2021-01-251-1/+7
| | | | native lib loading. Added junit test facility (Java).
* Use new jaulib/JaulibSetup.cmake (Unified Setup); RELEASE: Strip native libs ↵Sven Gothel2021-01-251-12/+0
| | | | and drop javac debug info (Current jaulib default)
* Java: New Layout: [tinyb2 -> direct_bt].jar ; org.[tinyb -> direct_bt] ..; ↵Sven Gothel2021-01-251-7/+7
| | | | Upcoming API Cleanup (Drop TinyB only entries)
* Cleanup warningsSven Gothel2020-10-161-0/+1
|
* Only generate JNI headers when Java sources have been modified, i.e. when ↵Sven Gothel2020-09-151-9/+21
| | | | | | | | | | | | | Jar file is being build. JNI header generation is satisfied by 'add_jar(.. GENERATE_NATIVE_HEADERS <target> DESTINATION <dir>)', note that its GENERATE_NATIVE_HEADERS target is a dummy target, since jni/direct_bt defines target javadirect_bt. Weakness of not directly checking build dependency of javadirect_bt against generated headers exists, however, it is unrealistic to assume that the transient generated JNI header will be edited manually within the process. Therefor we can use the dummy target javadirect_bt_javah and JNI header generation will only occur when java sources have been modified, i.e. the jar file being actually build.
* cmake: Add variable/define 'SKIP_TINYB': Allow to not build the tinyb native ↵Sven Gothel2020-08-251-1/+4
| | | | | | library. Building the native lib on slow systems becomes a burden, hence skip if not required.
* Initial working Java binding for the direct_bt C++ moduleSven Gothel2020-04-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* java: CMakeLists.txt replace depricated javah with javac -htinybXerxes Rånby2020-02-171-37/+1
| | | | | | javac -h generates jni headers by directly parsing java source files This enable java compilation using OpenJDK 10 and later
* C++ tinyb_hci: Working HCIScanner showing AD packets, demonstrating new HCI ↵Sven Gothel2020-02-151-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | classes See scripts/build-x86_64.sh and README.md for build instructions. See scripts/run-hci_scanner.sh to start new HCI scanner (C++). New HCI C++ implementation redised in libtinyb_hci.so w/o GLIB/DBus dependencies, but 'libbluetooth.so' dependency. Following Class datastructures are complete: - HCIUtil: Exception types, uint128_t and endian conversions - General UUID interface and its efficient UUID16, UUID32 + UUID128 implementation. Conversion 'toString', respecting endianess, and UUID* -> UUID128 conversion. Requird member comparison operations due to using interface - HCIAdapter with its opened HCISession, as well as its discovered HCIDevices - HCIAdapter discover includes multiple advertising AD records, up to 25 according to the spec. - HCIAdapter parses full AD segment. TODO: Handle few more AD types API/Impl Details: - Datastructures utilize 'vector<shares_ptr<T>>' collections. - Most attributes are specified 'const' -> immutable for efficancy - Convenient collection access member operations - etc .. RESULTS: - Fast AD scanning of multiple devices w/ UUID and RSSI - Proper integration into tinyb project TODO: - Handle few more AD types - Test multiple parallel HCISession from HCIAdapter - HCIAdapter.connect() - Represent GATT Service, Characteristics and Description - Catch up with the Java binding step by step
* java jni: Split helper to helper_base + helper_tinyb (modularization)Sven Gothel2020-02-091-0/+1
| | | | | | | C++ tinyb namespace is for the original D-Bus implementation, hence providing the base helper explicitly. Add static BluetoothFactory.getNativeAPIVersion().
* Java Refactory: Expose intefaces via org.tinyb.* and D-Bus implementation ↵Sven Gothel2020-02-091-15/+23
| | | | | | | | | | | | | | | | | | | | via tinyb.dbus.* Allows alternative interface implementations and delegated wrapper implementations for debug and tracing. Original D-Bus implementation can be retrieved via: 'BluetoothManager org.tinyb.BluetoothFactory.getDBusBluetoothManager()' A HCI native implementation will follow up w/o use of D-Bus. Otherwise the Java API is unchanged and this tinyb can replace previous implementation. Due to the major API change (despite interface is unchanged but BluetoothManager instantiation) the jar file has been renamed from 'tinyb.jar' to 'tinyb2.jar'. Same goes with the version number, which will be set to 'v2.0.0'. The native library and class definition is kept unchanged using the original names so far.
* c++, java: Add BluetoothException, throw it on DBus or BlueZ errorPetre Eftime2016-05-231-0/+1
| | | | Signed-off-by: Petre Eftime <[email protected]>
* java: Fix Cmake install path for jarPetre Eftime2016-05-191-1/+1
| | | | Signed-off-by: Petre Eftime <[email protected]>
* java: cmake created wrong path for symlink when VERSION was specified, fixed ↵Petre Eftime2016-05-171-2/+1
| | | | | | install path Signed-off-by: Petre Eftime <[email protected]>
* Add additional version information, including in jar manifestPetre Eftime2016-05-041-2/+4
| | | | Signed-off-by: Petre Eftime <[email protected]>
* java: Fix direct reference to cmake commandPetre Eftime2016-05-031-1/+1
| | | | Signed-off-by: Petre Eftime <[email protected]>
* java: Added install commands for generated binariesAndrei Vasiliu2016-02-031-0/+2
| | | | Signed-off-by: Andrei Vasiliu <[email protected]>
* java: Created Java package tinybAndrei Vasiliu2016-01-251-12/+12
| | | | Signed-off-by: Andrei Vasiliu <[email protected]>
* Java: Added cmake to Java bindings and deleted JNI header filesAndrei Vasiliu2016-01-121-0/+45
Cmake also generates JNI header files, therefore they are no longer required to be in the repo. Signed-off-by: Andrei Vasiliu <[email protected]>