mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-24 01:49:15 -04:00
Add method to get value of tag from a book.
Only the `getTagStr` method is available on android because we need a proper exception handling on wrapping side. Fix #298
This commit is contained in:
1 parent
7275f9b8e3
commit
bc257d2d6d
4 files changed
+25
No files matched your search
@@ -23,6 +23,7 @@
|
||||
#include "tools/base64.h"
|
||||
#include "tools/regexTools.h"
|
||||
#include "tools/networkTools.h"
|
||||
#include "tools/otherTools.h"
|
||||
|
||||
#include <pugixml.hpp>
|
||||
|
||||
@@ -203,4 +204,12 @@ const std::string& Book::getFavicon() const {
|
||||
return m_favicon;
|
||||
}
|
||||
|
||||
std::string Book::getTagStr(const std::string& tagName) const {
|
||||
return getTagValueFromTagList(convertTags(m_tags), tagName);
|
||||
}
|
||||
|
||||
bool Book::getTagBool(const std::string& tagName) const {
|
||||
return convertStrToBool(getTagStr(tagName));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user