91 |
typedef struct _Jv_JavaVM JavaVM; |
typedef struct _Jv_JavaVM JavaVM; |
92 |
|
|
93 |
#else /* __cplusplus */ |
#else /* __cplusplus */ |
94 |
|
|
95 |
|
/* |
96 |
|
* Before jni.h is #included within a typical JVM, the source code should |
97 |
|
* #define _JNI_VM_INTERNAL_TYPES_DEFINED and provide the real declarations |
98 |
|
* for 'jobject', 'jfieldID', 'jMethodID' and other implementation types. |
99 |
|
* If _JNI_VM_INTERNAL_TYPES_DEFINED is not defined, the following |
100 |
|
* declares the old versions of the types. |
101 |
|
*/ |
102 |
|
#ifndef _JNI_VM_INTERNAL_TYPES_DEFINED |
103 |
|
/* |
104 |
|
typedef void *jobject; |
105 |
|
typedef void *jfieldID; |
106 |
|
typedef void *jmethodID; |
107 |
|
*/ |
108 |
|
struct _jfieldID; |
109 |
|
struct _jmethodID; |
110 |
|
typedef struct _jfieldID *jfieldID; |
111 |
|
typedef struct _jmethodID *jmethodID; |
112 |
|
#endif |
113 |
|
|
114 |
typedef void *jobject; |
typedef void *jobject; |
115 |
typedef jobject jclass; |
typedef jobject jclass; |
157 |
jdouble d; |
jdouble d; |
158 |
jobject l; |
jobject l; |
159 |
} jvalue; |
} jvalue; |
|
|
|
|
struct _jfieldID; /* FIXME: VM specific */ |
|
|
struct _jmethodID; /* FIXME: VM specific */ |
|
|
typedef struct _jfieldID *jfieldID; |
|
|
typedef struct _jmethodID *jmethodID; |
|
160 |
|
|
161 |
/* Used for jboolean type */ |
/* Used for jboolean type */ |
162 |
#define JNI_TRUE 1 |
#define JNI_TRUE 1 |
172 |
/* Version numbers. */ |
/* Version numbers. */ |
173 |
#define JNI_VERSION_1_1 0x00010001 /* JNI version 1.1 */ |
#define JNI_VERSION_1_1 0x00010001 /* JNI version 1.1 */ |
174 |
#define JNI_VERSION_1_2 0x00010002 /* JNI version 1.2 */ |
#define JNI_VERSION_1_2 0x00010002 /* JNI version 1.2 */ |
175 |
|
#define JNI_VERSION_1_4 0x00010004 /* JNI version 1.4 */ |
176 |
|
|
177 |
/* Error codes */ |
/* Error codes */ |
178 |
#define JNI_OK 0 |
#define JNI_OK 0 |
450 |
jint (JNICALL *MonitorExit) (JNIEnv *, jobject); /* 218 */ |
jint (JNICALL *MonitorExit) (JNIEnv *, jobject); /* 218 */ |
451 |
jint (JNICALL *GetJavaVM) (JNIEnv *, JavaVM **); /* 219 */ |
jint (JNICALL *GetJavaVM) (JNIEnv *, JavaVM **); /* 219 */ |
452 |
|
|
453 |
|
/* ---- JNI 1.2 functions ---- */ |
454 |
void (JNICALL *GetStringRegion) (JNIEnv *, jstring, jsize, jsize, jchar *); /* 220 */ |
void (JNICALL *GetStringRegion) (JNIEnv *, jstring, jsize, jsize, jchar *); /* 220 */ |
455 |
void (JNICALL *GetStringUTFRegion) (JNIEnv *, jstring, jsize, jsize, char *); /* 221 */ |
void (JNICALL *GetStringUTFRegion) (JNIEnv *, jstring, jsize, jsize, char *); /* 221 */ |
456 |
|
|
464 |
void (JNICALL *DeleteWeakGlobalRef) (JNIEnv *, jweak); /* 227 */ |
void (JNICALL *DeleteWeakGlobalRef) (JNIEnv *, jweak); /* 227 */ |
465 |
|
|
466 |
jboolean (JNICALL *ExceptionCheck) (JNIEnv *); /* 228 */ |
jboolean (JNICALL *ExceptionCheck) (JNIEnv *); /* 228 */ |
467 |
|
|
468 |
|
/* ---- JNI 1.4 functions ---- */ |
469 |
|
jobject (JNICALL *NewDirectByteBuffer) (JNIEnv *, void *, jlong); /* 229 */ |
470 |
|
void * (JNICALL *GetDirectBufferAddress) (JNIEnv *, jobject); /* 230 */ |
471 |
|
long (JNICALL *GetDirectBufferCapacity) (JNIEnv *, jobject); /* 231 */ |
472 |
|
|
473 |
}; |
}; |
474 |
|
|
475 |
#ifdef __cplusplus |
#ifdef __cplusplus |
1336 |
|
|
1337 |
jboolean ExceptionCheck () |
jboolean ExceptionCheck () |
1338 |
{ return p->ExceptionCheck (this); } |
{ return p->ExceptionCheck (this); } |
1339 |
|
|
1340 |
|
jobject NewDirectByteBuffer (void * val1, jlong val2) |
1341 |
|
{ return p->NewDirectByteBuffer (this, val1, val2); } |
1342 |
|
|
1343 |
|
void * GetDirectBufferAddress (jobject val1) |
1344 |
|
{ return p->GetDirectBufferAddress (this, val1); } |
1345 |
|
|
1346 |
|
long GetDirectBufferCapacity (jobject val1) |
1347 |
|
{ return p->GetDirectBufferCapacity (this, val1); } |
1348 |
|
|
1349 |
}; |
}; |
1350 |
#endif /* __cplusplus */ |
#endif /* __cplusplus */ |
1351 |
|
|
1359 |
_Jv_func reserved1; |
_Jv_func reserved1; |
1360 |
_Jv_func reserved2; |
_Jv_func reserved2; |
1361 |
|
|
1362 |
jint (JNICALL *DestroyJavaVM) (JavaVM *); |
jint (JNICALL *DestroyJavaVM) (JavaVM *); |
1363 |
jint (JNICALL *AttachCurrentThread) (JavaVM *, void **, void *); |
jint (JNICALL *AttachCurrentThread) (JavaVM *, void **, void *); |
1364 |
jint (JNICALL *DetachCurrentThread) (JavaVM *); |
jint (JNICALL *DetachCurrentThread) (JavaVM *); |
1365 |
jint (JNICALL *GetEnv) (JavaVM *, void **, jint); |
jint (JNICALL *GetEnv) (JavaVM *, void **, jint); |
1366 |
|
jint (JNICALL *AttachCurrentThreadAsDaemon) (JavaVM *, void **, void *); |
1367 |
|
|
1368 |
}; |
}; |
1369 |
|
|
1370 |
#ifdef __cplusplus |
#ifdef __cplusplus |
1384 |
|
|
1385 |
jint GetEnv (void **penv, jint version) |
jint GetEnv (void **penv, jint version) |
1386 |
{ return functions->GetEnv (this, penv, version); } |
{ return functions->GetEnv (this, penv, version); } |
1387 |
|
|
1388 |
|
jint AttachCurrentThreadAsDaemon (void **penv, void *args) |
1389 |
|
{ return functions->AttachCurrentThreadAsDaemon (this, penv, args); } |
1390 |
}; |
}; |
1391 |
#endif /* __cplusplus */ |
#endif /* __cplusplus */ |
1392 |
|
|