summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/osx/osxbtdeviceinquiry_p.h
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-10-15 17:15:23 +0200
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2014-11-06 16:25:43 +0100
commitf98a81839db4f3932038b4aded73782641958672 (patch)
tree886822f3216595b6f1b54cd91fbb35e1b3709cd8 /src/bluetooth/osx/osxbtdeviceinquiry_p.h
parentc7a1622d1f76bc61f0d5bb524d3eb40501cab13b (diff)
Bluetooth LE - device discovery for OS X.
- Unfortunately IOBluetoothDeviceInquiry does not scan for LE devices, so I need a separate scan for OS X and iOS imeplemented with CoreBluetooth framework. - CoreBluetooth hides addresses - "think different" in action. So we'll have to use 'identifiers' (NSUUID actually) provided by CoreBluetooth instead and we'll have to ask CBCentralManager to retrieve peripheral with a given NSUUID (or however we encode it). - Inform a delegate about LE device discovered. - Add the second scan/pass (Bluetooth LE) in QBluetoothDeviceDiscoveryAgent. - Make it all more "protocol conformant" - Do a proper cleanup + fix auto-test failure - Make a device inquiry longer + remove totally useless (??) 'name update'. - Use a plain bool instead of IOReturn (no this type(??) on iOS). - CoreBluetooth provides enumerators to check if LE is supported or not, no need to manipulate with StatePowerOn and other flags. - Add a workaround for a broken SDK (10.9 + CoreBluetooth headers + c++11). NSUUID is quite new - added in 10.8/6.0, works only on 10.9 and 7.0 (works == there is required interface). - CBCentralManager: it looks like it's impossible to delete an object of this type before centralDidUpdateStatus was called - this is not good, since a C++ object (the owner) can be deleted at any point - some preliminary workaround is to create a temporary delegate and pass the ownership from the dealloc. To be investigated/tested. - Move the TransientCentralManagerDelegate into the separate file - it'll be reused in future by other users of CBCentralManager. Change-Id: I4434c23366618061029be4022cfa0f7647df45b9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/osx/osxbtdeviceinquiry_p.h')
-rw-r--r--src/bluetooth/osx/osxbtdeviceinquiry_p.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bluetooth/osx/osxbtdeviceinquiry_p.h b/src/bluetooth/osx/osxbtdeviceinquiry_p.h
index 2eda032c..3c4f83fd 100644
--- a/src/bluetooth/osx/osxbtdeviceinquiry_p.h
+++ b/src/bluetooth/osx/osxbtdeviceinquiry_p.h
@@ -50,12 +50,16 @@
#include <Foundation/Foundation.h>
#include <IOKit/IOReturn.h>
+@class QT_MANGLE_NAMESPACE(OSXBTDeviceInquiry);
+
QT_BEGIN_NAMESPACE
namespace OSXBluetooth {
class DeviceInquiryDelegate {
public:
+ typedef QT_MANGLE_NAMESPACE(OSXBTDeviceInquiry) DeviceInquiryObjC;
+
virtual ~DeviceInquiryDelegate();
virtual void inquiryFinished(IOBluetoothDeviceInquiry *inq) = 0;
@@ -88,14 +92,8 @@ QT_END_NAMESPACE
- (void)deviceInquiryDeviceFound:(IOBluetoothDeviceInquiry *)sender
device:(IOBluetoothDevice *)device;
-- (void)deviceInquiryDeviceNameUpdated:(IOBluetoothDeviceInquiry *)sender
- device:(IOBluetoothDevice*)device devicesRemaining:(uint32_t)devicesRemaining;
-
- (void)deviceInquiryStarted:(IOBluetoothDeviceInquiry *)sender;
-- (void)deviceInquiryUpdatingDeviceNamesStarted:(IOBluetoothDeviceInquiry *)sender
- devicesRemaining:(uint32_t)devicesRemaining;
-
@end
#endif