ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
media_download_image_internal.h File Reference

Private encoded-image download and RABOOK publication composition. More...

#include "ra8_attributes.h"
#include "ra8_c6link.h"
#include "ra8_c6link_mdl_transfer.h"
#include "ra8_err.h"
Include dependency graph for media_download_image_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ra8_err_t priv_media_download_image_run (ra8_c6link_t *link, const char *url, const char *destination, const ra8_mdl_transfer_config_t *transfer)
 Download one encoded image and publish it as a strict .rabook.

Detailed Description

Private encoded-image download and RABOOK publication composition.

Declares the application seam that downloads one encoded image into caller-owned RAM, formats it as a real RBKC/RABOOK1 artifact, and publishes it through the already-bound strict storage transaction.

Since
0.1.0

Definition in file media_download_image_internal.h.

Function Documentation

◆ priv_media_download_image_run()

ra8_err_t priv_media_download_image_run ( ra8_c6link_t * link,
const char * url,
const char * destination,
const ra8_mdl_transfer_config_t * transfer )
nodiscard

Download one encoded image and publish it as a strict .rabook.

Parameters
[in,out]linkOpen, exclusively owned C6 link.
[in]urlNUL-terminated HTTPS source-image URL.
[in]destinationCanonical final VFS destination.
[in]transferBound strict VFS storage, SHA, and chunk policy.
Returns
Download, format, validation, or publication status.
Return values
k_ra8_okA generated RBKC/RABOOK1 artifact was published.
k_ra8_err_null_ptrA required pointer or callback was null.
k_ra8_err_not_supportedThe configured output is not RABOOK.
otherC6, raster, builder, compression, hash, VFS, and validation errors propagate unchanged.
Precondition
link is open and no other caller uses it or the supplied contexts.
transfer owns a strict format validator and unused transaction.
Postcondition
Success leaves one validated final artifact and no private stage.
Failure leaves no newly published artifact and aborts an opened stage.
Note
All source, codec, book, and container bytes use fixed caller storage.
Since
0.1.0

Definition at line 353 of file media_download_image.c.

References ra8_mdl_transfer_config::format, internal_check_transfer(), internal_format(), internal_publish(), k_mdl_format_loose, k_ra8_err_null_ptr, k_ra8_ok, ra8_c6link_mdl_transfer(), ra8_mdl_storage_ram_init(), RA8_PRIV, s_source, s_source_storage, and ra8_mdl_transfer_config::storage.

Referenced by internal_transfer_and_consume().