mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 18:29:23 +02:00
BookReadingException can be thrown from native code
This commit is contained in:
parent
5f6223353d
commit
0e476c760c
4 changed files with 32 additions and 3 deletions
|
@ -25,6 +25,8 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class ZLFile;
|
||||
|
||||
class AndroidUtil {
|
||||
|
||||
private:
|
||||
|
@ -47,6 +49,7 @@ public:
|
|||
static const char * const Class_Book;
|
||||
static const char * const Class_Tag;
|
||||
static const char * const Class_NativeBookModel;
|
||||
static const char * const Class_BookReadingException;
|
||||
|
||||
static jmethodID MID_java_lang_String_toLowerCase;
|
||||
static jmethodID MID_java_lang_String_toUpperCase;
|
||||
|
@ -113,6 +116,8 @@ public:
|
|||
static jmethodID MID_NativeBookModel_setBookTextModel;
|
||||
static jmethodID MID_NativeBookModel_setFootnoteModel;
|
||||
|
||||
static jmethodID SMID_BookReadingException_throwForFile;
|
||||
|
||||
public:
|
||||
static bool init(JavaVM* jvm);
|
||||
static JNIEnv *getEnv();
|
||||
|
@ -127,7 +132,7 @@ public:
|
|||
static jobjectArray createStringArray(JNIEnv *env, const std::vector<std::string> &data);
|
||||
|
||||
static void throwRuntimeException(JNIEnv *env, const std::string &message);
|
||||
static void throwBookReadingException(JNIEnv *env, const std::string &resourceId, const std::string &filePath);
|
||||
static void throwBookReadingException(const std::string &resourceId, const ZLFile &file);
|
||||
};
|
||||
|
||||
#endif /* __ANDROIDUTIL_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue