AWS IoT Over-the-air Update v3.3.0
Client library for AWS IoT OTA
ota_http_private.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v3.3.0
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
6 * this software and associated documentation files (the "Software"), to deal in
7 * the Software without restriction, including without limitation the rights to
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 * the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in all
13 * copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22
28#ifndef OTA_HTTP_H
29#define OTA_HTTP_H
30
31/* *INDENT-OFF* */
32#ifdef __cplusplus
33 extern "C" {
34#endif
35/* *INDENT-ON* */
36
37/* OTA includes. */
38#include "ota.h"
39#include "ota_private.h"
40
41
53
54
67
68
86OtaErr_t decodeFileBlock_Http( const uint8_t * pMessageBuffer,
87 size_t messageSize,
88 int32_t * pFileId,
89 int32_t * pBlockId,
90 int32_t * pBlockSize,
91 uint8_t ** pPayload,
92 size_t * pPayloadSize );
93
105OtaErr_t cleanupData_Http( const OtaAgentContext_t * pAgentCtx );
106
114const char * OTA_HTTP_strerror( OtaHttpStatus_t status );
115
116/* *INDENT-OFF* */
117#ifdef __cplusplus
118 }
119#endif
120/* *INDENT-ON* */
121
122#endif /* ifndef OTA_HTTP_H */
OtaHttpStatus_t
The OTA HTTP interface return status.
Definition: ota_http_interface.h:86
OtaErr_t
The OTA API return status. OTA agent error codes are in the upper 8 bits of the 32 bit OTA error word...
Definition: ota.h:79
OTA Agent Interface.
OtaErr_t cleanupData_Http(const OtaAgentContext_t *pAgentCtx)
Cleanup related to OTA data plane over HTTP.
Definition: ota_http.c:162
OtaErr_t requestDataBlock_Http(OtaAgentContext_t *pAgentCtx)
Request File block over HTTP.
Definition: ota_http.c:78
OtaErr_t initFileTransfer_Http(OtaAgentContext_t *pAgentCtx)
Initialize file transfer over HTTP.
Definition: ota_http.c:47
OtaErr_t decodeFileBlock_Http(const uint8_t *pMessageBuffer, size_t messageSize, int32_t *pFileId, int32_t *pBlockId, int32_t *pBlockSize, uint8_t **pPayload, size_t *pPayloadSize)
Stub for decoding the file block.
Definition: ota_http.c:122
const char * OTA_HTTP_strerror(OtaHttpStatus_t status)
Status to string conversion for OTA HTTP interface status.
Definition: ota_http.c:176
Macros, enums, variables, and definitions internal to the OTA Agent module and shared by other OTA mo...
The OTA agent is a singleton today. The structure keeps it nice and organized.
Definition: ota.h:295