bool OEBPlugin::readLanguageAndEncoding(Book &book) const { if (book.language().empty()) { shared_ptr<ZLInputStream> oebStream = new OEBTextStream(opfFile(book.file())); detectLanguage(book, *oebStream, book.encoding()); } return true; }
bool OEBPlugin::readModel(BookModel &model) const { const ZLFile &file = model.book()->file(); model.addUserData( "inputStreamLock", new InputStreamLock(file.inputStream()) ); return OEBBookReader(model).readBook(opfFile(file)); }
shared_ptr<ZLImage> OEBPlugin::coverImage(const ZLFile &file) const { return OEBCoverReader().readCover(opfFile(file)); }
bool OEBPlugin::readModel(BookModel &model) const { const ZLFile &file = model.book()->file(); return OEBBookReader(model).readBook(opfFile(file)); }
bool OEBPlugin::readUids(Book &book) const { const ZLFile &file = book.file(); return OEBUidReader(book).readUids(opfFile(file)); }
std::vector<shared_ptr<FileEncryptionInfo> > OEBPlugin::readEncryptionInfos(Book &book) const { const ZLFile &opf = opfFile(book.file()); return OEBEncryptionReader().readEncryptionInfos(epubFile(opf), opf); }
bool OEBPlugin::readMetainfo(Book &book) const { const ZLFile &file = book.file(); return OEBMetaInfoReader(book).readMetainfo(opfFile(file)); }