11 #import <Foundation/Foundation.h>
12 #import "MQTTMessage.h"
19 - (void) didConnect: (NSUInteger)code;
28 - (void) didPublish: (NSUInteger)messageId;
39 - (void) didSubscribe: (NSUInteger)messageId grantedQos:(NSArray*)qos;
44 - (void) didUnsubscribe: (NSUInteger)messageId;
50 struct mosquitto *mosq;
63 @property (readwrite,retain) NSString *host;
67 @property (readwrite,assign)
unsigned short port;
71 @property (readwrite,retain) NSString *username;
75 @property (readwrite,retain) NSString *password;
79 @property (readwrite,assign)
unsigned short keepAlive;
83 @property (readwrite,assign) BOOL cleanSession;
87 @property (readwrite,assign) id<MQTTClientDelegate> delegate;
91 + (NSString*) version;
98 - (
MQTTClient*) initWithClientId: (NSString *)clientId;
103 - (void) setMessageRetry: (NSUInteger)seconds;
112 - (void) connectToHost: (NSString*)host;
128 - (void)setWill: (NSString *)payload toTopic:(NSString *)willTopic withQos:(NSUInteger)willQos retain:(BOOL)retain;
140 - (void)publishString: (NSString *)payload toTopic:(NSString *)topic withQos:(NSUInteger)qos retain:(BOOL)retain;
145 - (void)subscribe: (NSString *)topic;
151 - (void)subscribe: (NSString *)topic withQos:(NSUInteger)qos;
156 - (void)unsubscribe: (NSString *)topic;
160 - (void) loop: (NSTimer *)timer;
Definition: MQTTClient.h:49
NSString * password
Definition: MQTTClient.h:54
unsigned short port
Definition: MQTTClient.h:52
NSString * username
Definition: MQTTClient.h:53
Definition: MQTTMessage.h:13
unsigned short keepAlive
Definition: MQTTClient.h:55
NSString * host
Definition: MQTTClient.h:51
BOOL cleanSession
Definition: MQTTClient.h:56
Definition: MQTTClient.h:14