|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Opened EPUB book. More...
#include <epub.h>
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. | |
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.
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| uint8_t epub_book_t::in_use |
1 = open, 0 = closed.
Definition at line 358 of file epub.h.
Referenced by epub_close(), epub_entry_open(), epub_entry_pread(), epub_get_chapter_count(), epub_get_cover_image(), epub_get_embedded_font(), epub_get_embedded_font_count(), epub_get_metadata(), epub_get_resource(), epub_get_toc_count(), epub_get_toc_entry(), epub_get_toc_kind(), epub_load_chapter(), epub_manifest_count(), epub_manifest_item(), epub_render_glyph(), epub_set_font(), epub_toc_entry_to_chapter(), internal_close_compile_sources(), and priv_epub_finish_open().
| 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().
| 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().
| 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().
| 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().
| 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().
| char epub_book_t::opf_dir[k_epub_max_path_len] |
Directory portion of the OPF.
Definition at line 345 of file epub.h.
Referenced by epub_get_cover_image(), epub_get_embedded_font(), epub_get_resource(), epub_load_chapter(), internal_load_toc(), internal_locate(), and internal_parse_archive().
| 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().
| 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().
| epub_toc_entry_t epub_book_t::toc[k_epub_max_toc] |
Flattened TOC, document order.
Definition at line 351 of file epub.h.
Referenced by epub_get_toc_entry(), epub_toc_entry_to_chapter(), internal_nav_event(), internal_nav_event_start(), internal_ncx_event(), and internal_toc_reserve().
| uint16_t epub_book_t::toc_count |
Number of entries stored in toc.
Definition at line 350 of file epub.h.
Referenced by epub_get_toc_count(), epub_get_toc_entry(), epub_toc_entry_to_chapter(), internal_toc_reserve(), priv_epub_xml_parse_nav(), and priv_epub_xml_parse_ncx().
| 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().
| 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().
| epub_xml_workspace_t epub_book_t::xml_workspace |
Per-book XML parser state; never shared with another book.
Definition at line 311 of file epub.h.
Referenced by internal_collect_spine(), internal_opf_first(), internal_opf_metadata_child(), internal_opf_resolve_refs(), internal_parse_archive(), priv_epub_xml_parse_nav(), priv_epub_xml_parse_ncx(), and priv_epub_xml_parse_opf().
| uint8_t epub_book_t::zip_archive_active |
1 = mz_zip_reader_init succeeded.
Definition at line 305 of file epub.h.
Referenced by epub_close(), epub_entry_open(), epub_entry_pread(), epub_get_cover_image(), epub_get_embedded_font(), epub_get_resource(), epub_load_chapter(), and priv_epub_finish_open().
| uint8_t epub_book_t::zip_archive_storage[k_epub_zip_archive_bytes] |
Zip archive storage.
Definition at line 304 of file epub.h.
Referenced by epub_close(), epub_get_cover_image(), epub_get_embedded_font(), epub_get_resource(), epub_load_chapter(), epub_open(), epub_open_streamed(), and internal_zip().
| 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().
| 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().