1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 03:50:19 +02:00

no input stream lock

This commit is contained in:
Nikolay Pultsin 2012-05-06 01:27:20 +01:00
parent 2a0a349b08
commit 940f214d70

View file

@ -120,28 +120,11 @@ ZLFile OEBPlugin::opfFile(const ZLFile &oebFile) {
bool OEBPlugin::readMetaInfo(Book &book) const {
const ZLFile &file = book.file();
shared_ptr<ZLInputStream> lock = file.inputStream();
return OEBMetaInfoReader(book).readMetaInfo(opfFile(file));
}
class InputStreamLock : public ZLUserData {
public:
InputStreamLock(shared_ptr<ZLInputStream> stream);
private:
shared_ptr<ZLInputStream> myStream;
};
InputStreamLock::InputStreamLock(shared_ptr<ZLInputStream> stream) : myStream(stream) {
}
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));
}