71typedef enum : uint16_t {
84typedef enum : uint32_t {
93typedef enum : uint8_t {
122 "import stamp layout pinned");
145 const char* epub_path,
146 const char* out_path);
220 const char* epub_path,
221 char* out_cache_path,
222 uint32_t cache_path_cap,
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Minimal FAT12/FAT16/FAT32 filesystem adapter (read + write).
rabook_import_size_t
Fixed sizing constants for the cache-name layout.
@ k_rabook_import_name_cap
Cache/temp/marker name buffer bytes incl.
@ k_rabook_import_stamp_bytes
Pinned size of the freshness stamp.
rabook_import_outcome_t
How rabook_import_open satisfied the request.
@ k_rabook_import_hit
Fresh cache reused; the compiler was NOT invoked.
@ k_rabook_import_compiled
Miss/stale; the book was compiled and cached.
ra8_err_t(* rabook_import_compile_fn)(void *compile_ctx, ra8_fs_mount_t *mount, const char *epub_path, const char *out_path)
Dependency-injection seam: compile one EPUB into a .rabook blob.
rabook_import_magic_t
Sentinel stamped into the freshness marker so a stray file is rejected.
@ k_rabook_import_stamp_magic
Importer marker tag "RBK1".
ra8_err_t rabook_import_open(const rabook_import_cfg_t *cfg, const char *epub_path, char *out_cache_path, uint32_t cache_path_cap, rabook_import_outcome_t *out_outcome)
Resolve a source .epub to a fresh cached .rabook, compiling once.
Cached parse of one mounted FAT volume.
Injected dependencies + versioning for rabook_import_open.
uint32_t scratch_cap
Capacity of scratch in bytes.
ra8_fs_mount_t * mount
Mounted FAT volume (cache + source).
void * compile_ctx
Cookie forwarded to compile.
rabook_import_compile_fn compile
Compile-on-miss seam (non-NULL).
uint32_t format_version
.rabook format version stamp.
uint8_t * scratch
Streaming buffer for the source CRC.
uint32_t importer_version
Importer/compiler version stamp.
Body of the sidecar freshness marker (<name>.rabook.mrk).
uint32_t format_version
.rabook (RABOOK1) on-disk layout revision.
uint32_t importer_version
Compiler/importer stamp; bump to invalidate.
uint32_t source_size
Byte length of the source .epub.
uint32_t magic
k_rabook_import_stamp_magic.
uint32_t source_crc32
CRC-32/ISO-HDLC of the source .epub bytes.