Example #1
0
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;
}
Example #2
0
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));
}
Example #3
0
shared_ptr<ZLImage> OEBPlugin::coverImage(const ZLFile &file) const {
	return OEBCoverReader().readCover(opfFile(file));
}
Example #4
0
bool OEBPlugin::readModel(BookModel &model) const {
	const ZLFile &file = model.book()->file();
	return OEBBookReader(model).readBook(opfFile(file));
}
Example #5
0
bool OEBPlugin::readUids(Book &book) const {
	const ZLFile &file = book.file();
	return OEBUidReader(book).readUids(opfFile(file));
}
Example #6
0
std::vector<shared_ptr<FileEncryptionInfo> > OEBPlugin::readEncryptionInfos(Book &book) const {
	const ZLFile &opf = opfFile(book.file());
	return OEBEncryptionReader().readEncryptionInfos(epubFile(opf), opf);
}
Example #7
0
bool OEBPlugin::readMetainfo(Book &book) const {
	const ZLFile &file = book.file();
	return OEBMetaInfoReader(book).readMetainfo(opfFile(file));
}