AWS IoT Over-the-air Update v2.0.0 (Release Candidate)
Client library for AWS IoT OTA
ota_mqtt_interface.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v2.0.0 (Release Candidate)
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
6 * this software and associated documentation files (the "Software"), to deal in
7 * the Software without restriction, including without limitation the rights to
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 * the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22
28#ifndef OTA_MQTT_INTERFACE_H
29#define OTA_MQTT_INTERFACE_H
30
31/* Standard library includes. */
32#include <stddef.h>
33#include <stdint.h>
34
81typedef enum OtaMqttStatus
82{
88
105typedef OtaMqttStatus_t ( * OtaMqttSubscribe_t ) ( const char * pTopicFilter,
106 uint16_t topicFilterLength,
107 uint8_t ucQoS );
108
124typedef OtaMqttStatus_t ( * OtaMqttUnsubscribe_t ) ( const char * pTopicFilter,
125 uint16_t topicFilterLength,
126 uint8_t ucQoS );
127
145typedef OtaMqttStatus_t ( * OtaMqttPublish_t )( const char * const pacTopic,
146 uint16_t usTopicLen,
147 const char * pcMsg,
148 uint32_t ulMsgSize,
149 uint8_t ucQos );
150
155typedef struct OtaMqttInterface
156{
161
162#endif /* ifndef OTA_MQTT_INTERFACE_H */
OtaMqttStatus_t
The OTA MQTT interface return status.
Definition: ota_mqtt_interface.h:82
@ OtaMqttSuccess
OTA MQTT interface success.
Definition: ota_mqtt_interface.h:83
@ OtaMqttUnsubscribeFailed
Failed to unsubscribe from a topic.
Definition: ota_mqtt_interface.h:86
@ OtaMqttPublishFailed
Attempt to publish a MQTT message failed.
Definition: ota_mqtt_interface.h:84
@ OtaMqttSubscribeFailed
Failed to subscribe to a topic.
Definition: ota_mqtt_interface.h:85
OtaMqttStatus_t(* OtaMqttSubscribe_t)(const char *pTopicFilter, uint16_t topicFilterLength, uint8_t ucQoS)
Subscribe to the Mqtt topics.
Definition: ota_mqtt_interface.h:105
OtaMqttStatus_t(* OtaMqttPublish_t)(const char *const pacTopic, uint16_t usTopicLen, const char *pcMsg, uint32_t ulMsgSize, uint8_t ucQos)
Publish message to a topic.
Definition: ota_mqtt_interface.h:145
OtaMqttStatus_t(* OtaMqttUnsubscribe_t)(const char *pTopicFilter, uint16_t topicFilterLength, uint8_t ucQoS)
Unsubscribe to the Mqtt topics.
Definition: ota_mqtt_interface.h:124
OTA Event Interface structure.
Definition: ota_mqtt_interface.h:156
OtaMqttPublish_t publish
Interface for publishing MQTT messages.
Definition: ota_mqtt_interface.h:159
OtaMqttSubscribe_t subscribe
Interface for subscribing to Mqtt topics.
Definition: ota_mqtt_interface.h:157
OtaMqttUnsubscribe_t unsubscribe
interface for unsubscribing to MQTT topics.
Definition: ota_mqtt_interface.h:158