summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/java/Hellotinyb.java1
-rw-r--r--java/BluetoothAdapter.java2
-rw-r--r--java/BluetoothCallback.java2
-rw-r--r--java/BluetoothDevice.java2
-rw-r--r--java/BluetoothEvent.java2
-rw-r--r--java/BluetoothGattCharacteristic.java2
-rw-r--r--java/BluetoothGattDescriptor.java2
-rw-r--r--java/BluetoothGattService.java2
-rw-r--r--java/BluetoothManager.java2
-rw-r--r--java/BluetoothObject.java2
-rw-r--r--java/BluetoothType.java2
-rw-r--r--java/CMakeLists.txt24
-rw-r--r--java/ObjectArgCallback.java2
-rw-r--r--java/ObjectArrayArgCallback.java2
-rw-r--r--java/jni/BluetoothAdapter.cxx50
-rw-r--r--java/jni/BluetoothDevice.cxx58
-rw-r--r--java/jni/BluetoothEvent.cxx16
-rw-r--r--java/jni/BluetoothGattCharacteristic.cxx28
-rw-r--r--java/jni/BluetoothGattDescriptor.cxx18
-rw-r--r--java/jni/BluetoothGattService.cxx16
-rw-r--r--java/jni/BluetoothManager.cxx24
-rw-r--r--java/jni/BluetoothObject.cxx10
22 files changed, 147 insertions, 122 deletions
diff --git a/examples/java/Hellotinyb.java b/examples/java/Hellotinyb.java
index 755970e3..8c0b8b61 100644
--- a/examples/java/Hellotinyb.java
+++ b/examples/java/Hellotinyb.java
@@ -1,3 +1,4 @@
+import tinyb.*;
import java.util.*;
public class Hellotinyb {
diff --git a/java/BluetoothAdapter.java b/java/BluetoothAdapter.java
index 4d80d69c..8c23cb14 100644
--- a/java/BluetoothAdapter.java
+++ b/java/BluetoothAdapter.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
/**
diff --git a/java/BluetoothCallback.java b/java/BluetoothCallback.java
index c3f34486..0cbe0ed0 100644
--- a/java/BluetoothCallback.java
+++ b/java/BluetoothCallback.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
public abstract class BluetoothCallback implements Runnable
{
protected BluetoothObject bObj;
diff --git a/java/BluetoothDevice.java b/java/BluetoothDevice.java
index 20d54938..69480fb0 100644
--- a/java/BluetoothDevice.java
+++ b/java/BluetoothDevice.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
/**
diff --git a/java/BluetoothEvent.java b/java/BluetoothEvent.java
index 129159ec..b2141131 100644
--- a/java/BluetoothEvent.java
+++ b/java/BluetoothEvent.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
public class BluetoothEvent
diff --git a/java/BluetoothGattCharacteristic.java b/java/BluetoothGattCharacteristic.java
index fb91d452..de1ca368 100644
--- a/java/BluetoothGattCharacteristic.java
+++ b/java/BluetoothGattCharacteristic.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
/**
diff --git a/java/BluetoothGattDescriptor.java b/java/BluetoothGattDescriptor.java
index 35a18a3a..14522810 100644
--- a/java/BluetoothGattDescriptor.java
+++ b/java/BluetoothGattDescriptor.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
/**
diff --git a/java/BluetoothGattService.java b/java/BluetoothGattService.java
index 9ac4446a..cd806891 100644
--- a/java/BluetoothGattService.java
+++ b/java/BluetoothGattService.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
/**
diff --git a/java/BluetoothManager.java b/java/BluetoothManager.java
index 71f84016..4b137da0 100644
--- a/java/BluetoothManager.java
+++ b/java/BluetoothManager.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
public class BluetoothManager
diff --git a/java/BluetoothObject.java b/java/BluetoothObject.java
index 2914bb08..d4576810 100644
--- a/java/BluetoothObject.java
+++ b/java/BluetoothObject.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
import java.util.*;
public class BluetoothObject
diff --git a/java/BluetoothType.java b/java/BluetoothType.java
index a31b83c6..ac2fb02e 100644
--- a/java/BluetoothType.java
+++ b/java/BluetoothType.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
public enum BluetoothType
{
NONE, ADAPTER, DEVICE,
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 37fe0e0d..5ec798a0 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -21,18 +21,18 @@ add_jar(tinybjar ${JAVA_SOURCES}
OUTPUT_NAME tinyb
)
-set(JAVA_CLASSES BluetoothAdapter
- BluetoothCallback
- BluetoothDevice
- BluetoothEvent
- BluetoothGattCharacteristic
- BluetoothGattService
- BluetoothGattDescriptor
- BluetoothManager
- BluetoothObject
- BluetoothType
- ObjectArgCallback
- ObjectArrayArgCallback)
+set(JAVA_CLASSES tinyb.BluetoothAdapter
+ tinyb.BluetoothCallback
+ tinyb.BluetoothDevice
+ tinyb.BluetoothEvent
+ tinyb.BluetoothGattCharacteristic
+ tinyb.BluetoothGattService
+ tinyb.BluetoothGattDescriptor
+ tinyb.BluetoothManager
+ tinyb.BluetoothObject
+ tinyb.BluetoothType
+ tinyb.ObjectArgCallback
+ tinyb.ObjectArrayArgCallback)
add_custom_command (TARGET tinybjar
POST_BUILD
COMMAND cmake -E echo "Generating JNI headers.."
diff --git a/java/ObjectArgCallback.java b/java/ObjectArgCallback.java
index 797f862a..898c9cbc 100644
--- a/java/ObjectArgCallback.java
+++ b/java/ObjectArgCallback.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
public class ObjectArgCallback extends BluetoothCallback
{
private Object callbackArg;
diff --git a/java/ObjectArrayArgCallback.java b/java/ObjectArrayArgCallback.java
index 94bf25f1..b0d83410 100644
--- a/java/ObjectArrayArgCallback.java
+++ b/java/ObjectArrayArgCallback.java
@@ -22,6 +22,8 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+package tinyb;
+
public class ObjectArrayArgCallback extends BluetoothCallback
{
private Object[] callbackArg;
diff --git a/java/jni/BluetoothAdapter.cxx b/java/jni/BluetoothAdapter.cxx
index c049314c..1ac72773 100644
--- a/java/jni/BluetoothAdapter.cxx
+++ b/java/jni/BluetoothAdapter.cxx
@@ -26,39 +26,39 @@
#include "tinyb/BluetoothDevice.hpp"
#include "tinyb/BluetoothObject.hpp"
-#include "BluetoothAdapter.h"
+#include "tinyb_BluetoothAdapter.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothAdapter_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothAdapter_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "ADAPTER");
}
-jobject Java_BluetoothAdapter_clone(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothAdapter_clone(JNIEnv *env, jobject obj)
{
return generic_clone<BluetoothAdapter>(env, obj, "BluetoothAdapter");
}
-jboolean Java_BluetoothAdapter_startDiscovery(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothAdapter_startDiscovery(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return obj_adapter->start_discovery() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothAdapter_stopDiscovery(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothAdapter_stopDiscovery(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return obj_adapter->stop_discovery() ? JNI_TRUE : JNI_FALSE;
}
-jobject Java_BluetoothAdapter_getDevices(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothAdapter_getDevices(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
std::vector<std::unique_ptr<BluetoothDevice>> array = obj_adapter->get_devices();
@@ -69,7 +69,7 @@ jobject Java_BluetoothAdapter_getDevices(JNIEnv *env, jobject obj)
return result;
}
-jstring Java_BluetoothAdapter_getAddress(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothAdapter_getAddress(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
std::string address = obj_adapter->get_address();
@@ -77,7 +77,7 @@ jstring Java_BluetoothAdapter_getAddress(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)address.c_str());
}
-jstring Java_BluetoothAdapter_getName(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothAdapter_getName(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
std::string name = obj_adapter->get_name();
@@ -85,7 +85,7 @@ jstring Java_BluetoothAdapter_getName(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)name.c_str());
}
-jstring Java_BluetoothAdapter_getAlias(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothAdapter_getAlias(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
std::string alias = obj_adapter->get_alias();
@@ -93,7 +93,7 @@ jstring Java_BluetoothAdapter_getAlias(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)alias.c_str());
}
-void Java_BluetoothAdapter_setAlias(JNIEnv *env, jobject obj, jstring str)
+void Java_tinyb_BluetoothAdapter_setAlias(JNIEnv *env, jobject obj, jstring str)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
@@ -106,21 +106,21 @@ void Java_BluetoothAdapter_setAlias(JNIEnv *env, jobject obj, jstring str)
obj_adapter->set_alias(string_to_write);
}
-jlong Java_BluetoothAdapter_getBluetoothClass(JNIEnv *env, jobject obj)
+jlong Java_tinyb_BluetoothAdapter_getBluetoothClass(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return (jlong)obj_adapter->get_class();
}
-jboolean Java_BluetoothAdapter_getPowered(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothAdapter_getPowered(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return obj_adapter->get_powered() ? JNI_TRUE : JNI_FALSE;
}
-void Java_BluetoothAdapter_setPowered(JNIEnv *env, jobject obj, jboolean val)
+void Java_tinyb_BluetoothAdapter_setPowered(JNIEnv *env, jobject obj, jboolean val)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
@@ -128,14 +128,14 @@ void Java_BluetoothAdapter_setPowered(JNIEnv *env, jobject obj, jboolean val)
obj_adapter->set_powered(val_to_write);
}
-jboolean Java_BluetoothAdapter_getDiscoverable(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothAdapter_getDiscoverable(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return obj_adapter->get_discoverable() ? JNI_TRUE : JNI_FALSE;
}
-void Java_BluetoothAdapter_setDiscoverable(JNIEnv *env, jobject obj, jboolean val)
+void Java_tinyb_BluetoothAdapter_setDiscoverable(JNIEnv *env, jobject obj, jboolean val)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
@@ -143,14 +143,14 @@ void Java_BluetoothAdapter_setDiscoverable(JNIEnv *env, jobject obj, jboolean va
obj_adapter->set_discoverable(val_to_write);
}
-jlong Java_BluetoothAdapter_getDiscoverableTimeout(JNIEnv *env, jobject obj)
+jlong Java_tinyb_BluetoothAdapter_getDiscoverableTimeout(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return (jlong)obj_adapter->get_discoverable_timeout();
}
-void Java_BluetoothAdapter_setDiscoverableTimout(JNIEnv *env, jobject obj, jlong timeout)
+void Java_tinyb_BluetoothAdapter_setDiscoverableTimout(JNIEnv *env, jobject obj, jlong timeout)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
@@ -161,14 +161,14 @@ void Java_BluetoothAdapter_setDiscoverableTimout(JNIEnv *env, jobject obj, jlong
obj_adapter->set_discoverable_timeout((unsigned int)timeout);
}
-jboolean Java_BluetoothAdapter_getPairable(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothAdapter_getPairable(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return obj_adapter->get_pairable() ? JNI_TRUE : JNI_FALSE;
}
-void Java_BluetoothAdapter_setPairable(JNIEnv *env, jobject obj, jboolean val)
+void Java_tinyb_BluetoothAdapter_setPairable(JNIEnv *env, jobject obj, jboolean val)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
@@ -176,14 +176,14 @@ void Java_BluetoothAdapter_setPairable(JNIEnv *env, jobject obj, jboolean val)
obj_adapter->set_pairable(val_to_write);
}
-jlong Java_BluetoothAdapter_getPairableTimeout(JNIEnv *env, jobject obj)
+jlong Java_tinyb_BluetoothAdapter_getPairableTimeout(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return (jlong)obj_adapter->get_pairable_timeout();
}
-void Java_BluetoothAdapter_setPairableTimeout(JNIEnv *env, jobject obj, jlong timeout)
+void Java_tinyb_BluetoothAdapter_setPairableTimeout(JNIEnv *env, jobject obj, jlong timeout)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
@@ -194,14 +194,14 @@ void Java_BluetoothAdapter_setPairableTimeout(JNIEnv *env, jobject obj, jlong ti
obj_adapter->set_pairable_timeout((unsigned int)timeout);
}
-jboolean Java_BluetoothAdapter_getDiscovering(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothAdapter_getDiscovering(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
return obj_adapter->get_discovering() ? JNI_TRUE : JNI_FALSE;
}
-jobjectArray Java_BluetoothAdapter_getUuids(JNIEnv *env, jobject obj)
+jobjectArray Java_tinyb_BluetoothAdapter_getUuids(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
std::vector<std::string> uuids = obj_adapter->get_uuids();
@@ -220,7 +220,7 @@ jobjectArray Java_BluetoothAdapter_getUuids(JNIEnv *env, jobject obj)
return result;
}
-jstring Java_BluetoothAdapter_getModalias(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothAdapter_getModalias(JNIEnv *env, jobject obj)
{
BluetoothAdapter *obj_adapter = getInstance<BluetoothAdapter>(env, obj);
std::string modalias = obj_adapter->get_modalias();
@@ -228,7 +228,7 @@ jstring Java_BluetoothAdapter_getModalias(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)modalias.c_str());
}
-void Java_BluetoothAdapter_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothAdapter_delete(JNIEnv *env, jobject obj)
{
BluetoothAdapter *adapter = getInstance<BluetoothAdapter>(env, obj);
delete adapter;
diff --git a/java/jni/BluetoothDevice.cxx b/java/jni/BluetoothDevice.cxx
index 909d1bc3..9971c6ed 100644
--- a/java/jni/BluetoothDevice.cxx
+++ b/java/jni/BluetoothDevice.cxx
@@ -27,39 +27,39 @@
#include "tinyb/BluetoothGattService.hpp"
#include "tinyb/BluetoothObject.hpp"
-#include "BluetoothDevice.h"
+#include "tinyb_BluetoothDevice.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothAdapter_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothAdapter_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "DEVICE");
}
-jobject Java_BluetoothDevice_clone(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothDevice_clone(JNIEnv *env, jobject obj)
{
return generic_clone<BluetoothDevice>(env, obj, "BluetoothDevice");
}
-jboolean Java_BluetoothDevice_disconnect(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_disconnect(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->disconnect() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothDevice_connect(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_connect(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->connect() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothDevice_connectProfile(JNIEnv *env, jobject obj, jstring str)
+jboolean Java_tinyb_BluetoothDevice_connectProfile(JNIEnv *env, jobject obj, jstring str)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
@@ -72,7 +72,7 @@ jboolean Java_BluetoothDevice_connectProfile(JNIEnv *env, jobject obj, jstring s
return obj_device->connect_profile(string_to_write);
}
-jboolean Java_BluetoothDevice_disconnectProfile(JNIEnv *env, jobject obj, jstring str)
+jboolean Java_tinyb_BluetoothDevice_disconnectProfile(JNIEnv *env, jobject obj, jstring str)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
@@ -85,21 +85,21 @@ jboolean Java_BluetoothDevice_disconnectProfile(JNIEnv *env, jobject obj, jstrin
return obj_device->disconnect_profile(string_to_write);
}
-jboolean Java_BluetoothDevice_pair(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_pair(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->pair() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothDevice_cancelPairing(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_cancelPairing(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->cancel_pairing() ? JNI_TRUE : JNI_FALSE;
}
-jobject Java_BluetoothDevice_getServices(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothDevice_getServices(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::vector<std::unique_ptr<BluetoothGattService>> array = obj_device->get_services();
@@ -110,7 +110,7 @@ jobject Java_BluetoothDevice_getServices(JNIEnv *env, jobject obj)
return result;
}
-jstring Java_BluetoothDevice_getAddress(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothDevice_getAddress(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::string address = obj_device->get_address();
@@ -118,7 +118,7 @@ jstring Java_BluetoothDevice_getAddress(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)address.c_str());
}
-jstring Java_BluetoothDevice_getName(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothDevice_getName(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::string name = obj_device->get_name();
@@ -126,7 +126,7 @@ jstring Java_BluetoothDevice_getName(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)name.c_str());
}
-jstring Java_BluetoothDevice_getAlias(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothDevice_getAlias(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::string alias = obj_device->get_alias();
@@ -134,7 +134,7 @@ jstring Java_BluetoothDevice_getAlias(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)alias.c_str());
}
-void Java_BluetoothDevice_setAlias(JNIEnv *env, jobject obj, jstring str)
+void Java_tinyb_BluetoothDevice_setAlias(JNIEnv *env, jobject obj, jstring str)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
@@ -147,21 +147,21 @@ void Java_BluetoothDevice_setAlias(JNIEnv *env, jobject obj, jstring str)
obj_device->set_alias(string_to_write);
}
-jint Java_BluetoothDevice_getBluetoothClass(JNIEnv *env, jobject obj)
+jint Java_tinyb_BluetoothDevice_getBluetoothClass(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return (jlong)obj_device->get_class();
}
-jshort Java_BluetoothDevice_getAppearance(JNIEnv *env, jobject obj)
+jshort Java_tinyb_BluetoothDevice_getAppearance(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return (jshort)obj_device->get_appearance();
}
-jstring Java_BluetoothDevice_getIcon(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothDevice_getIcon(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::string icon = obj_device->get_icon();
@@ -169,21 +169,21 @@ jstring Java_BluetoothDevice_getIcon(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)icon.c_str());
}
-jboolean Java_BluetoothDevice_getPaired(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_getPaired(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->get_paired() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothDevice_getTrusted(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_getTrusted(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->get_trusted() ? JNI_TRUE : JNI_FALSE;
}
-void Java_BluetoothDevice_setTrusted(JNIEnv *env, jobject obj, jboolean val)
+void Java_tinyb_BluetoothDevice_setTrusted(JNIEnv *env, jobject obj, jboolean val)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
@@ -191,14 +191,14 @@ void Java_BluetoothDevice_setTrusted(JNIEnv *env, jobject obj, jboolean val)
obj_device->set_trusted(val_to_write);
}
-jboolean Java_BluetoothDevice_getBlocked(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_getBlocked(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->get_blocked() ? JNI_TRUE : JNI_FALSE;
}
-void Java_BluetoothDevice_setBlocked(JNIEnv *env, jobject obj, jboolean val)
+void Java_tinyb_BluetoothDevice_setBlocked(JNIEnv *env, jobject obj, jboolean val)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
@@ -206,28 +206,28 @@ void Java_BluetoothDevice_setBlocked(JNIEnv *env, jobject obj, jboolean val)
obj_device->set_blocked(val_to_write);
}
-jboolean Java_BluetoothDevice_getLegacyPairing(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_getLegacyPairing(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->get_legacy_pairing() ? JNI_TRUE : JNI_FALSE;
}
-jshort Java_BluetoothDevice_getRssi(JNIEnv *env, jobject obj)
+jshort Java_tinyb_BluetoothDevice_getRssi(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return (jshort)obj_device->get_rssi();
}
-jboolean Java_BluetoothDevice_getConnected(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothDevice_getConnected(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
return obj_device->get_connected() ? JNI_TRUE : JNI_FALSE;
}
-jobjectArray Java_BluetoothDevice_getUuids(JNIEnv *env, jobject obj)
+jobjectArray Java_tinyb_BluetoothDevice_getUuids(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::vector<std::string> uuids = obj_device->get_uuids();
@@ -246,7 +246,7 @@ jobjectArray Java_BluetoothDevice_getUuids(JNIEnv *env, jobject obj)
return result;
}
-jstring Java_BluetoothDevice_getModalias(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothDevice_getModalias(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
std::string modalias = obj_device->get_modalias();
@@ -254,7 +254,7 @@ jstring Java_BluetoothDevice_getModalias(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)modalias.c_str());
}
-jobject Java_BluetoothDevice_getAdapter(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothDevice_getAdapter(JNIEnv *env, jobject obj)
{
BluetoothDevice *obj_device = getInstance<BluetoothDevice>(env, obj);
BluetoothAdapter *obj_adapter = obj_device->get_adapter().clone();
@@ -271,7 +271,7 @@ jobject Java_BluetoothDevice_getAdapter(JNIEnv *env, jobject obj)
return result;
}
-void Java_BluetoothDevice_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothDevice_delete(JNIEnv *env, jobject obj)
{
BluetoothDevice *b_device = getInstance<BluetoothDevice>(env, obj);
delete b_device;
diff --git a/java/jni/BluetoothEvent.cxx b/java/jni/BluetoothEvent.cxx
index ec2ca18f..b3acd349 100644
--- a/java/jni/BluetoothEvent.cxx
+++ b/java/jni/BluetoothEvent.cxx
@@ -22,9 +22,9 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-#include "BluetoothEvent.h"
+#include "tinyb_BluetoothEvent.h"
-jobject Java_BluetoothEvent_getType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothEvent_getType(JNIEnv *env, jobject obj)
{
(void)env;
(void)obj;
@@ -32,7 +32,7 @@ jobject Java_BluetoothEvent_getType(JNIEnv *env, jobject obj)
return NULL;
}
-jstring Java_BluetoothEvent_getName(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothEvent_getName(JNIEnv *env, jobject obj)
{
(void)env;
(void)obj;
@@ -40,7 +40,7 @@ jstring Java_BluetoothEvent_getName(JNIEnv *env, jobject obj)
return NULL;
}
-jstring Java_BluetoothEvent_getIdentifier(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothEvent_getIdentifier(JNIEnv *env, jobject obj)
{
(void)env;
(void)obj;
@@ -48,7 +48,7 @@ jstring Java_BluetoothEvent_getIdentifier(JNIEnv *env, jobject obj)
return NULL;
}
-jboolean Java_BluetoothEvent_executeCallback(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothEvent_executeCallback(JNIEnv *env, jobject obj)
{
(void)env;
(void)obj;
@@ -56,7 +56,7 @@ jboolean Java_BluetoothEvent_executeCallback(JNIEnv *env, jobject obj)
return JNI_FALSE;
}
-jboolean Java_BluetoothEvent_hasCallback(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothEvent_hasCallback(JNIEnv *env, jobject obj)
{
(void)env;
(void)obj;
@@ -64,7 +64,7 @@ jboolean Java_BluetoothEvent_hasCallback(JNIEnv *env, jobject obj)
return JNI_FALSE;
}
-void Java_BluetoothEvent_init(JNIEnv *env, jobject obj, jobject type, jstring name,
+void Java_tinyb_BluetoothEvent_init(JNIEnv *env, jobject obj, jobject type, jstring name,
jstring identifier, jobject parent, jobject callback,
jobject arg_data)
{
@@ -78,7 +78,7 @@ void Java_BluetoothEvent_init(JNIEnv *env, jobject obj, jobject type, jstring na
(void)arg_data;
}
-void Java_BluetoothEvent_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothEvent_delete(JNIEnv *env, jobject obj)
{
(void)env;
(void)obj;
diff --git a/java/jni/BluetoothGattCharacteristic.cxx b/java/jni/BluetoothGattCharacteristic.cxx
index 0dca7992..b0c4a0b0 100644
--- a/java/jni/BluetoothGattCharacteristic.cxx
+++ b/java/jni/BluetoothGattCharacteristic.cxx
@@ -27,25 +27,25 @@
#include "tinyb/BluetoothGattService.hpp"
#include "tinyb/BluetoothObject.hpp"
-#include "BluetoothGattCharacteristic.h"
+#include "tinyb_BluetoothGattCharacteristic.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothGattCharacteristic_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattCharacteristic_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "GATT_CHARACTERISTIC");
}
-jobject Java_BluetoothGattCharacteristic_clone(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattCharacteristic_clone(JNIEnv *env, jobject obj)
{
return generic_clone<BluetoothGattCharacteristic>(env, obj, "BluetoothGattCharacteristic");
}
-jbyteArray Java_BluetoothGattCharacteristic_readValue(JNIEnv *env, jobject obj)
+jbyteArray Java_tinyb_BluetoothGattCharacteristic_readValue(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -58,7 +58,7 @@ jbyteArray Java_BluetoothGattCharacteristic_readValue(JNIEnv *env, jobject obj)
return result;
}
-jboolean Java_BluetoothGattCharacteristic_writeValue(JNIEnv *env, jobject obj, jbyteArray argValue)
+jboolean Java_tinyb_BluetoothGattCharacteristic_writeValue(JNIEnv *env, jobject obj, jbyteArray argValue)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -76,21 +76,21 @@ jboolean Java_BluetoothGattCharacteristic_writeValue(JNIEnv *env, jobject obj, j
return obj_gatt_char->write_value(array);
}
-jboolean Java_BluetoothGattCharacteristic_startNotify(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothGattCharacteristic_startNotify(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
return obj_gatt_char->start_notify() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothGattCharacteristic_stopNotify(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothGattCharacteristic_stopNotify(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
return obj_gatt_char->stop_notify() ? JNI_TRUE : JNI_FALSE;
}
-jstring Java_BluetoothGattCharacteristic_getUuid(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothGattCharacteristic_getUuid(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -99,7 +99,7 @@ jstring Java_BluetoothGattCharacteristic_getUuid(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)uuid.c_str());
}
-jobject Java_BluetoothGattCharacteristic_getService(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattCharacteristic_getService(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -117,7 +117,7 @@ jobject Java_BluetoothGattCharacteristic_getService(JNIEnv *env, jobject obj)
return result;
}
-jbyteArray Java_BluetoothGattCharacteristic_getValue(JNIEnv *env, jobject obj)
+jbyteArray Java_tinyb_BluetoothGattCharacteristic_getValue(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -130,14 +130,14 @@ jbyteArray Java_BluetoothGattCharacteristic_getValue(JNIEnv *env, jobject obj)
return result;
}
-jboolean Java_BluetoothGattCharacteristic_getNotifying(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothGattCharacteristic_getNotifying(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
return obj_gatt_char->get_notifying() ? JNI_TRUE : JNI_FALSE;
}
-jobjectArray Java_BluetoothGattCharacteristic_getFlags(JNIEnv *env, jobject obj)
+jobjectArray Java_tinyb_BluetoothGattCharacteristic_getFlags(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -157,7 +157,7 @@ jobjectArray Java_BluetoothGattCharacteristic_getFlags(JNIEnv *env, jobject obj)
return result;
}
-jobject Java_BluetoothGattCharacteristic_getDescriptors(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattCharacteristic_getDescriptors(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
@@ -169,7 +169,7 @@ jobject Java_BluetoothGattCharacteristic_getDescriptors(JNIEnv *env, jobject obj
return result;
}
-void Java_BluetoothGattCharacteristic_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothGattCharacteristic_delete(JNIEnv *env, jobject obj)
{
BluetoothGattCharacteristic *obj_gatt_char =
getInstance<BluetoothGattCharacteristic>(env, obj);
diff --git a/java/jni/BluetoothGattDescriptor.cxx b/java/jni/BluetoothGattDescriptor.cxx
index a5b1305b..609e2715 100644
--- a/java/jni/BluetoothGattDescriptor.cxx
+++ b/java/jni/BluetoothGattDescriptor.cxx
@@ -26,25 +26,25 @@
#include "tinyb/BluetoothGattDescriptor.hpp"
#include "tinyb/BluetoothObject.hpp"
-#include "BluetoothGattDescriptor.h"
+#include "tinyb_BluetoothGattDescriptor.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothGattDescriptor_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattDescriptor_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "GATT_DESCRIPTOR");
}
-jobject Java_BluetoothGattDescriptor_clone(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattDescriptor_clone(JNIEnv *env, jobject obj)
{
return generic_clone<BluetoothGattDescriptor>(env, obj, "BluetoothGattDescriptor");
}
-jbyteArray Java_BluetoothGattDescriptor_readValue(JNIEnv *env, jobject obj)
+jbyteArray Java_tinyb_BluetoothGattDescriptor_readValue(JNIEnv *env, jobject obj)
{
BluetoothGattDescriptor *obj_gatt_desc = getInstance<BluetoothGattDescriptor>(env, obj);
std::vector<unsigned char> array = obj_gatt_desc->read_value();
@@ -56,7 +56,7 @@ jbyteArray Java_BluetoothGattDescriptor_readValue(JNIEnv *env, jobject obj)
return result;
}
-jboolean Java_BluetoothGattDescriptor_writeValue(JNIEnv *env, jobject obj, jbyteArray argValue)
+jboolean Java_tinyb_BluetoothGattDescriptor_writeValue(JNIEnv *env, jobject obj, jbyteArray argValue)
{
BluetoothGattDescriptor *obj_gatt_desc = getInstance<BluetoothGattDescriptor>(env, obj);
@@ -73,7 +73,7 @@ jboolean Java_BluetoothGattDescriptor_writeValue(JNIEnv *env, jobject obj, jbyte
return obj_gatt_desc->write_value(array);
}
-jstring Java_BluetoothGattDescriptor_getUuid(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothGattDescriptor_getUuid(JNIEnv *env, jobject obj)
{
BluetoothGattDescriptor *obj_gatt_desc = getInstance<BluetoothGattDescriptor>(env, obj);
std::string uuid = obj_gatt_desc->get_uuid();
@@ -81,7 +81,7 @@ jstring Java_BluetoothGattDescriptor_getUuid(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)uuid.c_str());
}
-jobject Java_BluetoothGattDescriptor_getCharacteristic(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattDescriptor_getCharacteristic(JNIEnv *env, jobject obj)
{
BluetoothGattDescriptor *obj_gatt_desc = getInstance<BluetoothGattDescriptor>(env, obj);
BluetoothGattCharacteristic *obj_gatt_char = obj_gatt_desc->get_characteristic().clone();
@@ -98,7 +98,7 @@ jobject Java_BluetoothGattDescriptor_getCharacteristic(JNIEnv *env, jobject obj)
return result;
}
-jbyteArray Java_BluetoothGattDescriptor_getValue(JNIEnv *env, jobject obj)
+jbyteArray Java_tinyb_BluetoothGattDescriptor_getValue(JNIEnv *env, jobject obj)
{
BluetoothGattDescriptor *obj_gatt_desc = getInstance<BluetoothGattDescriptor>(env, obj);
std::vector<unsigned char> array = obj_gatt_desc->get_value();
@@ -111,7 +111,7 @@ jbyteArray Java_BluetoothGattDescriptor_getValue(JNIEnv *env, jobject obj)
}
-void Java_BluetoothGattDescriptor_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothGattDescriptor_delete(JNIEnv *env, jobject obj)
{
BluetoothGattDescriptor *obj_gatt_desc = getInstance<BluetoothGattDescriptor>(env, obj);
delete obj_gatt_desc;
diff --git a/java/jni/BluetoothGattService.cxx b/java/jni/BluetoothGattService.cxx
index 35580fd2..d60c6afe 100644
--- a/java/jni/BluetoothGattService.cxx
+++ b/java/jni/BluetoothGattService.cxx
@@ -27,25 +27,25 @@
#include "tinyb/BluetoothGattCharacteristic.hpp"
#include "tinyb/BluetoothObject.hpp"
-#include "BluetoothGattService.h"
+#include "tinyb_BluetoothGattService.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothGattService_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattService_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "GATT_SERVICE");
}
-jobject Java_BluetoothGattService_clone(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattService_clone(JNIEnv *env, jobject obj)
{
return generic_clone<BluetoothGattService>(env, obj, "BluetoothGattService");
}
-jstring Java_BluetoothGattService_getUuid(JNIEnv *env, jobject obj)
+jstring Java_tinyb_BluetoothGattService_getUuid(JNIEnv *env, jobject obj)
{
BluetoothGattService *obj_gatt_serv = getInstance<BluetoothGattService>(env, obj);
std::string uuid = obj_gatt_serv->get_uuid();
@@ -53,7 +53,7 @@ jstring Java_BluetoothGattService_getUuid(JNIEnv *env, jobject obj)
return env->NewStringUTF((const char *)uuid.c_str());
}
-jobject Java_BluetoothGattService_getDevice(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattService_getDevice(JNIEnv *env, jobject obj)
{
BluetoothGattService *obj_gatt_serv = getInstance<BluetoothGattService>(env, obj);
BluetoothDevice *obj_device = obj_gatt_serv->get_device().clone();
@@ -70,14 +70,14 @@ jobject Java_BluetoothGattService_getDevice(JNIEnv *env, jobject obj)
return result;
}
-jboolean Java_BluetoothGattService_getPrimary(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothGattService_getPrimary(JNIEnv *env, jobject obj)
{
BluetoothGattService *obj_gatt_serv = getInstance<BluetoothGattService>(env, obj);
return obj_gatt_serv->get_primary() ? JNI_TRUE : JNI_FALSE;
}
-jobject Java_BluetoothGattService_getCharacteristics(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothGattService_getCharacteristics(JNIEnv *env, jobject obj)
{
BluetoothGattService *obj_gatt_serv = getInstance<BluetoothGattService>(env, obj);
std::vector<std::unique_ptr<BluetoothGattCharacteristic>> array =
@@ -88,7 +88,7 @@ jobject Java_BluetoothGattService_getCharacteristics(JNIEnv *env, jobject obj)
return result;
}
-void Java_BluetoothGattService_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothGattService_delete(JNIEnv *env, jobject obj)
{
BluetoothGattService *obj_gatt_serv = getInstance<BluetoothGattService>(env, obj);
delete obj_gatt_serv;
diff --git a/java/jni/BluetoothManager.cxx b/java/jni/BluetoothManager.cxx
index 4fc74211..476f9baa 100644
--- a/java/jni/BluetoothManager.cxx
+++ b/java/jni/BluetoothManager.cxx
@@ -27,20 +27,20 @@
#include "tinyb/BluetoothGattService.hpp"
#include "tinyb/BluetoothManager.hpp"
-#include "BluetoothManager.h"
+#include "tinyb_BluetoothManager.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothManager_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothManager_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "NONE");
}
-jobject Java_BluetoothManager_getObject(JNIEnv *env, jobject obj, jobject type,
+jobject Java_tinyb_BluetoothManager_getObject(JNIEnv *env, jobject obj, jobject type,
jstring name, jstring identifier, jobject parent)
{
(void)env;
@@ -53,7 +53,7 @@ jobject Java_BluetoothManager_getObject(JNIEnv *env, jobject obj, jobject type,
return nullptr;
}
-jobject Java_BluetoothManager_getObjects(JNIEnv *env, jobject obj, jobject type,
+jobject Java_tinyb_BluetoothManager_getObjects(JNIEnv *env, jobject obj, jobject type,
jstring name, jstring identifier, jobject parent)
{
(void)env;
@@ -66,7 +66,7 @@ jobject Java_BluetoothManager_getObjects(JNIEnv *env, jobject obj, jobject type,
return nullptr;
}
-jobject Java_BluetoothManager_getAdapters(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothManager_getAdapters(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
@@ -77,7 +77,7 @@ jobject Java_BluetoothManager_getAdapters(JNIEnv *env, jobject obj)
return result;
}
-jobject Java_BluetoothManager_getDevices(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothManager_getDevices(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
@@ -89,7 +89,7 @@ jobject Java_BluetoothManager_getDevices(JNIEnv *env, jobject obj)
}
-jobject Java_BluetoothManager_getServices(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothManager_getServices(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
@@ -100,7 +100,7 @@ jobject Java_BluetoothManager_getServices(JNIEnv *env, jobject obj)
return result;
}
-jboolean Java_BluetoothManager_setDefaultAdapter(JNIEnv *env, jobject obj, jobject adapter)
+jboolean Java_tinyb_BluetoothManager_setDefaultAdapter(JNIEnv *env, jobject obj, jobject adapter)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
BluetoothAdapter *b_adapter = getInstance<BluetoothAdapter>(env, adapter);
@@ -108,25 +108,25 @@ jboolean Java_BluetoothManager_setDefaultAdapter(JNIEnv *env, jobject obj, jobje
return manager->set_default_adapter(b_adapter);
}
-jboolean Java_BluetoothManager_startDiscovery(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothManager_startDiscovery(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
return manager->start_discovery() ? JNI_TRUE : JNI_FALSE;
}
-jboolean Java_BluetoothManager_stopDiscovery(JNIEnv *env, jobject obj)
+jboolean Java_tinyb_BluetoothManager_stopDiscovery(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
return manager->start_discovery() ? JNI_TRUE : JNI_FALSE;
}
-void Java_BluetoothManager_init(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothManager_init(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = BluetoothManager::get_bluetooth_manager();
setInstance<BluetoothManager>(env, obj, manager);
}
-void Java_BluetoothManager_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothManager_delete(JNIEnv *env, jobject obj)
{
BluetoothManager *manager = getInstance<BluetoothManager>(env, obj);
delete manager;
diff --git a/java/jni/BluetoothObject.cxx b/java/jni/BluetoothObject.cxx
index cef194c6..ce62db43 100644
--- a/java/jni/BluetoothObject.cxx
+++ b/java/jni/BluetoothObject.cxx
@@ -24,32 +24,32 @@
#include "tinyb/BluetoothObject.hpp"
-#include "BluetoothObject.h"
+#include "tinyb_BluetoothObject.h"
#include "helper.h"
using namespace tinyb;
-jobject Java_BluetoothObject_getBluetoothType(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothObject_getBluetoothType(JNIEnv *env, jobject obj)
{
(void)obj;
return get_bluetooth_type(env, "NONE");
}
-jobject Java_BluetoothObject_clone(JNIEnv *env, jobject obj)
+jobject Java_tinyb_BluetoothObject_clone(JNIEnv *env, jobject obj)
{
return generic_clone<BluetoothObject>(env, obj, "BluetoothObject");
}
-void Java_BluetoothObject_delete(JNIEnv *env, jobject obj)
+void Java_tinyb_BluetoothObject_delete(JNIEnv *env, jobject obj)
{
BluetoothObject *obj_b = getInstance<BluetoothObject>(env, obj);
delete obj_b;
}
-jboolean Java_BluetoothObject_operatorEqual(JNIEnv *env, jobject obj, jobject other)
+jboolean Java_tinyb_BluetoothObject_operatorEqual(JNIEnv *env, jobject obj, jobject other)
{
BluetoothObject *obj_b = getInstance<BluetoothObject>(env, obj);
BluetoothObject *obj_other = getInstance<BluetoothObject>(env, other);