ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_fetch_body_internal.h
Go to the documentation of this file.
1
9#pragma once
10
11#include <limits.h>
12#include <stddef.h>
13#include <stdint.h>
14
15#include "mdl_net.h"
16#include "mdl_state.h"
17#include "mdl_storage.h"
18#include "ra8_attributes.h"
19#include "ra8_err.h"
20
22typedef enum : uint8_t {
25
31
50
68 mdl_storage_t* storage,
69 const char* target_abs);
70
89 mdl_storage_t* storage,
90 const char* target_abs,
91 const char* target_rel);
92
107
125
142
ra8_err_t priv_mdl_fetch_body_commit(mdl_fetch_body_t *body)
Validate exact size/hash and publish one prepared body.
ra8_err_t priv_mdl_fetch_body_init_exact(mdl_fetch_body_t *body, mdl_storage_t *storage, const char *target_abs)
Initialize an exact-path transactional body sink.
mdl_fetch_body_limit_t
Bounded signature extent retained before image publication begins.
@ k_mdl_fetch_magic_bytes
Largest supported image signature prefix.
mdl_net_body_sink_t priv_mdl_fetch_body_sink(mdl_fetch_body_t *body)
Return the network sink view of one body state.
mdl_fetch_body_mode_t
Destination policy for one response body.
@ k_mdl_fetch_body_image
Derive the suffix from image magic.
@ k_mdl_fetch_body_exact
Publish under the supplied exact path.
ra8_err_t priv_mdl_fetch_body_prepare(mdl_fetch_body_t *body)
Finish prefix classification and make a nonempty stage commit-ready.
ra8_err_t priv_mdl_fetch_body_init_image(mdl_fetch_body_t *body, mdl_storage_t *storage, const char *target_abs, const char *target_rel)
Initialize a magic-typed image body sink.
ra8_err_t priv_mdl_fetch_body_abort(mdl_fetch_body_t *body)
Abort any private stage owned by a body sink.
Streaming HTTP(S) GET seam (a real function-pointer vtable) for the host manga downloader (v0).
Persistent per-series library state for the media downloader.
@ k_mdl_relpath_max
Page path relative to the series dir.
Definition mdl_state.h:102
Injected portable storage resources for downloader domain code.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Caller-owned state for one retryable streamed fetch.
mdl_storage_t * storage
Exclusive storage binding.
uint8_t prefix_bytes
Bytes retained in prefix.
const char * target_rel
Requested relative path or NULL.
mdl_storage_txn_t writer
Single private output stage.
uint64_t received
Network bytes accepted.
char actual_rel[k_mdl_relpath_max]
Magic-derived relative path.
mdl_fetch_body_mode_t mode
Exact or magic-typed publication.
uint8_t prefix[k_mdl_fetch_magic_bytes]
Deferred signature bytes.
char actual_abs[PATH_MAX]
Magic-derived final path.
const char * target_abs
Requested absolute destination.
Caller-owned lifecycle and write seam for one response body.
Definition mdl_net.h:162
One non-reentrant downloader filesystem dependency bundle.
Definition mdl_storage.h:40
Caller-owned streaming publication transaction with running identity.
Definition mdl_storage.h:58