Move the initialization code of a book from xml|opds into Book.

This commit is contained in:
Matthieu Gautier
2018-09-06 15:21:16 +02:00
parent 57fbb98bca
commit e0704b3b21
3 changed files with 72 additions and 38 deletions

View File

@ -33,6 +33,10 @@
using namespace std;
namespace pugi {
class xml_node;
}
namespace kiwix
{
enum supportedIndexType { UNKNOWN, XAPIAN };
@ -51,6 +55,8 @@ class Book
bool update(const Book& other);
void update(const Reader& reader);
void updateFromXml(const pugi::xml_node& node, const std::string& baseDir);
void updateFromOpds(const pugi::xml_node& node);
static bool sortByTitle(const Book& a, const Book& b);
static bool sortBySize(const Book& a, const Book& b);
static bool sortByDate(const Book& a, const Book& b);