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:
parent
2a0a349b08
commit
940f214d70
1 changed files with 0 additions and 17 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue