diff options
Diffstat (limited to 'src/bluetooth/osx/osxbtledeviceinquiry_p.h')
-rw-r--r-- | src/bluetooth/osx/osxbtledeviceinquiry_p.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/bluetooth/osx/osxbtledeviceinquiry_p.h b/src/bluetooth/osx/osxbtledeviceinquiry_p.h index fc787a6d..a19055ab 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry_p.h +++ b/src/bluetooth/osx/osxbtledeviceinquiry_p.h @@ -53,10 +53,10 @@ #include "qbluetoothdevicediscoveryagent.h" #include "qbluetoothdeviceinfo.h" +#include "osxbtgcdtimer_p.h" #include "osxbtutility_p.h" #include "osxbluetooth_p.h" -#include <QtCore/qelapsedtimer.h> #include <QtCore/qglobal.h> #include <QtCore/qlist.h> @@ -75,10 +75,8 @@ class LECBManagerNotifier; QT_END_NAMESPACE -// Ugly but all these QT_PREPEND_NAMESPACE etc. are even worse ... -using OSXBluetooth::LECBManagerNotifier; -using OSXBluetooth::ObjCScopedPointer; -using QT_PREPEND_NAMESPACE(QElapsedTimer); +using QT_PREPEND_NAMESPACE(OSXBluetooth)::LECBManagerNotifier; +using QT_PREPEND_NAMESPACE(OSXBluetooth)::ObjCScopedPointer; enum LEInquiryState { @@ -90,7 +88,7 @@ enum LEInquiryState ErrorLENotSupported }; -@interface QT_MANGLE_NAMESPACE(OSXBTLEDeviceInquiry) : NSObject +@interface QT_MANGLE_NAMESPACE(OSXBTLEDeviceInquiry) : NSObject<CBCentralManagerDelegate, QT_MANGLE_NAMESPACE(GCDTimerDelegate)> { LECBManagerNotifier *notifier; ObjCScopedPointer<CBCentralManager> manager; @@ -99,16 +97,14 @@ enum LEInquiryState LEInquiryState internalState; int inquiryTimeoutMS; - // Timers to check if we can execute delayed callbacks: - QT_PREPEND_NAMESPACE(QElapsedTimer) errorTimer; - QT_PREPEND_NAMESPACE(QElapsedTimer) scanTimer; + QT_PREPEND_NAMESPACE(OSXBluetooth)::GCDTimer elapsedTimer; } - (id)initWithNotifier:(LECBManagerNotifier *)aNotifier; - (void)dealloc; -// IMPORTANT: both 'startWithTimeout' and 'stop' -// can be executed only on the "Qt's LE queue". +// IMPORTANT: both 'startWithTimeout' and 'stop' MUST be executed on the "Qt's +// LE queue". - (void)startWithTimeout:(int)timeout; - (void)stop; |