32 #include "iot_config.h" 126 void * pReceiveContext );
454 size_t subscriptionCount,
495 size_t subscriptionCount,
497 uint32_t timeoutMs );
541 size_t subscriptionCount,
577 size_t subscriptionCount,
579 uint32_t timeoutMs );
713 uint32_t timeoutMs );
768 uint32_t timeoutMs );
849 const char * pTopicFilter,
850 uint16_t topicFilterLength,
860 #define IotMqtt_Subscribe IotMqtt_SubscribeAsync 861 #define IotMqtt_TimedSubscribe IotMqtt_SubscribeSync 862 #define IotMqtt_Unsubscribe IotMqtt_UnsubscribeAsync 863 #define IotMqtt_TimedUnsubscribe IotMqtt_UnsubscribeSync 864 #define IotMqtt_Publish IotMqtt_PublishAsync 865 #define IotMqtt_TimedPublish IotMqtt_PublishSync IotMqttError_t IotMqtt_SubscribeAsync(IotMqttConnection_t mqttConnection, const IotMqttSubscription_t *pSubscriptionList, size_t subscriptionCount, uint32_t flags, const IotMqttCallbackInfo_t *pCallbackInfo, IotMqttOperation_t *const pSubscribeOperation)
Subscribes to the given array of topic filters and optionally receive an asynchronous notification wh...
Definition: iot_mqtt_api.c:1510
IotMqttError_t
Return codes of MQTT functions.
Definition: iot_mqtt_types.h:106
MQTT callback function and context.
Definition: iot_mqtt_types.h:518
IotMqttError_t IotMqtt_Connect(const IotMqttNetworkInfo_t *pNetworkInfo, const IotMqttConnectInfo_t *pConnectInfo, uint32_t timeoutMs, IotMqttConnection_t *const pMqttConnection)
Establish a new MQTT connection.
Definition: iot_mqtt_api.c:1229
IotMqttError_t IotMqtt_Wait(IotMqttOperation_t operation, uint32_t timeoutMs)
Waits for an operation to complete.
Definition: iot_mqtt_api.c:1810
IotMqttError_t IotMqtt_UnsubscribeAsync(IotMqttConnection_t mqttConnection, const IotMqttSubscription_t *pSubscriptionList, size_t subscriptionCount, uint32_t flags, const IotMqttCallbackInfo_t *pCallbackInfo, IotMqttOperation_t *const pUnsubscribeOperation)
Unsubscribes from the given array of topic filters and optionally receive an asynchronous notificatio...
Definition: iot_mqtt_api.c:1575
void IotMqtt_ReceiveCallback(IotNetworkConnection_t pNetworkConnection, void *pReceiveContext)
Network receive callback for the MQTT library.
Definition: iot_mqtt_network.c:828
bool IotMqtt_IsSubscribed(IotMqttConnection_t mqttConnection, const char *pTopicFilter, uint16_t topicFilterLength, IotMqttSubscription_t *const pCurrentSubscription)
Check if an MQTT connection has a subscription for a topic filter.
Definition: iot_mqtt_subscription.c:652
const char * IotMqtt_OperationType(IotMqttOperationType_t operation)
Returns a string that describes an IotMqttOperationType_t.
Definition: iot_mqtt_api.c:1938
void IotMqtt_Cleanup(void)
One-time deinitialization function for the MQTT library.
Definition: iot_mqtt_api.c:1203
IotMqttError_t IotMqtt_PublishAsync(IotMqttConnection_t mqttConnection, const IotMqttPublishInfo_t *pPublishInfo, uint32_t flags, const IotMqttCallbackInfo_t *pCallbackInfo, IotMqttOperation_t *const pPublishOperation)
Publishes a message to the given topic name and optionally receive an asynchronous notification when ...
Definition: iot_mqtt_api.c:1645
Information on a PUBLISH message.
Definition: iot_mqtt_types.h:395
struct _mqttConnection * IotMqttConnection_t
Opaque handle of an MQTT connection.
Definition: iot_mqtt_types.h:67
MQTT subscription.
Definition: iot_mqtt_types.h:553
MQTT connection details.
Definition: iot_mqtt_types.h:589
IotMqttError_t IotMqtt_PublishSync(IotMqttConnection_t mqttConnection, const IotMqttPublishInfo_t *pPublishInfo, uint32_t flags, uint32_t timeoutMs)
Publish a message to the given topic name with a timeout.
Definition: iot_mqtt_api.c:1762
IotMqttError_t IotMqtt_SubscribeSync(IotMqttConnection_t mqttConnection, const IotMqttSubscription_t *pSubscriptionList, size_t subscriptionCount, uint32_t flags, uint32_t timeoutMs)
Subscribes to the given array of topic filters with a timeout.
Definition: iot_mqtt_api.c:1541
IotMqttError_t IotMqtt_UnsubscribeSync(IotMqttConnection_t mqttConnection, const IotMqttSubscription_t *pSubscriptionList, size_t subscriptionCount, uint32_t flags, uint32_t timeoutMs)
Unsubscribes from a given array of topic filters with a timeout.
Definition: iot_mqtt_api.c:1611
IotMqttError_t IotMqtt_Init(void)
One-time initialization function for the MQTT library.
Definition: iot_mqtt_api.c:1165
struct _mqttOperation * IotMqttOperation_t
Opaque handle that references an in-progress MQTT operation.
Definition: iot_mqtt_types.h:90
MQTT network connection details.
Definition: iot_mqtt_types.h:1013
IotMqttOperationType_t
Types of MQTT operations.
Definition: iot_mqtt_types.h:280
void IotMqtt_Disconnect(IotMqttConnection_t mqttConnection, uint32_t flags)
Closes an MQTT connection and frees resources.
Definition: iot_mqtt_api.c:1369
const char * IotMqtt_strerror(IotMqttError_t status)
Returns a string that describes an IotMqttError_t.
Definition: iot_mqtt_api.c:1874