Studying how Papyrix renders XTC ebooks... Which is a format specifically designed for this device.
To open such a file it closes anything already open, defers to a support lib for parsing it, clears metadata, retrieves the title to copy over to that metadata falling back to using the filename, retrieves the author falling back to an empty string, creates a cache directory, assembles (via helper) for the cover BMP, retrieves the parser's page count, & zeroes out some progress properties.
1/?
The close method defers to the parser & clears that captured metadata.
There's getters for the properties & those of the parser.
To get a ToC entry it validates with the parser that it has a table-of-contents & that the index is in range, retrieves the chapter array from the parser & the given index into it, & copies the data out.
There's a couple utils for assembling filepaths.
Another method defers to `xtc::generateCoverBmpFromParser` if the file doesn't already exist.
2/5?