![]() |
nRF Connect SDK API 3.3.99
|
Client for downloading a file. More...
Topics | |
| Downloader transport | |
| Downloader transport definition. | |
Data Structures | |
| struct | downloader_fragment |
| Downloader data fragment. More... | |
| struct | downloader_evt |
| Downloader event. More... | |
| struct | downloader_cfg |
| Downloader configuration options. More... | |
| struct | downloader_host_cfg |
| Downloader host configuration options. More... | |
| struct | downloader |
| Downloader instance. More... | |
Typedefs | |
| typedef int(* | downloader_callback_t) (const struct downloader_evt *event) |
| Downloader asynchronous event handler. | |
Enumerations | |
| enum | downloader_evt_id { DOWNLOADER_EVT_FRAGMENT , DOWNLOADER_EVT_ERROR , DOWNLOADER_EVT_DONE , DOWNLOADER_EVT_STOPPED , DOWNLOADER_EVT_DEINITIALIZED } |
| Downloader event IDs. More... | |
| enum | downloader_state { DOWNLOADER_DEINITIALIZED , DOWNLOADER_IDLE , DOWNLOADER_CONNECTING , DOWNLOADER_CONNECTED , DOWNLOADER_DOWNLOADING , DOWNLOADER_STOPPING , DOWNLOADER_DEINITIALIZING } |
| Downloader internal state. More... | |
Functions | |
| int | downloader_init (struct downloader *dl, struct downloader_cfg *cfg) |
| Initialize the downloader. | |
| int | downloader_deinit (struct downloader *dl) |
| Deinitialize the downloader. | |
| int | downloader_get (struct downloader *dl, const struct downloader_host_cfg *host_cfg, const char *url, size_t from) |
| Download a file asynchronously. | |
| int | downloader_get_with_host_and_file (struct downloader *dl, const struct downloader_host_cfg *host_cfg, const char *host, const char *file, size_t from) |
| Download a file asynchronously with host and file as separate parameters. | |
| int | downloader_cancel (struct downloader *dl) |
| Cancel file download. | |
| int | downloader_file_size_get (struct downloader *dl, size_t *size) |
| Retrieve the size of the file being downloaded, in bytes. | |
| int | downloader_downloaded_size_get (struct downloader *dl, size_t *size) |
| Retrieve the number of bytes downloaded so far. | |
Client for downloading a file.
The downloader provides APIs for: