diff --git a/jni/NativeFormats/fbreader/src/formats/FormatPlugin.h b/jni/NativeFormats/fbreader/src/formats/FormatPlugin.h index bf5fc5240..ba58243b6 100644 --- a/jni/NativeFormats/fbreader/src/formats/FormatPlugin.h +++ b/jni/NativeFormats/fbreader/src/formats/FormatPlugin.h @@ -58,6 +58,7 @@ public: virtual const std::string &tryOpen(const ZLFile &file) const; virtual bool readMetaInfo(Book &book) const = 0; + virtual bool readUids(Book &book) const = 0; virtual bool readLanguageAndEncoding(Book &book) const = 0; virtual bool readModel(BookModel &model) const = 0; virtual shared_ptr coverImage(const ZLFile &file) const; diff --git a/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.cpp b/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.cpp index 3a8a9aef8..cb998d811 100644 --- a/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.cpp +++ b/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.cpp @@ -62,6 +62,10 @@ bool DocPlugin::readMetaInfo(Book &book) const { return true; } +bool DocPlugin::readUids(Book &/*book*/) const { + return true; +} + bool DocPlugin::readLanguageAndEncoding(Book &/*book*/) const { return true; } diff --git a/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.h b/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.h index 65f97c29f..102a8b55f 100644 --- a/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.h +++ b/jni/NativeFormats/fbreader/src/formats/doc/DocPlugin.h @@ -32,6 +32,7 @@ public: const std::string supportedFileType() const; bool acceptsFile(const ZLFile &file) const; bool readMetaInfo(Book &book) const; + bool readUids(Book &book) const; bool readLanguageAndEncoding(Book &book) const; bool readModel(BookModel &model) const; }; diff --git a/jni/NativeFormats/fbreader/src/formats/fb2/FB2MetaInfoReader.h b/jni/NativeFormats/fbreader/src/formats/fb2/FB2MetaInfoReader.h index e5ecc7dab..0e48ba7aa 100644 --- a/jni/NativeFormats/fbreader/src/formats/fb2/FB2MetaInfoReader.h +++ b/jni/NativeFormats/fbreader/src/formats/fb2/FB2MetaInfoReader.h @@ -50,7 +50,9 @@ private: READ_AUTHOR_NAME_1, READ_AUTHOR_NAME_2, READ_LANGUAGE, - READ_GENRE + READ_GENRE, + READ_DOCUMENT_INFO, + READ_ID } myReadState; std::string myAuthorNames[3]; diff --git a/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.cpp b/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.cpp index 6879c473a..33f715b37 100644 --- a/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.cpp +++ b/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.cpp @@ -33,6 +33,10 @@ bool FB2Plugin::readMetaInfo(Book &book) const { return FB2MetaInfoReader(book).readMetaInfo(); } +bool FB2Plugin::readUids(Book &/*book*/) const { + return true; +} + bool FB2Plugin::readModel(BookModel &model) const { return FB2BookReader(model).readBook(); } diff --git a/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.h b/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.h index 785196599..746efdf7a 100644 --- a/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.h +++ b/jni/NativeFormats/fbreader/src/formats/fb2/FB2Plugin.h @@ -30,6 +30,7 @@ public: bool providesMetaInfo() const; const std::string supportedFileType() const; bool readMetaInfo(Book &book) const; + bool readUids(Book &book) const; bool readLanguageAndEncoding(Book &book) const; bool readModel(BookModel &model) const; shared_ptr coverImage(const ZLFile &file) const; diff --git a/jni/NativeFormats/fbreader/src/formats/fb2/FB2Reader.h b/jni/NativeFormats/fbreader/src/formats/fb2/FB2Reader.h index 5a299411a..667417ea0 100644 --- a/jni/NativeFormats/fbreader/src/formats/fb2/FB2Reader.h +++ b/jni/NativeFormats/fbreader/src/formats/fb2/FB2Reader.h @@ -81,6 +81,8 @@ public: _COVERPAGE, _SEQUENCE, _GENRE, + _DOCUMENT_INFO, + _ID, _UNKNOWN }; diff --git a/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.cpp b/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.cpp index 4e3bdb013..ab311d652 100644 --- a/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.cpp +++ b/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.cpp @@ -50,6 +50,10 @@ bool HtmlPlugin::readMetaInfo(Book &book) const { return true; } +bool HtmlPlugin::readUids(Book &/*book*/) const { + return true; +} + bool HtmlPlugin::readModel(BookModel &model) const { const Book& book = *model.book(); const ZLFile &file = book.file(); diff --git a/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.h b/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.h index ef6bc25cb..1e31e405c 100644 --- a/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.h +++ b/jni/NativeFormats/fbreader/src/formats/html/HtmlPlugin.h @@ -30,6 +30,7 @@ public: bool providesMetaInfo() const; const std::string supportedFileType() const; bool readMetaInfo(Book &book) const; + bool readUids(Book &book) const; bool readLanguageAndEncoding(Book &book) const; bool readModel(BookModel &model) const; // FormatInfoPage *createInfoPage(ZLOptionsDialog &dialog, const ZLFile &file); diff --git a/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.cpp b/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.cpp index f90e1f901..8ad189cd4 100644 --- a/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.cpp +++ b/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.cpp @@ -123,6 +123,10 @@ bool OEBPlugin::readMetaInfo(Book &book) const { return OEBMetaInfoReader(book).readMetaInfo(opfFile(file)); } +bool OEBPlugin::readUids(Book &/*book*/) const { + return true; +} + bool OEBPlugin::readModel(BookModel &model) const { const ZLFile &file = model.book()->file(); return OEBBookReader(model).readBook(opfFile(file)); diff --git a/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.h b/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.h index d462d8275..0e4de6524 100644 --- a/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.h +++ b/jni/NativeFormats/fbreader/src/formats/oeb/OEBPlugin.h @@ -32,6 +32,7 @@ public: bool providesMetaInfo() const; const std::string supportedFileType() const; bool readMetaInfo(Book &book) const; + bool readUids(Book &book) const; bool readLanguageAndEncoding(Book &book) const; bool readModel(BookModel &model) const; shared_ptr coverImage(const ZLFile &file) const; diff --git a/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.cpp b/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.cpp index f5eac05ad..215bc3c08 100644 --- a/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.cpp +++ b/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.cpp @@ -54,6 +54,10 @@ bool RtfPlugin::readMetaInfo(Book &book) const { return true; } +bool RtfPlugin::readUids(Book &/*book*/) const { + return true; +} + bool RtfPlugin::readModel(BookModel &model) const { const Book &book = *model.book(); return RtfBookReader(model, book.encoding()).readDocument(book.file()); diff --git a/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.h b/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.h index 7a83a179f..bcc2203ea 100644 --- a/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.h +++ b/jni/NativeFormats/fbreader/src/formats/rtf/RtfPlugin.h @@ -28,6 +28,7 @@ public: bool providesMetaInfo() const; const std::string supportedFileType() const; bool readMetaInfo(Book &book) const; + bool readUids(Book &book) const; bool readLanguageAndEncoding(Book &book) const; bool readModel(BookModel &model) const; }; diff --git a/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.cpp b/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.cpp index 9626e7ee5..ddcc6ec52 100644 --- a/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.cpp +++ b/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.cpp @@ -65,6 +65,10 @@ bool TxtPlugin::readModel(BookModel &model) const { // return new PlainTextInfoPage(dialog, file, ZLResourceKey("Text"), true); //} +bool TxtPlugin::readUids(Book &/*book*/) const { + return true; +} + bool TxtPlugin::readLanguageAndEncoding(Book &book) const { shared_ptr stream = book.file().inputStream(); if (stream.isNull()) { diff --git a/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.h b/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.h index 50834f88b..1ea91ecd9 100644 --- a/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.h +++ b/jni/NativeFormats/fbreader/src/formats/txt/TxtPlugin.h @@ -29,6 +29,7 @@ public: bool providesMetaInfo() const; const std::string supportedFileType() const; bool readMetaInfo(Book &book) const; + bool readUids(Book &book) const; bool readLanguageAndEncoding(Book &book) const; bool readModel(BookModel &model) const; // FormatInfoPage *createInfoPage(ZLOptionsDialog &dialog, const ZLFile &file);