diff options
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_p.h')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_p.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/bluetooth/qbluetoothsocket_p.h b/src/bluetooth/qbluetoothsocket_p.h index e95af465..dc490f26 100644 --- a/src/bluetooth/qbluetoothsocket_p.h +++ b/src/bluetooth/qbluetoothsocket_p.h @@ -52,8 +52,10 @@ #endif #ifdef QT_ANDROID_BLUETOOTH #include <QtAndroidExtras/QAndroidJniObject> +#include <QtCore/QPointer> #include "android/inputstreamthread_p.h" #include <jni.h> +class WorkerThread; #endif #ifndef QPRIVATELINEARBUFFER_BUFFERSIZE @@ -93,18 +95,14 @@ public: ~QBluetoothSocketPrivate(); //On QNX and Android we connect using the uuid not the port -#if defined(QT_QNX_BLUETOOTH) - void connectToService(const QBluetoothAddress &address, const QBluetoothUuid &uuid, QIODevice::OpenMode openMode); -#elif defined(QT_ANDROID_BLUETOOTH) +#if defined(QT_QNX_BLUETOOTH) || defined(QT_ANDROID_BLUETOOTH) void connectToService(const QBluetoothAddress &address, const QBluetoothUuid &uuid, - QIODevice::OpenMode openMode, int fallbackServiceChannel = 1); - bool fallBackConnect(QAndroidJniObject uuid, int channel); + QIODevice::OpenMode openMode); #else void connectToService(const QBluetoothAddress &address, quint16 port, QIODevice::OpenMode openMode); #endif #ifdef QT_ANDROID_BLUETOOTH - void connectToServiceConc(const QBluetoothAddress &address, const QBluetoothUuid &uuid, - QIODevice::OpenMode openMode, int fallbackServiceChannel = 1); + bool fallBackConnect(QAndroidJniObject uuid, int channel); #endif @@ -166,9 +164,18 @@ public: QAndroidJniObject outputStream; InputStreamThread *inputThread; -private slots: +public slots: + void socketConnectSuccess(const QAndroidJniObject &socket); + void defaultSocketConnectFailed(const QAndroidJniObject & socket, + const QAndroidJniObject &targetUuid); + void fallbackSocketConnectFailed(const QAndroidJniObject &socket, + const QAndroidJniObject &targetUuid); void inputThreadError(int errorCode); +signals: + void connectJavaSocket(); + void closeJavaSocket(); + #endif #if defined(QT_QNX_BLUETOOTH) || defined(QT_BLUEZ_BLUETOOTH) |