Demo application for using the AT&T IoT Starter Kit Powered by AWS.

Dependencies:   SDFileSystem

Fork of ATT_AWS_IoT_demo by Anthony Phillips

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers aws_iot_shadow_json.h Source File

aws_iot_shadow_json.h

00001 /*
00002  * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License").
00005  * You may not use this file except in compliance with the License.
00006  * A copy of the License is located at
00007  *
00008  *  http://aws.amazon.com/apache2.0
00009  *
00010  * or in the "license" file accompanying this file. This file is distributed
00011  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
00012  * express or implied. See the License for the specific language governing
00013  * permissions and limitations under the License.
00014  */
00015 #ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
00016 #define AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
00017 
00018 #include <stdint.h>
00019 #include <stdbool.h>
00020 #include <stdarg.h>
00021 
00022 #include "aws_iot_error.h"
00023 #include "aws_iot_shadow_json_data.h"
00024 
00025 bool isJsonValidAndParse(const char *pJsonDocument, void *pJsonHandler, int32_t *pTokenCount);
00026 bool isJsonKeyMatchingAndUpdateValue(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount,
00027         jsonStruct_t *pDataStruct, uint32_t *pDataLength, int32_t *pDataPosition);
00028 
00029 void iot_shadow_get_request_json(char *pJsonDocument);
00030 void iot_shadow_delete_request_json(char *pJsonDocument);
00031 void resetClientTokenSequenceNum(void);
00032 
00033 
00034 bool isReceivedJsonValid(const char *pJsonDocument);
00035 void FillWithClientToken(char *pStringToUpdateClientToken);
00036 bool extractClientToken(const char *pJsonDocumentToBeSent, char *pExtractedClientToken);
00037 bool extractVersionNumber(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount, uint32_t *pVersionNumber);
00038 #endif // AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
00039