69 const char* destination,
93 const char* destination,
114 const uint8_t* bytes,
139 const uint8_t* bytes,
141 uint32_t* out_written);
161 mz_uint64 file_offset,
184 bool* out_published);
259 mz_uint64 file_offset,
326 const uint8_t* bytes,
372 uint8_t* destination,
396 const char* directory,
Package a downloaded chapter folder into a reader-openable container.
struct mdl_export_workspace mdl_export_workspace_t
Caller-owned bounded arena for all exporter scratch state.
ra8_err_t priv_mdl_export_zip_add_file(mz_zip_archive *zip, mdl_storage_t *storage, const char *member, const char *path, mz_uint flags)
Add one portable source file through miniz callbacks.
ra8_err_t priv_mdl_export_path_join(char *out, size_t capacity, const char *directory, const char *leaf)
Join a canonical directory and leaf without truncation.
ra8_err_t priv_mdl_export_output_abort(mdl_export_output_t *output)
Abort one unpublished export stage, retaining cleanup failure.
size_t priv_mdl_export_zip_write(void *opaque, mz_uint64 file_offset, const void *bytes, size_t length)
Adapt random-offset miniz output to the active export stage.
ra8_err_t priv_mdl_export_output_commit(mdl_export_output_t *output, mdl_export_workspace_t *workspace, bool *out_published)
Structurally validate and publish one completed export stage.
ra8_err_t(* mdl_export_sink_fn_t)(void *ctx, const uint8_t *bytes, uint32_t length)
Portable archive-output sink signature.
ra8_err_t priv_mdl_export_output_begin_new(mdl_export_output_t *output, mdl_storage_t *storage, const char *destination, mdl_format_t format)
Bind a create-new validated publication transaction.
ra8_err_t priv_mdl_export_source_copy(mdl_export_source_t *source, mdl_export_sink_fn_t sink, void *sink_ctx)
Stream one portable source into a bounded caller sink.
ra8_err_t priv_mdl_export_output_begin(mdl_export_output_t *output, mdl_storage_t *storage, const char *destination, mdl_format_t format)
Bind a validated publication transaction to one destination.
ra8_err_t priv_mdl_export_source_close(mdl_export_source_t *source)
Close one open source and clear its retained binding.
ra8_err_t priv_mdl_export_output_write_at(void *opaque, uint64_t offset, const uint8_t *bytes, uint32_t length, uint32_t *out_written)
Write one complete span at an absolute active-stage offset.
ra8_err_t priv_mdl_export_output_write(mdl_export_output_t *output, const uint8_t *bytes, uint32_t length)
Append one complete byte span to an active export stage.
ra8_err_t priv_mdl_export_zip_add_memory(mz_zip_archive *zip, const char *member, const uint8_t *bytes, size_t length, mz_uint flags)
Add caller-owned memory through the deterministic ZIP read seam.
ra8_err_t priv_mdl_export_source_slurp(mdl_storage_t *storage, const char *path, uint8_t *destination, size_t capacity, size_t *out_length)
Read one complete bounded portable source into caller storage.
ra8_err_t priv_mdl_export_source_verify_close(mdl_export_source_t *source)
Verify the first source pass against an independent reread.
ra8_err_t priv_mdl_export_source_open(mdl_export_source_t *source, mdl_storage_t *storage, const char *path)
Open one regular source and snapshot its exact nonempty extent.
size_t priv_mdl_export_zip_read(void *opaque, mz_uint64 file_offset, void *destination, size_t capacity)
Adapt one sequential miniz source read to a portable file stream.
Injected portable storage resources for downloader domain code.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Caller-owned open file; fields are private to the facade.
One validated staged publication, including random ZIP backfill.
uint64_t extent
Greatest written byte edge.
uint64_t offset
Current staged write position.
mdl_storage_txn_t writer
Active storage transaction.
ra8_err_t error
First callback error, if any.
mdl_format_t format
Canonical verifier selection.
One open regular source with a snapshotted identity.
mdl_storage_t * storage
Borrowed exclusive storage binding.
uint32_t calls
Bounded read-call tally.
ra8_err_t error
First callback error, if any.
fw_fs_file_t file
Open portable source stream.
uint64_t hash
First-pass FNV identity.
uint64_t offset
Sequential callback cursor.
uint64_t size
Snapshotted source extent.
One non-reentrant downloader filesystem dependency bundle.
Caller-owned streaming publication transaction with running identity.