Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: c++; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef AndroidJNIWrapper_h__
7 #define AndroidJNIWrapper_h__
9 #include <jni.h>
10 #include <android/log.h>
12 extern "C" jclass jsjni_FindClass(const char *className);
14 /**
15 * JNIEnv::FindClass alternative.
16 * Callable from any thread, including code
17 * invoked via the JNI that doesn't have MOZILLA_INTERNAL_API defined.
18 * The caller is responsible for ensuring that the class is not leaked by
19 * calling DeleteGlobalRef at an appropriate time.
20 */
21 extern "C" jclass jsjni_GetGlobalClassRef(const char *className);
23 extern "C" jmethodID jsjni_GetStaticMethodID(jclass methodClass,
24 const char *methodName,
25 const char *signature);
26 extern "C" bool jsjni_ExceptionCheck();
27 extern "C" void jsjni_CallStaticVoidMethodA(jclass cls, jmethodID method, jvalue *values);
28 extern "C" int jsjni_CallStaticIntMethodA(jclass cls, jmethodID method, jvalue *values);
29 extern "C" jobject jsjni_GetGlobalContextRef();
30 extern "C" JavaVM* jsjni_GetVM();
31 extern "C" JNIEnv* jsjni_GetJNIForThread();
33 #endif /* AndroidJNIWrapper_h__ */