mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-01-05 21:08:06 -05: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:
@@ -66,4 +66,11 @@ GETTER(jstring, getFavicon)
|
||||
GETTER(jstring, getFaviconUrl)
|
||||
GETTER(jstring, getFaviconMimeType)
|
||||
|
||||
METHOD(jstring, Book, getTagStr, jstring tagName) try {
|
||||
auto cRet = Book->getTagStr(jni2c(tagName, env));
|
||||
return c2jni(cRet, env);
|
||||
} catch(...) {
|
||||
return c2jni<std::string>("", env);
|
||||
}
|
||||
|
||||
#undef GETTER
|
||||
|
||||
Reference in New Issue
Block a user