AWS IoT Over-the-air Update v3.4.0
Client library for AWS IoT OTA
 
Loading...
Searching...
No Matches
ota_http_private.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v3.4.0
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
30#ifndef OTA_HTTP_H
31#define OTA_HTTP_H
32
33/* *INDENT-OFF* */
34#ifdef __cplusplus
35 extern "C" {
36#endif
37/* *INDENT-ON* */
38
39/* OTA includes. */
40#include "ota.h"
41#include "ota_private.h"
42
43
55
56
69
70
88OtaErr_t decodeFileBlock_Http( const uint8_t * pMessageBuffer,
89 size_t messageSize,
90 int32_t * pFileId,
91 int32_t * pBlockId,
92 int32_t * pBlockSize,
93 uint8_t * const * pPayload,
94 size_t * pPayloadSize );
95
107OtaErr_t cleanupData_Http( const OtaAgentContext_t * pAgentCtx );
108
116const char * OTA_HTTP_strerror( OtaHttpStatus_t status );
117
118/* *INDENT-OFF* */
119#ifdef __cplusplus
120 }
121#endif
122/* *INDENT-ON* */
123
124#endif /* ifndef OTA_HTTP_H */
OtaHttpStatus_t
The OTA HTTP interface return status.
Definition: ota_http_interface.h:88
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:80
OTA Agent Interface.
OtaErr_t cleanupData_Http(const OtaAgentContext_t *pAgentCtx)
Cleanup related to OTA data plane over HTTP.
Definition: ota_http.c:167
OtaErr_t decodeFileBlock_Http(const uint8_t *pMessageBuffer, size_t messageSize, int32_t *pFileId, int32_t *pBlockId, int32_t *pBlockSize, uint8_t *const *pPayload, size_t *pPayloadSize)
Stub for decoding the file block.
Definition: ota_http.c:127
OtaErr_t initFileTransfer_Http(const OtaAgentContext_t *pAgentCtx)
Initialize file transfer over HTTP.
Definition: ota_http.c:49
OtaErr_t requestDataBlock_Http(OtaAgentContext_t *pAgentCtx)
Request File block over HTTP.
Definition: ota_http.c:83
const char * OTA_HTTP_strerror(OtaHttpStatus_t status)
Status to string conversion for OTA HTTP interface status.
Definition: ota_http.c:181
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:339