jni_helper.h revision e4e3750390bec0a849a9153348b7c21b2cc8b843
1
2namespace android {
3
4/* JNI Helpers for wifi_hal to WifiNative bridge implementation */
5
6void throwException( JNIEnv *env, const char *message, int line );
7jboolean  getBoolField(JNIEnv *env, jobject obj, const char *name);
8jint  getIntField(JNIEnv *env, jobject obj, const char *name);
9jlong getLongField(JNIEnv *env, jobject obj, const char *name);
10jobject getObjectField(JNIEnv *env, jobject obj, const char *name, const char *type);
11jlong getLongArrayField(JNIEnv *env, jobject obj, const char *name, int index);
12jobject getObjectArrayField(JNIEnv *env, jobject obj, const char *name, const char *type, int index);
13void setIntField(JNIEnv *env, jobject obj, const char *name, jint value);
14void setLongField(JNIEnv *env, jobject obj, const char *name, jlong value);
15void setLongArrayField(JNIEnv *env, jobject obj, const char *name, jlongArray value);
16void setLongArrayElement(JNIEnv *env, jobject obj, const char *name, int index, jlong value);
17void setStringField(JNIEnv *env, jobject obj, const char *name, const char *value);
18void reportEvent(JNIEnv *env, jobject obj, const char *method, const char *signature, ...);
19jobject createObject(JNIEnv *env, const char *className);
20void setObjectField(JNIEnv *env, jobject obj, const char *name, const char *type, jobject value);
21
22}
23
24#define THROW(env, message)      throwException(env, message, __LINE__)
25