![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
test
aws-iot/include/aws_iot_shadow_records.h@1:3f75eb8d46f4, 2017-04-12 (annotated)
- Committer:
- peyo
- Date:
- Wed Apr 12 14:09:46 2017 +0200
- Revision:
- 1:3f75eb8d46f4
- Parent:
- 0:cd5404401c2f
add main
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
peyo |
0:cd5404401c2f | 1 | /* |
peyo |
0:cd5404401c2f | 2 | * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
peyo |
0:cd5404401c2f | 3 | * |
peyo |
0:cd5404401c2f | 4 | * Licensed under the Apache License, Version 2.0 (the "License"). |
peyo |
0:cd5404401c2f | 5 | * You may not use this file except in compliance with the License. |
peyo |
0:cd5404401c2f | 6 | * A copy of the License is located at |
peyo |
0:cd5404401c2f | 7 | * |
peyo |
0:cd5404401c2f | 8 | * http://aws.amazon.com/apache2.0 |
peyo |
0:cd5404401c2f | 9 | * |
peyo |
0:cd5404401c2f | 10 | * or in the "license" file accompanying this file. This file is distributed |
peyo |
0:cd5404401c2f | 11 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
peyo |
0:cd5404401c2f | 12 | * express or implied. See the License for the specific language governing |
peyo |
0:cd5404401c2f | 13 | * permissions and limitations under the License. |
peyo |
0:cd5404401c2f | 14 | */ |
peyo |
0:cd5404401c2f | 15 | |
peyo |
0:cd5404401c2f | 16 | #ifndef SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ |
peyo |
0:cd5404401c2f | 17 | #define SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ |
peyo |
0:cd5404401c2f | 18 | |
peyo |
0:cd5404401c2f | 19 | #ifdef __cplusplus |
peyo |
0:cd5404401c2f | 20 | extern "C" { |
peyo |
0:cd5404401c2f | 21 | #endif |
peyo |
0:cd5404401c2f | 22 | |
peyo |
0:cd5404401c2f | 23 | #include <stdbool.h> |
peyo |
0:cd5404401c2f | 24 | |
peyo |
0:cd5404401c2f | 25 | #include "aws_iot_shadow_interface.h" |
peyo |
0:cd5404401c2f | 26 | #include "aws_iot_config.h" |
peyo |
0:cd5404401c2f | 27 | |
peyo |
0:cd5404401c2f | 28 | |
peyo |
0:cd5404401c2f | 29 | extern uint32_t shadowJsonVersionNum; |
peyo |
0:cd5404401c2f | 30 | extern bool shadowDiscardOldDeltaFlag; |
peyo |
0:cd5404401c2f | 31 | |
peyo |
0:cd5404401c2f | 32 | extern char myThingName[MAX_SIZE_OF_THING_NAME]; |
peyo |
0:cd5404401c2f | 33 | extern uint16_t myThingNameLen; |
peyo |
0:cd5404401c2f | 34 | extern char mqttClientID[MAX_SIZE_OF_UNIQUE_CLIENT_ID_BYTES]; |
peyo |
0:cd5404401c2f | 35 | extern uint16_t mqttClientIDLen; |
peyo |
0:cd5404401c2f | 36 | |
peyo |
0:cd5404401c2f | 37 | void initializeRecords(AWS_IoT_Client *pClient); |
peyo |
0:cd5404401c2f | 38 | bool isSubscriptionPresent(const char *pThingName, ShadowActions_t action); |
peyo |
0:cd5404401c2f | 39 | IoT_Error_t subscribeToShadowActionAcks(const char *pThingName, ShadowActions_t action, bool isSticky); |
peyo |
0:cd5404401c2f | 40 | void incrementSubscriptionCnt(const char *pThingName, ShadowActions_t action, bool isSticky); |
peyo |
0:cd5404401c2f | 41 | |
peyo |
0:cd5404401c2f | 42 | IoT_Error_t publishToShadowAction(const char *pThingName, ShadowActions_t action, const char *pJsonDocumentToBeSent); |
peyo |
0:cd5404401c2f | 43 | void addToAckWaitList(uint8_t indexAckWaitList, const char *pThingName, ShadowActions_t action, |
peyo |
0:cd5404401c2f | 44 | const char *pExtractedClientToken, fpActionCallback_t callback, void *pCallbackContext, |
peyo |
0:cd5404401c2f | 45 | uint32_t timeout_seconds); |
peyo |
0:cd5404401c2f | 46 | bool getNextFreeIndexOfAckWaitList(uint8_t *pIndex); |
peyo |
0:cd5404401c2f | 47 | void HandleExpiredResponseCallbacks(void); |
peyo |
0:cd5404401c2f | 48 | void initDeltaTokens(void); |
peyo |
0:cd5404401c2f | 49 | IoT_Error_t registerJsonTokenOnDelta(jsonStruct_t *pStruct); |
peyo |
0:cd5404401c2f | 50 | |
peyo |
0:cd5404401c2f | 51 | #ifdef __cplusplus |
peyo |
0:cd5404401c2f | 52 | } |
peyo |
0:cd5404401c2f | 53 | #endif |
peyo |
0:cd5404401c2f | 54 | |
peyo |
0:cd5404401c2f | 55 | #endif /* SRC_SHADOW_AWS_IOT_SHADOW_RECORDS_H_ */ |