summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothservicediscoveryagent_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_p.h')
-rw-r--r--src/bluetooth/qbluetoothservicediscoveryagent_p.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_p.h b/src/bluetooth/qbluetoothservicediscoveryagent_p.h
index b4281530..65082558 100644
--- a/src/bluetooth/qbluetoothservicediscoveryagent_p.h
+++ b/src/bluetooth/qbluetoothservicediscoveryagent_p.h
@@ -73,6 +73,12 @@ QT_END_NAMESPACE
QT_BEGIN_NAMESPACE
class QBluetoothDeviceDiscoveryAgent;
+#ifdef QT_ANDROID_BLUETOOTH
+class ServiceDiscoveryBroadcastReceiver;
+class LocalDeviceBroadcastReceiver;
+#include <QtAndroidExtras/QAndroidJniObject>
+#include <QtBluetooth/QBluetoothLocalDevice>
+#endif
class QBluetoothServiceDiscoveryAgentPrivate
#ifdef QT_QNX_BLUETOOTH
@@ -100,7 +106,7 @@ public:
void stopServiceDiscovery();
void setDiscoveryState(DiscoveryState s) { state = s; }
- DiscoveryState discoveryState() { return state; }
+ inline DiscoveryState discoveryState() { return state; }
void setDiscoveryMode(QBluetoothServiceDiscoveryAgent::DiscoveryMode m) { mode = m; }
QBluetoothServiceDiscoveryAgent::DiscoveryMode DiscoveryMode() { return mode; }
@@ -119,6 +125,14 @@ public:
void _q_discoveredGattCharacteristic(QDBusPendingCallWatcher *watcher);
*/
#endif
+#ifdef QT_ANDROID_BLUETOOTH
+ void _q_processFetchedUuids(const QBluetoothAddress &address, const QList<QBluetoothUuid> &uuids);
+
+ void populateDiscoveredServices(const QBluetoothDeviceInfo &remoteDevice,
+ const QList<QBluetoothUuid> &uuids);
+ void _q_fetchUuidsTimeout();
+ void _q_hostModeStateChanged(QBluetoothLocalDevice::HostMode state);
+#endif
private:
void start(const QBluetoothAddress &address);
@@ -152,6 +166,7 @@ public:
QBluetoothAddress deviceAddress;
QList<QBluetoothServiceInfo> discoveredServices;
QList<QBluetoothDeviceInfo> discoveredDevices;
+ QBluetoothAddress m_deviceAdapterAddress;
private:
DiscoveryState state;
@@ -166,14 +181,21 @@ private:
OrgBluezManagerInterface *manager;
OrgBluezAdapterInterface *adapter;
OrgBluezDeviceInterface *device;
- QBluetoothAddress m_deviceAdapterAddress;
- //Varibles below are used for discovering Bluetooth Low Energy devices
+ // variables below are used for discovering Bluetooth Low Energy devices
OrgBluezCharacteristicInterface *characteristic;
QStringList gattServices;
QStringList gattCharacteristics;
QLowEnergyCharacteristicInfo gattCharacteristic;
#endif
+#ifdef QT_ANDROID_BLUETOOTH
+ ServiceDiscoveryBroadcastReceiver *receiver;
+ LocalDeviceBroadcastReceiver *localDeviceReceiver;
+
+ QAndroidJniObject btAdapter;
+ QMap<QBluetoothAddress,QPair<QBluetoothDeviceInfo,QList<QBluetoothUuid> > > sdpCache;
+#endif
+
protected:
QBluetoothServiceDiscoveryAgent *q_ptr;
};