diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-12-13 15:58:08 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-12-18 09:26:24 +0000 |
commit | e9967647ffe20df0473a1fa9eb10957b4e32fbf3 (patch) | |
tree | 82f990b2650b8f3f069cdffe5efe66fbfd76fdd1 | |
parent | db0f1f7ab0892c84744608e073fc99999ef28fdd (diff) | |
download | qtconnectivity-e9967647ffe20df0473a1fa9eb10957b4e32fbf3.tar.gz |
CoreBluetooth - fix warnings ('-Wobjc-interface-ivars')
Move all i-vars into implementation part of declaration.
Change-Id: I9ee71bc85308d899871dc680d438c504e591b091
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
20 files changed, 97 insertions, 98 deletions
diff --git a/src/bluetooth/osx/osxbtconnectionmonitor.mm b/src/bluetooth/osx/osxbtconnectionmonitor.mm index dcd38726..b777af8e 100644 --- a/src/bluetooth/osx/osxbtconnectionmonitor.mm +++ b/src/bluetooth/osx/osxbtconnectionmonitor.mm @@ -59,6 +59,11 @@ using namespace QT_NAMESPACE; #endif @implementation QT_MANGLE_NAMESPACE(OSXBTConnectionMonitor) +{ + QT_PREPEND_NAMESPACE(OSXBluetooth::ConnectionMonitor) *monitor; + IOBluetoothUserNotification *discoveryNotification; + NSMutableArray *foundConnections; +} - (id)initWithMonitor:(OSXBluetooth::ConnectionMonitor *)aMonitor { diff --git a/src/bluetooth/osx/osxbtconnectionmonitor_p.h b/src/bluetooth/osx/osxbtconnectionmonitor_p.h index 18ffc86a..679f6124 100644 --- a/src/bluetooth/osx/osxbtconnectionmonitor_p.h +++ b/src/bluetooth/osx/osxbtconnectionmonitor_p.h @@ -79,11 +79,6 @@ public: QT_END_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTConnectionMonitor) : NSObject -{ - QT_PREPEND_NAMESPACE(OSXBluetooth::ConnectionMonitor) *monitor; - IOBluetoothUserNotification *discoveryNotification; - NSMutableArray *foundConnections; -} - (id)initWithMonitor:(QT_PREPEND_NAMESPACE(OSXBluetooth::ConnectionMonitor) *)monitor; - (void)connectionNotification:(id)notification withDevice:(IOBluetoothDevice *)device; diff --git a/src/bluetooth/osx/osxbtdeviceinquiry.mm b/src/bluetooth/osx/osxbtdeviceinquiry.mm index 79a8a92c..57cd73e1 100644 --- a/src/bluetooth/osx/osxbtdeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtdeviceinquiry.mm @@ -60,6 +60,11 @@ QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTDeviceInquiry) +{ + IOBluetoothDeviceInquiry *m_inquiry; + bool m_active; + QT_PREPEND_NAMESPACE(OSXBluetooth::DeviceInquiryDelegate) *m_delegate;//C++ "delegate" +} - (id)initWithDelegate:(OSXBluetooth::DeviceInquiryDelegate *)delegate { diff --git a/src/bluetooth/osx/osxbtdeviceinquiry_p.h b/src/bluetooth/osx/osxbtdeviceinquiry_p.h index 777184f9..0fec2db2 100644 --- a/src/bluetooth/osx/osxbtdeviceinquiry_p.h +++ b/src/bluetooth/osx/osxbtdeviceinquiry_p.h @@ -80,11 +80,6 @@ public: QT_END_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTDeviceInquiry) : NSObject<IOBluetoothDeviceInquiryDelegate> -{ - IOBluetoothDeviceInquiry *m_inquiry; - bool m_active; - QT_PREPEND_NAMESPACE(OSXBluetooth::DeviceInquiryDelegate) *m_delegate;//C++ "delegate" -} - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth::DeviceInquiryDelegate) *)delegate; - (void)dealloc; diff --git a/src/bluetooth/osx/osxbtdevicepair.mm b/src/bluetooth/osx/osxbtdevicepair.mm index dcaa3536..75dbbcad 100644 --- a/src/bluetooth/osx/osxbtdevicepair.mm +++ b/src/bluetooth/osx/osxbtdevicepair.mm @@ -69,6 +69,13 @@ QT_END_NAMESPACE QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTPairing) +{ + QT_PREPEND_NAMESPACE(QBluetoothAddress) m_targetAddress; + + bool m_active; + IOBluetoothDevicePair *m_pairing; // The real pairing request + QT_PREPEND_NAMESPACE(OSXBluetooth)::PairingDelegate *m_object; +} - (id)initWithTarget:(const QBluetoothAddress &)address delegate:(OSXBluetooth::PairingDelegate *)object diff --git a/src/bluetooth/osx/osxbtdevicepair_p.h b/src/bluetooth/osx/osxbtdevicepair_p.h index d5db5e35..1a2c7d6b 100644 --- a/src/bluetooth/osx/osxbtdevicepair_p.h +++ b/src/bluetooth/osx/osxbtdevicepair_p.h @@ -90,13 +90,6 @@ ObjCStrongReference<IOBluetoothDevice> device_with_address(const QBluetoothAddre QT_END_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTPairing) : NSObject<IOBluetoothDevicePairDelegate> -{ - QT_PREPEND_NAMESPACE(QBluetoothAddress) m_targetAddress; - - bool m_active; - IOBluetoothDevicePair *m_pairing; // The real pairing request - QT_PREPEND_NAMESPACE(OSXBluetooth)::PairingDelegate *m_object; -} - (id)initWithTarget:(const QBluetoothAddress &)address delegate:(QT_PREPEND_NAMESPACE(OSXBluetooth::PairingDelegate) *)object; diff --git a/src/bluetooth/osx/osxbtl2capchannel.mm b/src/bluetooth/osx/osxbtl2capchannel.mm index 474fe04b..dc8468a0 100644 --- a/src/bluetooth/osx/osxbtl2capchannel.mm +++ b/src/bluetooth/osx/osxbtl2capchannel.mm @@ -48,6 +48,12 @@ QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTL2CAPChannel) +{ + QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *delegate; + IOBluetoothDevice *device; + IOBluetoothL2CAPChannel *channel; + bool connected; +} - (id)initWithDelegate:(OSXBluetooth::ChannelDelegate *)aDelegate { diff --git a/src/bluetooth/osx/osxbtl2capchannel_p.h b/src/bluetooth/osx/osxbtl2capchannel_p.h index a8a08975..512087b4 100644 --- a/src/bluetooth/osx/osxbtl2capchannel_p.h +++ b/src/bluetooth/osx/osxbtl2capchannel_p.h @@ -72,12 +72,6 @@ class ChannelDelegate; QT_END_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTL2CAPChannel) : NSObject<IOBluetoothL2CAPChannelDelegate> -{ - QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *delegate; - IOBluetoothDevice *device; - IOBluetoothL2CAPChannel *channel; - bool connected; -} - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *)aDelegate; - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *)aDelegate diff --git a/src/bluetooth/osx/osxbtledeviceinquiry.mm b/src/bluetooth/osx/osxbtledeviceinquiry.mm index c616d470..ccf1c279 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry.mm +++ b/src/bluetooth/osx/osxbtledeviceinquiry.mm @@ -122,6 +122,16 @@ QT_END_NAMESPACE QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTLEDeviceInquiry) +{ + LECBManagerNotifier *notifier; + ObjCScopedPointer<CBCentralManager> manager; + + QList<QBluetoothDeviceInfo> devices; + LEInquiryState internalState; + int inquiryTimeoutMS; + + QT_PREPEND_NAMESPACE(OSXBluetooth)::GCDTimer elapsedTimer; +} -(id)initWithNotifier:(LECBManagerNotifier *)aNotifier { diff --git a/src/bluetooth/osx/osxbtledeviceinquiry_p.h b/src/bluetooth/osx/osxbtledeviceinquiry_p.h index a19055ab..d99a93bd 100644 --- a/src/bluetooth/osx/osxbtledeviceinquiry_p.h +++ b/src/bluetooth/osx/osxbtledeviceinquiry_p.h @@ -89,17 +89,6 @@ enum LEInquiryState }; @interface QT_MANGLE_NAMESPACE(OSXBTLEDeviceInquiry) : NSObject<CBCentralManagerDelegate, QT_MANGLE_NAMESPACE(GCDTimerDelegate)> -{ - LECBManagerNotifier *notifier; - ObjCScopedPointer<CBCentralManager> manager; - - QList<QBluetoothDeviceInfo> devices; - LEInquiryState internalState; - int inquiryTimeoutMS; - - QT_PREPEND_NAMESPACE(OSXBluetooth)::GCDTimer elapsedTimer; -} - - (id)initWithNotifier:(LECBManagerNotifier *)aNotifier; - (void)dealloc; diff --git a/src/bluetooth/osx/osxbtobexsession.mm b/src/bluetooth/osx/osxbtobexsession.mm index 9fbc2c12..868b2319 100644 --- a/src/bluetooth/osx/osxbtobexsession.mm +++ b/src/bluetooth/osx/osxbtobexsession.mm @@ -418,6 +418,27 @@ QT_USE_NAMESPACE @end @implementation QT_MANGLE_NAMESPACE(OSXBTOBEXSession) +{ + QT_PREPEND_NAMESPACE(OSXBluetooth)::OBEXSessionDelegate *delegate; + IOBluetoothDevice *device; + quint16 channelID; + IOBluetoothOBEXSession *session; + + QT_PREPEND_NAMESPACE(OSXBluetooth)::OBEXRequest currentRequest; + + bool connected; + bool connectionIDFound; + quint32 connectionID; + + QT_PREPEND_NAMESPACE(QIODevice) *inputStream; + + // TODO: switch to scoped pointers or strong reference objects instead. + NSMutableData *headersData; + NSMutableData *bodyData; + + quint32 bytesSent; + bool pendingAbort; +} + (OBEXMaxPacketLength) maxPacketLength { diff --git a/src/bluetooth/osx/osxbtobexsession_p.h b/src/bluetooth/osx/osxbtobexsession_p.h index 78c93452..49465f24 100644 --- a/src/bluetooth/osx/osxbtobexsession_p.h +++ b/src/bluetooth/osx/osxbtobexsession_p.h @@ -101,27 +101,6 @@ QT_END_NAMESPACE // (it does not have an interface to re-send data or re-use the same transfer reply). // It either succeeds or fails and tries to cleanup in any case. @interface QT_MANGLE_NAMESPACE(OSXBTOBEXSession) : NSObject -{ - QT_PREPEND_NAMESPACE(OSXBluetooth)::OBEXSessionDelegate *delegate; - IOBluetoothDevice *device; - quint16 channelID; - IOBluetoothOBEXSession *session; - - QT_PREPEND_NAMESPACE(OSXBluetooth)::OBEXRequest currentRequest; - - bool connected; - bool connectionIDFound; - quint32 connectionID; - - QT_PREPEND_NAMESPACE(QIODevice) *inputStream; - - // TODO: switch to scoped pointers or strong reference objects instead. - NSMutableData *headersData; - NSMutableData *bodyData; - - quint32 bytesSent; - bool pendingAbort; -} - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth::OBEXSessionDelegate) *)aDelegate remoteDevice:(const QBluetoothAddress &)deviceAddress channelID:(quint16)port; diff --git a/src/bluetooth/osx/osxbtperipheralmanager.mm b/src/bluetooth/osx/osxbtperipheralmanager.mm index d3d92f41..1998340a 100644 --- a/src/bluetooth/osx/osxbtperipheralmanager.mm +++ b/src/bluetooth/osx/osxbtperipheralmanager.mm @@ -178,6 +178,33 @@ bool qt_validate_value_range(const QLowEnergyCharacteristicData &data) @end @implementation QT_MANGLE_NAMESPACE(OSXBTPeripheralManager) +{ + ObjCScopedPointer<CBPeripheralManager> manager; + LECBManagerNotifier *notifier; + + QLowEnergyHandle lastHandle; + // Services in this vector are placed in such order: + // the one that has included services, must + // follow its included services to avoid exceptions from CBPeripheralManager. + std::vector<ObjCStrongReference<CBMutableService>> services; + decltype(services.size()) nextServiceToAdd; + + // Lookup map for included services: + std::map<QBluetoothUuid, CBService *> serviceIndex; + ObjCScopedPointer<NSMutableDictionary> advertisementData; + + GenericLEMap<CBCharacteristic *> charMap; + GenericLEMap<ObjCStrongReference<NSMutableData>> charValues; + + QMap<QLowEnergyHandle, ValueRange> valueRanges; + + std::deque<UpdateRequest> updateQueue; + + ObjCScopedPointer<NSMutableSet> connectedCentrals; + + PeripheralState state; + NSUInteger maxNotificationValueLength; +} - (id)initWith:(LECBManagerNotifier *)aNotifier { diff --git a/src/bluetooth/osx/osxbtperipheralmanager_p.h b/src/bluetooth/osx/osxbtperipheralmanager_p.h index 19a831d8..fcf55698 100644 --- a/src/bluetooth/osx/osxbtperipheralmanager_p.h +++ b/src/bluetooth/osx/osxbtperipheralmanager_p.h @@ -122,33 +122,6 @@ struct UpdateRequest using ValueRange = QPair<NSUInteger, NSUInteger>; @interface QT_MANGLE_NAMESPACE(OSXBTPeripheralManager) : NSObject<CBPeripheralManagerDelegate> -{ - ObjCScopedPointer<CBPeripheralManager> manager; - LECBManagerNotifier *notifier; - - QLowEnergyHandle lastHandle; - // Services in this vector are placed in such order: - // the one that has included services, must - // follow its included services to avoid exceptions from CBPeripheralManager. - std::vector<ObjCStrongReference<CBMutableService>> services; - decltype(services.size()) nextServiceToAdd; - - // Lookup map for included services: - std::map<QBluetoothUuid, CBService *> serviceIndex; - ObjCScopedPointer<NSMutableDictionary> advertisementData; - - GenericLEMap<CBCharacteristic *> charMap; - GenericLEMap<ObjCStrongReference<NSMutableData>> charValues; - - QMap<QLowEnergyHandle, ValueRange> valueRanges; - - std::deque<UpdateRequest> updateQueue; - - ObjCScopedPointer<NSMutableSet> connectedCentrals; - - PeripheralState state; - NSUInteger maxNotificationValueLength; -} - (id)initWith:(LECBManagerNotifier *)notifier; - (void)dealloc; diff --git a/src/bluetooth/osx/osxbtrfcommchannel.mm b/src/bluetooth/osx/osxbtrfcommchannel.mm index bd87aae0..00b67ee0 100644 --- a/src/bluetooth/osx/osxbtrfcommchannel.mm +++ b/src/bluetooth/osx/osxbtrfcommchannel.mm @@ -45,6 +45,12 @@ QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTRFCOMMChannel) +{ + QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *delegate; + IOBluetoothDevice *device; + IOBluetoothRFCOMMChannel *channel; + bool connected; +} - (id)initWithDelegate:(OSXBluetooth::ChannelDelegate *)aDelegate { diff --git a/src/bluetooth/osx/osxbtrfcommchannel_p.h b/src/bluetooth/osx/osxbtrfcommchannel_p.h index bb615559..775999ed 100644 --- a/src/bluetooth/osx/osxbtrfcommchannel_p.h +++ b/src/bluetooth/osx/osxbtrfcommchannel_p.h @@ -72,12 +72,6 @@ class ChannelDelegate; QT_END_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTRFCOMMChannel) : NSObject<IOBluetoothRFCOMMChannelDelegate> -{ - QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *delegate; - IOBluetoothDevice *device; - IOBluetoothRFCOMMChannel *channel; - bool connected; -} - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *)aDelegate; - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth)::ChannelDelegate *)aDelegate diff --git a/src/bluetooth/osx/osxbtsdpinquiry.mm b/src/bluetooth/osx/osxbtsdpinquiry.mm index 23d1bd84..591d75a5 100644 --- a/src/bluetooth/osx/osxbtsdpinquiry.mm +++ b/src/bluetooth/osx/osxbtsdpinquiry.mm @@ -212,6 +212,11 @@ QT_USE_NAMESPACE using namespace OSXBluetooth; @implementation QT_MANGLE_NAMESPACE(OSXBTSDPInquiry) +{ + QT_PREPEND_NAMESPACE(OSXBluetooth::SDPInquiryDelegate) *delegate; + IOBluetoothDevice *device; + bool isActive; +} - (id)initWithDelegate:(SDPInquiryDelegate *)aDelegate { diff --git a/src/bluetooth/osx/osxbtsdpinquiry_p.h b/src/bluetooth/osx/osxbtsdpinquiry_p.h index 6b39634e..c63738bb 100644 --- a/src/bluetooth/osx/osxbtsdpinquiry_p.h +++ b/src/bluetooth/osx/osxbtsdpinquiry_p.h @@ -88,11 +88,6 @@ QList<QBluetoothUuid> extract_services_uuids(IOBluetoothDevice *device); QT_END_NAMESPACE @interface QT_MANGLE_NAMESPACE(OSXBTSDPInquiry) : NSObject -{ - QT_PREPEND_NAMESPACE(OSXBluetooth::SDPInquiryDelegate) *delegate; - IOBluetoothDevice *device; - bool isActive; -} - (id)initWithDelegate:(QT_PREPEND_NAMESPACE(OSXBluetooth::SDPInquiryDelegate) *)aDelegate; - (void)dealloc; diff --git a/src/bluetooth/osx/osxbtsocketlistener.mm b/src/bluetooth/osx/osxbtsocketlistener.mm index 52243990..517b7f2d 100644 --- a/src/bluetooth/osx/osxbtsocketlistener.mm +++ b/src/bluetooth/osx/osxbtsocketlistener.mm @@ -57,6 +57,11 @@ QT_END_NAMESPACE QT_USE_NAMESPACE @implementation QT_MANGLE_NAMESPACE(OSXBTSocketListener) +{ + IOBluetoothUserNotification *connectionNotification; + QT_PREPEND_NAMESPACE(OSXBluetooth::SocketListener) *delegate; + quint16 port; +} - (id)initWithListener:(OSXBluetooth::SocketListener *)aDelegate { diff --git a/src/bluetooth/osx/osxbtsocketlistener_p.h b/src/bluetooth/osx/osxbtsocketlistener_p.h index afe3eadc..cac0b7c4 100644 --- a/src/bluetooth/osx/osxbtsocketlistener_p.h +++ b/src/bluetooth/osx/osxbtsocketlistener_p.h @@ -82,11 +82,6 @@ QT_END_NAMESPACE // RFCOMM or L2CAP protocol. It must be deleted to stop listening. @interface QT_MANGLE_NAMESPACE(OSXBTSocketListener) : NSObject -{ - IOBluetoothUserNotification *connectionNotification; - QT_PREPEND_NAMESPACE(OSXBluetooth::SocketListener) *delegate; - quint16 port; -} - (id)initWithListener:(QT_PREPEND_NAMESPACE(OSXBluetooth::SocketListener) *)aDelegate; - (void)dealloc; |