|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
In-memory model and coverage queries for persistent series state. More...
#include "mdl_state.h"#include <limits.h>#include <math.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include "mdl_state_internal.h"#include "ra8_attributes.h"Go to the source code of this file.
Enumerations | |
| enum | mdl_state_coverage_t : uint16_t { k_state_gap_cap = 12 , k_state_http_status_min = 100 , k_state_http_status_max = 599 } |
| Maximum missing chapter numbers rendered in one coverage summary. More... | |
Functions | |
| static bool | internal_mdl_state_page_response_valid (int64_t fetched_at, uint16_t response_status) |
| Whether persisted HTTP observation metadata is canonical. | |
| void | mdl_state_init (mdl_state_t *st) |
| Reset a state object to an empty, current-version library. | |
| void | priv_mdl_state_set_opt (char *dst, size_t cap, const char *val) |
| Copy val into a bounded field when val is non-NULL. | |
| bool | priv_mdl_state_field_valid (const char *text, size_t cap) |
| True when a record field fits and cannot inject a line or column. | |
| bool | priv_mdl_state_relative_path_valid (const char *path, size_t cap) |
| Validate a bounded relative path. | |
| static bool | internal_mdl_state_chapter_number_valid (double number, bool known) |
| Validate an explicit chapter-number tuple. | |
| bool | priv_mdl_state_valid (const mdl_state_t *st) |
| Validate every bound and cross-field invariant before persistence. | |
| bool | mdl_state_set_series_metadata (mdl_state_t *st, const char *summary, const char *writer, const char *artist, const char *cover_url, const char *cover_path, const char *language, mdl_state_reading_direction_t direction) |
| Set the optional rich metadata persisted for a series. | |
| void | mdl_state_set_series (mdl_state_t *st, const char *url, const char *title, const char *site_name, const char *site_host, const char *config_path) |
| Record the series identity and the descriptor used. | |
| mdl_chapter_rec_t * | mdl_state_find_chapter (mdl_state_t *st, const char *id) |
| Find a chapter record by its stable identifier. | |
| mdl_chapter_rec_t * | mdl_state_add_chapter (mdl_state_t *st, const char *id, const char *url, long number) |
| Find or append a chapter record, returning it. | |
| mdl_chapter_rec_t * | mdl_state_add_chapter_numbered (mdl_state_t *st, const char *id, const char *url, double number, bool number_known) |
| Find or append a chapter with explicit parsed-number presence. | |
| bool | mdl_state_set_chapter_metadata (mdl_chapter_rec_t *chapter, const char *title, double number, bool number_known) |
| Set a chapter's display title and explicit parsed number. | |
| bool | mdl_state_chapter_complete (const mdl_state_t *st, const char *id) |
| Whether a chapter is recorded fully fetched and verified. | |
| uint16_t | mdl_state_chapter_pages (const mdl_state_t *st, const char *id) |
| Recorded page count for a chapter (0 when unknown). | |
| const mdl_page_rec_t * | mdl_state_find_page (const mdl_state_t *st, uint64_t url_hash) |
| Find a page record by its source-URL hash (the dedup lookup). | |
| bool | mdl_state_add_page (mdl_state_t *st, uint64_t url_hash, uint64_t content_hash, const char *rel_path, const char *etag, const char *last_modified, int64_t fetched_at, uint16_t response_status) |
| Add or replace a URL-keyed page cache record. | |
| bool | mdl_state_note_page_response (mdl_state_t *st, uint64_t url_hash, int64_t fetched_at, uint16_t response_status) |
| Refresh the observed HTTP result for one existing URL cache entry. | |
| static bool | internal_mdl_state_chapter_number_as_long (const mdl_chapter_rec_t *chapter, long *out) |
| Convert an exactly integral chapter number to long. | |
| static bool | internal_mdl_state_complete_span (const mdl_state_t *st, long *lo, long *hi, size_t *n) |
| Number span [lo,hi] of complete integral chapters. | |
| static bool | internal_mdl_state_has_complete_number (const mdl_state_t *st, long num) |
| True when a complete chapter with parsed number num exists. | |
| static void | internal_mdl_state_append_gaps (const mdl_state_t *st, long lo, long hi, char *buf, size_t cap) |
| Append the missing-chapter list within [lo,hi] to buf (bounded). | |
| void | mdl_state_coverage (const mdl_state_t *st, char *buf, size_t cap) |
| Render a one-line coverage summary (chapter span, count, gaps). | |
In-memory model and coverage queries for persistent series state.
Maintains bounded chapter and page records, metadata, completion, and coverage calculations independently of storage encoding.
Definition in file mdl_state.c.
| enum mdl_state_coverage_t : uint16_t |
Maximum missing chapter numbers rendered in one coverage summary.
| Enumerator | |
|---|---|
| k_state_gap_cap | Max missing chapters listed. |
| k_state_http_status_min | Smallest valid HTTP status. |
| k_state_http_status_max | Largest valid HTTP status. |
Definition at line 21 of file mdl_state.c.
|
static |
Append the missing-chapter list within [lo,hi] to buf (bounded).
Walks the inclusive integral range, appending absent chapter numbers as a comma-separated list while preserving NUL termination at cap.
| [in] | st | Validated bounded state used for membership checks. |
| [in] | lo | Inclusive lower chapter number. |
| [in] | hi | Inclusive upper chapter number. |
| [in,out] | buf | Existing report buffer to append to. |
| [in] | cap | Total capacity of buf in bytes. |
st and buf are non-NULL and buf is NUL-terminated within cap. lo is no greater than hi and range iteration cannot overflow long. buf remains NUL-terminated within cap. Definition at line 536 of file mdl_state.c.
References internal_mdl_state_has_complete_number(), k_state_gap_cap, and strlen().
Referenced by mdl_state_coverage().
|
static |
Convert an exactly integral chapter number to long.
Rejects unknown, fractional, and out-of-range binary64 chapter numbers before performing the narrowing conversion.
| [in] | chapter | Validated chapter record to inspect. |
| [out] | out | Receives the integral value on success. |
| true | out was initialized with the exact integral value. |
| false | The number was unknown, fractional, or outside long range. |
chapter and out are non-NULL. chapter is a readable initialized record. out exactly once. Definition at line 430 of file mdl_state.c.
References mdl_chapter_rec_t::number, mdl_chapter_rec_t::number_known, and RA8_INTERNAL.
Referenced by internal_mdl_state_complete_span(), and internal_mdl_state_has_complete_number().
|
static |
Validate an explicit chapter-number tuple.
Requires a finite number and canonical 0.0 when presence is false.
| [in] | number | Candidate parsed chapter number. |
| [in] | known | Whether the number was explicitly present. |
| true | The number is finite and canonical for known. |
| false | The number is non-finite or unknown-but-nonzero. |
known is a canonical C Boolean. number is passed by value. Definition at line 136 of file mdl_state.c.
References RA8_INTERNAL.
Referenced by mdl_state_add_chapter_numbered(), mdl_state_set_chapter_metadata(), and priv_mdl_state_valid().
|
static |
Number span [lo,hi] of complete integral chapters.
Scans bounded chapter records, considers only complete chapters with exact integral numbers, and returns their minimum, maximum, and count.
| [in] | st | Validated bounded state to scan. |
| [out] | lo | Receives the minimum complete integral chapter number. |
| [out] | hi | Receives the maximum complete integral chapter number. |
| [out] | n | Receives the number of complete integral chapters. |
| true | lo, hi, and n describe the complete integral span. |
| false | No complete integral chapter exists; outputs are not authoritative. |
st, lo, hi, and n are non-NULL. st contains no more than its fixed chapter capacity. Definition at line 464 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_state_t::chapters, mdl_chapter_rec_t::complete, and internal_mdl_state_chapter_number_as_long().
Referenced by mdl_state_coverage().
|
static |
True when a complete chapter with parsed number num exists.
Scans only the bounded chapter prefix and requires both completion and an exact integral-number match.
| [in] | st | Validated bounded state to scan. |
| [in] | num | Integral chapter number being queried. |
num. | true | A complete exact-number match exists. |
| false | No complete exact-number match exists. |
st is non-NULL and readable. st contains no more than its fixed chapter capacity. Definition at line 506 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_state_t::chapters, mdl_chapter_rec_t::complete, internal_mdl_state_chapter_number_as_long(), and RA8_INTERNAL.
Referenced by internal_mdl_state_append_gaps().
|
static |
Whether persisted HTTP observation metadata is canonical.
Accepts the exact legacy unknown pair or a nonnegative completion time paired with a three-digit HTTP response status.
| [in] | fetched_at | Most recent fetch completion time in epoch seconds. |
| [in] | response_status | Most recent HTTP status, or zero if unknown. |
| true | The pair is the legacy unknown value or a valid observation. |
| false | The time is negative or the response status is out of range. |
Definition at line 43 of file mdl_state.c.
References k_state_http_status_max, k_state_http_status_min, and RA8_INTERNAL.
Referenced by mdl_state_add_page(), mdl_state_note_page_response(), and priv_mdl_state_valid().
| mdl_chapter_rec_t * mdl_state_add_chapter | ( | mdl_state_t * | st, |
| const char * | id, | ||
| const char * | url, | ||
| long | number ) |
Find or append a chapter record, returning it.
| [in,out] | st | State to update (never NULL). |
| [in] | id | Chapter identifier (never NULL). |
| [in] | url | Chapter page URL (never NULL). |
| [in] | number | Parsed chapter number (0 when unnumbered). |
| NULL | A NULL argument, or k_mdl_max_chapters already reached. |
st, id, url are non-NULL and NUL-terminated. number is marked known and zero retains legacy "unknown" semantics. Definition at line 257 of file mdl_state.c.
References mdl_state_add_chapter_numbered().
| mdl_chapter_rec_t * mdl_state_add_chapter_numbered | ( | mdl_state_t * | st, |
| const char * | id, | ||
| const char * | url, | ||
| double | number, | ||
| bool | number_known ) |
Find or append a chapter with explicit parsed-number presence.
Unlike the source-compatible mdl_state_add_chapter wrapper, this API keeps chapter zero distinct from an unknown number and preserves fractional chapter numbers. An unknown number must be supplied canonically as 0.0.
| [in,out] | st | State to update (never NULL). |
| [in] | id | Chapter identifier (never NULL). |
| [in] | url | Chapter page URL (never NULL). |
| [in] | number | Finite parsed chapter number, or 0.0 if unknown. |
| [in] | number_known | Whether number was explicitly parsed. |
| NULL | A NULL/malformed argument, invalid number, or full table. |
st, id, and url are non-NULL. id and url are NUL-terminated and fit their fixed fields. number and number_known exactly. Definition at line 262 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_chapter_rec_t::chapter_id, mdl_state_t::chapters, internal_mdl_state_chapter_number_valid(), k_mdl_chapter_id_max, k_mdl_max_chapters, k_mdl_url_max, mdl_state_find_chapter(), memset(), mdl_chapter_rec_t::number, mdl_chapter_rec_t::number_known, priv_mdl_state_field_valid(), and mdl_chapter_rec_t::source_url.
Referenced by internal_mdl_fetch_process_chapter(), internal_mdl_state_apply_chapter_values(), and mdl_state_add_chapter().
| bool mdl_state_add_page | ( | mdl_state_t * | st, |
| uint64_t | url_hash, | ||
| uint64_t | content_hash, | ||
| const char * | rel_path, | ||
| const char * | etag, | ||
| const char * | last_modified, | ||
| int64_t | fetched_at, | ||
| uint16_t | response_status ) |
Add or replace a URL-keyed page cache record.
Adds or refreshes a bounded page identity and its optional HTTP validators. The URL hash is the sole cache key: when magic-byte validation changes a page's canonical extension or a combined layout relocates it, the existing record is replaced instead of leaving an older path first in lookup order. Empty or NULL validator strings are stored as empty values.
| [in,out] | st | State to update (never NULL). |
| [in] | url_hash | FNV-1a 64 of the page's source URL. |
| [in] | content_hash | FNV-1a 64 of the fetched page bytes. |
| [in] | rel_path | Page path relative to the series dir (never NULL). |
| [in] | etag | Cached ETag, or NULL when unavailable. |
| [in] | last_modified | Cached Last-Modified, or NULL when unavailable. |
| [in] | fetched_at | Most recent fetch completion time in epoch seconds. |
| [in] | response_status | Most recent HTTP status, or zero if unknown. |
| true | The record was appended or the existing URL record replaced. |
| false | The pool is full (k_mdl_max_page_recs) or a NULL argument; dedup simply degrades to a refetch next time, never a crash. |
st and rel_path are non-NULL; rel_path is NUL-terminated. rel_path is a sanitised path with no ../leading /. st is unchanged.Definition at line 347 of file mdl_state.c.
References mdl_page_rec_t::content_hash, mdl_page_rec_t::etag, mdl_page_rec_t::fetched_at, internal_mdl_state_page_response_valid(), k_mdl_etag_max, k_mdl_last_mod_max, k_mdl_max_page_recs, k_mdl_relpath_max, mdl_page_rec_t::last_modified, mdl_state_t::page_rec_count, mdl_state_t::pages, priv_mdl_state_field_valid(), mdl_page_rec_t::rel_path, mdl_page_rec_t::response_status, and mdl_page_rec_t::url_hash.
Referenced by internal_mdl_fetch_publish_page(), internal_mdl_fetch_try_reuse(), and internal_mdl_state_apply_page().
| bool mdl_state_chapter_complete | ( | const mdl_state_t * | st, |
| const char * | id ) |
Whether a chapter is recorded fully fetched and verified.
| [in] | st | State to query (never NULL). |
| [in] | id | Chapter identifier (never NULL). |
id is present AND its record is complete. | true | The chapter exists and every page is fetched and verified. |
| false | Not recorded, incomplete, or a NULL argument. |
st and id are non-NULL; id is NUL-terminated. st is not modified.Uses fixed-capacity state supplied by the caller without allocation. Any text retained by the state is copied into bounded records.
Definition at line 308 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_chapter_rec_t::chapter_id, mdl_state_t::chapters, mdl_chapter_rec_t::complete, and strcmp().
| uint16_t mdl_state_chapter_pages | ( | const mdl_state_t * | st, |
| const char * | id ) |
Recorded page count for a chapter (0 when unknown).
The combined-download page numbering is derived from these counts, so a run that resumes reproduces the same continuous numbering an uninterrupted run would have produced.
| [in] | st | State to query (never NULL). |
| [in] | id | Chapter identifier (never NULL). |
| 0 | The chapter is absent, unlearned, or a NULL argument was passed. |
st and id are non-NULL; id is NUL-terminated. st is not modified.Definition at line 321 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_chapter_rec_t::chapter_id, mdl_state_t::chapters, mdl_chapter_rec_t::page_count, and strcmp().
| void mdl_state_coverage | ( | const mdl_state_t * | st, |
| char * | buf, | ||
| size_t | cap ) |
Render a one-line coverage summary (chapter span, count, gaps).
Summarises which chapters are complete for the library --list view: the count, the numeric span, and the missing chapter numbers inside that span, so a reader can spot a hole without reading the directory tree.
| [in] | st | State to summarise (never NULL). |
| [out] | buf | Destination buffer for the NUL-terminated line (never NULL). |
| [in] | cap | Capacity of buf in bytes (must be > 0). |
st and buf are non-NULL; cap > 0. buf as one line. buf is NUL-terminated. st is not modified.Definition at line 559 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_state_t::chapters, mdl_chapter_rec_t::complete, internal_mdl_state_append_gaps(), and internal_mdl_state_complete_span().
Referenced by internal_list_cb().
| mdl_chapter_rec_t * mdl_state_find_chapter | ( | mdl_state_t * | st, |
| const char * | id ) |
Find a chapter record by its stable identifier.
| [in] | st | State to search (never NULL). |
| [in] | id | Chapter identifier (never NULL). |
| NULL | No chapter with id, or a NULL argument. |
st and id are non-NULL; id is NUL-terminated. st is not modified.Definition at line 243 of file mdl_state.c.
References mdl_state_t::chapter_count, mdl_chapter_rec_t::chapter_id, mdl_state_t::chapters, and strcmp().
Referenced by internal_export_fresh_separate(), internal_mdl_state_apply_chapter_values(), and mdl_state_add_chapter_numbered().
| const mdl_page_rec_t * mdl_state_find_page | ( | const mdl_state_t * | st, |
| uint64_t | url_hash ) |
Find a page record by its source-URL hash (the dedup lookup).
| [in] | st | State to search (never NULL). |
| [in] | url_hash | FNV-1a 64 of the candidate source URL. |
| NULL | No page with url_hash, or a NULL st. |
st is non-NULL. url_hash came from mdl_hash_str on the source URL. st is not modified.Definition at line 334 of file mdl_state.c.
References mdl_state_t::page_rec_count, mdl_state_t::pages, and mdl_page_rec_t::url_hash.
Referenced by internal_mdl_fetch_one_page(), internal_mdl_fetch_prepare_page(), and internal_mdl_fetch_try_reuse().
| void mdl_state_init | ( | mdl_state_t * | st | ) |
Reset a state object to an empty, current-version library.
| [out] | st | State to clear (never NULL). |
st is non-NULL and addresses a full mdl_state_t. st for the duration (not thread-safe). Uses fixed-capacity state supplied by the caller without allocation. Any text retained by the state is copied into bounded records.
Definition at line 52 of file mdl_state.c.
References k_mdl_state_version, memset(), and mdl_state_t::version.
Referenced by internal_mdl_state_load_mode(), internal_mdl_state_load_slot(), and priv_mdl_state_parse_file().
| bool mdl_state_note_page_response | ( | mdl_state_t * | st, |
| uint64_t | url_hash, | ||
| int64_t | fetched_at, | ||
| uint16_t | response_status ) |
Refresh the observed HTTP result for one existing URL cache entry.
Locates the record by its stable URL hash and atomically replaces only the completion time and response-status fields.
| [in,out] | st | State containing the URL-keyed record. |
| [in] | url_hash | FNV-1a 64 hash selecting the record. |
| [in] | fetched_at | Completed request time in epoch seconds. |
| [in] | response_status | HTTP response status in 100..599. |
| true | The matching record now carries the supplied observation. |
| false | No record matched or the time/status was invalid. |
st is non-NULL and exclusively owned. fetched_at is nonnegative. st unchanged. Definition at line 393 of file mdl_state.c.
References mdl_page_rec_t::fetched_at, internal_mdl_state_page_response_valid(), mdl_state_t::page_rec_count, mdl_state_t::pages, mdl_page_rec_t::response_status, and mdl_page_rec_t::url_hash.
Referenced by internal_mdl_fetch_resolve_not_modified().
| bool mdl_state_set_chapter_metadata | ( | mdl_chapter_rec_t * | chapter, |
| const char * | title, | ||
| double | number, | ||
| bool | number_known ) |
Set a chapter's display title and explicit parsed number.
Applies both fields transactionally after validating the title and number. A known number may be zero or fractional; an unknown number must be 0.0.
| [in,out] | chapter | Chapter record to update (never NULL). |
| [in] | title | Display title (may be empty, never NULL). |
| [in] | number | Finite parsed chapter number, or 0.0 if unknown. |
| [in] | number_known | Whether number was explicitly parsed. |
| true | The title and number were stored. |
| false | An argument was invalid; chapter is unchanged. |
chapter is non-NULL and caller-owned. title is non-NULL and NUL-terminated. chapter is unchanged.Definition at line 293 of file mdl_state.c.
References internal_mdl_state_chapter_number_valid(), mdl_chapter_rec_t::number, mdl_chapter_rec_t::number_known, priv_mdl_state_field_valid(), and mdl_chapter_rec_t::title.
Referenced by internal_mdl_fetch_chapter_pages_and_checkpoint(), and internal_mdl_state_apply_chapter_values().
| void mdl_state_set_series | ( | mdl_state_t * | st, |
| const char * | url, | ||
| const char * | title, | ||
| const char * | site_name, | ||
| const char * | site_host, | ||
| const char * | config_path ) |
Record the series identity and the descriptor used.
| [in,out] | st | State to update (never NULL). |
| [in] | url | Series page URL, or NULL to leave unchanged. |
| [in] | title | Series title, or NULL to leave unchanged. |
| [in] | site_name | Descriptor display name, or NULL. |
| [in] | site_host | Site host, or NULL. |
| [in] | config_path | Descriptor file path used (for update-all), or NULL. |
st is non-NULL. st. Uses fixed-capacity state supplied by the caller without allocation. Any text retained by the state is copied into bounded records.
Definition at line 226 of file mdl_state.c.
References mdl_state_t::config_path, priv_mdl_state_set_opt(), mdl_state_t::series_title, mdl_state_t::series_url, mdl_state_t::site_host, and mdl_state_t::site_name.
Referenced by internal_reconcile_series_state().
| bool mdl_state_set_series_metadata | ( | mdl_state_t * | st, |
| const char * | summary, | ||
| const char * | writer, | ||
| const char * | artist, | ||
| const char * | cover_url, | ||
| const char * | cover_path, | ||
| const char * | language, | ||
| mdl_state_reading_direction_t | direction ) |
Set the optional rich metadata persisted for a series.
Copies the complete metadata tuple only when every field fits its fixed destination, contains no TAB/newline record delimiters, the cover path is a relative non-traversing path, and direction is a supported value. Empty strings explicitly clear fields; NULL string arguments are invalid.
| [in,out] | st | State to update (never NULL). |
| [in] | summary | Series synopsis (may be empty). |
| [in] | writer | Writer/author name (may be empty). |
| [in] | artist | Artist/illustrator name (may be empty). |
| [in] | cover_url | Remote cover URL (may be empty). |
| [in] | cover_path | Local cover path relative to the series directory. |
| [in] | language | BCP-47 language tag (may be empty). |
| [in] | direction | Page progression direction. |
| true | Every value was validated and copied. |
| false | An argument was NULL, overlong, malformed, or unsupported. |
st is non-NULL and caller-owned. st is unchanged.Definition at line 186 of file mdl_state.c.
References mdl_state_t::artist, mdl_state_t::cover_path, mdl_state_t::cover_url, k_mdl_language_max, k_mdl_person_max, k_mdl_relpath_max, k_mdl_state_read_ltr, k_mdl_state_read_rtl, k_mdl_summary_max, k_mdl_url_max, mdl_state_t::language, memcpy(), priv_mdl_state_field_valid(), priv_mdl_state_relative_path_valid(), mdl_state_t::reading_direction, mdl_state_t::summary, and mdl_state_t::writer.
Referenced by internal_reconcile_series_state().
| bool priv_mdl_state_field_valid | ( | const char * | text, |
| size_t | cap ) |
True when a record field fits and cannot inject a line or column.
Validate one delimiter-free bounded state field.
Definition at line 70 of file mdl_state.c.
References RA8_PRIV, and strnlen().
Referenced by internal_mdl_state_apply_kv(), mdl_state_add_chapter_numbered(), mdl_state_add_page(), mdl_state_set_chapter_metadata(), mdl_state_set_series_metadata(), priv_mdl_state_relative_path_valid(), and priv_mdl_state_valid().
| bool priv_mdl_state_relative_path_valid | ( | const char * | path, |
| size_t | cap ) |
Validate a bounded relative path.
Validate a bounded relative path stored in state.
Accepts empty paths and rejects absolute, empty-component, and .. component paths without accessing the filesystem.
| [in] | path | Candidate NUL-terminated path. |
| [in] | cap | Maximum field capacity, including NUL. |
| true | The path is empty or safely relative. |
| false | The path is malformed, overlong, absolute, or traversing. |
path is non-NULL. cap is greater than zero. path is unchanged. Definition at line 95 of file mdl_state.c.
References priv_mdl_state_field_valid(), RA8_PRIV, and strlen().
Referenced by internal_mdl_state_apply_metadata(), mdl_state_set_series_metadata(), and priv_mdl_state_valid().
| void priv_mdl_state_set_opt | ( | char * | dst, |
| size_t | cap, | ||
| const char * | val ) |
Copy val into a bounded field when val is non-NULL.
Copy one optional value into a bounded state field.
Definition at line 62 of file mdl_state.c.
References RA8_PRIV.
Referenced by internal_mdl_state_apply_kv(), and mdl_state_set_series().
| bool priv_mdl_state_valid | ( | const mdl_state_t * | st | ) |
Validate every bound and cross-field invariant before persistence.
Validate all persisted state bounds and cross-field invariants.
Definition at line 142 of file mdl_state.c.
References mdl_state_t::artist, mdl_state_t::chapter_count, mdl_chapter_rec_t::chapter_id, mdl_state_t::chapters, mdl_chapter_rec_t::complete, mdl_state_t::config_path, mdl_state_t::cover_path, mdl_state_t::cover_url, mdl_page_rec_t::etag, mdl_page_rec_t::fetched_at, internal_mdl_state_chapter_number_valid(), internal_mdl_state_page_response_valid(), k_mdl_max_chapters, k_mdl_max_page_recs, k_mdl_state_read_ltr, k_mdl_state_read_rtl, k_mdl_state_version, mdl_state_t::language, mdl_page_rec_t::last_modified, mdl_chapter_rec_t::number, mdl_chapter_rec_t::number_known, mdl_chapter_rec_t::page_count, mdl_state_t::page_rec_count, mdl_state_t::pages, mdl_chapter_rec_t::pages_done, priv_mdl_state_field_valid(), priv_mdl_state_relative_path_valid(), RA8_PRIV, mdl_state_t::reading_direction, mdl_page_rec_t::rel_path, mdl_page_rec_t::response_status, mdl_state_t::series_title, mdl_state_t::series_url, mdl_state_t::site_host, mdl_state_t::site_name, mdl_chapter_rec_t::source_url, mdl_state_t::summary, mdl_chapter_rec_t::title, mdl_state_t::version, and mdl_state_t::writer.
Referenced by mdl_state_save(), and priv_mdl_state_parse_file().