ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
epub_book_t Struct Reference

Opened EPUB book. More...

#include <epub.h>

Collaboration diagram for epub_book_t:

Data Fields

const uint8_t * zip_bytes
 Pointer to the EPUB blob.
size_t zip_size
 Length of the EPUB blob.
uint8_t zip_archive_storage [k_epub_zip_archive_bytes]
 Zip archive storage.
uint8_t zip_archive_active
 1 = mz_zip_reader_init succeeded.
epub_miniz_arena_t miniz_arena
 Per-book allocator descriptor bound through miniz's opaque pointer.
epub_miniz_workspace_t miniz_workspace
 Per-book bounded allocator workspace; never shared with another book.
epub_xml_workspace_t xml_workspace
 Per-book XML parser state; never shared with another book.
epub_stream_media_t stream_media
 Streamed media descriptor; {} for the resident path.
uint16_t chapter_count
 Spine length actually stored.
char chapter_paths [k_epub_max_chapters][k_epub_max_path_len]
 Manifest hrefs (relative to OPF dir).
char title [k_epub_meta_len]
 Dublin Core <dc:title>.
char author [k_epub_meta_len]
 Dublin Core <dc:creator>.
char language [k_epub_meta_len]
 Dublin Core <dc:language>.
char identifier [k_epub_meta_len]
 Dublin Core <dc:identifier> (unique book id).
char cover_path [k_epub_max_path_len]
 Path to cover image (or empty).
uint16_t embedded_font_count
 Manifest font items found (<= cap).
