summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothserviceinfo_p.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-09-23 13:52:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-25 10:37:27 +0200
commit85de7d64e85aa058f1777bc9d1a778790b1d50a6 (patch)
treea498afb7454905736cf589d3624ab68542ae04d8 /src/bluetooth/qbluetoothserviceinfo_p.h
parent85eac47703aa40df76e5102eb04291d8f029bfa3 (diff)
Fix peer to peer communication using two local adapters.
The code assumed to use the default adapter in a variety of places which caused wrong SDP registrations, device searches and peer names. The btchat examples was extended to cope with two local adapters. If there are more than two local adapters they will be ignored. Change-Id: I27d8bce65d943773e4e6cbd86982446fa79664a4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserviceinfo_p.h')
-rw-r--r--src/bluetooth/qbluetoothserviceinfo_p.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/bluetooth/qbluetoothserviceinfo_p.h b/src/bluetooth/qbluetoothserviceinfo_p.h
index 0e263fe6..a98cf0e9 100644
--- a/src/bluetooth/qbluetoothserviceinfo_p.h
+++ b/src/bluetooth/qbluetoothserviceinfo_p.h
@@ -43,6 +43,7 @@
#define QBLUETOOTHSERVICEINFO_P_H
#include "qbluetoothuuid.h"
+#include "qbluetoothaddress.h"
#include "qbluetoothdeviceinfo.h"
#include "qbluetoothserviceinfo.h"
@@ -63,14 +64,14 @@ public:
QBluetoothServiceInfoPrivate();
~QBluetoothServiceInfoPrivate();
- bool registerService() const;
+ bool registerService(const QBluetoothAddress &localAdapter = QBluetoothAddress());
bool isRegistered() const;
- bool unregisterService() const;
+ bool unregisterService();
- void setRegisteredAttribute(quint16 attributeId, const QVariant &value) const;
- void removeRegisteredAttribute(quint16 attributeId) const;
+ void setRegisteredAttribute(quint16 attributeId, const QVariant &value);
+ void removeRegisteredAttribute(quint16 attributeId);
QBluetoothDeviceInfo deviceInfo;
QMap<quint16, QVariant> attributes;
@@ -78,10 +79,11 @@ public:
int serverChannel() const;
private:
#ifdef QT_BLUEZ_BLUETOOTH
- bool ensureSdpConnection() const;
+ bool ensureSdpConnection(const QBluetoothAddress &localAdapter = QBluetoothAddress());
- mutable OrgBluezServiceInterface *service;
- mutable quint32 serviceRecord;
+ OrgBluezServiceInterface *service;
+ quint32 serviceRecord;
+ QBluetoothAddress currentLocalAdapter;
#endif
mutable bool registered;