react-native-gizwits-sdk-v5 1.5.6-thirdbluetooth → 1.5.7-thirdbluetooth

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/package.json +1 -1
  2. package/react-native-gizwits-sdk-v5.podspec +2 -2
  3. package/ios/GizwitsiOSSDK.framework/GizwitsiOSSDK +0 -0
  4. package/ios/GizwitsiOSSDK.framework/Headers/CocoaAsyncSocket.h +0 -18
  5. package/ios/GizwitsiOSSDK.framework/Headers/DDASLLogger.h +0 -41
  6. package/ios/GizwitsiOSSDK.framework/Headers/DDAbstractDatabaseLogger.h +0 -102
  7. package/ios/GizwitsiOSSDK.framework/Headers/DDContextFilterLogFormatter.h +0 -63
  8. package/ios/GizwitsiOSSDK.framework/Headers/DDDispatchQueueLogFormatter.h +0 -128
  9. package/ios/GizwitsiOSSDK.framework/Headers/DDFileLogger.h +0 -340
  10. package/ios/GizwitsiOSSDK.framework/Headers/DDLog+LOGV.h +0 -99
  11. package/ios/GizwitsiOSSDK.framework/Headers/DDLog.h +0 -632
  12. package/ios/GizwitsiOSSDK.framework/Headers/DDMultiFormatter.h +0 -30
  13. package/ios/GizwitsiOSSDK.framework/Headers/DDTTYLogger.h +0 -171
  14. package/ios/GizwitsiOSSDK.framework/Headers/ESPAES.h +0 -19
  15. package/ios/GizwitsiOSSDK.framework/Headers/ESPDataCode.h +0 -44
  16. package/ios/GizwitsiOSSDK.framework/Headers/ESPDatumCode.h +0 -38
  17. package/ios/GizwitsiOSSDK.framework/Headers/ESPGuideCode.h +0 -15
  18. package/ios/GizwitsiOSSDK.framework/Headers/ESPTools.h +0 -22
  19. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouch.h +0 -36
  20. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchDelegate.h +0 -24
  21. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchGenerator.h +0 -46
  22. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchResult.h +0 -36
  23. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTask.h +0 -124
  24. package/ios/GizwitsiOSSDK.framework/Headers/ESPTouchTaskParameter.h +0 -173
  25. package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketClient.h +0 -50
  26. package/ios/GizwitsiOSSDK.framework/Headers/ESPUDPSocketServer.h +0 -49
  27. package/ios/GizwitsiOSSDK.framework/Headers/ESP_ByteUtil.h +0 -128
  28. package/ios/GizwitsiOSSDK.framework/Headers/ESP_CRC8.h +0 -61
  29. package/ios/GizwitsiOSSDK.framework/Headers/ESP_NetUtil.h +0 -82
  30. package/ios/GizwitsiOSSDK.framework/Headers/ESP_WifiUtil.h +0 -33
  31. package/ios/GizwitsiOSSDK.framework/Headers/ForegroundReconnection.h +0 -23
  32. package/ios/GizwitsiOSSDK.framework/Headers/GCDTimer.h +0 -19
  33. package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK-Swift.h +0 -338
  34. package/ios/GizwitsiOSSDK.framework/Headers/GizwitsiOSSDK.h +0 -24
  35. package/ios/GizwitsiOSSDK.framework/Headers/MQTTClient.h +0 -39
  36. package/ios/GizwitsiOSSDK.framework/Headers/MQTTInMemoryPersistence.h +0 -16
  37. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyDecoder.h +0 -19
  38. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSSLSecurityPolicyEncoder.h +0 -18
  39. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionLegacy.h +0 -112
  40. package/ios/GizwitsiOSSDK.framework/Headers/MQTTSessionSynchron.h +0 -194
  41. package/ios/GizwitsiOSSDK.framework/Headers/MQTTStrict.h +0 -33
  42. package/ios/GizwitsiOSSDK.framework/Headers/MQTTUntil.h +0 -14
  43. package/ios/GizwitsiOSSDK.framework/Headers/ReconnectTimer.h +0 -21
  44. package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncSocket.h +0 -1226
  45. package/ios/GizwitsiOSSDK.framework/Headers/_GCDAsyncUdpSocket.h +0 -1036
  46. package/ios/GizwitsiOSSDK.framework/Headers/_GizwitsParser.h +0 -61
  47. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketDecoder.h +0 -39
  48. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketEncoder.h +0 -38
  49. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCFSocketTransport.h +0 -79
  50. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTCoreDataPersistence.h +0 -21
  51. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTDecoder.h +0 -66
  52. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTLog.h +0 -123
  53. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTMessage.h +0 -233
  54. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTPersistence.h +0 -124
  55. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTProperties.h +0 -76
  56. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicy.h +0 -158
  57. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSSLSecurityPolicyTransport.h +0 -30
  58. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSession.h +0 -886
  59. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTSessionManager.h +0 -237
  60. package/ios/GizwitsiOSSDK.framework/Headers/_MQTTTransport.h +0 -114
  61. package/ios/GizwitsiOSSDK.framework/Headers/_SSZipArchive.h +0 -178
  62. package/ios/GizwitsiOSSDK.framework/Headers/_SSZipCommon.h +0 -71
  63. package/ios/GizwitsiOSSDK.framework/Headers/_ZipArchive.h +0 -26
  64. package/ios/GizwitsiOSSDK.framework/Headers/a_weighting.h +0 -88
  65. package/ios/GizwitsiOSSDK.framework/Headers/aubio.h +0 -231
  66. package/ios/GizwitsiOSSDK.framework/Headers/audio_unit.h +0 -61
  67. package/ios/GizwitsiOSSDK.framework/Headers/awhitening.h +0 -125
  68. package/ios/GizwitsiOSSDK.framework/Headers/beattracking.h +0 -121
  69. package/ios/GizwitsiOSSDK.framework/Headers/biquad.h +0 -75
  70. package/ios/GizwitsiOSSDK.framework/Headers/c_weighting.h +0 -88
  71. package/ios/GizwitsiOSSDK.framework/Headers/common.h +0 -104
  72. package/ios/GizwitsiOSSDK.framework/Headers/cvec.h +0 -247
  73. package/ios/GizwitsiOSSDK.framework/Headers/dct.h +0 -85
  74. package/ios/GizwitsiOSSDK.framework/Headers/fft.h +0 -144
  75. package/ios/GizwitsiOSSDK.framework/Headers/filter.h +0 -176
  76. package/ios/GizwitsiOSSDK.framework/Headers/filterbank.h +0 -90
  77. package/ios/GizwitsiOSSDK.framework/Headers/filterbank_mel.h +0 -72
  78. package/ios/GizwitsiOSSDK.framework/Headers/fmat.h +0 -172
  79. package/ios/GizwitsiOSSDK.framework/Headers/fvec.h +0 -178
  80. package/ios/GizwitsiOSSDK.framework/Headers/hist.h +0 -63
  81. package/ios/GizwitsiOSSDK.framework/Headers/ioutils.h +0 -60
  82. package/ios/GizwitsiOSSDK.framework/Headers/log.h +0 -99
  83. package/ios/GizwitsiOSSDK.framework/Headers/lvec.h +0 -118
  84. package/ios/GizwitsiOSSDK.framework/Headers/mathutils.h +0 -330
  85. package/ios/GizwitsiOSSDK.framework/Headers/mfcc.h +0 -79
  86. package/ios/GizwitsiOSSDK.framework/Headers/musicutils.h +0 -171
  87. package/ios/GizwitsiOSSDK.framework/Headers/notes.h +0 -113
  88. package/ios/GizwitsiOSSDK.framework/Headers/onset.h +0 -347
  89. package/ios/GizwitsiOSSDK.framework/Headers/parameter.h +0 -159
  90. package/ios/GizwitsiOSSDK.framework/Headers/peakpicker.h +0 -57
  91. package/ios/GizwitsiOSSDK.framework/Headers/phasevoc.h +0 -112
  92. package/ios/GizwitsiOSSDK.framework/Headers/pitch.h +0 -197
  93. package/ios/GizwitsiOSSDK.framework/Headers/pitchfcomb.h +0 -76
  94. package/ios/GizwitsiOSSDK.framework/Headers/pitchmcomb.h +0 -77
  95. package/ios/GizwitsiOSSDK.framework/Headers/pitchschmitt.h +0 -75
  96. package/ios/GizwitsiOSSDK.framework/Headers/pitchspecacf.h +0 -103
  97. package/ios/GizwitsiOSSDK.framework/Headers/pitchyin.h +0 -100
  98. package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfast.h +0 -102
  99. package/ios/GizwitsiOSSDK.framework/Headers/pitchyinfft.h +0 -99
  100. package/ios/GizwitsiOSSDK.framework/Headers/resampler.h +0 -65
  101. package/ios/GizwitsiOSSDK.framework/Headers/sampler.h +0 -140
  102. package/ios/GizwitsiOSSDK.framework/Headers/scale.h +0 -80
  103. package/ios/GizwitsiOSSDK.framework/Headers/sink.h +0 -181
  104. package/ios/GizwitsiOSSDK.framework/Headers/sink_apple_audio.h +0 -163
  105. package/ios/GizwitsiOSSDK.framework/Headers/sink_sndfile.h +0 -162
  106. package/ios/GizwitsiOSSDK.framework/Headers/sink_wavwrite.h +0 -162
  107. package/ios/GizwitsiOSSDK.framework/Headers/source.h +0 -184
  108. package/ios/GizwitsiOSSDK.framework/Headers/source_apple_audio.h +0 -156
  109. package/ios/GizwitsiOSSDK.framework/Headers/source_avcodec.h +0 -155
  110. package/ios/GizwitsiOSSDK.framework/Headers/source_sndfile.h +0 -155
  111. package/ios/GizwitsiOSSDK.framework/Headers/source_wavread.h +0 -160
  112. package/ios/GizwitsiOSSDK.framework/Headers/specdesc.h +0 -204
  113. package/ios/GizwitsiOSSDK.framework/Headers/tempo.h +0 -255
  114. package/ios/GizwitsiOSSDK.framework/Headers/tss.h +0 -103
  115. package/ios/GizwitsiOSSDK.framework/Headers/types.h +0 -70
  116. package/ios/GizwitsiOSSDK.framework/Headers/vecutils.h +0 -116
  117. package/ios/GizwitsiOSSDK.framework/Headers/wavetable.h +0 -178
  118. package/ios/GizwitsiOSSDK.framework/Info.plist +0 -0
  119. package/ios/GizwitsiOSSDK.framework/LICENSE +0 -17
  120. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  121. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.abi.json +0 -57489
  122. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -1752
  123. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  124. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftinterface +0 -1752
  125. package/ios/GizwitsiOSSDK.framework/Modules/GizwitsiOSSDK.swiftmodule/arm64-apple-ios.swiftmodule +0 -0
  126. package/ios/GizwitsiOSSDK.framework/Modules/module.modulemap +0 -11
  127. package/ios/GizwitsiOSSDK.framework/PrivacyInfo.xcprivacy +0 -23
  128. package/ios/GizwitsiOSSDK.framework/README.md +0 -31
