25typedef enum : uint32_t {
110 const char* user_agent,
Streaming HTTP(S) GET seam (a real function-pointer vtable) for the host manga downloader (v0).
robots.txt parser, path matcher, and per-host cache.
bool mdl_session_url_allowed(mdl_session_t *session, const char *url, uint32_t *crawl_delay_ms)
Decide whether url may be fetched under robots.txt, and its delay.
mdl_session_size_t
Fixed session buffer sizes.
@ k_mdl_session_scratch
robots.txt fetch scratch bytes.
@ k_mdl_ua_max
Built User-Agent buffer bytes.
void mdl_session_init(mdl_session_t *session, mdl_net_iface_t *net, const char *user_agent, ra8_io_stream_t *diagnostic, bool honor_robots)
Initialise a session over a network backend.
const char * mdl_session_ua_token(void)
The robots.txt product token this tool matches on ("mdl").
bool mdl_session_build_ua(const char *contact, char *out, size_t cap)
Build the truthful default User-Agent into out.
ra8_io targetable byte-stream facade – one writer, many destinations.
A network backend handle: an immutable method table plus its state.
Fixed-size per-host robots.txt cache for one run.
One download session's identity and robots.txt state.
mdl_robots_cache_t cache
Per-host robots cache.
mdl_net_iface_t * net
Backend used for robots.txt fetches.
bool honor_robots
False disables all robots gating.
const char * user_agent
Full UA header (caller-owned).
ra8_io_stream_t * diagnostic
Borrowed diagnostic byte sink.
char scratch[k_mdl_session_scratch]
Fetch scratch.
Caller-allocated byte-stream handle binding a sink to its context.