Anjay Lite
Loading...
Searching...
No Matches
coap_downloader.h
Go to the documentation of this file.
1/*
2 * Copyright 2023-2025 AVSystem <avsystem@avsystem.com>
3 * AVSystem Anjay Lite LwM2M SDK
4 * All rights reserved.
5 *
6 * Licensed under AVSystem Anjay Lite LwM2M Client SDK - Non-Commercial License.
7 * See the attached LICENSE file for details.
8 */
9
10#include <anj/init.h>
11
22#ifndef ANJ_COAP_DOWNLOADER_H
23# define ANJ_COAP_DOWNLOADER_H
24
26
27# include <anj/defs.h>
28
30# define ANJ_INTERNAL_INCLUDE_EXCHANGE
31# include <anj_internal/exchange.h>
32# undef ANJ_INTERNAL_INCLUDE_EXCHANGE
35# ifdef __cplusplus
36extern "C" {
37# endif
38
39# ifdef ANJ_WITH_COAP_DOWNLOADER
40
53# define ANJ_COAP_DOWNLOADER_ERR_INVALID_URI -1
54
63# define ANJ_COAP_DOWNLOADER_ERR_IN_PROGRESS -2
64
70# define ANJ_COAP_DOWNLOADER_ERR_INVALID_CONFIGURATION -3
71
76# define ANJ_COAP_DOWNLOADER_ERR_TERMINATED -4
84# define ANJ_COAP_DOWNLOADER_ERR_NETWORK -5
85
90# define ANJ_COAP_DOWNLOADER_ERR_INVALID_RESPONSE -6
91
96# define ANJ_COAP_DOWNLOADER_ERR_TIMEOUT -7
97
106# define ANJ_COAP_DOWNLOADER_ERR_INTERNAL -8
107
114# define ANJ_COAP_DOWNLOADER_ERR_ETAG_MISMATCH -9
115
162
180typedef void
182 anj_coap_downloader_t *coap_downloader,
184 const uint8_t *data,
185 size_t data_len);
186
212
226
240
265 const char *uri,
266 const anj_net_config_t *net_config);
267
291
306
308# define ANJ_INTERNAL_INCLUDE_COAP_DOWNLOADER
309# include <anj_internal/coap_downloader.h>
310# undef ANJ_INTERNAL_INCLUDE_COAP_DOWNLOADER
313# endif // ANJ_WITH_COAP_DOWNLOADER
314
315# ifdef __cplusplus
316}
317# endif
318
319#endif // ANJ_CORE_H
Platform hooks for network transport integration.
int anj_coap_downloader_get_error(anj_coap_downloader_t *coap_downloader)
anj_coap_downloader_status_t
Definition coap_downloader.h:121
@ ANJ_COAP_DOWNLOADER_STATUS_INITIAL
Definition coap_downloader.h:127
@ ANJ_COAP_DOWNLOADER_STATUS_STARTING
Definition coap_downloader.h:133
@ ANJ_COAP_DOWNLOADER_STATUS_FINISHING
Definition coap_downloader.h:145
@ ANJ_COAP_DOWNLOADER_STATUS_FAILED
Definition coap_downloader.h:160
@ ANJ_COAP_DOWNLOADER_STATUS_DOWNLOADING
Definition coap_downloader.h:139
@ ANJ_COAP_DOWNLOADER_STATUS_FINISHED
Definition coap_downloader.h:151
int anj_coap_downloader_start(anj_coap_downloader_t *coap_downloader, const char *uri, const anj_net_config_t *net_config)
void anj_coap_downloader_event_callback_t(void *arg, anj_coap_downloader_t *coap_downloader, anj_coap_downloader_status_t conn_status, const uint8_t *data, size_t data_len)
Definition coap_downloader.h:181
int anj_coap_downloader_init(anj_coap_downloader_t *coap_downloader, const anj_coap_downloader_configuration_t *config)
struct anj_coap_downloader_configuration_struct anj_coap_downloader_configuration_t
void anj_coap_downloader_step(anj_coap_downloader_t *coap_downloader)
void anj_coap_downloader_terminate(anj_coap_downloader_t *coap_downloader)
Core type and constant definitions for Anjay Lite.
struct anj_coap_downloader_struct anj_coap_downloader_t
Definition defs.h:139
Global configuration validation header for Anjay Lite.
Definition coap_downloader.h:191
const anj_exchange_udp_tx_params_t * udp_tx_params
Definition coap_downloader.h:210
anj_coap_downloader_event_callback_t * event_cb
Definition coap_downloader.h:198
void * event_cb_arg
Definition coap_downloader.h:204
Definition defs.h:215
Definition anj_net_api.h:214