mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
+ content manager last imp.
This commit is contained in:
@ -27,7 +27,7 @@ namespace kiwix {
|
|||||||
path(""),
|
path(""),
|
||||||
last(""),
|
last(""),
|
||||||
indexPath(""),
|
indexPath(""),
|
||||||
indexType(XAPIAN),
|
indexType(UNKNOWN),
|
||||||
title(""),
|
title(""),
|
||||||
description(""),
|
description(""),
|
||||||
language(""),
|
language(""),
|
||||||
|
@ -31,7 +31,7 @@ using namespace std;
|
|||||||
|
|
||||||
namespace kiwix {
|
namespace kiwix {
|
||||||
|
|
||||||
enum supportedIndexType { XAPIAN, CLUCENE };
|
enum supportedIndexType { UNKNOWN, XAPIAN, CLUCENE };
|
||||||
|
|
||||||
class Book {
|
class Book {
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ namespace kiwix {
|
|||||||
book.readOnly = readOnly;
|
book.readOnly = readOnly;
|
||||||
book.id = bookNode.attribute("id").value();
|
book.id = bookNode.attribute("id").value();
|
||||||
book.path = bookNode.attribute("path").value();
|
book.path = bookNode.attribute("path").value();
|
||||||
book.last = bookNode.attribute("last").value() != "undefined" ? bookNode.attribute("last").value() : "";
|
book.last = (std::string(bookNode.attribute("last").value()) != "undefined" ? bookNode.attribute("last").value() : "");
|
||||||
book.indexPath = bookNode.attribute("indexPath").value();
|
book.indexPath = bookNode.attribute("indexPath").value();
|
||||||
book.indexType = bookNode.attribute("indexType").value() == "xapian" ? XAPIAN : CLUCENE;
|
book.indexType = (std::string(bookNode.attribute("indexType").value()) == "xapian" ? XAPIAN : CLUCENE);
|
||||||
book.title = bookNode.attribute("title").value();
|
book.title = bookNode.attribute("title").value();
|
||||||
book.description = bookNode.attribute("description").value();
|
book.description = bookNode.attribute("description").value();
|
||||||
book.language = bookNode.attribute("language").value();
|
book.language = bookNode.attribute("language").value();
|
||||||
@ -107,7 +107,7 @@ namespace kiwix {
|
|||||||
bookNode.append_attribute("indexPath") = itr->indexPath.c_str();
|
bookNode.append_attribute("indexPath") = itr->indexPath.c_str();
|
||||||
if (itr->indexType == XAPIAN)
|
if (itr->indexType == XAPIAN)
|
||||||
bookNode.append_attribute("indexType") = "xapian";
|
bookNode.append_attribute("indexType") = "xapian";
|
||||||
else
|
else if (itr->indexType == CLUCENE)
|
||||||
bookNode.append_attribute("indexType") = "clucene";
|
bookNode.append_attribute("indexType") = "clucene";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user