Changes to enabled on-line compiler

Committer:
JMF
Date:
Wed May 30 20:59:51 2018 +0000
Revision:
0:082731ede69f
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JMF 0:082731ede69f 1 /*
JMF 0:082731ede69f 2 * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
JMF 0:082731ede69f 3 *
JMF 0:082731ede69f 4 * Licensed under the Apache License, Version 2.0 (the "License").
JMF 0:082731ede69f 5 * You may not use this file except in compliance with the License.
JMF 0:082731ede69f 6 * A copy of the License is located at
JMF 0:082731ede69f 7 *
JMF 0:082731ede69f 8 * http://aws.amazon.com/apache2.0
JMF 0:082731ede69f 9 *
JMF 0:082731ede69f 10 * or in the "license" file accompanying this file. This file is distributed
JMF 0:082731ede69f 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
JMF 0:082731ede69f 12 * express or implied. See the License for the specific language governing
JMF 0:082731ede69f 13 * permissions and limitations under the License.
JMF 0:082731ede69f 14 */
JMF 0:082731ede69f 15 #ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_H_
JMF 0:082731ede69f 16 #define AWS_IOT_SDK_SRC_IOT_SHADOW_H_
JMF 0:082731ede69f 17
JMF 0:082731ede69f 18 #ifdef __cplusplus
JMF 0:082731ede69f 19 extern "C" {
JMF 0:082731ede69f 20 #endif
JMF 0:082731ede69f 21
JMF 0:082731ede69f 22
JMF 0:082731ede69f 23 /**
JMF 0:082731ede69f 24 * @file aws_iot_shadow_interface.h
JMF 0:082731ede69f 25 * @brief Interface for thing shadow
JMF 0:082731ede69f 26 *
JMF 0:082731ede69f 27 * These are the functions and structs to manage/interact the Thing Shadow(in the cloud).
JMF 0:082731ede69f 28 * This SDK will let you interact with your own thing shadow or any other shadow using its Thing Name.
JMF 0:082731ede69f 29 * There are totally 3 actions a device can perform on the shadow - Get, Update and Delete.
JMF 0:082731ede69f 30 *
JMF 0:082731ede69f 31 * Currently the device should use MQTT/S underneath. In the future this will also support other protocols. As it supports MQTT, the shadow needs to connect and disconnect.
JMF 0:082731ede69f 32 * It will also work on the pub/sub model. On performing any action, the acknowledgment will be received in either accepted or rejected. For Example:
JMF 0:082731ede69f 33 * If we want to perform a GET on the thing shadow the following messages will be sent and received:
JMF 0:082731ede69f 34 * 1. A MQTT Publish on the topic - $aws/things/{thingName}/shadow/get
JMF 0:082731ede69f 35 * 2. Subscribe to MQTT topics - $aws/things/{thingName}/shadow/get/accepted and $aws/things/{thingName}/shadow/get/rejected.
JMF 0:082731ede69f 36 * If the request was successful we will receive the things json document in the accepted topic.
JMF 0:082731ede69f 37 *
JMF 0:082731ede69f 38 *
JMF 0:082731ede69f 39 */
JMF 0:082731ede69f 40 #include "aws_iot_mqtt_client_interface.h"
JMF 0:082731ede69f 41 #include "aws_iot_shadow_json_data.h"
JMF 0:082731ede69f 42
JMF 0:082731ede69f 43 /*!
JMF 0:082731ede69f 44 * @brief Shadow Initialization parameters
JMF 0:082731ede69f 45 *
JMF 0:082731ede69f 46 * As the Shadow SDK uses MQTT underneath, it could be connected and disconnected on events to save some battery.
JMF 0:082731ede69f 47 * @note Always use the \c ShadowIniTParametersDefault to initialize this struct
JMF 0:082731ede69f 48 *
JMF 0:082731ede69f 49 *
JMF 0:082731ede69f 50 *
JMF 0:082731ede69f 51 */
JMF 0:082731ede69f 52 typedef struct {
JMF 0:082731ede69f 53 char *pHost; ///< This will be unique to a customer and can be retrieved from the console
JMF 0:082731ede69f 54 uint16_t port; ///< Network port for TCP/IP socket
JMF 0:082731ede69f 55 char *pRootCA; ///< Location with the Filename of the Root CA
JMF 0:082731ede69f 56 char *pClientCRT; ///< Location of Device certs signed by AWS IoT service
JMF 0:082731ede69f 57 char *pClientKey; ///< Location of Device private key
JMF 0:082731ede69f 58 bool enableAutoReconnect; ///< Set to true to enable auto reconnect
JMF 0:082731ede69f 59 iot_disconnect_handler disconnectHandler; ///< Callback to be invoked upon connection loss.
JMF 0:082731ede69f 60 } ShadowInitParameters_t;
JMF 0:082731ede69f 61
JMF 0:082731ede69f 62 /*!
JMF 0:082731ede69f 63 * @brief Shadow Connect parameters
JMF 0:082731ede69f 64 *
JMF 0:082731ede69f 65 * As the Shadow SDK uses MQTT underneath, it could be connected and disconnected on events to save some battery.
JMF 0:082731ede69f 66 * @note Always use the \c ShadowConnectParametersDefault to initialize this struct
JMF 0:082731ede69f 67 *
JMF 0:082731ede69f 68 *d
JMF 0:082731ede69f 69 *
JMF 0:082731ede69f 70 */
JMF 0:082731ede69f 71 typedef struct {
JMF 0:082731ede69f 72 char *pMyThingName; ///< Every device has a Thing Shadow and this is the placeholder for name
JMF 0:082731ede69f 73 char *pMqttClientId; ///< Currently the Shadow uses MQTT to connect and it is important to ensure we have unique client id
JMF 0:082731ede69f 74 uint16_t mqttClientIdLen; ///< Currently the Shadow uses MQTT to connect and it is important to ensure we have unique client id
JMF 0:082731ede69f 75 pApplicationHandler_t deleteActionHandler; ///< Callback to be invoked when Thing shadow for this device is deleted
JMF 0:082731ede69f 76 } ShadowConnectParameters_t;
JMF 0:082731ede69f 77
JMF 0:082731ede69f 78 /*!
JMF 0:082731ede69f 79 * @brief This is set to defaults from the configuration file
JMF 0:082731ede69f 80 * The certs are set to NULL because they need the path to the file. shadow_sample.c file demonstrates on how to get the relative path
JMF 0:082731ede69f 81 *
JMF 0:082731ede69f 82 * \relates ShadowInitParameters_t
JMF 0:082731ede69f 83 */
JMF 0:082731ede69f 84 extern const ShadowInitParameters_t ShadowInitParametersDefault;
JMF 0:082731ede69f 85
JMF 0:082731ede69f 86 /*!
JMF 0:082731ede69f 87 * @brief This is set to defaults from the configuration file
JMF 0:082731ede69f 88 * The length of the client id is initialized as 0. This is due to C language limitations of using constant literals
JMF 0:082731ede69f 89 * only for creating const variables. The client id will be assigned using the value from aws_iot_config.h but the
JMF 0:082731ede69f 90 * length needs to be assigned in code. shadow_sample.c file demonstrates this.
JMF 0:082731ede69f 91 *
JMF 0:082731ede69f 92 * \relates ShadowConnectParameters_t
JMF 0:082731ede69f 93 */
JMF 0:082731ede69f 94 extern const ShadowConnectParameters_t ShadowConnectParametersDefault;
JMF 0:082731ede69f 95
JMF 0:082731ede69f 96 /**
JMF 0:082731ede69f 97 * @brief Clean shadow client from all dynamic memory allocate
JMF 0:082731ede69f 98 *
JMF 0:082731ede69f 99 * This function will free up memory that was dynamically allocated for the client.
JMF 0:082731ede69f 100 *
JMF 0:082731ede69f 101 * @param pClient MQTT Client that was previously created by calling aws_iot_shadow_init
JMF 0:082731ede69f 102 * @return An IoT Error Type defining successful/failed freeing
JMF 0:082731ede69f 103 */
JMF 0:082731ede69f 104 IoT_Error_t aws_iot_shadow_free(AWS_IoT_Client *pClient);
JMF 0:082731ede69f 105
JMF 0:082731ede69f 106 /**
JMF 0:082731ede69f 107 * @brief Initialize the Thing Shadow before use
JMF 0:082731ede69f 108 *
JMF 0:082731ede69f 109 * This function takes care of initializing the internal book-keeping data structures and initializing the IoT client.
JMF 0:082731ede69f 110 *
JMF 0:082731ede69f 111 * @param pClient A new MQTT Client to be used as the protocol layer. Will be initialized with pParams.
JMF 0:082731ede69f 112 * @return An IoT Error Type defining successful/failed Initialization
JMF 0:082731ede69f 113 */
JMF 0:082731ede69f 114 IoT_Error_t aws_iot_shadow_init(AWS_IoT_Client *pClient, ShadowInitParameters_t *pParams);
JMF 0:082731ede69f 115
JMF 0:082731ede69f 116 /**
JMF 0:082731ede69f 117 * @brief Connect to the AWS IoT Thing Shadow service over MQTT
JMF 0:082731ede69f 118 *
JMF 0:082731ede69f 119 * This function does the TLSv1.2 handshake and establishes the MQTT connection
JMF 0:082731ede69f 120 *
JMF 0:082731ede69f 121 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 122 * @param pParams Shadow Conenction parameters like TLS cert location
JMF 0:082731ede69f 123 * @return An IoT Error Type defining successful/failed Connection
JMF 0:082731ede69f 124 */
JMF 0:082731ede69f 125 IoT_Error_t aws_iot_shadow_connect(AWS_IoT_Client *pClient, ShadowConnectParameters_t *pParams);
JMF 0:082731ede69f 126
JMF 0:082731ede69f 127 /**
JMF 0:082731ede69f 128 * @brief Yield function to let the background tasks of MQTT and Shadow
JMF 0:082731ede69f 129 *
JMF 0:082731ede69f 130 * This function could be use in a separate thread waiting for the incoming messages, ensuring the connection is kept alive with the AWS Service.
JMF 0:082731ede69f 131 * It also ensures the expired requests of Shadow actions are cleared and Timeout callback is executed.
JMF 0:082731ede69f 132 * @note All callbacks ever used in the SDK will be executed in the context of this function.
JMF 0:082731ede69f 133 *
JMF 0:082731ede69f 134 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 135 * @param timeout in milliseconds, This is the maximum time the yield function will wait for a message and/or read the messages from the TLS buffer
JMF 0:082731ede69f 136 * @return An IoT Error Type defining successful/failed Yield
JMF 0:082731ede69f 137 */
JMF 0:082731ede69f 138 IoT_Error_t aws_iot_shadow_yield(AWS_IoT_Client *pClient, uint32_t timeout);
JMF 0:082731ede69f 139
JMF 0:082731ede69f 140 /**
JMF 0:082731ede69f 141 * @brief Disconnect from the AWS IoT Thing Shadow service over MQTT
JMF 0:082731ede69f 142 *
JMF 0:082731ede69f 143 * This will close the underlying TCP connection, MQTT connection will also be closed
JMF 0:082731ede69f 144 *
JMF 0:082731ede69f 145 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 146 * @return An IoT Error Type defining successful/failed disconnect status
JMF 0:082731ede69f 147 */
JMF 0:082731ede69f 148 IoT_Error_t aws_iot_shadow_disconnect(AWS_IoT_Client *pClient);
JMF 0:082731ede69f 149
JMF 0:082731ede69f 150 /**
JMF 0:082731ede69f 151 * @brief Thing Shadow Acknowledgment enum
JMF 0:082731ede69f 152 *
JMF 0:082731ede69f 153 * This enum type is use in the callback for the action response
JMF 0:082731ede69f 154 *
JMF 0:082731ede69f 155 */
JMF 0:082731ede69f 156 typedef enum {
JMF 0:082731ede69f 157 SHADOW_ACK_TIMEOUT, SHADOW_ACK_REJECTED, SHADOW_ACK_ACCEPTED
JMF 0:082731ede69f 158 } Shadow_Ack_Status_t;
JMF 0:082731ede69f 159
JMF 0:082731ede69f 160 /**
JMF 0:082731ede69f 161 * @brief Thing Shadow Action type enum
JMF 0:082731ede69f 162 *
JMF 0:082731ede69f 163 * This enum type is use in the callback for the action response
JMF 0:082731ede69f 164 *
JMF 0:082731ede69f 165 */
JMF 0:082731ede69f 166 typedef enum {
JMF 0:082731ede69f 167 SHADOW_GET, SHADOW_UPDATE, SHADOW_DELETE
JMF 0:082731ede69f 168 } ShadowActions_t;
JMF 0:082731ede69f 169
JMF 0:082731ede69f 170
JMF 0:082731ede69f 171 /**
JMF 0:082731ede69f 172 * @brief Function Pointer typedef used as the callback for every action
JMF 0:082731ede69f 173 *
JMF 0:082731ede69f 174 * This function will be called from the context of \c aws_iot_shadow_yield() context
JMF 0:082731ede69f 175 *
JMF 0:082731ede69f 176 * @param pThingName Thing Name of the response received
JMF 0:082731ede69f 177 * @param action The response of the action
JMF 0:082731ede69f 178 * @param status Informs if the action was Accepted/Rejected or Timed out
JMF 0:082731ede69f 179 * @param pReceivedJsonDocument Received JSON document
JMF 0:082731ede69f 180 * @param pContextData the void* data passed in during the action call(update, get or delete)
JMF 0:082731ede69f 181 *
JMF 0:082731ede69f 182 */
JMF 0:082731ede69f 183 typedef void (*fpActionCallback_t)(const char *pThingName, ShadowActions_t action, Shadow_Ack_Status_t status,
JMF 0:082731ede69f 184 const char *pReceivedJsonDocument, void *pContextData);
JMF 0:082731ede69f 185
JMF 0:082731ede69f 186 /**
JMF 0:082731ede69f 187 * @brief This function is the one used to perform an Update action to a Thing Name's Shadow.
JMF 0:082731ede69f 188 *
JMF 0:082731ede69f 189 * update is one of the most frequently used functionality by a device. In most cases the device may be just reporting few params to update the thing shadow in the cloud
JMF 0:082731ede69f 190 * Update Action if no callback or if the JSON document does not have a client token then will just publish the update and not track it.
JMF 0:082731ede69f 191 *
JMF 0:082731ede69f 192 * @note The update has to subscribe to two topics update/accepted and update/rejected. This function waits 2 seconds to ensure the subscriptions are registered before publishing the update message.
JMF 0:082731ede69f 193 * The following steps are performed on using this function:
JMF 0:082731ede69f 194 * 1. Subscribe to Shadow topics - $aws/things/{thingName}/shadow/update/accepted and $aws/things/{thingName}/shadow/update/rejected
JMF 0:082731ede69f 195 * 2. wait for 2 seconds for the subscription to take effect
JMF 0:082731ede69f 196 * 3. Publish on the update topic - $aws/things/{thingName}/shadow/update
JMF 0:082731ede69f 197 * 4. In the \c aws_iot_shadow_yield() function the response will be handled. In case of timeout or if the response is received, the subscription to shadow response topics are un-subscribed from.
JMF 0:082731ede69f 198 * On the contrary if the persistent subscription is set to true then the un-subscribe will not be done. The topics will always be listened to.
JMF 0:082731ede69f 199 *
JMF 0:082731ede69f 200 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 201 * @param pThingName Thing Name of the shadow that needs to be Updated
JMF 0:082731ede69f 202 * @param pJsonString The update action expects a JSON document to send. The JSON String should be a null terminated string. This JSON document should adhere to the AWS IoT Thing Shadow specification. To help in the process of creating this document- SDK provides apis in \c aws_iot_shadow_json_data.h
JMF 0:082731ede69f 203 * @param callback This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important
JMF 0:082731ede69f 204 * @param pContextData This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used
JMF 0:082731ede69f 205 * @param timeout_seconds It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action
JMF 0:082731ede69f 206 * @param isPersistentSubscribe As mentioned above, every time if a device updates the same shadow then this should be set to true to avoid repeated subscription and unsubscription. If the Thing Name is one off update then this should be set to false
JMF 0:082731ede69f 207 * @return An IoT Error Type defining successful/failed update action
JMF 0:082731ede69f 208 */
JMF 0:082731ede69f 209 IoT_Error_t aws_iot_shadow_update(AWS_IoT_Client *pClient, const char *pThingName, char *pJsonString,
JMF 0:082731ede69f 210 fpActionCallback_t callback, void *pContextData, uint8_t timeout_seconds,
JMF 0:082731ede69f 211 bool isPersistentSubscribe);
JMF 0:082731ede69f 212
JMF 0:082731ede69f 213 /**
JMF 0:082731ede69f 214 * @brief This function is the one used to perform an Get action to a Thing Name's Shadow.
JMF 0:082731ede69f 215 *
JMF 0:082731ede69f 216 * One use of this function is usually to get the config of a device at boot up.
JMF 0:082731ede69f 217 * It is similar to the Update function internally except it does not take a JSON document as the input. The entire JSON document will be sent over the accepted topic
JMF 0:082731ede69f 218 *
JMF 0:082731ede69f 219 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 220 * @param pThingName Thing Name of the JSON document that is needed
JMF 0:082731ede69f 221 * @param callback This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important
JMF 0:082731ede69f 222 * @param pContextData This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used
JMF 0:082731ede69f 223 * @param timeout_seconds It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action
JMF 0:082731ede69f 224 * @param isPersistentSubscribe As mentioned above, every time if a device gets the same Sahdow (JSON document) then this should be set to true to avoid repeated subscription and un-subscription. If the Thing Name is one off get then this should be set to false
JMF 0:082731ede69f 225 * @return An IoT Error Type defining successful/failed get action
JMF 0:082731ede69f 226 */
JMF 0:082731ede69f 227 IoT_Error_t aws_iot_shadow_get(AWS_IoT_Client *pClient, const char *pThingName, fpActionCallback_t callback,
JMF 0:082731ede69f 228 void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscribe);
JMF 0:082731ede69f 229
JMF 0:082731ede69f 230 /**
JMF 0:082731ede69f 231 * @brief This function is the one used to perform an Delete action to a Thing Name's Shadow.
JMF 0:082731ede69f 232 *
JMF 0:082731ede69f 233 * This is not a very common use case for device. It is generally the responsibility of the accompanying app to do the delete.
JMF 0:082731ede69f 234 * It is similar to the Update function internally except it does not take a JSON document as the input. The Thing Shadow referred by the ThingName will be deleted.
JMF 0:082731ede69f 235 *
JMF 0:082731ede69f 236 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 237 * @param pThingName Thing Name of the Shadow that should be deleted
JMF 0:082731ede69f 238 * @param callback This is the callback that will be used to inform the caller of the response from the AWS IoT Shadow service.Callback could be set to NULL if response is not important
JMF 0:082731ede69f 239 * @param pContextData This is an extra parameter that could be passed along with the callback. It should be set to NULL if not used
JMF 0:082731ede69f 240 * @param timeout_seconds It is the time the SDK will wait for the response on either accepted/rejected before declaring timeout on the action
JMF 0:082731ede69f 241 * @param isPersistentSubscribe As mentioned above, every time if a device deletes the same Shadow (JSON document) then this should be set to true to avoid repeated subscription and un-subscription. If the Thing Name is one off delete then this should be set to false
JMF 0:082731ede69f 242 * @return An IoT Error Type defining successful/failed delete action
JMF 0:082731ede69f 243 */
JMF 0:082731ede69f 244 IoT_Error_t aws_iot_shadow_delete(AWS_IoT_Client *pClient, const char *pThingName, fpActionCallback_t callback,
JMF 0:082731ede69f 245 void *pContextData, uint8_t timeout_seconds, bool isPersistentSubscriptions);
JMF 0:082731ede69f 246
JMF 0:082731ede69f 247 /**
JMF 0:082731ede69f 248 * @brief This function is used to listen on the delta topic of #AWS_IOT_MY_THING_NAME mentioned in the aws_iot_config.h file.
JMF 0:082731ede69f 249 *
JMF 0:082731ede69f 250 * Any time a delta is published the Json document will be delivered to the pStruct->cb. If you don't want the parsing done by the SDK then use the jsonStruct_t key set to "state". A good example of this is displayed in the sample_apps/shadow_console_echo.c
JMF 0:082731ede69f 251 *
JMF 0:082731ede69f 252 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 253 * @param pStruct The struct used to parse JSON value
JMF 0:082731ede69f 254 * @return An IoT Error Type defining successful/failed delta registering
JMF 0:082731ede69f 255 */
JMF 0:082731ede69f 256 IoT_Error_t aws_iot_shadow_register_delta(AWS_IoT_Client *pClient, jsonStruct_t *pStruct);
JMF 0:082731ede69f 257
JMF 0:082731ede69f 258 /**
JMF 0:082731ede69f 259 * @brief Reset the last received version number to zero.
JMF 0:082731ede69f 260 * This will be useful if the Thing Shadow is deleted and would like to to reset the local version
JMF 0:082731ede69f 261 * @return no return values
JMF 0:082731ede69f 262 *
JMF 0:082731ede69f 263 */
JMF 0:082731ede69f 264 void aws_iot_shadow_reset_last_received_version(void);
JMF 0:082731ede69f 265
JMF 0:082731ede69f 266 /**
JMF 0:082731ede69f 267 * @brief Version of a document is received with every accepted/rejected and the SDK keeps track of the last received version of the JSON document of #AWS_IOT_MY_THING_NAME shadow
JMF 0:082731ede69f 268 *
JMF 0:082731ede69f 269 * One exception to this version tracking is that, the SDK will ignore the version from update/accepted topic. Rest of the responses will be scanned to update the version number.
JMF 0:082731ede69f 270 * Accepting version change for update/accepted may cause version conflicts for delta message if the update message is received before the delta.
JMF 0:082731ede69f 271 *
JMF 0:082731ede69f 272 * @return version number of the last received response
JMF 0:082731ede69f 273 *
JMF 0:082731ede69f 274 */
JMF 0:082731ede69f 275 uint32_t aws_iot_shadow_get_last_received_version(void);
JMF 0:082731ede69f 276
JMF 0:082731ede69f 277 /**
JMF 0:082731ede69f 278 * @brief Enable the ignoring of delta messages with old version number
JMF 0:082731ede69f 279 *
JMF 0:082731ede69f 280 * As we use MQTT underneath, there could be more than 1 of the same message if we use QoS 0. To avoid getting called for the same message, this functionality should be enabled. All the old message will be ignored
JMF 0:082731ede69f 281 */
JMF 0:082731ede69f 282 void aws_iot_shadow_enable_discard_old_delta_msgs(void);
JMF 0:082731ede69f 283
JMF 0:082731ede69f 284 /**
JMF 0:082731ede69f 285 * @brief Disable the ignoring of delta messages with old version number
JMF 0:082731ede69f 286 */
JMF 0:082731ede69f 287 void aws_iot_shadow_disable_discard_old_delta_msgs(void);
JMF 0:082731ede69f 288
JMF 0:082731ede69f 289 /**
JMF 0:082731ede69f 290 * @brief This function is used to enable or disable autoreconnect
JMF 0:082731ede69f 291 *
JMF 0:082731ede69f 292 * Any time a disconnect happens the underlying MQTT client attempts to reconnect if this is set to true
JMF 0:082731ede69f 293 *
JMF 0:082731ede69f 294 * @param pClient MQTT Client used as the protocol layer
JMF 0:082731ede69f 295 * @param newStatus The new status to set the autoreconnect option to
JMF 0:082731ede69f 296 *
JMF 0:082731ede69f 297 * @return An IoT Error Type defining successful/failed operation
JMF 0:082731ede69f 298 */
JMF 0:082731ede69f 299 IoT_Error_t aws_iot_shadow_set_autoreconnect_status(AWS_IoT_Client *pClient, bool newStatus);
JMF 0:082731ede69f 300
JMF 0:082731ede69f 301 #ifdef __cplusplus
JMF 0:082731ede69f 302 }
JMF 0:082731ede69f 303 #endif
JMF 0:082731ede69f 304
JMF 0:082731ede69f 305 #endif //AWS_IOT_SDK_SRC_IOT_SHADOW_H_