AWS IoT Embedded C Device SDK
aws_iot_shadow_json.h
1 /*
2  * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 #ifndef AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
16 #define AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
17 
18 #include <stdint.h>
19 #include <stdbool.h>
20 #include <stdarg.h>
21 
22 #include "aws_iot_error.h"
24 
25 bool isJsonValidAndParse(const char *pJsonDocument, void *pJsonHandler, int32_t *pTokenCount);
26 bool isJsonKeyMatchingAndUpdateValue(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount,
27  jsonStruct_t *pDataStruct, uint32_t *pDataLength, int32_t *pDataPosition);
28 
29 void iot_shadow_get_request_json(char *pJsonDocument);
30 void iot_shadow_delete_request_json(char *pJsonDocument);
31 void resetClientTokenSequenceNum(void);
32 
33 
34 bool isReceivedJsonValid(const char *pJsonDocument);
35 void FillWithClientToken(char *pStringToUpdateClientToken);
36 bool extractClientToken(const char *pJsonDocumentToBeSent, char *pExtractedClientToken);
37 bool extractVersionNumber(const char *pJsonDocument, void *pJsonHandler, int32_t tokenCount, uint32_t *pVersionNumber);
38 #endif // AWS_IOT_SDK_SRC_IOT_SHADOW_JSON_H_
Definition of error types for the SDK.
This file is the interface for all the Shadow related JSON functions.
This is the struct form of a JSON Key value pair.
Definition: aws_iot_shadow_json_data.h:58