88typedef enum : uint16_t {
281 const char* chapter_url,
282 const char* dest_abs,
283 const char* dest_rel,
State-aware chapter/page download orchestrator for the media downloader.
ra8_err_t priv_mdl_fetch_chapter_pages(mdl_fetch_ctx_t *ctx, const char *chapter_url, const char *dest_abs, const char *dest_rel, size_t base, mdl_chapter_rec_t *rec, mdl_fetch_stats_t *stats, const mdl_run_pos_t *pos)
Fetch and checkpoint every extracted page in one chapter.
ra8_err_t priv_mdl_fetch_checkpoint(const mdl_fetch_ctx_t *ctx)
Persist the current fetch state when a checkpoint path is configured.
struct mdl_fetch_cache_request mdl_fetch_cache_request_t
Caller-owned governor parameters for one cached buffer fetch.
bool priv_mdl_fetch_run_incomplete(const mdl_fetch_stats_t *stats)
Whether a finished run left anything unfetched (chapter or page).
bool priv_mdl_fetch_is_retryable(ra8_err_t rc)
Whether a failed transfer result is worth retrying.
ra8_err_t priv_mdl_fetch_with_retry(mdl_fetch_ctx_t *ctx, const char *host, const char *url, const mdl_net_req_t *req, mdl_net_body_sink_t *sink, uint32_t jmin, uint32_t jmax, mdl_net_resp_t *out_resp, size_t *out_bytes)
Perform one bounded governed file transfer with retry classification.
void priv_mdl_fetch_record_fail(const mdl_fetch_ctx_t *ctx, const char *url, long status, ra8_err_t err)
Record one classified failure in the caller's bounded log.
void priv_mdl_fetch_reason(ra8_err_t err, long status, char *buf, size_t cap)
Render a human-readable reason for a transfer result and HTTP status.
ra8_err_t priv_mdl_fetch_cache_get_buf(void *context, const char *url, const mdl_net_req_t *request, char *buffer, size_t capacity, size_t *out_length, mdl_net_resp_t *response)
Fetch one cache buffer through governor and bounded retry policy.
mdl_fetch_reason_size_t
Buffer size the priv_mdl_fetch_reason renderer never overruns.
@ k_mdl_reason_max
Failure-reason string buffer bytes.
Streaming HTTP(S) GET seam (a real function-pointer vtable) for the host manga downloader (v0).
@ k_mdl_gov_host_max
Host-key buffer bytes (matches config).
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.
One chapter's coverage in library state.
Governed retry context for one cache buffer callback.
mdl_fetch_ctx_t * ctx
Active fetch dependencies.
char host[k_mdl_gov_host_max]
Governor host key.
uint32_t jmin
Minimum request delay.
uint32_t jmax
Maximum request delay.
Everything mdl_fetch_run needs, injected for testability.
Tallies a fetch run reports back (all zero-initialised by the run).
Caller-owned lifecycle and write seam for one response body.
Per-request session parameters.
Per-transfer response metadata surfaced to the politeness governor.
Stable chapter position carried into per-page progress events.
size_t chapter_total
Total chapters in the run.
size_t chapter_index
1-based chapter position in the run.
const char * chapter_id
Stable chapter identifier.