summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbtdevicepair.mm
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-09-04 10:23:05 +0200
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-09-16 15:27:09 +0200
commitdc34c7aae7d4d641f4d06990141c7915542363ee (patch)
treec0245f807242b904ba44f5268d3551938cb4e5f8 /src/bluetooth/osx/osxbtdevicepair.mm
parent982eeb3547f85dc76e5864559ee56db74a7dd86f (diff)
Port QBluetoothServiceInfo and QBluetoothServiceDiscoveryAgent to OS X.
QBluetoothServiceInfo and QBluetoothServiceDiscoveryAgent - version for OS X (IOBluetooth-based). Update 0: initial dummy version + mods to enable this new classes to be built with qtconnectivity. Update 1: SDP query + initial implementation of a services discovery agent. Update 2: aux functions to "parse" a service records once I got it. Update 3: extract services UUIDs on a discovered device, if any. Update 4: refactor Update 5: "fix" asserts Update 6: more asserts fixed. Update 7: add the ability to stop SDP query (to be tested!!!) Update 8: mods as suggested in review. Update 9: no reason to check the size of discoveredDevices after 'clear' call. Update 10: set an error and error description only if it's a 'singleDevice'. Update 11: fix private header (_p suffix). Update 12: on 10.7 (with quite old clang) there is no 'subscript operator' syntax for NSDictionary. Change-Id: Ib3b07b49e3ed6381af75fb8b1e29cdf1e7a11237 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/osx/osxbtdevicepair.mm')
-rw-r--r--src/bluetooth/osx/osxbtdevicepair.mm11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/bluetooth/osx/osxbtdevicepair.mm b/src/bluetooth/osx/osxbtdevicepair.mm
index 726df9a8..8edc30a6 100644
--- a/src/bluetooth/osx/osxbtdevicepair.mm
+++ b/src/bluetooth/osx/osxbtdevicepair.mm
@@ -82,9 +82,9 @@ using namespace QT_NAMESPACE;
delegate:(OSXBluetooth::PairingDelegate *)object
{
if (self = [super init]) {
- Q_ASSERT_X(address.isNull() == false, "-initWithTarget:delegate",
+ Q_ASSERT_X(!address.isNull(), "-initWithTarget:delegate",
"invalid target address");
- Q_ASSERT_X(object != Q_NULLPTR, "-initWithTarget:delegate:",
+ Q_ASSERT_X(object, "-initWithTarget:delegate:",
"invalid delegate (null)");
m_targetAddress = address;
@@ -108,8 +108,7 @@ using namespace QT_NAMESPACE;
if (m_active)
return kIOReturnBusy;
- Q_ASSERT_X(m_targetAddress.isNull() == false, "-start",
- "invalid target address");
+ Q_ASSERT_X(!m_targetAddress.isNull(), "-start", "invalid target address");
QT_BT_MAC_AUTORELEASEPOOL;
@@ -196,7 +195,7 @@ using namespace QT_NAMESPACE;
if (sender != m_pairing) // Can never happen.
return;
- Q_ASSERT_X(m_object != Q_NULLPTR, "-devicePairingUserConfirmationRequest:numericValue:",
+ Q_ASSERT_X(m_object, "-devicePairingUserConfirmationRequest:numericValue:",
"invalid delegate (null)");
m_object->requestUserConfirmation(self, numericValue);
@@ -213,7 +212,7 @@ using namespace QT_NAMESPACE;
- (void)devicePairingFinished:(id)sender error:(IOReturn)error
{
- Q_ASSERT_X(m_object != Q_NULLPTR, "-devicePairingFinished:",
+ Q_ASSERT_X(m_object, "-devicePairingFinished:",
"invalid delegate (null)");
if (sender != m_pairing) // Can never happen though.