this is fork and i will modify for STM32

Fork of AWS-test by Pierre-Marie Ancèle

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 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 #include <stdint.h>
00023 #include <stdbool.h>
00024 #include <stdarg.h>
00025 
00026 #include "aws_iot_error.h"
00027 #include "aws_iot_shadow_json_data.h"
00028 
00029 bool isJsonValidAndParse(const char *pJsonDocument, void *pJsonHandler, int32_t *pTokenCount);
00030 
00031 bool isJsonKeyMatchingAndUpdateValue(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount,
00032                                      jsonStruct_t *pDataStruct, uint32_t *pDataLength, int32_t *pDataPosition);
00033 
00034 void aws_iot_shadow_internal_get_request_json(char *pJsonDocument);
00035 
00036 void aws_iot_shadow_internal_delete_request_json(char *pJsonDocument);
00037 
00038 void resetClientTokenSequenceNum(void);
00039 
00040 
00041 bool isReceivedJsonValid(const char *pJsonDocument);
00042 
00043 void FillWithClientToken(char *pStringToUpdateClientToken);
00044 
00045 bool extractClientToken(const char *pJsonDocumentToBeSent, char *pExtractedClientToken);
00046 
00047 bool extractVersionNumber(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount, uint32_t *pVersionNumber);
00048 
00049 #ifdef __cplusplus
00050 }
00051 #endif
00052 
00053 #endif // AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_