Deprecate Reader creation.

As we `Reader` is now deprecated, we also remove the unit tests on it.
`Reader` is now untested, and so it reduces the code coverage.
This commit is contained in:
Matthieu Gautier
2022-01-12 18:12:59 +01:00
parent 96e0d15ab4
commit fb7d9f02c8
5 changed files with 9 additions and 70 deletions

View File

@ -240,7 +240,7 @@ class Library : private LibraryBase
Book getBookByIdThreadSafe(const std::string& id) const;
std::shared_ptr<Reader> getReaderById(const std::string& id);
DEPRECATED std::shared_ptr<Reader> getReaderById(const std::string& id);
std::shared_ptr<zim::Archive> getArchiveById(const std::string& id);
/**

View File

@ -73,6 +73,8 @@ class SuggestionItem
/**
* The Reader class is the class who allow to get an entry content from a zim
* file.
*
* Reader is now deprecated. Directly use `zim::Archive`.
*/
using SuggestionsList_t = std::vector<SuggestionItem>;
@ -88,17 +90,17 @@ class Reader
* unsplitted path as if the file were not splitted
* (.zim extesion).
*/
explicit Reader(const string zimFilePath);
explicit DEPRECATED Reader(const string zimFilePath);
/**
* Create a Reader to read a zim file given by the Archive.
*
* @param archive The shared pointer to the Archive object.
*/
explicit Reader(const std::shared_ptr<zim::Archive> archive);
explicit DEPRECATED Reader(const std::shared_ptr<zim::Archive> archive);
#ifndef _WIN32
explicit Reader(int fd);
Reader(int fd, zim::offset_type offset, zim::size_type size);
explicit DEPRECATED Reader(int fd);
DEPRECATED Reader(int fd, zim::offset_type offset, zim::size_type size);
#endif
~Reader() = default;