4#ifndef LOWENERGYNOTIFICATIONHUB_H
5#define LOWENERGYNOTIFICATIONHUB_H
18#include <QtCore/QObject>
19#include <QtCore/QReadWriteLock>
20#include <QtCore/QJniObject>
21#include <QtBluetooth/QBluetoothAddress>
22#include <QtBluetooth/QLowEnergyController>
23#include <QtBluetooth/QLowEnergyService>
24#include <QtCore/private/qglobal_p.h>
25#include "android/jni_android_p.h"
28#include <QtBluetooth/QLowEnergyCharacteristic>
41 jint errorCode, jint newState);
124 int startHandle,
int endHandle);
126 int handle,
const QBluetoothUuid &charUuid,
127 int properties,
const QByteArray &data);
128 void descriptorRead(
const QBluetoothUuid &serviceUuid,
const QBluetoothUuid &charUuid,
129 int handle,
const QBluetoothUuid &descUuid,
const QByteArray &data);
131 QLowEnergyService::ServiceError errorCode);
133 QLowEnergyService::ServiceError errorCode);
137 void serviceError(
int attributeHandle, QLowEnergyService::ServiceError errorCode);
141 static QReadWriteLock lock;
143 QJniObject jBluetoothLe;
QT_BEGIN_NAMESPACE void QtBroadcastReceiver_jniOnReceive(JNIEnv *, jobject, jlong, QtJniTypes::Context, QtJniTypes::Intent)
#define FIND_AND_CHECK_CLASS(CLASS_NAME)
friend void QtBluetoothLE_leScanResult(JNIEnv *, jobject, jlong, QtJniTypes::BluetoothDevice, jint, jbyteArray)
void serviceDetailsDiscoveryFinished(const QString &serviceUuid, int startHandle, int endHandle)
void characteristicRead(const QBluetoothUuid &serviceUuid, int handle, const QBluetoothUuid &charUuid, int properties, const QByteArray &data)
void servicesDiscovered(QLowEnergyController::Error errorCode, const QString &uuids)
void serverCharacteristicChanged(const QJniObject &characteristic, const QByteArray &newValue)
void serviceError(int attributeHandle, QLowEnergyService::ServiceError errorCode)
Q_DECLARE_JNI_NATIVE_METHOD_IN_CURRENT_SCOPE(lowEnergy_connectionChange, leConnectionStateChange) static void lowEnergy_mtuChanged(JNIEnv *
static void lowEnergy_connectionChange(JNIEnv *, jobject, jlong qtObject, jint errorCode, jint newState)
void serverDescriptorWritten(const QJniObject &descriptor, const QByteArray &newValue)
~LowEnergyNotificationHub()
void characteristicChanged(int charHandle, const QByteArray &data)
void descriptorRead(const QBluetoothUuid &serviceUuid, const QBluetoothUuid &charUuid, int handle, const QBluetoothUuid &descUuid, const QByteArray &data)
void remoteRssiRead(int rssi, bool success)
void characteristicWritten(int charHandle, const QByteArray &data, QLowEnergyService::ServiceError errorCode)
void descriptorWritten(int descHandle, const QByteArray &data, QLowEnergyService::ServiceError errorCode)
void advertisementError(int status)
QJniObject nextPendingConnection()
void setServiceDetails(const QBluetoothUuid &uuid, const QString &serviceName, QBluetooth::SecurityFlags securityFlags)
void errorOccurred(QBluetoothServer::Error)
void javaNewSocket(jobject socket)
bool hasPendingConnections() const
void javaThreadErrorOccurred(int errorCode)
~ServerAcceptanceThread()
void setMaxPendingConnections(int maximumCount)
#define LEHUB_SCOPED_METHOD(Method)
static const char classErrorMsg[]
static const char logTag[]
static void QtBluetoothInputStreamThread_errorOccurred(JNIEnv *, jobject, jlong qtObject, jint errorCode)
static void QtBluetoothInputStreamThread_readyData(JNIEnv *, jobject, jlong qtObject, jbyteArray buffer, jint bufferLength)
static void QtBluetoothSocketServer_newSocket(JNIEnv *, jobject, jlong qtObject, QtJniTypes::BluetoothSocket socket)
static void QtBluetoothSocketServer_errorOccurred(JNIEnv *, jobject, jlong qtObject, jint errorCode)
static bool registerNatives()
QString valueFromStaticFieldCache(const char *key, const char *className, const char *fieldName)