26#define EPUB_FILE_LEN_MAX 255
33#define EPUB_LSDIR_CHARS_MAX 4096
40#define EPUB_PAGE_SIZE 1400
47#define STATE_FILE "/SD:/.statefile"
char * epub_get_next_page()
Get the parsed and prettified next page.
book_entry_t * epub_get_book_entry_for_num(uint16_t number)
Get the book_entry_t representation for a given number in the book list.
book_entry_t * epub_get_book_entry_for_title(char *title)
Get the book_entry_t representation for a given book title.
int epub_restore_book()
Restore a book's reading state from a saved state file.
char * epub_get_prev_page()
Get the parsed and prettified previous page.
int epub_open_book(book_entry_t *book)
Load and open the EPUB represented by the given book_entry_t entry.
struct llist book_list_t
A linked list to store all book representations.
book_list_t * epub_get_book_list()
Get the book list.
struct dllist chapter_list_t
A double-linked list to represent the chapters in a book.
int epub_write_current_book_state()
Save the current book's state in a state file on the inserted SD card.
#define EPUB_PAGE_SIZE
The configured page read size.
Definition epub.h:40
void epub_get_current_book_state()
Restore the book state from a state file on the inserted SD card.
int epub_initialize()
Initialize the SD card and fetch EPUBs, authors and titles.
Represents one EPUB E-Book.
Definition epub.h:54
char * entry_point
Definition epub.h:74
char * author
Definition epub.h:68
char * title
Definition epub.h:63
size_t number
Definition epub.h:58
char * root_dir
Definition epub.h:79
Represents one chapter in a book.
Definition epub.h:102
char * path
Definition epub.h:111
size_t number
Definition epub.h:106
Represents the current book read.
Definition epub.h:139
size_t file_offset
Definition epub.h:198
char * root_dir
Definition epub.h:173
char pretty_page[1400]
Definition epub.h:163
size_t chapter
Definition epub.h:193
chapter_list_t * chapter_list
Definition epub.h:148
char * chapter_filename
Definition epub.h:168
uint16_t num_chapters
Definition epub.h:143
char * title
Definition epub.h:186
chapter_list_t * current_chapter
Definition epub.h:153
char page[1400]
Definition epub.h:158
A double-linked list to represent the chapters in a book.
Definition epub.h:118
struct dllist * next
Definition epub.h:127
struct dllist * prev
Definition epub.h:132
chapter_entry_t * chapter
Definition epub.h:122
A linked list to store all book representations.
Definition epub.h:86
struct llist * next
Definition epub.h:95
book_entry_t * book
Definition epub.h:90