char embedded_font_paths [k_epub_max_fonts][k_epub_max_path_len]
 Font hrefs (rel.
uint16_t manifest_count
 <manifest> <item> entries stored (<= cap).
epub_manifest_item_t manifest [k_epub_max_manifest]
 Items, OPF order.
char opf_dir [k_epub_max_path_len]
 Directory portion of the OPF.
char toc_path [k_epub_max_path_len]
 Nav/NCX href (rel.
uint8_t toc_kind
 epub_toc_kind_t: source of the TOC.
uint16_t toc_count
 Number of entries stored in toc.
epub_toc_entry_t toc [k_epub_max_toc]
 Flattened TOC, document order.
const uint8_t * font_data
 TTF blob; NULL if unset.
size_t font_size
 TTF blob length.
uint8_t in_use
 1 = open, 0 = closed.

Detailed Description

Opened EPUB book.

Populated by epub_open(). The struct is exposed (not behind a pointer) so callers can statically allocate it. Treat all fields as read-only; modify only via the epub_* API.

Invariant
in_use == 1 while a book is open; cleared by epub_close().
See also
epub_open()
epub_close()

Definition at line 286 of file epub.h.

Field Documentation

◆ author

char epub_book_t::author[k_epub_meta_len]

Dublin Core <dc:creator>.

Definition at line 327 of file epub.h.

Referenced by epub_get_metadata(), and internal_metadata_text().

◆ chapter_count

uint16_t epub_book_t::chapter_count

Spine length actually stored.

Definition at line 321 of file epub.h.

Referenced by epub_close(), epub_get_chapter_count(), epub_load_chapter(), epub_toc_entry_to_chapter(), and internal_opf_resolve_refs().

◆ chapter_paths

char epub_book_t::chapter_paths[k_epub_max_chapters][k_epub_max_path_len]

Manifest hrefs (relative to OPF dir).

Definition at line 322 of file epub.h.

Referenced by epub_load_chapter(), epub_toc_entry_to_chapter(), internal_compile_chapters(), and internal_opf_resolve_refs().

◆ cover_path

char epub_book_t::cover_path[k_epub_max_path_len]

Path to cover image (or empty).

Definition at line 332 of file epub.h.

Referenced by epub_get_cover_image(), internal_compile_images(), internal_manifest_item(), and internal_opf_resolve_refs().

◆ embedded_font_count

uint16_t epub_book_t::embedded_font_count

Manifest font items found (<= cap).

Definition at line 335 of file epub.h.

Referenced by epub_get_embedded_font(), epub_get_embedded_font_count(), and internal_manifest_item().

◆ embedded_font_paths

char epub_book_t::embedded_font_paths[k_epub_max_fonts][k_epub_max_path_len]

Font hrefs (rel.

to OPF dir).

Definition at line 336 of file epub.h.

Referenced by epub_get_embedded_font(), and internal_manifest_item().

◆ font_data

const uint8_t* epub_book_t::font_data

TTF blob; NULL if unset.

Definition at line 354 of file epub.h.

Referenced by epub_render_glyph(), epub_set_font(), and internal_font_init().

◆ font_size

size_t epub_book_t::font_size

TTF blob length.

Definition at line 355 of file epub.h.

Referenced by epub_set_font(), and internal_font_init().

◆ identifier

char epub_book_t::identifier[k_epub_meta_len]

Dublin Core <dc:identifier> (unique book id).

Definition at line 329 of file epub.h.

Referenced by epub_get_metadata(), and internal_metadata_text().

◆ in_use

◆ language

char epub_book_t::language[k_epub_meta_len]

Dublin Core <dc:language>.

Definition at line 328 of file epub.h.

Referenced by epub_get_metadata(), and internal_metadata_text().

◆ manifest

epub_manifest_item_t epub_book_t::manifest[k_epub_max_manifest]

Items, OPF order.

Definition at line 342 of file epub.h.

Referenced by epub_manifest_item(), and internal_manifest_item().

◆ manifest_count

uint16_t epub_book_t::manifest_count

<manifest> <item> entries stored (<= cap).

Definition at line 340 of file epub.h.

Referenced by epub_manifest_count(), epub_manifest_item(), and internal_manifest_item().

◆ miniz_arena

epub_miniz_arena_t epub_book_t::miniz_arena

Per-book allocator descriptor bound through miniz's opaque pointer.

Definition at line 307 of file epub.h.

Referenced by epub_close(), epub_open(), epub_open_streamed(), and priv_epub_set_miniz_alloc().

◆ miniz_workspace

epub_miniz_workspace_t epub_book_t::miniz_workspace

Per-book bounded allocator workspace; never shared with another book.

Definition at line 309 of file epub.h.

Referenced by priv_epub_set_miniz_alloc().

◆ opf_dir

char epub_book_t::opf_dir[k_epub_max_path_len]

◆ stream_media

epub_stream_media_t epub_book_t::stream_media

Streamed media descriptor; {} for the resident path.

Definition at line 318 of file epub.h.

Referenced by epub_open_streamed(), and internal_backing_read().

◆ title

char epub_book_t::title[k_epub_meta_len]

Dublin Core <dc:title>.

Definition at line 326 of file epub.h.

Referenced by epub_get_metadata(), and internal_metadata_text().

◆ toc

◆ toc_count

uint16_t epub_book_t::toc_count

◆ toc_kind

uint8_t epub_book_t::toc_kind

epub_toc_kind_t: source of the TOC.

Definition at line 349 of file epub.h.

Referenced by epub_get_toc_kind(), internal_load_toc(), internal_manifest_item(), and internal_opf_resolve_refs().

◆ toc_path

char epub_book_t::toc_path[k_epub_max_path_len]

Nav/NCX href (rel.

to OPF dir); "" if none.

Definition at line 348 of file epub.h.

Referenced by internal_load_toc(), internal_manifest_item(), and internal_opf_resolve_refs().

◆ xml_workspace

epub_xml_workspace_t epub_book_t::xml_workspace

◆ zip_archive_active

uint8_t epub_book_t::zip_archive_active

◆ zip_archive_storage

uint8_t epub_book_t::zip_archive_storage[k_epub_zip_archive_bytes]

◆ zip_bytes

const uint8_t* epub_book_t::zip_bytes

Pointer to the EPUB blob.

Definition at line 288 of file epub.h.

Referenced by epub_open(), epub_open_streamed(), and internal_backing_read().

◆ zip_size

size_t epub_book_t::zip_size

Length of the EPUB blob.

Definition at line 289 of file epub.h.

Referenced by epub_open(), epub_open_streamed(), and internal_backing_read().


The documentation for this struct was generated from the following file:
  • apps/shared_libs/epub/inc/epub.h