ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
mdl_discover.h
Go to the documentation of this file.
1
22#pragma once
23
24#include <stddef.h>
25#include <stdint.h>
26
27#include "mdl_config.h"
28#include "mdl_extract.h"
29#include "mdl_politeness.h"
30#include "mdl_session.h"
31
42
67
105int mdl_discover_run(const mdl_discover_req_t* req, size_t pick, char* out_url, size_t out_cap);
Per-site descriptor loaded from a flat key=value config file.
int mdl_discover_run(const mdl_discover_req_t *req, size_t pick, char *out_url, size_t out_cap)
Run one search/browse discovery: fetch, parse, present, and select.
mdl_discover_mode_t
Which discovery endpoint of a site descriptor to query.
@ k_mdl_discover_browse
browse_url latest-updates page, no term.
@ k_mdl_discover_search
search_url with a {q} term substitution.
Extract image URLs and anchor links from an HTML page (v1 scanner).
Jittered inter-request delay plus the per-host politeness governor.
Session identity (honest User-Agent) and robots.txt gating.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Injected dependencies and inputs for one discovery run.
mdl_hit_list_t * hits
Receives the parsed hits (borrowed).
ra8_io_stream_t * output
Borrowed normal-output byte sink.
mdl_session_t * session
Initialised session (net + UA + robots).
const char * term
Raw search term; ignored/NULL for browse.
ra8_err_t * io_error
Caller-owned first sink failure latch.
mdl_governor_t * gov
Initialised per-host politeness governor.
const mdl_site_t * site
Descriptor holding the discovery keys.
uint32_t timeout_ms
Per-request time budget, milliseconds.
mdl_discover_mode_t mode
Search or browse.
size_t page_cap
Capacity of page_buf in bytes.
ra8_io_stream_t * diagnostic
Borrowed diagnostic byte sink.
char * page_buf
Results-page fetch scratch (borrowed).
Closed-loop per-host politeness governor (rate + backoff + concurrency).
Bounded list of titled hits plus the raw anchor tally.
Definition mdl_extract.h:68
One download session's identity and robots.txt state.
Definition mdl_session.h:39
One site's scraping rules (all data, no logic).
Definition mdl_config.h:46
Caller-allocated byte-stream handle binding a sink to its context.