diff options
Diffstat (limited to 'src/bluetooth/qbluetoothsocket.h')
-rw-r--r-- | src/bluetooth/qbluetoothsocket.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket.h b/src/bluetooth/qbluetoothsocket.h index 3fc2892e..cda64dff 100644 --- a/src/bluetooth/qbluetoothsocket.h +++ b/src/bluetooth/qbluetoothsocket.h @@ -52,15 +52,30 @@ QT_BEGIN_NAMESPACE +#ifndef QT_OSX_BLUETOOTH +class QBluetoothSocketBasePrivate; +#else class QBluetoothSocketPrivate; +#endif class Q_BLUETOOTH_EXPORT QBluetoothSocket : public QIODevice { Q_OBJECT +#ifndef QT_OSX_BLUETOOTH + Q_DECLARE_PRIVATE(QBluetoothSocketBase) +#else Q_DECLARE_PRIVATE(QBluetoothSocket) +#endif + friend class QBluetoothServer; friend class QBluetoothServerPrivate; + friend class QBluetoothSocketPrivate; + friend class QBluetoothSocketPrivateAndroid; + friend class QBluetoothSocketPrivateBluez; + friend class QBluetoothSocketPrivateBluezDBus; + friend class QBluetoothSocketPrivateDummy; + friend class QBluetoothSocketPrivateWinRT; public: @@ -106,6 +121,11 @@ public: void connectToService(const QBluetoothServiceInfo &service, OpenMode openMode = ReadWrite); void connectToService(const QBluetoothAddress &address, const QBluetoothUuid &uuid, OpenMode openMode = ReadWrite); void connectToService(const QBluetoothAddress &address, quint16 port, OpenMode openMode = ReadWrite); + inline void connectToService(const QBluetoothAddress &address, QBluetoothUuid::ServiceClassUuid uuid, + OpenMode mode = ReadWrite) + { + connectToService(address, QBluetoothUuid(uuid), mode); + } void disconnectFromService(); //bool flush(); @@ -161,10 +181,14 @@ private Q_SLOTS: protected: +#ifndef QT_OSX_BLUETOOTH + QBluetoothSocketBasePrivate *d_ptr; +#else QBluetoothSocketPrivate *d_ptr; +#endif private: - friend class QLowEnergyControllerPrivate; + friend class QLowEnergyControllerPrivateBluez; }; #ifndef QT_NO_DEBUG_STREAM |