Bumping manifests a=b2g-bump
[gecko.git] / widget / android / AndroidJNIWrapper.h
blob90bca26939dcde1e4ddc2ac0ab1a465fd2c19248
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 "mozilla/Types.h"
10 #include <jni.h>
11 #include <android/log.h>
13 extern "C" MOZ_EXPORT jclass jsjni_FindClass(const char *className);
15 /**
16 * JNIEnv::FindClass alternative.
17 * Callable from any thread, including code
18 * invoked via the JNI that doesn't have MOZILLA_INTERNAL_API defined.
19 * The caller is responsible for ensuring that the class is not leaked by
20 * calling DeleteGlobalRef at an appropriate time.
22 extern "C" MOZ_EXPORT jclass jsjni_GetGlobalClassRef(const char *className);
24 extern "C" MOZ_EXPORT jmethodID jsjni_GetStaticMethodID(jclass methodClass,
25 const char *methodName,
26 const char *signature);
27 extern "C" MOZ_EXPORT bool jsjni_ExceptionCheck();
28 extern "C" MOZ_EXPORT void jsjni_CallStaticVoidMethodA(jclass cls, jmethodID method, jvalue *values);
29 extern "C" MOZ_EXPORT int jsjni_CallStaticIntMethodA(jclass cls, jmethodID method, jvalue *values);
30 extern "C" MOZ_EXPORT jobject jsjni_GetGlobalContextRef();
31 extern "C" MOZ_EXPORT JavaVM* jsjni_GetVM();
32 extern "C" MOZ_EXPORT JNIEnv* jsjni_GetJNIForThread();
34 #endif /* AndroidJNIWrapper_h__ */