AWS IoT Over-the-air Update v3.4.1
Client library for AWS IoT OTA
ota_http_interface.h
Go to the documentation of this file.
1/*
2 * AWS IoT Over-the-air Update v3.4.1
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_INTERFACE_H
31#define OTA_HTTP_INTERFACE_H
32
33/* *INDENT-OFF* */
34#ifdef __cplusplus
35 extern "C" {
36#endif
37/* *INDENT-ON* */
38
39/* Standard library includes. */
40#include <stddef.h>
41#include <stdint.h>
42
87typedef enum OtaHttpStatus
88{
94
105typedef OtaHttpStatus_t ( * OtaHttpInit_t ) ( char * pUrl );
106
119typedef OtaHttpStatus_t ( * OtaHttpRequest_t ) ( uint32_t rangeStart,
120 uint32_t rangeEnd );
121
130typedef OtaHttpStatus_t ( * OtaHttpDeinit )( void );
131
137typedef struct OtaHttpInterface
138{
143
144/* *INDENT-OFF* */
145#ifdef __cplusplus
146 }
147#endif
148/* *INDENT-ON* */
149
150#endif /* ifndef OTA_HTTP_INTERFACE_H */
OtaHttpStatus_t
The OTA HTTP interface return status.
Definition: ota_http_interface.h:88
@ OtaHttpInitFailed
Error initializing the HTTP connection.
Definition: ota_http_interface.h:90
@ OtaHttpRequestFailed
Error sending the HTTP request.
Definition: ota_http_interface.h:92
@ OtaHttpDeinitFailed
Error deinitializing the HTTP connection.
Definition: ota_http_interface.h:91
@ OtaHttpSuccess
OTA HTTP interface success.
Definition: ota_http_interface.h:89
OtaHttpStatus_t(* OtaHttpRequest_t)(uint32_t rangeStart, uint32_t rangeEnd)
Request file block over Http.
Definition: ota_http_interface.h:119
OtaHttpStatus_t(* OtaHttpInit_t)(char *pUrl)
Init OTA Http interface.
Definition: ota_http_interface.h:105
OtaHttpStatus_t(* OtaHttpDeinit)(void)
Deinit OTA Http interface.
Definition: ota_http_interface.h:130
OTA Event Interface structure.
Definition: ota_http_interface.h:138
OtaHttpDeinit deinit
Reference to HTTP deinitialize.
Definition: ota_http_interface.h:141
OtaHttpRequest_t request
Reference to HTTP data request.
Definition: ota_http_interface.h:140
OtaHttpInit_t init
Reference to HTTP initialization.
Definition: ota_http_interface.h:139