From 57743c9da4431dcedb4cbac31ea9ac5dffd51168 Mon Sep 17 00:00:00 2001 From: Jeraimee Hughes Date: Fri, 18 Apr 2014 13:50:12 -0400 Subject: [PATCH 1/2] Declare connected in the correct location --- MQTTKit/MQTTKit.h | 1 + MQTTKit/MQTTKit.m | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/MQTTKit/MQTTKit.h b/MQTTKit/MQTTKit.h index ded41f9..4994d81 100644 --- a/MQTTKit/MQTTKit.h +++ b/MQTTKit/MQTTKit.h @@ -57,6 +57,7 @@ typedef void (^MQTTDisconnectionHandler)(NSUInteger code); @property (readwrite, assign) unsigned int reconnectDelayMax; // in seconds (default is 1) @property (readwrite, assign) BOOL reconnectExponentialBackoff; // wheter to backoff exponentially the reconnect attempts (default is NO) @property (readwrite, assign) BOOL cleanSession; +@property (readwrite, assign) BOOL connected; @property (nonatomic, copy) MQTTMessageHandler messageHandler; @property (nonatomic, copy) MQTTDisconnectionHandler disconnectionHandler; diff --git a/MQTTKit/MQTTKit.m b/MQTTKit/MQTTKit.m index a68e731..c6d7ecf 100644 --- a/MQTTKit/MQTTKit.m +++ b/MQTTKit/MQTTKit.m @@ -60,7 +60,6 @@ - (NSString *)payloadString { @interface MQTTClient() -@property (nonatomic, assign) BOOL connected; @property (nonatomic, copy) void (^connectionCompletionHandler)(NSUInteger code); @property (nonatomic, strong) NSMutableDictionary *subscriptionHandlers; @property (nonatomic, strong) NSMutableDictionary *unsubscriptionHandlers; From 9bfb1143105340243281a292676bbf85b20f639d Mon Sep 17 00:00:00 2001 From: Jeraimee Hughes Date: Tue, 22 Apr 2014 22:14:35 -0400 Subject: [PATCH 2/2] Fixed property declaration --- MQTTKit/MQTTKit.h | 2 +- MQTTKit/MQTTKit.m | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MQTTKit/MQTTKit.h b/MQTTKit/MQTTKit.h index 4994d81..4238d30 100644 --- a/MQTTKit/MQTTKit.h +++ b/MQTTKit/MQTTKit.h @@ -57,7 +57,7 @@ typedef void (^MQTTDisconnectionHandler)(NSUInteger code); @property (readwrite, assign) unsigned int reconnectDelayMax; // in seconds (default is 1) @property (readwrite, assign) BOOL reconnectExponentialBackoff; // wheter to backoff exponentially the reconnect attempts (default is NO) @property (readwrite, assign) BOOL cleanSession; -@property (readwrite, assign) BOOL connected; +@property (readonly, assign) BOOL connected; @property (nonatomic, copy) MQTTMessageHandler messageHandler; @property (nonatomic, copy) MQTTDisconnectionHandler disconnectionHandler; diff --git a/MQTTKit/MQTTKit.m b/MQTTKit/MQTTKit.m index c6d7ecf..9b49601 100644 --- a/MQTTKit/MQTTKit.m +++ b/MQTTKit/MQTTKit.m @@ -65,6 +65,7 @@ @interface MQTTClient() @property (nonatomic, strong) NSMutableDictionary *unsubscriptionHandlers; // dictionary of mid -> completion handlers for messages published with a QoS of 1 or 2 @property (nonatomic, strong) NSMutableDictionary *publishHandlers; +@property (nonatomic, assign) BOOL connected; @end