53 const uint8_t* request,
57 size_t* response_len);
76 uint64_t* total_bytes,
90typedef enum : uint16_t {
190 const uint8_t* request,
194 size_t* response_len);
struct ra8_mdl_service ra8_mdl_service_t
ra8_err_t(* ra8_mdl_service_dispatch_fn)(void *ctx, uint32_t operation, const uint8_t *request, size_t request_len, uint8_t *response, size_t response_cap, size_t *response_len)
Dispatch one generated inner media request into caller-owned storage.
ra8_mdl_decode_arena_limit_t
Bounded protobuf decode storage one dispatch may consume.
@ k_ra8_mdl_decode_arena_bytes
Per-dispatch arena size.
@ k_ra8_mdl_decode_align
Alignment every arena span is issued on.
ra8_err_t ra8_mdl_service_dispatch(void *ctx, uint32_t operation, const uint8_t *request, size_t request_len, uint8_t *response, size_t response_cap, size_t *response_len)
Dispatch Start, Next, or Cancel generated protobuf payloads.
struct ra8_mdl_decode_arena ra8_mdl_decode_arena_t
ra8_err_t ra8_mdl_service_init(ra8_mdl_service_t *service, const ra8_mdl_service_backend_t *backend)
Initialise portable service state with a complete backend seam.
struct ra8_mdl_service_backend ra8_mdl_service_backend_t
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Wire-neutral media HTTP request and response records.
Allocation-free constants shared by the RA8 and C6 media endpoints.
@ k_ra8_mdl_user_agent_max
Maximum User-Agent size, including NUL.
@ k_ra8_mdl_referer_max
Maximum Referer size, including NUL.
@ k_ra8_mdl_url_max
Maximum URL buffer size, including NUL.
@ k_ra8_mdl_http_date_max
Maximum HTTP-date size, including NUL.
@ k_ra8_mdl_etag_max
Maximum ETag size, including NUL.
@ k_ra8_mdl_sha256_bytes
SHA-256 digest size in bytes.
Linear allocator storage the generated decoder draws one dispatch from.
uint8_t bytes[k_ra8_mdl_decode_arena_bytes]
Fixed protobuf decode storage.
size_t used
Bytes already allocated.
HTTP status and selected response headers proven by the C6 backend.
Complete typed HTTPS request accepted by protocol version 3.
Bounded typed-artifact source seam implemented by the C6 port.
ra8_err_t(* begin)(void *ctx, const ra8_mdl_request_t *request)
Validate and begin one bounded typed HTTPS request.
ra8_err_t(* read)(void *ctx, uint8_t *out, uint16_t cap, uint16_t *got, uint64_t *total_bytes, bool *complete, uint8_t sha256[k_ra8_mdl_sha256_bytes], ra8_mdl_http_response_t *response)
Pull bytes or terminal metadata.
void * ctx
Backend callback context.
ra8_err_t(* cancel)(void *ctx)
Cancel and release the active backend job.
Caller-owned one-job portable service state.
uint32_t next_sequence
Sequence required from the next pull.
uint32_t active_job_id
Correlation id of the current job.
bool active
Whether Next or Cancel is currently valid.
uint64_t next_offset
Byte offset required from the next pull.
ra8_mdl_service_backend_t backend
Injected typed-artifact source mechanism.
ra8_mdl_decode_arena_t arena
Decode storage for the running dispatch.
uint32_t next_job_id
Monotonic id candidate for the next Start.
mdl_format_t active_format
Artifact identity of the active job.