@@ -1,886 +0,0 @@
1
- //
2
- // MQTTSession.h
3
- // MQTTClient.framework
4
- //
5
-
6
- /**
7
- Using MQTT in your Objective-C application
8
-
9
- @author Christoph Krey c@ckrey.de
10
- @copyright Copyright © 2013-2017, Christoph Krey. All rights reserved.
11
-
12
- based on Copyright (c) 2011, 2013, 2lemetry LLC
13
- All rights reserved. This program and the accompanying materials
14
- are made available under the terms of the Eclipse Public License v1.0
15
- which accompanies this distribution, and is available at
16
- http://www.eclipse.org/legal/epl-v10.html
17
-
18
- @see http://mqtt.org
19
- */
20
-
21
-
22
- #import <Foundation/Foundation.h>
23
-
24
- #import "_MQTTMessage.h"
25
- #import "_MQTTPersistence.h"
26
- #import "_MQTTTransport.h"
27
-
28
- @class _MQTTSession;
29
- @class _MQTTSSLSecurityPolicy;
30
-
31
- /**
32
- Enumeration of MQTTSession states
33
- */
34
- typedef NS_ENUM(NSInteger, _MQTTSessionStatus) {
35
- MQTTSessionStatusCreated,
36
- MQTTSessionStatusConnecting,
37
- MQTTSessionStatusConnected,
38
- MQTTSessionStatusDisconnecting,
39
- MQTTSessionStatusClosed,
40
- MQTTSessionStatusError
41
- };
42
-
43
- /**
44
- Enumeration of MQTTSession events
45
- */
46
- typedef NS_ENUM(NSInteger, _MQTTSessionEvent) {
47
- MQTTSessionEventConnected,
48
- MQTTSessionEventConnectionRefused,
49
- MQTTSessionEventConnectionClosed,
50
- MQTTSessionEventConnectionError,
51
- MQTTSessionEventProtocolError,
52
- MQTTSessionEventConnectionClosedByBroker
53
- };
54
-
55
- /**
56
- The error domain used for all errors created by MQTTSession
57
- */
58
- extern NSString * const _MQTTSessionErrorDomain;
59
-
60
- /**
61
- The error codes used for all errors created by MQTTSession
62
- */
63
- typedef NS_ENUM(NSInteger, _MQTTSessionError) {
64
- MQTTSessionErrorConnectionRefused = -8, // Sent if the server closes the connection without sending an appropriate error CONNACK
65
- MQTTSessionErrorIllegalMessageReceived = -7,
66
- MQTTSessionErrorDroppingOutgoingMessage = -6, // For some reason the value is the same as for MQTTSessionErrorNoResponse
67
- MQTTSessionErrorNoResponse = -6, // For some reason the value is the same as for MQTTSessionErrorDroppingOutgoingMessage
68
- MQTTSessionErrorEncoderNotReady = -5,
69
- MQTTSessionErrorInvalidConnackReceived = -2, // Sent if the message received from server was an invalid connack message
70
- MQTTSessionErrorNoConnackReceived = -1, // Sent if first message received from server was no connack message
71
-
72
- MQTTSessionErrorConnackUnacceptableProtocolVersion = 1, // Value as defined by MQTT Protocol
73
- MQTTSessionErrorConnackIdentifierRejected = 2, // Value as defined by MQTT Protocol
74
- MQTTSessionErrorConnackServeUnavailable = 3, // Value as defined by MQTT Protocol
75
- MQTTSessionErrorConnackBadUsernameOrPassword = 4, // Value as defined by MQTT Protocol
76
- MQTTSessionErrorConnackNotAuthorized = 5, // Value as defined by MQTT Protocol
77
- MQTTSessionErrorConnackReserved = 6, // Should be value 6-255, as defined by MQTT Protocol
78
- };
79
-
80
- /** Session delegate gives your application control over the MQTTSession
81
- @note all callback methods are optional
82
- */
83
-
84
- @protocol _MQTTSessionDelegate <NSObject>
85
-
86
- @optional
87
-
88
- /** gets called when a new message was received
89
- @param session the MQTTSession reporting the new message
90
- @param data the data received, might be zero length
91
- @param topic the topic the data was published to
92
- @param qos the qos of the message
93
- @param retained indicates if the data retransmitted from server storage
94
- @param mid the Message Identifier of the message if qos = 1 or 2, zero otherwise
95
- */
96
- - (void)newMessage:(_MQTTSession *)session
97
- data:(NSData *)data
98
- onTopic:(NSString *)topic
99
- qos:(_MQTTQosLevel)qos
100
- retained:(BOOL)retained
101
- mid:(unsigned int)mid;
102
-
103
- /** gets called when a new message was received
104
- @param session the MQTTSession reporting the new message
105
- @param data the data received, might be zero length
106
- @param topic the topic the data was published to
107
- @param qos the qos of the message
108
- @param retained indicates if the data retransmitted from server storage
109
- @param mid the Message Identifier of the message if qos = 1 or 2, zero otherwise
110
- @return true if the message was or will be processed, false if the message shall not be ack-ed
111
- */
112
- - (BOOL)newMessageWithFeedback:(_MQTTSession *)session
113
- data:(NSData *)data
114
- onTopic:(NSString *)topic
115
- qos:(_MQTTQosLevel)qos
116
- retained:(BOOL)retained
117
- mid:(unsigned int)mid;
118
-
119
- /** for mqttio-OBJC backward compatibility
120
- @param session see newMessage for description
121
- @param data see newMessage for description
122
- @param topic see newMessage for description
123
- */
124
- - (void)session:(_MQTTSession*)session newMessage:(NSData*)data onTopic:(NSString*)topic;
125
-
126
- /** gets called when a connection is established, closed or a problem occurred
127
- @param session the MQTTSession reporting the event
128
- @param eventCode the code of the event
129
- @param error an optional additional error object with additional information
130
- */
131
- - (void)handleEvent:(_MQTTSession *)session event:(_MQTTSessionEvent)eventCode error:(NSError *)error;
132
-
133
- /** for mqttio-OBJC backward compatibility
134
- @param session the MQTTSession reporting the event
135
- @param eventCode the code of the event
136
- */
137
- - (void)session:(_MQTTSession*)session handleEvent:(_MQTTSessionEvent)eventCode;
138
-
139
- /** gets called when a connection has been successfully established
140
- @param session the MQTTSession reporting the connect
141
-
142
- */
143
- - (void)connected:(_MQTTSession *)session;
144
-
145
- /** gets called when a connection has been successfully established
146
- @param session the MQTTSession reporting the connect
147
- @param sessionPresent represents the Session Present flag sent by the broker
148
-
149
- */
150
- - (void)connected:(_MQTTSession *)session sessionPresent:(BOOL)sessionPresent;
151
-
152
- /** gets called when a connection has been refused
153
- @param session the MQTTSession reporting the refusal
154
- @param error an optional additional error object with additional information
155
- */
156
- - (void)connectionRefused:(_MQTTSession *)session error:(NSError *)error;
157
-
158
- /** gets called when a connection has been closed
159
- @param session the MQTTSession reporting the close
160
-
161
- */
162
- - (void)connectionClosed:(_MQTTSession *)session;
163
-
164
- /** gets called when a connection error happened
165
- @param session the MQTTSession reporting the connect error
166
- @param error an optional additional error object with additional information
167
- */
168
- - (void)connectionError:(_MQTTSession *)session error:(NSError *)error;
169
-
170
- /** gets called when an MQTT protocol error happened
171
- @param session the MQTTSession reporting the protocol error
172
- @param error an optional additional error object with additional information
173
- */
174
- - (void)protocolError:(_MQTTSession *)session error:(NSError *)error;
175
-
176
- /** gets called when a published message was actually delivered
177
- @param session the MQTTSession reporting the delivery
178
- @param msgID the Message Identifier of the delivered message
179
- @note this method is called after a publish with qos 1 or 2 only
180
- */
181
- - (void)messageDelivered:(_MQTTSession *)session msgID:(UInt16)msgID;
182
-
183
- /** gets called when a published message was actually delivered
184
- @param session the MQTTSession reporting the delivery
185
- @param msgID the Message Identifier of the delivered message
186
- @param topic the topic of the delivered message
187
- @param data the data Identifier of the delivered message
188
- @param qos the QoS level of the delivered message
189
- @param retainFlag the retain Flag of the delivered message
190
- @note this method is called after a publish with qos 1 or 2 only
191
- */
192
- - (void)messageDelivered:(_MQTTSession *)session
193
- msgID:(UInt16)msgID
194
- topic:(NSString *)topic
195
- data:(NSData *)data
196
- qos:(_MQTTQosLevel)qos
197
- retainFlag:(BOOL)retainFlag;
198
-
199
- /** gets called when a subscription is acknowledged by the MQTT broker
200
- @param session the MQTTSession reporting the acknowledge
201
- @param msgID the Message Identifier of the SUBSCRIBE message
202
- @param qoss an array containing the granted QoS(s) related to the SUBSCRIBE message
203
- (see subscribeTopic, subscribeTopics)
204
- */
205
- - (void)subAckReceived:(_MQTTSession *)session msgID:(UInt16)msgID grantedQoss:(NSArray<NSNumber *> *)qoss;
206
-
207
- /** gets called when an unsubscribe is acknowledged by the MQTT broker
208
- @param session the MQTTSession reporting the acknowledge
209
- @param msgID the Message Identifier of the UNSUBSCRIBE message
210
- */
211
- - (void)unsubAckReceived:(_MQTTSession *)session msgID:(UInt16)msgID;
212
-
213
- /** gets called when a command is sent to the MQTT broker
214
- use this for low level monitoring of the MQTT connection
215
- @param session the MQTTSession reporting the sent command
216
- @param type the MQTT command type
217
- @param qos the Quality of Service of the command
218
- @param retained the retained status of the command
219
- @param duped the duplication status of the command
220
- @param mid the Message Identifier of the command
221
- @param data the payload data of the command if any, might be zero length
222
- */
223
- - (void)sending:(_MQTTSession *)session type:(_MQTTCommandType)type qos:(_MQTTQosLevel)qos retained:(BOOL)retained duped:(BOOL)duped mid:(UInt16)mid data:(NSData *)data;
224
-
225
- /** gets called when a command is received from the MQTT broker
226
- use this for low level monitoring of the MQTT connection
227
- @param session the MQTTSession reporting the received command
228
- @param type the MQTT command type
229
- @param qos the Quality of Service of the command
230
- @param retained the retained status of the command
231
- @param duped the duplication status of the command
232
- @param mid the Message Identifier of the command
233
- @param data the payload data of the command if any, might be zero length
234
- */
235
- - (void)received:(_MQTTSession *)session type:(_MQTTCommandType)type qos:(_MQTTQosLevel)qos retained:(BOOL)retained duped:(BOOL)duped mid:(UInt16)mid data:(NSData *)data;
236
-
237
- /** gets called when a command is received from the MQTT broker
238
- use this for low level control of the MQTT connection
239
- @param session the MQTTSession reporting the received command
240
- @param type the MQTT command type
241
- @param qos the Quality of Service of the command
242
- @param retained the retained status of the command
243
- @param duped the duplication status of the command
244
- @param mid the Message Identifier of the command
245
- @param data the payload data of the command if any, might be zero length
246
- @return true if the sessionmanager should ignore the received message
247
- */
248
- - (BOOL)ignoreReceived:(_MQTTSession *)session type:(_MQTTCommandType)type qos:(_MQTTQosLevel)qos retained:(BOOL)retained duped:(BOOL)duped mid:(UInt16)mid data:(NSData *)data;
249
-
250
- /** gets called when the content of MQTTClients internal buffers change
251
- use for monitoring the completion of transmitted and received messages
252
- @param session the MQTTSession reporting the change
253
- @param queued for backward compatibility only: MQTTClient does not queue messages anymore except during QoS protocol
254
- @param flowingIn the number of incoming messages not acknowledged by the MQTTClient yet
255
- @param flowingOut the number of outgoing messages not yet acknowledged by the MQTT broker
256
- */
257
- - (void)buffered:(_MQTTSession *)session
258
- queued:(NSUInteger)queued
259
- flowingIn:(NSUInteger)flowingIn
260
- flowingOut:(NSUInteger)flowingOut;
261
-
262
- /** gets called when the content of MQTTClients internal buffers change
263
- use for monitoring the completion of transmitted and received messages
264
- @param session the MQTTSession reporting the change
265
- @param flowingIn the number of incoming messages not acknowledged by the MQTTClient yet
266
- @param flowingOut the number of outgoing messages not yet acknowledged by the MQTT broker
267
- */
268
- - (void)buffered:(_MQTTSession *)session
269
- flowingIn:(NSUInteger)flowingIn
270
- flowingOut:(NSUInteger)flowingOut;
271
-
272
- @end
273
-
274
- typedef void (^_MQTTConnectHandler)(NSError *error);
275
- typedef void (^_MQTTDisconnectHandler)(NSError *error);
276
- typedef void (^_MQTTSubscribeHandler)(NSError *error, NSArray<NSNumber *> *gQoss);
277
- typedef void (^_MQTTUnsubscribeHandler)(NSError *error);
278
- typedef void (^_MQTTPublishHandler)(NSError *error);
279
-
280
- /** Session implements the MQTT protocol for your application
281
- *
282
- */
283
-
284
- @interface _MQTTSession : NSObject
285
-
286
- /** set this member variable to receive delegate messages
287
- @code
288
- #import "MQTTClient.h"
289
-
290
- @interface MyClass : NSObject <MQTTSessionDelegate>
291
- ...
292
- @end
293
-
294
- ...
295
- MQTTSession *session = [[MQTTSession alloc] init];
296
- session.delegate = self;
297
- ...
298
- - (void)handleEvent:(MQTTSession *)session
299
- event:(MQTTSessionEvent)eventCode
300
- error:(NSError *)error {
301
- ...
302
- }
303
- - (void)newMessage:(MQTTSession *)session
304
- data:(NSData *)data
305
- onTopic:(NSString *)topic
306
- qos:(MQTTQosLevel)qos
307
- retained:(BOOL)retained
308
- mid:(unsigned int)mid {
309
- ...
310
- }
311
- @endcode
312
-
313
- */
314
- @property (weak, nonatomic) id<_MQTTSessionDelegate> delegate;
315
-
316
- /** Control MQTT persistence by setting the properties of persistence before connecting to an MQTT broker.
317
- The settings are specific to a clientId.
318
-
319
- persistence.persistent = YES or NO (default) to establish file or in memory persistence. IMPORTANT: set immediately after creating the MQTTSession before calling any other method. Otherwise the default value (NO) will be used
320
- for this session.
321
-
322
- persistence.maxWindowSize (a positive number, default is 16) to control the number of messages sent before waiting for acknowledgement in Qos 1 or 2. Additional messages are
323
- stored and transmitted later.
324
-
325
- persistence.maxSize (a positive number of bytes, default is 64 MB) to limit the size of the persistence file. Messages published after the limit is reached are dropped.
326
-
327
- persistence.maxMessages (a positive number, default is 1024) to limit the number of messages stored. Additional messages published are dropped.
328
-
329
- Messages are deleted after they have been acknowledged.
330
- */
331
- @property (strong, nonatomic) id<_MQTTPersistence> persistence;
332
-
333
- /** block called once when connection is established
334
- */
335
- @property (copy, nonatomic) _MQTTConnectHandler connectHandler;
336
-
337
- /** block called when connection is established
338
- */
339
- @property (strong) void (^connectionHandler)(_MQTTSessionEvent event);
340
-
341
- /** block called when message is received
342
- */
343
- @property (strong) void (^messageHandler)(NSData* message, NSString* topic);
344
-
345
- /** Session status
346
- */
347
- @property (nonatomic, readonly) _MQTTSessionStatus status;
348
-
349
- /** Indicates if the broker found a persistent session when connecting with cleanSession:FALSE
350
- */
351
- @property (nonatomic, readonly) BOOL sessionPresent;
352
-
353
- /** streamSSLLevel an NSString containing the security level for read and write streams
354
- * For list of possible values see:
355
- * https://developer.apple.com/documentation/corefoundation/cfstream/cfstream_socket_security_level_constants
356
- * Please also note that kCFStreamSocketSecurityLevelTLSv1_2 is not in a list
357
- * and cannot be used as constant, but you can use it as a string value
358
- * defaults to kCFStreamSocketSecurityLevelNegotiatedSSL
359
- */
360
- @property (strong, nonatomic) NSString *streamSSLLevel;
361
-
362
- /** host an NSString containing the hostName or IP address of the Server
363
- */
364
- @property (readonly) NSString *host;
365
-
366
- /** port an unsigned 32 bit integer containing the IP port number of the Server
367
- */
368
- @property (readonly) UInt32 port;
369
-
370
- /** The Client Identifier identifies the Client to the Server. If nil, a random clientId is generated.
371
- */
372
- @property (strong, nonatomic) NSString *clientId;
373
-
374
- /** see userName an NSString object containing the user's name (or ID) for authentication. May be nil. */
375
- @property (strong, nonatomic) NSString *userName;
376
-
377
- /** see password an NSString object containing the user's password. If userName is nil, password must be nil as well.*/
378
- @property (strong, nonatomic) NSString *password;
379
-
380
- /** see keepAliveInterval The Keep Alive is a time interval measured in seconds.
381
- * The MQTTClient ensures that the interval between Control Packets being sent does not exceed
382
- * the Keep Alive value. In the absence of sending any other Control Packets, the Client sends a PINGREQ Packet.
383
- */
384
- @property (nonatomic) UInt16 keepAliveInterval;
385
-
386
- /** The serverKeepAlive is a time interval measured in seconds.
387
- * This value may be set by the broker and overrides keepAliveInterval if present
388
- * Zero means the broker does not perform any keep alive checks
389
- */
390
- @property (readonly, strong, nonatomic) NSNumber *serverKeepAlive;
391
-
392
- /** effectiveKeepAlive is a time interval measured in seconds
393
- * It indicates the effective keep alive interval after a successfull connect
394
- * where keepAliveInterval might have been overridden by the broker.
395
- */
396
- @property (readonly, nonatomic) UInt16 effectiveKeepAlive;
397
-
398
-
399
- /**
400
- * dupTimeout If PUBACK or PUBREC not received, message will be resent after this interval
401
- */
402
- @property (nonatomic) double dupTimeout;
403
-
404
- /** leanSessionFlag specifies if the server should discard previous session information. */
405
- @property (nonatomic) BOOL cleanSessionFlag;
406
-
407
- /** willFlag If the Will Flag is set to YES this indicates that
408
- * a Will Message MUST be published by the Server when the Server detects
409
- * that the Client is disconnected for any reason other than the Client flowing a DISCONNECT Packet.
410
- */
411
- @property (nonatomic) BOOL willFlag;
412
-
413
- /** willTopic If the Will Flag is set to YES, the Will Topic is a string, nil otherwise. */
414
- @property (strong, nonatomic) NSString *willTopic;
415
-
416
- /** willMsg If the Will Flag is set to YES the Will Message must be specified, nil otherwise. */
417
- @property (strong, nonatomic) NSData *willMsg;
418
-
419
- /** willQoS specifies the QoS level to be used when publishing the Will Message.
420
- * If the Will Flag is set to NO, then the Will QoS MUST be set to 0.
421
- * If the Will Flag is set to YES, the Will QoS MUST be a valid MQTTQosLevel.
422
- */
423
- @property (nonatomic) _MQTTQosLevel willQoS;
424
-
425
- /** willRetainFlag indicates if the server should publish the Will Messages with retainFlag.
426
- * If the Will Flag is set to NO, then the Will Retain Flag MUST be set to NO .
427
- * If the Will Flag is set to YES: If Will Retain is set to NO, the Serve
428
- * MUST publish the Will Message as a non-retained publication [MQTT-3.1.2-14].
429
- * If Will Retain is set to YES, the Server MUST publish the Will Message as a retained publication [MQTT-3.1.2-15].
430
- */
431
- @property (nonatomic) BOOL willRetainFlag;
432
-
433
- /** protocolLevel specifies the protocol to be used */
434
- @property (nonatomic) _MQTTProtocolVersion protocolLevel;
435
-
436
- /** sessionExpiryInterval specifies the number of seconds after which a session should expire MQTT v5.0*/
437
- @property (strong, nonatomic) NSNumber *sessionExpiryInterval;
438
-
439
- /** authMethod specifies the number of seconds after which a session should expire MQTT v5.0*/
440
- @property (strong, nonatomic) NSString *authMethod;
441
-
442
- /** authData specifies the number of seconds after which a session should expire MQTT v5.0*/
443
- @property (strong, nonatomic) NSData *authData;
444
-
445
- /** requestProblemInformation specifies the number of seconds after which a session should expire MQTT v5.0*/
446
- @property (strong, nonatomic) NSNumber *requestProblemInformation;
447
-
448
- /** willDelayInterval specifies the number of seconds after which a session should expire MQTT v5.0*/
449
- @property (strong, nonatomic) NSNumber *willDelayInterval;
450
-
451
- /** requestResponseInformation specifies the number of seconds after which a session should expire MQTT v5.0*/
452
- @property (strong, nonatomic) NSNumber *requestResponseInformation;
453
-
454
- /** receiveMaximum specifies the number of seconds after which a session should expire MQTT v5.0*/
455
- @property (strong, nonatomic) NSNumber *receiveMaximum;
456
-
457
- /** topicAliasMaximum specifies the number of seconds after which a session should expire MQTT v5.0*/
458
- @property (strong, nonatomic) NSNumber *topicAliasMaximum;
459
-
460
- /** topicAliasMaximum specifies the number of seconds after which a session should expire MQTT v5.0*/
461
- @property (strong, nonatomic) NSDictionary <NSString *, NSString*> *userProperty;
462
-
463
- /** maximumPacketSize specifies the number of seconds after which a session should expire MQTT v5.0*/
464
- @property (strong, nonatomic) NSNumber *maximumPacketSize;
465
-
466
- /** queue The queue where the streams are scheduled. */
467
- @property (strong, nonatomic) dispatch_queue_t queue;
468
-
469
-
470
- /** for mqttio-OBJC backward compatibility
471
- the connect message used is stored here
472
- */
473
- @property (strong, nonatomic) _MQTTMessage *connectMessage;
474
-
475
- /** the transport provider for MQTTClient
476
- *
477
- * assign an in instance of a class implementing the MQTTTransport protocol e.g.
478
- * MQTTCFSocketTransport before connecting.
479
- */
480
- @property (strong, nonatomic) id <_MQTTTransport> transport;
481
-
482
- /** certificates an NSArray holding client certificates or nil */
483
- @property (strong, nonatomic) NSArray *certificates;
484
-
485
- /** Require for VoIP background service
486
- * defaults to NO
487
- */
488
- @property (nonatomic) BOOL voip;
489
-
490
- /** connect to the given host through the given transport with the given
491
- * MQTT session parameters asynchronously
492
- *
493
- */
494
-
495
-
496
- - (void)connect;
497
-
498
- /** connects to the specified MQTT server
499
-
500
- @param connectHandler identifies a block which is executed on successfull or unsuccessfull connect. Might be nil
501
- error is nil in the case of a successful connect
502
- sessionPresent indicates in MQTT 3.1.1 if persistent session data was present at the server
503
- returns nothing and returns immediately. To check the connect results, register as an MQTTSessionDelegate and
504
- - watch for events
505
- - watch for connect or connectionRefused messages
506
- - watch for error messages
507
- or use the connectHandler block
508
-
509
- @code
510
- #import "MQTTClient.h"
511
-
512
- MQTTSession *session = [[MQTTSession alloc] init];
513
- ...
514
- [session connectWithConnectHandler:^(NSError *error, BOOL sessionPresent) {
515
- if (error) {
516
- NSLog(@"Error Connect %@", error.localizedDescription);
517
- } else {
518
- NSLog(@"Connected sessionPresent:%d", sessionPresent);
519
- }
520
- }];
521
- @endcode
522
-
523
- */
524
-
525
- - (void)connectWithConnectHandler:(_MQTTConnectHandler)connectHandler;
526
-
527
-
528
- /** disconnect gracefully
529
- *
530
- */
531
- - (void)disconnect;
532
-
533
- /** disconnect V5
534
- * @param returnCode the returncode send to the broker
535
- * @param sessionExpiryInterval the time in seconds before the session can be deleted
536
- * @param reasonString a string explaining the reason
537
- * @param userProperty additional dictionary of user key/value combinations
538
- */
539
- - (void)disconnectWithReturnCode:(_MQTTReturnCode)returnCode
540
- sessionExpiryInterval:(NSNumber *)sessionExpiryInterval
541
- reasonString:(NSString *)reasonString
542
- userProperty:(NSDictionary <NSString *, NSString *> *)userProperty;
543
-
544
-
545
- /** initialises the MQTT session with default values
546
- @return the initialised MQTTSession object
547
- @code
548
- #import "MQTTClient.h"
549
-
550
- MQTTSession *session = [[MQTTSession alloc] init];
551
- @endcode
552
- */
553
- - (_MQTTSession *)init;
554
-
555
-
556
-
557
- /** subscribes to a topic at a specific QoS level
558
-
559
- @param topic see subscribeToTopic:atLevel:subscribeHandler: for description
560
- @param qosLevel see subscribeToTopic:atLevel:subscribeHandler: for description
561
- @return the Message Identifier of the SUBSCRIBE message.
562
-
563
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
564
-
565
- @code
566
- #import "MQTTClient.h"
567
-
568
- MQTTSession *session = [[MQTTSession alloc] init];
569
- ...
570
- [session connect];
571
- ...
572
- [session subscribeToTopic:@"example/#" atLevel:2];
573
-
574
- @endcode
575
-
576
- */
577
-
578
- - (UInt16)subscribeToTopic:(NSString *)topic
579
- atLevel:(_MQTTQosLevel)qosLevel;
580
- /** subscribes to a topic at a specific QoS level
581
-
582
- @param topic the Topic Filter to subscribe to.
583
-
584
- @param qosLevel specifies the QoS Level of the subscription.
585
- qosLevel can be 0, 1, or 2.
586
- @param subscribeHandler identifies a block which is executed on successfull or unsuccessfull subscription.
587
- Might be nil. error is nil in the case of a successful subscription. In this case gQoss represents an
588
- array of grantes Qos
589
-
590
-
591
- @return the Message Identifier of the SUBSCRIBE message.
592
-
593
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
594
-
595
- @code
596
- #import "MQTTClient.h"
597
-
598
- MQTTSession *session = [[MQTTSession alloc] init];
599
- ...
600
- [session connect];
601
- ...
602
- [session subscribeToTopic:@"example/#" atLevel:2 subscribeHandler:^(NSError *error, NSArray<NSNumber *> *gQoss){
603
- if (error) {
604
- NSLog(@"Subscription failed %@", error.localizedDescription);
605
- } else {
606
- NSLog(@"Subscription sucessfull! Granted Qos: %@", gQoss);
607
- }
608
- }];
609
-
610
- @endcode
611
-
612
- */
613
-
614
- - (UInt16)subscribeToTopic:(NSString *)topic
615
- atLevel:(_MQTTQosLevel)qosLevel
616
- subscribeHandler:(_MQTTSubscribeHandler)subscribeHandler;
617
-
618
- /** subscribes a number of topics
619
-
620
- @param topics an NSDictionary<NSString *, NSNumber *> containing the Topic Filters to subscribe to as keys and
621
- the corresponding QoS as NSNumber values
622
-
623
- @return the Message Identifier of the SUBSCRIBE message.
624
-
625
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
626
-
627
- @code
628
- #import "MQTTClient.h"
629
-
630
- MQTTSession *session = [[MQTTSession alloc] init];
631
- ...
632
- [session connect];
633
-
634
- [session subscribeToTopics:@{
635
- @"example/#": @(0),
636
- @"example/status": @(2),
637
- @"other/#": @(1)
638
- }];
639
-
640
- @endcode
641
- */
642
-
643
-
644
- - (UInt16)subscribeToTopics:(NSDictionary<NSString *, NSNumber *> *)topics;
645
-
646
- /** subscribes a number of topics
647
-
648
- @param topics an NSDictionary<NSString *, NSNumber *> containing the Topic Filters to subscribe to as keys and
649
- the corresponding QoS as NSNumber values
650
- @param subscribeHandler identifies a block which is executed on successfull or unsuccessfull subscription.
651
- Might be nil. error is nil in the case of a successful subscription. In this case gQoss represents an
652
- array of grantes Qos
653
-
654
- @return the Message Identifier of the SUBSCRIBE message.
655
-
656
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
657
-
658
- @code
659
- #import "MQTTClient.h"
660
-
661
- MQTTSession *session = [[MQTTSession alloc] init];
662
- ...
663
- [session connect];
664
-
665
- [session subscribeToTopics:@{
666
- @"example/#": @(0),
667
- @"example/status": @(2),
668
- @"other/#": @(1)
669
- } subscribeHandler:^(NSError *error, NSArray<NSNumber *> *gQoss){
670
- if (error) {
671
- NSLog(@"Subscription failed %@", error.localizedDescription);
672
- } else {
673
- NSLog(@"Subscription sucessfull! Granted Qos: %@", gQoss);
674
- }
675
- }];
676
-
677
-
678
- @endcode
679
- */
680
-
681
-
682
- - (UInt16)subscribeToTopics:(NSDictionary<NSString *, NSNumber *> *)topics
683
- subscribeHandler:(_MQTTSubscribeHandler)subscribeHandler;
684
-
685
- /** unsubscribes from a topic
686
-
687
- @param topic the Topic Filter to unsubscribe from.
688
-
689
- @return the Message Identifier of the UNSUBSCRIBE message.
690
-
691
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
692
-
693
- @code
694
- #import "MQTTClient.h"
695
-
696
- MQTTSession *session = [[MQTTSession alloc] init];
697
- ...
698
- [session connect];
699
-
700
- [session unsubscribeTopic:@"example/#"];
701
-
702
- @endcode
703
- */
704
-
705
- - (UInt16)unsubscribeTopic:(NSString *)topic;
706
-
707
- /** unsubscribes from a topic
708
-
709
- @param topic the Topic Filter to unsubscribe from.
710
- @param unsubscribeHandler identifies a block which is executed on successfull or unsuccessfull subscription.
711
- Might be nil. error is nil in the case of a successful subscription. In this case gQoss represents an
712
- array of grantes Qos
713
-
714
- @return the Message Identifier of the UNSUBSCRIBE message.
715
-
716
- @note returns immediately.
717
-
718
- */
719
-
720
-
721
- - (UInt16)unsubscribeTopic:(NSString *)topic
722
- unsubscribeHandler:(_MQTTUnsubscribeHandler)unsubscribeHandler;
723
-
724
- /** unsubscribes from a number of topics
725
-
726
- @param topics an NSArray<NSString *> of topics to unsubscribe from
727
-
728
- @return the Message Identifier of the UNSUBSCRIBE message.
729
-
730
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
731
-
732
- @code
733
- #import "MQTTClient.h"
734
-
735
- MQTTSession *session = [[MQTTSession alloc] init];
736
- ...
737
- [session connect];
738
-
739
- [session unsubscribeTopics:@[
740
- @"example/#",
741
- @"example/status",
742
- @"other/#"
743
- ]];
744
-
745
- @endcode
746
-
747
- */
748
-
749
- - (UInt16)unsubscribeTopics:(NSArray<NSString *> *)topics;
750
-
751
- /** unsubscribes from a number of topics
752
-
753
- @param topics an NSArray<NSString *> of topics to unsubscribe from
754
-
755
- @param unsubscribeHandler identifies a block which is executed on successfull or unsuccessfull subscription.
756
- Might be nil. error is nil in the case of a successful subscription. In this case gQoss represents an
757
- array of grantes Qos
758
-
759
- @return the Message Identifier of the UNSUBSCRIBE message.
760
-
761
- @note returns immediately.
762
-
763
- */
764
- - (UInt16)unsubscribeTopics:(NSArray<NSString *> *)topics
765
- unsubscribeHandler:(_MQTTUnsubscribeHandler)unsubscribeHandler;
766
-
767
- /** publishes data on a given topic at a specified QoS level and retain flag
768
-
769
- @param data the data to be sent. length may range from 0 to 268,435,455 - 4 - _lengthof-topic_ bytes. Defaults to length 0.
770
- @param topic the Topic to identify the data
771
- @param retainFlag if YES, data is stored on the MQTT broker until overwritten by the next publish with retainFlag = YES
772
- @param qos specifies the Quality of Service for the publish
773
- qos can be 0, 1, or 2.
774
- @return the Message Identifier of the PUBLISH message. Zero if qos 0. If qos 1 or 2, zero if message was dropped
775
-
776
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
777
-
778
- @code
779
- #import "MQTTClient.h"
780
-
781
- MQTTSession *session = [[MQTTSession alloc] init];
782
- ...
783
- [session connect];
784
-
785
- [session publishData:[@"Sample Data" dataUsingEncoding:NSUTF8StringEncoding]
786
- topic:@"example/data"
787
- retain:YES
788
- qos:1];
789
- @endcode
790
-
791
- */
792
-
793
- - (UInt16)publishData:(NSData *)data
794
- onTopic:(NSString *)topic
795
- retain:(BOOL)retainFlag
796
- qos:(_MQTTQosLevel)qos;
797
-
798
- /** publishes data on a given topic at a specified QoS level and retain flag
799
-
800
- @param data the data to be sent. length may range from 0 to 268,435,455 - 4 - _lengthof-topic_ bytes. Defaults to length 0.
801
- @param topic the Topic to identify the data
802
- @param retainFlag if YES, data is stored on the MQTT broker until overwritten by the next publish with retainFlag = YES
803
- @param qos specifies the Quality of Service for the publish
804
- qos can be 0, 1, or 2.
805
-
806
-
807
- @param publishHandler identifies a block which is executed on successfull or unsuccessfull publsh. Might be nil
808
- error is nil in the case of a successful connect
809
- sessionPresent indicates in MQTT 3.1.1 if persistent session data was present at the server
810
-
811
-
812
- @return the Message Identifier of the PUBLISH message. Zero if qos 0. If qos 1 or 2, zero if message was dropped
813
-
814
- @note returns immediately. To check results, register as an MQTTSessionDelegate and watch for events.
815
-
816
- @code
817
- #import "MQTTClient.h"
818
-
819
- MQTTSession *session = [[MQTTSession alloc] init];
820
- ...
821
- [session connect];
822
-
823
- [session publishData:[@"Sample Data" dataUsingEncoding:NSUTF8StringEncoding]
824
- topic:@"example/data"
825
- retain:YES
826
- qos:1
827
- publishHandler:^(NSError *error){
828
- if (error) {
829
- DDLogVerbose(@"error: %@ %@", error.localizedDescription, payload);
830
- } else {
831
- DDLogVerbose(@"delivered:%@", payload);
832
- delivered++;
833
- }
834
- }];
835
- @endcode
836
-
837
- */
838
-
839
- - (UInt16)publishData:(NSData *)data
840
- onTopic:(NSString *)topic
841
- retain:(BOOL)retainFlag
842
- qos:(_MQTTQosLevel)qos
843
- publishHandler:(_MQTTPublishHandler)publishHandler;
844
-
845
- /** closes an MQTTSession gracefully
846
-
847
- If the connection was successfully established before, a DISCONNECT is sent.
848
-
849
- @param disconnectHandler identifies a block which is executed on successfull or unsuccessfull disconnect. Might be nil. error is nil in the case of a successful disconnect
850
-
851
- @code
852
- #import "MQTTClient.h"
853
-
854
- MQTTSession *session = [[MQTTSession alloc] init];
855
- ...
856
- [session connect];
857
-
858
- ...
859
-
860
- [session closeWithDisconnectHandler^(NSError *error) {
861
- if (error) {
862
- NSLog(@"Error Disconnect %@", error.localizedDescription);
863
- }
864
- NSLog(@"Session closed");
865
- }];
866
-
867
-
868
- @endcode
869
-
870
- */
871
- - (void)closeWithDisconnectHandler:(_MQTTDisconnectHandler)disconnectHandler;
872
-
873
- /** close V5
874
- * @param returnCode the returncode send to the broker
875
- * @param sessionExpiryInterval the time in seconds before the session can be deleted
876
- * @param reasonString a string explaining the reason
877
- * @param userProperty additional dictionary of user key/value combinations
878
- * @param disconnectHandler will be called when the disconnect finished
879
- */
880
- - (void)closeWithReturnCode:(_MQTTReturnCode)returnCode
881
- sessionExpiryInterval:(NSNumber *)sessionExpiryInterval
882
- reasonString:(NSString *)reasonString
883
- userProperty:(NSDictionary <NSString *, NSString *> *)userProperty
884
- disconnectHandler:(_MQTTDisconnectHandler)disconnectHandler;
885
-
886
- @end