#import <ThingSmartMQTTChannel.h>
Definition at line 101 of file ThingSmartMQTTChannel.h.
◆ addDelegate: [1/2]
Adds an MQTT channel delegate.
- Parameters
-
◆ addDelegate: [2/2]
Adds an MQTT channel delegate.
- Parameters
-
◆ close [1/2]
Disconnects from the MQTT host.
◆ close [2/2]
Disconnects from the MQTT host.
◆ connectState [1/2]
- (ThingSmartMqttConnectState) connectState |
|
|
|
The MQTT connection state.
◆ connectState [2/2]
- (ThingSmartMqttConnectState) connectState |
|
|
|
The MQTT connection state.
◆ hasSubscribedTopic: [1/2]
- (BOOL) hasSubscribedTopic: |
|
(NSString *) |
topic |
|
Whether MQTT channel has subscribed to a topic.
- Parameters
-
◆ hasSubscribedTopic: [2/2]
- (BOOL) hasSubscribedTopic: |
|
(NSString *) |
topic |
|
Whether MQTT channel has subscribed to a topic.
- Parameters
-
◆ publishMessage:topic:success:failure: [1/2]
Publishes the MQTT data.
- Parameters
-
data | The data. |
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
- Returns
- The message identifier of the published message. A value of
zero
is returned at the QoS level 0. A message identifier is returned at the QoS level 1 or 2.
◆ publishMessage:topic:success:failure: [2/2]
Publishes the MQTT data.
- Parameters
-
data | The data. |
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
- Returns
- The message identifier of the published message. A value of
zero
is returned at the QoS level 0. A message identifier is returned at the QoS level 1 or 2.
◆ publishMessageWithMessageModel:topic:success:failure: [1/2]
Publishes MQTT data.
- Parameters
-
messageModel | The message model. |
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ publishMessageWithMessageModel:topic:success:failure: [2/2]
Publishes MQTT data.
- Parameters
-
messageModel | The message model. |
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ removeDelegate: [1/2]
Removes an MQTT channel delegate.
- Parameters
-
◆ removeDelegate: [2/2]
Removes an MQTT channel delegate.
- Parameters
-
◆ sharedInstance [1/2]
+ (instancetype) sharedInstance |
|
|
|
◆ sharedInstance [2/2]
+ (instancetype) sharedInstance |
|
|
|
◆ startConnectToHostWithMqttConfig: [1/2]
Connects to the MQTT host.
- Parameters
-
mqttConfig | The configuration of the MQTT connection. |
◆ startConnectToHostWithMqttConfig: [2/2]
Connects to the MQTT host.
- Parameters
-
mqttConfig | The configuration of the MQTT connection. |
◆ subscribeToTopic:devInfo:success:failure: [1/2]
- (void) subscribeToTopic: |
|
(NSString *) |
topic |
devInfo: |
|
(nullable NSDictionary *) |
devInfo |
success: |
|
(nullable ThingSuccessHandler) |
success |
failure: |
|
(nullable ThingFailureError) |
failure |
|
|
| |
Subscribes to a topic.
- Parameters
-
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ subscribeToTopic:devInfo:success:failure: [2/2]
- (void) subscribeToTopic: |
|
(NSString *) |
topic |
devInfo: |
|
(nullable NSDictionary *) |
devInfo |
success: |
|
(nullable ThingSuccessHandler) |
success |
failure: |
|
(nullable ThingFailureError) |
failure |
|
|
| |
Subscribes to a topic.
- Parameters
-
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ unsubscribeToTopic:success:failure: [1/2]
Unsubscribes from a topic.
- Parameters
-
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ unsubscribeToTopic:success:failure: [2/2]
Unsubscribes from a topic.
- Parameters
-
topic | The topic. |
success | Called when the task is finished. |
failure | Called when the task is interrupted by an error. |
◆ backgroundEnabled
- (BOOL) backgroundEnabled |
|
readwritenonatomicassign |
Special reconnect enable while App’s state is Background Active. Default is NO.
Definition at line 109 of file ThingSmartMQTTChannel.h.
◆ deviceCorrector
◆ quicEnabled
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingSmartMQTTChannelKit/Build/ThingSmartMQTTChannelKit.xcframework/ios-arm64_x86_64-simulator/ThingSmartMQTTChannelKit.framework/Headers/ThingSmartMQTTChannel.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartMQTTChannelKit/Build/ThingSmartMQTTChannelKit.xcframework/ios-arm64/ThingSmartMQTTChannelKit.framework/Headers/ThingSmartMQTTChannel.h