int mdl_app_run_artifact(const char *url, const char *out_dir, uint32_t timeout, const mdl_run_opts_t *opts)
Download, validate and atomically publish one direct artifact.
int mdl_app_run_update_all(const mdl_series_run_t *base)
Incrementally update every tracked series under a library root.
int mdl_app_run_discover(const mdl_discover_run_t *req, const mdl_run_opts_t *opts, const mdl_series_run_t *base)
Run search or browse discovery and optionally download one result.
int mdl_app_run_verify(const char *target_dir)
Verify one library or artifact tree without mutating it.
int mdl_app_run_init_site(const char *url, const char *descriptor_dir)
Create a starter descriptor for one validated site URL.
int mdl_app_run_remove(const char *out_dir, const char *url_or_slug)
Remove one explicitly tracked series directory.
int mdl_app_run_page(const char *url, const char *out_dir, const char *attr, uint32_t max_imgs, uint64_t seed, uint32_t timeout, const mdl_run_opts_t *opts)
Download image resources from one direct page URL.
int mdl_app_run_pack(const char *dir, mdl_format_t format)
Package an existing image directory without network access.
int mdl_app_run_list(const char *out_dir)
List every tracked series under one library root.
int mdl_app_run_series(const mdl_series_run_t *run)
Execute one prepared series download.
mdl_cli_mode_t
Exactly one command mode selected by a valid invocation.
@ k_mdl_cli_mode_verify
Verify tracked state/pages/containers.
@ k_mdl_cli_mode_series
Download or update one configured series.
@ k_mdl_cli_mode_artifact
Download one verified HTTPS artifact.
@ k_mdl_cli_mode_page
Debug-download images from one page URL.
@ k_mdl_cli_mode_search
Search a descriptor and optionally pick.
@ k_mdl_cli_mode_pack
Package a local page-image directory.
@ k_mdl_cli_mode_update_all
Update every tracked local series.
@ k_mdl_cli_mode_list
List tracked local series.
@ k_mdl_cli_mode_remove
Remove one tracked local series.
@ k_mdl_cli_mode_browse
Browse a descriptor and optionally pick.
@ k_mdl_cli_mode_init_site
Generate a starter descriptor template.
const mdl_net_provider_t * priv_mdl_compose_net_provider(void)
The libcurl transport factory this form injects into every run.
mdl_series_run_t priv_mdl_compose_build_run(const mdl_args_t *a, mdl_format_t format, const mdl_run_opts_t *opts, const mdl_nums_t *n)
Translate validated argv state into one portable series-run value.
static mdl_net_curl_storage_t s_curl_storage
The one caller-owned libcurl backend context this form provides.
static const mdl_net_provider_t s_curl_provider
This form's injected transport factory, bound once at compile time.
int priv_mdl_compose_dispatch(const mdl_args_t *a, mdl_cli_mode_t mode, mdl_format_t format, const mdl_run_opts_t *opts, const mdl_nums_t *nums, const mdl_series_run_t *run)
Route the one validated mode to its portable application entry point.
static ra8_err_t internal_curl_open(void *ctx, const mdl_net_policy_t *policy, mdl_net_iface_t *out_net)
Open one hardened libcurl interface over the form's backend storage.
What this FORM injects, and how one parsed invocation reaches a mode.
Factory for the concrete libcurl-backed mdl_net_iface_t backend.
struct mdl_net_curl_storage mdl_net_curl_storage_t
ra8_err_t mdl_net_curl_init(mdl_net_iface_t *net, mdl_net_curl_storage_t *storage, const mdl_net_policy_t *policy)
Initialise a libcurl-backed host network interface in caller storage.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Parsed command-line options in string form (converted by main).
const char * verify_dir
–verify [DIR]: directory to verify.
bool update
–update: fetch only chapters not already complete.
const char * pack
–pack DIR: package an existing folder, no network.
const char * cfg
–config path.
const char * page_url
positional page URL (page mode).
const char * remove_series
–remove: series URL/slug to drop from the library.
const char * out
–out dir.
const char * init_site_url
–init-site URL: generate site descriptor template.
bool browse
–browse: list a site's latest-updates page.
const char * cache_dir
–cache-dir: persistent per-host cache root.
const char * pick
–pick N: download the Nth discovery hit (1-based).
const char * series
–series URL.
bool separate
–separate: one archive per chapter (default: combine).
One search or browse request against a configured site descriptor.
A network backend handle: an immutable method table plus its state.
Session-wide security policy for the network backend.
An injected FACTORY for mdl_net_iface_t: which backend, decided once.
The validated numeric CLI scalars, parsed once before any run mode.
size_t pick
–pick discovery hit (1-based; 0 = list).
bool from_present
Whether –from was supplied.
uint32_t timeout
–timeout ms (default k_req_timeout_def).
size_t chapters
–chapters window (clamped to >= 1).
uint32_t max_imgs
–max page images (0 = all).
uint64_t seed
–seed (default 1).
double from_num
–from chapter number, including decimals.
Cross-cutting policy and injected transport threaded into every mode.
Parameters of one series download, as values rather than arguments.