summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_bluezdbus_p.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2018-07-25 14:28:22 +0200
committerAlex Blasche <alexander.blasche@qt.io>2018-08-09 08:55:04 +0000
commit80bea1f32b92c70c21c96762e31c726cb49e180f (patch)
tree4cc8558c45986359a51756b4959756c712ca5332 /src/bluetooth/qbluetoothsocket_bluezdbus_p.h
parentf1d00a83d12f27c37c20b6138f00ff82960018c1 (diff)
Implement QBluetoothSocket Client support for Bluez5 DBus
The new code is not yet enabled in QBluetoothSocket because the server side implementation is still missing. Task-number: QTBUG-68550 Change-Id: I2f94dac9f7665c8d4ba5d675e91c5ab81af8504a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_bluezdbus_p.h')
-rw-r--r--src/bluetooth/qbluetoothsocket_bluezdbus_p.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluezdbus_p.h b/src/bluetooth/qbluetoothsocket_bluezdbus_p.h
index c7279555..4d1a272e 100644
--- a/src/bluetooth/qbluetoothsocket_bluezdbus_p.h
+++ b/src/bluetooth/qbluetoothsocket_bluezdbus_p.h
@@ -53,8 +53,17 @@
#include "qbluetoothsocketbase_p.h"
+#include <QtDBus/qdbusunixfiledescriptor.h>
+
+#include <QtNetwork/qlocalsocket.h>
+
+class OrgBluezProfileManager1Interface;
+
QT_BEGIN_NAMESPACE
+class QLocalSocket;
+class OrgBluezProfile1ContextInterface;
+
class QBluetoothSocketPrivateBluezDBus final: public QBluetoothSocketBasePrivate
{
Q_OBJECT
@@ -66,6 +75,9 @@ public:
void connectToServiceHelper(const QBluetoothAddress &address,
quint16 port,
QIODevice::OpenMode openMode) override;
+ void connectToServiceHelper(const QBluetoothAddress &address,
+ const QBluetoothUuid &uuid,
+ QIODevice::OpenMode openMode);
void connectToService(const QBluetoothServiceInfo &service,
QIODevice::OpenMode openMode) override;
@@ -97,6 +109,20 @@ public:
qint64 bytesAvailable() const override;
bool canReadLine() const override;
qint64 bytesToWrite() const override;
+
+private:
+ void remoteConnected(const QDBusUnixFileDescriptor &fd);
+ void socketStateChanged(QLocalSocket::LocalSocketState newState);
+
+ void clearSocket();
+
+private:
+ OrgBluezProfileManager1Interface *profileManager = nullptr;
+ OrgBluezProfile1ContextInterface *profileContext = nullptr;
+ QString remoteDevicePath;
+ QString profileUuid;
+ QString profilePath;
+ QLocalSocket *localSocket = nullptr;
};
QT_END_NAMESPACE