jni.h 62 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810
  1. /* ***** BEGIN LICENSE BLOCK *****
  2. * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3. *
  4. * The contents of this file are subject to the Mozilla Public License Version
  5. * 1.1 (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. * http://www.mozilla.org/MPL/
  8. *
  9. * Software distributed under the License is distributed on an "AS IS" basis,
  10. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. * for the specific language governing rights and limitations under the
  12. * License.
  13. *
  14. * The Original Code is the Java Runtime Interface.
  15. *
  16. * The Initial Developer of the Original Code is
  17. * Netscape Communications Corporation and Sun Microsystems, Inc.
  18. * Portions created by the Initial Developer are Copyright (C) 1993-1996
  19. * the Initial Developer. All Rights Reserved.
  20. *
  21. * Contributor(s):
  22. *
  23. * Alternatively, the contents of this file may be used under the terms of
  24. * either the GNU General Public License Version 2 or later (the "GPL"), or
  25. * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  26. * in which case the provisions of the GPL or the LGPL are applicable instead
  27. * of those above. If you wish to allow use of your version of this file only
  28. * under the terms of either the GPL or the LGPL, and not to allow others to
  29. * use your version of this file under the terms of the MPL, indicate your
  30. * decision by deleting the provisions above and replace them with the notice
  31. * and other provisions required by the GPL or the LGPL. If you do not delete
  32. * the provisions above, a recipient may use your version of this file under
  33. * the terms of any one of the MPL, the GPL or the LGPL.
  34. *
  35. * ***** END LICENSE BLOCK ***** */
  36. #ifndef JNI_H
  37. #define JNI_H
  38. #include <stdio.h>
  39. #include <stdarg.h>
  40. /* jni_md.h contains the machine-dependent typedefs for jbyte, jint
  41. and jlong */
  42. #include "jni_md.h"
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. /*
  47. * JNI Types
  48. */
  49. typedef unsigned char jboolean;
  50. typedef unsigned short jchar;
  51. typedef short jshort;
  52. typedef float jfloat;
  53. typedef double jdouble;
  54. typedef jint jsize;
  55. #ifdef __cplusplus
  56. class _jobject {};
  57. class _jclass : public _jobject {};
  58. class _jthrowable : public _jobject {};
  59. class _jstring : public _jobject {};
  60. class _jarray : public _jobject {};
  61. class _jbooleanArray : public _jarray {};
  62. class _jbyteArray : public _jarray {};
  63. class _jcharArray : public _jarray {};
  64. class _jshortArray : public _jarray {};
  65. class _jintArray : public _jarray {};
  66. class _jlongArray : public _jarray {};
  67. class _jfloatArray : public _jarray {};
  68. class _jdoubleArray : public _jarray {};
  69. class _jobjectArray : public _jarray {};
  70. typedef _jobject *jobject;
  71. typedef _jclass *jclass;
  72. typedef _jthrowable *jthrowable;
  73. typedef _jstring *jstring;
  74. typedef _jarray *jarray;
  75. typedef _jbooleanArray *jbooleanArray;
  76. typedef _jbyteArray *jbyteArray;
  77. typedef _jcharArray *jcharArray;
  78. typedef _jshortArray *jshortArray;
  79. typedef _jintArray *jintArray;
  80. typedef _jlongArray *jlongArray;
  81. typedef _jfloatArray *jfloatArray;
  82. typedef _jdoubleArray *jdoubleArray;
  83. typedef _jobjectArray *jobjectArray;
  84. #else
  85. struct _jobject;
  86. typedef struct _jobject *jobject;
  87. typedef jobject jclass;
  88. typedef jobject jthrowable;
  89. typedef jobject jstring;
  90. typedef jobject jarray;
  91. typedef jarray jbooleanArray;
  92. typedef jarray jbyteArray;
  93. typedef jarray jcharArray;
  94. typedef jarray jshortArray;
  95. typedef jarray jintArray;
  96. typedef jarray jlongArray;
  97. typedef jarray jfloatArray;
  98. typedef jarray jdoubleArray;
  99. typedef jarray jobjectArray;
  100. #endif
  101. #if 0 /* moved to jri_md.h */
  102. typedef jobject jref; /* For transition---not meant to be part of public
  103. API anymore.*/
  104. #endif
  105. typedef union jvalue {
  106. jboolean z;
  107. jbyte b;
  108. jchar c;
  109. jshort s;
  110. jint i;
  111. jlong j;
  112. jfloat f;
  113. jdouble d;
  114. jobject l;
  115. } jvalue;
  116. struct _jfieldID;
  117. typedef struct _jfieldID *jfieldID;
  118. struct _jmethodID;
  119. typedef struct _jmethodID *jmethodID;
  120. /*
  121. * jboolean constants
  122. */
  123. #define JNI_FALSE 0
  124. #define JNI_TRUE 1
  125. /*
  126. * possible return values for JNI functions.
  127. */
  128. #define JNI_OK 0
  129. #define JNI_ERR (-1)
  130. /*
  131. * used in ReleaseScalarArrayElements
  132. */
  133. #define JNI_COMMIT 1
  134. #define JNI_ABORT 2
  135. /*
  136. * used in RegisterNatives to describe native method name, signature,
  137. * and function pointer.
  138. */
  139. typedef struct {
  140. char *name;
  141. char *signature;
  142. void *fnPtr;
  143. } JNINativeMethod;
  144. /*
  145. * JNI Native Method Interface.
  146. */
  147. struct JNINativeInterface_;
  148. struct JNIEnv_;
  149. #ifdef __cplusplus
  150. typedef JNIEnv_ JNIEnv;
  151. #else
  152. typedef const struct JNINativeInterface_ *JNIEnv;
  153. #endif
  154. /*
  155. * JNI Invocation Interface.
  156. */
  157. struct JNIInvokeInterface_;
  158. struct JavaVM_;
  159. #ifdef __cplusplus
  160. typedef JavaVM_ JavaVM;
  161. #else
  162. typedef const struct JNIInvokeInterface_ *JavaVM;
  163. #endif
  164. struct JNINativeInterface_ {
  165. void *reserved0;
  166. void *reserved1;
  167. void *reserved2;
  168. void *reserved3;
  169. jint (JNICALL *GetVersion)(JNIEnv *env);
  170. jclass (JNICALL *DefineClass)
  171. (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
  172. jsize len);
  173. jclass (JNICALL *FindClass)
  174. (JNIEnv *env, const char *name);
  175. void *reserved4;
  176. void *reserved5;
  177. void *reserved6;
  178. jclass (JNICALL *GetSuperclass)
  179. (JNIEnv *env, jclass sub);
  180. jboolean (JNICALL *IsAssignableFrom)
  181. (JNIEnv *env, jclass sub, jclass sup);
  182. void *reserved7;
  183. jint (JNICALL *Throw)
  184. (JNIEnv *env, jthrowable obj);
  185. jint (JNICALL *ThrowNew)
  186. (JNIEnv *env, jclass clazz, const char *msg);
  187. jthrowable (JNICALL *ExceptionOccurred)
  188. (JNIEnv *env);
  189. void (JNICALL *ExceptionDescribe)
  190. (JNIEnv *env);
  191. void (JNICALL *ExceptionClear)
  192. (JNIEnv *env);
  193. void (JNICALL *FatalError)
  194. (JNIEnv *env, const char *msg);
  195. void *reserved8;
  196. void *reserved9;
  197. jobject (JNICALL *NewGlobalRef)
  198. (JNIEnv *env, jobject lobj);
  199. void (JNICALL *DeleteGlobalRef)
  200. (JNIEnv *env, jobject gref);
  201. void (JNICALL *DeleteLocalRef)
  202. (JNIEnv *env, jobject obj);
  203. jboolean (JNICALL *IsSameObject)
  204. (JNIEnv *env, jobject obj1, jobject obj2);
  205. void *reserved10;
  206. void *reserved11;
  207. jobject (JNICALL *AllocObject)
  208. (JNIEnv *env, jclass clazz);
  209. jobject (JNICALL *NewObject)
  210. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  211. jobject (JNICALL *NewObjectV)
  212. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  213. jobject (JNICALL *NewObjectA)
  214. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  215. jclass (JNICALL *GetObjectClass)
  216. (JNIEnv *env, jobject obj);
  217. jboolean (JNICALL *IsInstanceOf)
  218. (JNIEnv *env, jobject obj, jclass clazz);
  219. jmethodID (JNICALL *GetMethodID)
  220. (JNIEnv *env, jclass clazz, const char *name, const char *sig);
  221. jobject (JNICALL *CallObjectMethod)
  222. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  223. jobject (JNICALL *CallObjectMethodV)
  224. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  225. jobject (JNICALL *CallObjectMethodA)
  226. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
  227. jboolean (JNICALL *CallBooleanMethod)
  228. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  229. jboolean (JNICALL *CallBooleanMethodV)
  230. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  231. jboolean (JNICALL *CallBooleanMethodA)
  232. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
  233. jbyte (JNICALL *CallByteMethod)
  234. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  235. jbyte (JNICALL *CallByteMethodV)
  236. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  237. jbyte (JNICALL *CallByteMethodA)
  238. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  239. jchar (JNICALL *CallCharMethod)
  240. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  241. jchar (JNICALL *CallCharMethodV)
  242. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  243. jchar (JNICALL *CallCharMethodA)
  244. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  245. jshort (JNICALL *CallShortMethod)
  246. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  247. jshort (JNICALL *CallShortMethodV)
  248. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  249. jshort (JNICALL *CallShortMethodA)
  250. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  251. jint (JNICALL *CallIntMethod)
  252. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  253. jint (JNICALL *CallIntMethodV)
  254. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  255. jint (JNICALL *CallIntMethodA)
  256. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  257. jlong (JNICALL *CallLongMethod)
  258. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  259. jlong (JNICALL *CallLongMethodV)
  260. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  261. jlong (JNICALL *CallLongMethodA)
  262. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  263. jfloat (JNICALL *CallFloatMethod)
  264. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  265. jfloat (JNICALL *CallFloatMethodV)
  266. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  267. jfloat (JNICALL *CallFloatMethodA)
  268. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  269. jdouble (JNICALL *CallDoubleMethod)
  270. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  271. jdouble (JNICALL *CallDoubleMethodV)
  272. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  273. jdouble (JNICALL *CallDoubleMethodA)
  274. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
  275. void (JNICALL *CallVoidMethod)
  276. (JNIEnv *env, jobject obj, jmethodID methodID, ...);
  277. void (JNICALL *CallVoidMethodV)
  278. (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
  279. void (JNICALL *CallVoidMethodA)
  280. (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
  281. jobject (JNICALL *CallNonvirtualObjectMethod)
  282. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  283. jobject (JNICALL *CallNonvirtualObjectMethodV)
  284. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  285. va_list args);
  286. jobject (JNICALL *CallNonvirtualObjectMethodA)
  287. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  288. jvalue * args);
  289. jboolean (JNICALL *CallNonvirtualBooleanMethod)
  290. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  291. jboolean (JNICALL *CallNonvirtualBooleanMethodV)
  292. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  293. va_list args);
  294. jboolean (JNICALL *CallNonvirtualBooleanMethodA)
  295. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  296. jvalue * args);
  297. jbyte (JNICALL *CallNonvirtualByteMethod)
  298. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  299. jbyte (JNICALL *CallNonvirtualByteMethodV)
  300. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  301. va_list args);
  302. jbyte (JNICALL *CallNonvirtualByteMethodA)
  303. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  304. jvalue *args);
  305. jchar (JNICALL *CallNonvirtualCharMethod)
  306. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  307. jchar (JNICALL *CallNonvirtualCharMethodV)
  308. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  309. va_list args);
  310. jchar (JNICALL *CallNonvirtualCharMethodA)
  311. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  312. jvalue *args);
  313. jshort (JNICALL *CallNonvirtualShortMethod)
  314. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  315. jshort (JNICALL *CallNonvirtualShortMethodV)
  316. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  317. va_list args);
  318. jshort (JNICALL *CallNonvirtualShortMethodA)
  319. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  320. jvalue *args);
  321. jint (JNICALL *CallNonvirtualIntMethod)
  322. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  323. jint (JNICALL *CallNonvirtualIntMethodV)
  324. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  325. va_list args);
  326. jint (JNICALL *CallNonvirtualIntMethodA)
  327. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  328. jvalue *args);
  329. jlong (JNICALL *CallNonvirtualLongMethod)
  330. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  331. jlong (JNICALL *CallNonvirtualLongMethodV)
  332. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  333. va_list args);
  334. jlong (JNICALL *CallNonvirtualLongMethodA)
  335. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  336. jvalue *args);
  337. jfloat (JNICALL *CallNonvirtualFloatMethod)
  338. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  339. jfloat (JNICALL *CallNonvirtualFloatMethodV)
  340. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  341. va_list args);
  342. jfloat (JNICALL *CallNonvirtualFloatMethodA)
  343. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  344. jvalue *args);
  345. jdouble (JNICALL *CallNonvirtualDoubleMethod)
  346. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  347. jdouble (JNICALL *CallNonvirtualDoubleMethodV)
  348. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  349. va_list args);
  350. jdouble (JNICALL *CallNonvirtualDoubleMethodA)
  351. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  352. jvalue *args);
  353. void (JNICALL *CallNonvirtualVoidMethod)
  354. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
  355. void (JNICALL *CallNonvirtualVoidMethodV)
  356. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  357. va_list args);
  358. void (JNICALL *CallNonvirtualVoidMethodA)
  359. (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
  360. jvalue * args);
  361. jfieldID (JNICALL *GetFieldID)
  362. (JNIEnv *env, jclass clazz, const char *name, const char *sig);
  363. jobject (JNICALL *GetObjectField)
  364. (JNIEnv *env, jobject obj, jfieldID fieldID);
  365. jboolean (JNICALL *GetBooleanField)
  366. (JNIEnv *env, jobject obj, jfieldID fieldID);
  367. jbyte (JNICALL *GetByteField)
  368. (JNIEnv *env, jobject obj, jfieldID fieldID);
  369. jchar (JNICALL *GetCharField)
  370. (JNIEnv *env, jobject obj, jfieldID fieldID);
  371. jshort (JNICALL *GetShortField)
  372. (JNIEnv *env, jobject obj, jfieldID fieldID);
  373. jint (JNICALL *GetIntField)
  374. (JNIEnv *env, jobject obj, jfieldID fieldID);
  375. jlong (JNICALL *GetLongField)
  376. (JNIEnv *env, jobject obj, jfieldID fieldID);
  377. jfloat (JNICALL *GetFloatField)
  378. (JNIEnv *env, jobject obj, jfieldID fieldID);
  379. jdouble (JNICALL *GetDoubleField)
  380. (JNIEnv *env, jobject obj, jfieldID fieldID);
  381. void (JNICALL *SetObjectField)
  382. (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
  383. void (JNICALL *SetBooleanField)
  384. (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
  385. void (JNICALL *SetByteField)
  386. (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
  387. void (JNICALL *SetCharField)
  388. (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
  389. void (JNICALL *SetShortField)
  390. (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
  391. void (JNICALL *SetIntField)
  392. (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
  393. void (JNICALL *SetLongField)
  394. (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
  395. void (JNICALL *SetFloatField)
  396. (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
  397. void (JNICALL *SetDoubleField)
  398. (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
  399. jmethodID (JNICALL *GetStaticMethodID)
  400. (JNIEnv *env, jclass clazz, const char *name, const char *sig);
  401. jobject (JNICALL *CallStaticObjectMethod)
  402. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  403. jobject (JNICALL *CallStaticObjectMethodV)
  404. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  405. jobject (JNICALL *CallStaticObjectMethodA)
  406. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  407. jboolean (JNICALL *CallStaticBooleanMethod)
  408. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  409. jboolean (JNICALL *CallStaticBooleanMethodV)
  410. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  411. jboolean (JNICALL *CallStaticBooleanMethodA)
  412. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  413. jbyte (JNICALL *CallStaticByteMethod)
  414. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  415. jbyte (JNICALL *CallStaticByteMethodV)
  416. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  417. jbyte (JNICALL *CallStaticByteMethodA)
  418. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  419. jchar (JNICALL *CallStaticCharMethod)
  420. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  421. jchar (JNICALL *CallStaticCharMethodV)
  422. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  423. jchar (JNICALL *CallStaticCharMethodA)
  424. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  425. jshort (JNICALL *CallStaticShortMethod)
  426. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  427. jshort (JNICALL *CallStaticShortMethodV)
  428. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  429. jshort (JNICALL *CallStaticShortMethodA)
  430. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  431. jint (JNICALL *CallStaticIntMethod)
  432. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  433. jint (JNICALL *CallStaticIntMethodV)
  434. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  435. jint (JNICALL *CallStaticIntMethodA)
  436. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  437. jlong (JNICALL *CallStaticLongMethod)
  438. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  439. jlong (JNICALL *CallStaticLongMethodV)
  440. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  441. jlong (JNICALL *CallStaticLongMethodA)
  442. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  443. jfloat (JNICALL *CallStaticFloatMethod)
  444. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  445. jfloat (JNICALL *CallStaticFloatMethodV)
  446. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  447. jfloat (JNICALL *CallStaticFloatMethodA)
  448. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  449. jdouble (JNICALL *CallStaticDoubleMethod)
  450. (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
  451. jdouble (JNICALL *CallStaticDoubleMethodV)
  452. (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
  453. jdouble (JNICALL *CallStaticDoubleMethodA)
  454. (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
  455. void (JNICALL *CallStaticVoidMethod)
  456. (JNIEnv *env, jclass cls, jmethodID methodID, ...);
  457. void (JNICALL *CallStaticVoidMethodV)
  458. (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
  459. void (JNICALL *CallStaticVoidMethodA)
  460. (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args);
  461. jfieldID (JNICALL *GetStaticFieldID)
  462. (JNIEnv *env, jclass clazz, const char *name, const char *sig);
  463. jobject (JNICALL *GetStaticObjectField)
  464. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  465. jboolean (JNICALL *GetStaticBooleanField)
  466. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  467. jbyte (JNICALL *GetStaticByteField)
  468. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  469. jchar (JNICALL *GetStaticCharField)
  470. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  471. jshort (JNICALL *GetStaticShortField)
  472. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  473. jint (JNICALL *GetStaticIntField)
  474. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  475. jlong (JNICALL *GetStaticLongField)
  476. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  477. jfloat (JNICALL *GetStaticFloatField)
  478. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  479. jdouble (JNICALL *GetStaticDoubleField)
  480. (JNIEnv *env, jclass clazz, jfieldID fieldID);
  481. void (JNICALL *SetStaticObjectField)
  482. (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
  483. void (JNICALL *SetStaticBooleanField)
  484. (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
  485. void (JNICALL *SetStaticByteField)
  486. (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
  487. void (JNICALL *SetStaticCharField)
  488. (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
  489. void (JNICALL *SetStaticShortField)
  490. (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
  491. void (JNICALL *SetStaticIntField)
  492. (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
  493. void (JNICALL *SetStaticLongField)
  494. (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
  495. void (JNICALL *SetStaticFloatField)
  496. (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
  497. void (JNICALL *SetStaticDoubleField)
  498. (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
  499. jstring (JNICALL *NewString)
  500. (JNIEnv *env, const jchar *unicode, jsize len);
  501. jsize (JNICALL *GetStringLength)
  502. (JNIEnv *env, jstring str);
  503. const jchar *(JNICALL *GetStringChars)
  504. (JNIEnv *env, jstring str, jboolean *isCopy);
  505. void (JNICALL *ReleaseStringChars)
  506. (JNIEnv *env, jstring str, const jchar *chars);
  507. jstring (JNICALL *NewStringUTF)
  508. (JNIEnv *env, const char *utf);
  509. jsize (JNICALL *GetStringUTFLength)
  510. (JNIEnv *env, jstring str);
  511. const char* (JNICALL *GetStringUTFChars)
  512. (JNIEnv *env, jstring str, jboolean *isCopy);
  513. void (JNICALL *ReleaseStringUTFChars)
  514. (JNIEnv *env, jstring str, const char* chars);
  515. jsize (JNICALL *GetArrayLength)
  516. (JNIEnv *env, jarray array);
  517. jobjectArray (JNICALL *NewObjectArray)
  518. (JNIEnv *env, jsize len, jclass clazz, jobject init);
  519. jobject (JNICALL *GetObjectArrayElement)
  520. (JNIEnv *env, jobjectArray array, jsize index);
  521. void (JNICALL *SetObjectArrayElement)
  522. (JNIEnv *env, jobjectArray array, jsize index, jobject val);
  523. jbooleanArray (JNICALL *NewBooleanArray)
  524. (JNIEnv *env, jsize len);
  525. jbyteArray (JNICALL *NewByteArray)
  526. (JNIEnv *env, jsize len);
  527. jcharArray (JNICALL *NewCharArray)
  528. (JNIEnv *env, jsize len);
  529. jshortArray (JNICALL *NewShortArray)
  530. (JNIEnv *env, jsize len);
  531. jintArray (JNICALL *NewIntArray)
  532. (JNIEnv *env, jsize len);
  533. jlongArray (JNICALL *NewLongArray)
  534. (JNIEnv *env, jsize len);
  535. jfloatArray (JNICALL *NewFloatArray)
  536. (JNIEnv *env, jsize len);
  537. jdoubleArray (JNICALL *NewDoubleArray)
  538. (JNIEnv *env, jsize len);
  539. jboolean * (JNICALL *GetBooleanArrayElements)
  540. (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
  541. jbyte * (JNICALL *GetByteArrayElements)
  542. (JNIEnv *env, jbyteArray array, jboolean *isCopy);
  543. jchar * (JNICALL *GetCharArrayElements)
  544. (JNIEnv *env, jcharArray array, jboolean *isCopy);
  545. jshort * (JNICALL *GetShortArrayElements)
  546. (JNIEnv *env, jshortArray array, jboolean *isCopy);
  547. jint * (JNICALL *GetIntArrayElements)
  548. (JNIEnv *env, jintArray array, jboolean *isCopy);
  549. jlong * (JNICALL *GetLongArrayElements)
  550. (JNIEnv *env, jlongArray array, jboolean *isCopy);
  551. jfloat * (JNICALL *GetFloatArrayElements)
  552. (JNIEnv *env, jfloatArray array, jboolean *isCopy);
  553. jdouble * (JNICALL *GetDoubleArrayElements)
  554. (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
  555. void (JNICALL *ReleaseBooleanArrayElements)
  556. (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
  557. void (JNICALL *ReleaseByteArrayElements)
  558. (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
  559. void (JNICALL *ReleaseCharArrayElements)
  560. (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
  561. void (JNICALL *ReleaseShortArrayElements)
  562. (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
  563. void (JNICALL *ReleaseIntArrayElements)
  564. (JNIEnv *env, jintArray array, jint *elems, jint mode);
  565. void (JNICALL *ReleaseLongArrayElements)
  566. (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
  567. void (JNICALL *ReleaseFloatArrayElements)
  568. (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
  569. void (JNICALL *ReleaseDoubleArrayElements)
  570. (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
  571. void (JNICALL *GetBooleanArrayRegion)
  572. (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
  573. void (JNICALL *GetByteArrayRegion)
  574. (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
  575. void (JNICALL *GetCharArrayRegion)
  576. (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
  577. void (JNICALL *GetShortArrayRegion)
  578. (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
  579. void (JNICALL *GetIntArrayRegion)
  580. (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
  581. void (JNICALL *GetLongArrayRegion)
  582. (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
  583. void (JNICALL *GetFloatArrayRegion)
  584. (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
  585. void (JNICALL *GetDoubleArrayRegion)
  586. (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
  587. void (JNICALL *SetBooleanArrayRegion)
  588. (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
  589. void (JNICALL *SetByteArrayRegion)
  590. (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
  591. void (JNICALL *SetCharArrayRegion)
  592. (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
  593. void (JNICALL *SetShortArrayRegion)
  594. (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
  595. void (JNICALL *SetIntArrayRegion)
  596. (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
  597. void (JNICALL *SetLongArrayRegion)
  598. (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
  599. void (JNICALL *SetFloatArrayRegion)
  600. (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
  601. void (JNICALL *SetDoubleArrayRegion)
  602. (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
  603. jint (JNICALL *RegisterNatives)
  604. (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
  605. jint nMethods);
  606. jint (JNICALL *UnregisterNatives)
  607. (JNIEnv *env, jclass clazz);
  608. jint (JNICALL *MonitorEnter)
  609. (JNIEnv *env, jobject obj);
  610. jint (JNICALL *MonitorExit)
  611. (JNIEnv *env, jobject obj);
  612. jint (JNICALL *GetJavaVM)
  613. (JNIEnv *env, JavaVM **vm);
  614. };
  615. /*
  616. * We use inlined functions for C++ so that programmers can write:
  617. *
  618. * env->FindClass("java/lang/String")
  619. *
  620. * in C++ rather than:
  621. *
  622. * (*env)->FindClass(env, "java/lang/String")
  623. *
  624. * in C.
  625. */
  626. struct JNIEnv_ {
  627. const struct JNINativeInterface_ *functions;
  628. void *reserved0;
  629. void *reserved1[6];
  630. #ifdef __cplusplus
  631. jint GetVersion() {
  632. return functions->GetVersion(this);
  633. }
  634. jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
  635. jsize len) {
  636. return functions->DefineClass(this, name, loader, buf, len);
  637. }
  638. jclass FindClass(const char *name) {
  639. return functions->FindClass(this, name);
  640. }
  641. jclass GetSuperclass(jclass sub) {
  642. return functions->GetSuperclass(this, sub);
  643. }
  644. jboolean IsAssignableFrom(jclass sub, jclass sup) {
  645. return functions->IsAssignableFrom(this, sub, sup);
  646. }
  647. jint Throw(jthrowable obj) {
  648. return functions->Throw(this, obj);
  649. }
  650. jint ThrowNew(jclass clazz, const char *msg) {
  651. return functions->ThrowNew(this, clazz, msg);
  652. }
  653. jthrowable ExceptionOccurred() {
  654. return functions->ExceptionOccurred(this);
  655. }
  656. void ExceptionDescribe() {
  657. functions->ExceptionDescribe(this);
  658. }
  659. void ExceptionClear() {
  660. functions->ExceptionClear(this);
  661. }
  662. void FatalError(const char *msg) {
  663. functions->FatalError(this, msg);
  664. }
  665. jobject NewGlobalRef(jobject lobj) {
  666. return functions->NewGlobalRef(this,lobj);
  667. }
  668. void DeleteGlobalRef(jobject gref) {
  669. functions->DeleteGlobalRef(this,gref);
  670. }
  671. void DeleteLocalRef(jobject obj) {
  672. functions->DeleteLocalRef(this, obj);
  673. }
  674. jboolean IsSameObject(jobject obj1, jobject obj2) {
  675. return functions->IsSameObject(this,obj1,obj2);
  676. }
  677. jobject AllocObject(jclass clazz) {
  678. return functions->AllocObject(this,clazz);
  679. }
  680. jobject NewObject(jclass clazz, jmethodID methodID, ...) {
  681. va_list args;
  682. jobject result;
  683. va_start(args, methodID);
  684. result = functions->NewObjectV(this,clazz,methodID,args);
  685. va_end(args);
  686. return result;
  687. }
  688. jobject NewObjectV(jclass clazz, jmethodID methodID,
  689. va_list args) {
  690. return functions->NewObjectV(this,clazz,methodID,args);
  691. }
  692. jobject NewObjectA(jclass clazz, jmethodID methodID,
  693. jvalue *args) {
  694. return functions->NewObjectA(this,clazz,methodID,args);
  695. }
  696. jclass GetObjectClass(jobject obj) {
  697. return functions->GetObjectClass(this,obj);
  698. }
  699. jboolean IsInstanceOf(jobject obj, jclass clazz) {
  700. return functions->IsInstanceOf(this,obj,clazz);
  701. }
  702. jmethodID GetMethodID(jclass clazz, const char *name,
  703. const char *sig) {
  704. return functions->GetMethodID(this,clazz,name,sig);
  705. }
  706. jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
  707. va_list args;
  708. jobject result;
  709. va_start(args,methodID);
  710. result = functions->CallObjectMethodV(this,obj,methodID,args);
  711. va_end(args);
  712. return result;
  713. }
  714. jobject CallObjectMethodV(jobject obj, jmethodID methodID,
  715. va_list args) {
  716. return functions->CallObjectMethodV(this,obj,methodID,args);
  717. }
  718. jobject CallObjectMethodA(jobject obj, jmethodID methodID,
  719. jvalue * args) {
  720. return functions->CallObjectMethodA(this,obj,methodID,args);
  721. }
  722. jboolean CallBooleanMethod(jobject obj,
  723. jmethodID methodID, ...) {
  724. va_list args;
  725. jboolean result;
  726. va_start(args,methodID);
  727. result = functions->CallBooleanMethodV(this,obj,methodID,args);
  728. va_end(args);
  729. return result;
  730. }
  731. jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
  732. va_list args) {
  733. return functions->CallBooleanMethodV(this,obj,methodID,args);
  734. }
  735. jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
  736. jvalue * args) {
  737. return functions->CallBooleanMethodA(this,obj,methodID, args);
  738. }
  739. jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
  740. va_list args;
  741. jbyte result;
  742. va_start(args,methodID);
  743. result = functions->CallByteMethodV(this,obj,methodID,args);
  744. va_end(args);
  745. return result;
  746. }
  747. jbyte CallByteMethodV(jobject obj, jmethodID methodID,
  748. va_list args) {
  749. return functions->CallByteMethodV(this,obj,methodID,args);
  750. }
  751. jbyte CallByteMethodA(jobject obj, jmethodID methodID,
  752. jvalue * args) {
  753. return functions->CallByteMethodA(this,obj,methodID,args);
  754. }
  755. jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
  756. va_list args;
  757. jchar result;
  758. va_start(args,methodID);
  759. result = functions->CallCharMethodV(this,obj,methodID,args);
  760. va_end(args);
  761. return result;
  762. }
  763. jchar CallCharMethodV(jobject obj, jmethodID methodID,
  764. va_list args) {
  765. return functions->CallCharMethodV(this,obj,methodID,args);
  766. }
  767. jchar CallCharMethodA(jobject obj, jmethodID methodID,
  768. jvalue * args) {
  769. return functions->CallCharMethodA(this,obj,methodID,args);
  770. }
  771. jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
  772. va_list args;
  773. jshort result;
  774. va_start(args,methodID);
  775. result = functions->CallShortMethodV(this,obj,methodID,args);
  776. va_end(args);
  777. return result;
  778. }
  779. jshort CallShortMethodV(jobject obj, jmethodID methodID,
  780. va_list args) {
  781. return functions->CallShortMethodV(this,obj,methodID,args);
  782. }
  783. jshort CallShortMethodA(jobject obj, jmethodID methodID,
  784. jvalue * args) {
  785. return functions->CallShortMethodA(this,obj,methodID,args);
  786. }
  787. jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
  788. va_list args;
  789. jint result;
  790. va_start(args,methodID);
  791. result = functions->CallIntMethodV(this,obj,methodID,args);
  792. va_end(args);
  793. return result;
  794. }
  795. jint CallIntMethodV(jobject obj, jmethodID methodID,
  796. va_list args) {
  797. return functions->CallIntMethodV(this,obj,methodID,args);
  798. }
  799. jint CallIntMethodA(jobject obj, jmethodID methodID,
  800. jvalue * args) {
  801. return functions->CallIntMethodA(this,obj,methodID,args);
  802. }
  803. jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
  804. va_list args;
  805. jlong result;
  806. va_start(args,methodID);
  807. result = functions->CallLongMethodV(this,obj,methodID,args);
  808. va_end(args);
  809. return result;
  810. }
  811. jlong CallLongMethodV(jobject obj, jmethodID methodID,
  812. va_list args) {
  813. return functions->CallLongMethodV(this,obj,methodID,args);
  814. }
  815. jlong CallLongMethodA(jobject obj, jmethodID methodID,
  816. jvalue * args) {
  817. return functions->CallLongMethodA(this,obj,methodID,args);
  818. }
  819. jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
  820. va_list args;
  821. jfloat result;
  822. va_start(args,methodID);
  823. result = functions->CallFloatMethodV(this,obj,methodID,args);
  824. va_end(args);
  825. return result;
  826. }
  827. jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
  828. va_list args) {
  829. return functions->CallFloatMethodV(this,obj,methodID,args);
  830. }
  831. jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
  832. jvalue * args) {
  833. return functions->CallFloatMethodA(this,obj,methodID,args);
  834. }
  835. jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
  836. va_list args;
  837. jdouble result;
  838. va_start(args,methodID);
  839. result = functions->CallDoubleMethodV(this,obj,methodID,args);
  840. va_end(args);
  841. return result;
  842. }
  843. jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
  844. va_list args) {
  845. return functions->CallDoubleMethodV(this,obj,methodID,args);
  846. }
  847. jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
  848. jvalue * args) {
  849. return functions->CallDoubleMethodA(this,obj,methodID,args);
  850. }
  851. void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
  852. va_list args;
  853. va_start(args,methodID);
  854. functions->CallVoidMethodV(this,obj,methodID,args);
  855. va_end(args);
  856. }
  857. void CallVoidMethodV(jobject obj, jmethodID methodID,
  858. va_list args) {
  859. functions->CallVoidMethodV(this,obj,methodID,args);
  860. }
  861. void CallVoidMethodA(jobject obj, jmethodID methodID,
  862. jvalue * args) {
  863. functions->CallVoidMethodA(this,obj,methodID,args);
  864. }
  865. jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
  866. jmethodID methodID, ...) {
  867. va_list args;
  868. jobject result;
  869. va_start(args,methodID);
  870. result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
  871. methodID,args);
  872. va_end(args);
  873. return result;
  874. }
  875. jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
  876. jmethodID methodID, va_list args) {
  877. return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
  878. methodID,args);
  879. }
  880. jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
  881. jmethodID methodID, jvalue * args) {
  882. return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
  883. methodID,args);
  884. }
  885. jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
  886. jmethodID methodID, ...) {
  887. va_list args;
  888. jboolean result;
  889. va_start(args,methodID);
  890. result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
  891. methodID,args);
  892. va_end(args);
  893. return result;
  894. }
  895. jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
  896. jmethodID methodID, va_list args) {
  897. return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
  898. methodID,args);
  899. }
  900. jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
  901. jmethodID methodID, jvalue * args) {
  902. return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
  903. methodID, args);
  904. }
  905. jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
  906. jmethodID methodID, ...) {
  907. va_list args;
  908. jbyte result;
  909. va_start(args,methodID);
  910. result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
  911. methodID,args);
  912. va_end(args);
  913. return result;
  914. }
  915. jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
  916. jmethodID methodID, va_list args) {
  917. return functions->CallNonvirtualByteMethodV(this,obj,clazz,
  918. methodID,args);
  919. }
  920. jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
  921. jmethodID methodID, jvalue * args) {
  922. return functions->CallNonvirtualByteMethodA(this,obj,clazz,
  923. methodID,args);
  924. }
  925. jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
  926. jmethodID methodID, ...) {
  927. va_list args;
  928. jchar result;
  929. va_start(args,methodID);
  930. result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
  931. methodID,args);
  932. va_end(args);
  933. return result;
  934. }
  935. jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
  936. jmethodID methodID, va_list args) {
  937. return functions->CallNonvirtualCharMethodV(this,obj,clazz,
  938. methodID,args);
  939. }
  940. jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
  941. jmethodID methodID, jvalue * args) {
  942. return functions->CallNonvirtualCharMethodA(this,obj,clazz,
  943. methodID,args);
  944. }
  945. jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
  946. jmethodID methodID, ...) {
  947. va_list args;
  948. jshort result;
  949. va_start(args,methodID);
  950. result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
  951. methodID,args);
  952. va_end(args);
  953. return result;
  954. }
  955. jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
  956. jmethodID methodID, va_list args) {
  957. return functions->CallNonvirtualShortMethodV(this,obj,clazz,
  958. methodID,args);
  959. }
  960. jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
  961. jmethodID methodID, jvalue * args) {
  962. return functions->CallNonvirtualShortMethodA(this,obj,clazz,
  963. methodID,args);
  964. }
  965. jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
  966. jmethodID methodID, ...) {
  967. va_list args;
  968. jint result;
  969. va_start(args,methodID);
  970. result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
  971. methodID,args);
  972. va_end(args);
  973. return result;
  974. }
  975. jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
  976. jmethodID methodID, va_list args) {
  977. return functions->CallNonvirtualIntMethodV(this,obj,clazz,
  978. methodID,args);
  979. }
  980. jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
  981. jmethodID methodID, jvalue * args) {
  982. return functions->CallNonvirtualIntMethodA(this,obj,clazz,
  983. methodID,args);
  984. }
  985. jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
  986. jmethodID methodID, ...) {
  987. va_list args;
  988. jlong result;
  989. va_start(args,methodID);
  990. result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
  991. methodID,args);
  992. va_end(args);
  993. return result;
  994. }
  995. jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
  996. jmethodID methodID, va_list args) {
  997. return functions->CallNonvirtualLongMethodV(this,obj,clazz,
  998. methodID,args);
  999. }
  1000. jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
  1001. jmethodID methodID, jvalue * args) {
  1002. return functions->CallNonvirtualLongMethodA(this,obj,clazz,
  1003. methodID,args);
  1004. }
  1005. jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
  1006. jmethodID methodID, ...) {
  1007. va_list args;
  1008. jfloat result;
  1009. va_start(args,methodID);
  1010. result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
  1011. methodID,args);
  1012. va_end(args);
  1013. return result;
  1014. }
  1015. jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
  1016. jmethodID methodID,
  1017. va_list args) {
  1018. return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
  1019. methodID,args);
  1020. }
  1021. jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
  1022. jmethodID methodID,
  1023. jvalue * args) {
  1024. return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
  1025. methodID,args);
  1026. }
  1027. jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
  1028. jmethodID methodID, ...) {
  1029. va_list args;
  1030. jdouble result;
  1031. va_start(args,methodID);
  1032. result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
  1033. methodID,args);
  1034. va_end(args);
  1035. return result;
  1036. }
  1037. jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
  1038. jmethodID methodID,
  1039. va_list args) {
  1040. return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
  1041. methodID,args);
  1042. }
  1043. jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
  1044. jmethodID methodID,
  1045. jvalue * args) {
  1046. return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
  1047. methodID,args);
  1048. }
  1049. void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
  1050. jmethodID methodID, ...) {
  1051. va_list args;
  1052. va_start(args,methodID);
  1053. functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
  1054. va_end(args);
  1055. }
  1056. void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
  1057. jmethodID methodID,
  1058. va_list args) {
  1059. functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
  1060. }
  1061. void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
  1062. jmethodID methodID,
  1063. jvalue * args) {
  1064. functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
  1065. }
  1066. jfieldID GetFieldID(jclass clazz, const char *name,
  1067. const char *sig) {
  1068. return functions->GetFieldID(this,clazz,name,sig);
  1069. }
  1070. jobject GetObjectField(jobject obj, jfieldID fieldID) {
  1071. return functions->GetObjectField(this,obj,fieldID);
  1072. }
  1073. jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
  1074. return functions->GetBooleanField(this,obj,fieldID);
  1075. }
  1076. jbyte GetByteField(jobject obj, jfieldID fieldID) {
  1077. return functions->GetByteField(this,obj,fieldID);
  1078. }
  1079. jchar GetCharField(jobject obj, jfieldID fieldID) {
  1080. return functions->GetCharField(this,obj,fieldID);
  1081. }
  1082. jshort GetShortField(jobject obj, jfieldID fieldID) {
  1083. return functions->GetShortField(this,obj,fieldID);
  1084. }
  1085. jint GetIntField(jobject obj, jfieldID fieldID) {
  1086. return functions->GetIntField(this,obj,fieldID);
  1087. }
  1088. jlong GetLongField(jobject obj, jfieldID fieldID) {
  1089. return functions->GetLongField(this,obj,fieldID);
  1090. }
  1091. jfloat GetFloatField(jobject obj, jfieldID fieldID) {
  1092. return functions->GetFloatField(this,obj,fieldID);
  1093. }
  1094. jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
  1095. return functions->GetDoubleField(this,obj,fieldID);
  1096. }
  1097. void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
  1098. functions->SetObjectField(this,obj,fieldID,val);
  1099. }
  1100. void SetBooleanField(jobject obj, jfieldID fieldID,
  1101. jboolean val) {
  1102. functions->SetBooleanField(this,obj,fieldID,val);
  1103. }
  1104. void SetByteField(jobject obj, jfieldID fieldID,
  1105. jbyte val) {
  1106. functions->SetByteField(this,obj,fieldID,val);
  1107. }
  1108. void SetCharField(jobject obj, jfieldID fieldID,
  1109. jchar val) {
  1110. functions->SetCharField(this,obj,fieldID,val);
  1111. }
  1112. void SetShortField(jobject obj, jfieldID fieldID,
  1113. jshort val) {
  1114. functions->SetShortField(this,obj,fieldID,val);
  1115. }
  1116. void SetIntField(jobject obj, jfieldID fieldID,
  1117. jint val) {
  1118. functions->SetIntField(this,obj,fieldID,val);
  1119. }
  1120. void SetLongField(jobject obj, jfieldID fieldID,
  1121. jlong val) {
  1122. functions->SetLongField(this,obj,fieldID,val);
  1123. }
  1124. void SetFloatField(jobject obj, jfieldID fieldID,
  1125. jfloat val) {
  1126. functions->SetFloatField(this,obj,fieldID,val);
  1127. }
  1128. void SetDoubleField(jobject obj, jfieldID fieldID,
  1129. jdouble val) {
  1130. functions->SetDoubleField(this,obj,fieldID,val);
  1131. }
  1132. jmethodID GetStaticMethodID(jclass clazz, const char *name,
  1133. const char *sig) {
  1134. return functions->GetStaticMethodID(this,clazz,name,sig);
  1135. }
  1136. jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
  1137. ...) {
  1138. va_list args;
  1139. jobject result;
  1140. va_start(args,methodID);
  1141. result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
  1142. va_end(args);
  1143. return result;
  1144. }
  1145. jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
  1146. va_list args) {
  1147. return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
  1148. }
  1149. jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
  1150. jvalue *args) {
  1151. return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
  1152. }
  1153. jboolean CallStaticBooleanMethod(jclass clazz,
  1154. jmethodID methodID, ...) {
  1155. va_list args;
  1156. jboolean result;
  1157. va_start(args,methodID);
  1158. result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
  1159. va_end(args);
  1160. return result;
  1161. }
  1162. jboolean CallStaticBooleanMethodV(jclass clazz,
  1163. jmethodID methodID, va_list args) {
  1164. return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
  1165. }
  1166. jboolean CallStaticBooleanMethodA(jclass clazz,
  1167. jmethodID methodID, jvalue *args) {
  1168. return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
  1169. }
  1170. jbyte CallStaticByteMethod(jclass clazz,
  1171. jmethodID methodID, ...) {
  1172. va_list args;
  1173. jbyte result;
  1174. va_start(args,methodID);
  1175. result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
  1176. va_end(args);
  1177. return result;
  1178. }
  1179. jbyte CallStaticByteMethodV(jclass clazz,
  1180. jmethodID methodID, va_list args) {
  1181. return functions->CallStaticByteMethodV(this,clazz,methodID,args);
  1182. }
  1183. jbyte CallStaticByteMethodA(jclass clazz,
  1184. jmethodID methodID, jvalue *args) {
  1185. return functions->CallStaticByteMethodA(this,clazz,methodID,args);
  1186. }
  1187. jchar CallStaticCharMethod(jclass clazz,
  1188. jmethodID methodID, ...) {
  1189. va_list args;
  1190. jchar result;
  1191. va_start(args,methodID);
  1192. result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
  1193. va_end(args);
  1194. return result;
  1195. }
  1196. jchar CallStaticCharMethodV(jclass clazz,
  1197. jmethodID methodID, va_list args) {
  1198. return functions->CallStaticCharMethodV(this,clazz,methodID,args);
  1199. }
  1200. jchar CallStaticCharMethodA(jclass clazz,
  1201. jmethodID methodID, jvalue *args) {
  1202. return functions->CallStaticCharMethodA(this,clazz,methodID,args);
  1203. }
  1204. jshort CallStaticShortMethod(jclass clazz,
  1205. jmethodID methodID, ...) {
  1206. va_list args;
  1207. jshort result;
  1208. va_start(args,methodID);
  1209. result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
  1210. va_end(args);
  1211. return result;
  1212. }
  1213. jshort CallStaticShortMethodV(jclass clazz,
  1214. jmethodID methodID, va_list args) {
  1215. return functions->CallStaticShortMethodV(this,clazz,methodID,args);
  1216. }
  1217. jshort CallStaticShortMethodA(jclass clazz,
  1218. jmethodID methodID, jvalue *args) {
  1219. return functions->CallStaticShortMethodA(this,clazz,methodID,args);
  1220. }
  1221. jint CallStaticIntMethod(jclass clazz,
  1222. jmethodID methodID, ...) {
  1223. va_list args;
  1224. jint result;
  1225. va_start(args,methodID);
  1226. result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
  1227. va_end(args);
  1228. return result;
  1229. }
  1230. jint CallStaticIntMethodV(jclass clazz,
  1231. jmethodID methodID, va_list args) {
  1232. return functions->CallStaticIntMethodV(this,clazz,methodID,args);
  1233. }
  1234. jint CallStaticIntMethodA(jclass clazz,
  1235. jmethodID methodID, jvalue *args) {
  1236. return functions->CallStaticIntMethodA(this,clazz,methodID,args);
  1237. }
  1238. jlong CallStaticLongMethod(jclass clazz,
  1239. jmethodID methodID, ...) {
  1240. va_list args;
  1241. jlong result;
  1242. va_start(args,methodID);
  1243. result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
  1244. va_end(args);
  1245. return result;
  1246. }
  1247. jlong CallStaticLongMethodV(jclass clazz,
  1248. jmethodID methodID, va_list args) {
  1249. return functions->CallStaticLongMethodV(this,clazz,methodID,args);
  1250. }
  1251. jlong CallStaticLongMethodA(jclass clazz,
  1252. jmethodID methodID, jvalue *args) {
  1253. return functions->CallStaticLongMethodA(this,clazz,methodID,args);
  1254. }
  1255. jfloat CallStaticFloatMethod(jclass clazz,
  1256. jmethodID methodID, ...) {
  1257. va_list args;
  1258. jfloat result;
  1259. va_start(args,methodID);
  1260. result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
  1261. va_end(args);
  1262. return result;
  1263. }
  1264. jfloat CallStaticFloatMethodV(jclass clazz,
  1265. jmethodID methodID, va_list args) {
  1266. return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
  1267. }
  1268. jfloat CallStaticFloatMethodA(jclass clazz,
  1269. jmethodID methodID, jvalue *args) {
  1270. return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
  1271. }
  1272. jdouble CallStaticDoubleMethod(jclass clazz,
  1273. jmethodID methodID, ...) {
  1274. va_list args;
  1275. jdouble result;
  1276. va_start(args,methodID);
  1277. result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
  1278. va_end(args);
  1279. return result;
  1280. }
  1281. jdouble CallStaticDoubleMethodV(jclass clazz,
  1282. jmethodID methodID, va_list args) {
  1283. return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
  1284. }
  1285. jdouble CallStaticDoubleMethodA(jclass clazz,
  1286. jmethodID methodID, jvalue *args) {
  1287. return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
  1288. }
  1289. void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
  1290. va_list args;
  1291. va_start(args,methodID);
  1292. functions->CallStaticVoidMethodV(this,cls,methodID,args);
  1293. va_end(args);
  1294. }
  1295. void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
  1296. va_list args) {
  1297. functions->CallStaticVoidMethodV(this,cls,methodID,args);
  1298. }
  1299. void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
  1300. jvalue * args) {
  1301. functions->CallStaticVoidMethodA(this,cls,methodID,args);
  1302. }
  1303. jfieldID GetStaticFieldID(jclass clazz, const char *name,
  1304. const char *sig) {
  1305. return functions->GetStaticFieldID(this,clazz,name,sig);
  1306. }
  1307. jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
  1308. return functions->GetStaticObjectField(this,clazz,fieldID);
  1309. }
  1310. jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
  1311. return functions->GetStaticBooleanField(this,clazz,fieldID);
  1312. }
  1313. jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
  1314. return functions->GetStaticByteField(this,clazz,fieldID);
  1315. }
  1316. jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
  1317. return functions->GetStaticCharField(this,clazz,fieldID);
  1318. }
  1319. jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
  1320. return functions->GetStaticShortField(this,clazz,fieldID);
  1321. }
  1322. jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
  1323. return functions->GetStaticIntField(this,clazz,fieldID);
  1324. }
  1325. jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
  1326. return functions->GetStaticLongField(this,clazz,fieldID);
  1327. }
  1328. jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
  1329. return functions->GetStaticFloatField(this,clazz,fieldID);
  1330. }
  1331. jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
  1332. return functions->GetStaticDoubleField(this,clazz,fieldID);
  1333. }
  1334. void SetStaticObjectField(jclass clazz, jfieldID fieldID,
  1335. jobject value) {
  1336. functions->SetStaticObjectField(this,clazz,fieldID,value);
  1337. }
  1338. void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
  1339. jboolean value) {
  1340. functions->SetStaticBooleanField(this,clazz,fieldID,value);
  1341. }
  1342. void SetStaticByteField(jclass clazz, jfieldID fieldID,
  1343. jbyte value) {
  1344. functions->SetStaticByteField(this,clazz,fieldID,value);
  1345. }
  1346. void SetStaticCharField(jclass clazz, jfieldID fieldID,
  1347. jchar value) {
  1348. functions->SetStaticCharField(this,clazz,fieldID,value);
  1349. }
  1350. void SetStaticShortField(jclass clazz, jfieldID fieldID,
  1351. jshort value) {
  1352. functions->SetStaticShortField(this,clazz,fieldID,value);
  1353. }
  1354. void SetStaticIntField(jclass clazz, jfieldID fieldID,
  1355. jint value) {
  1356. functions->SetStaticIntField(this,clazz,fieldID,value);
  1357. }
  1358. void SetStaticLongField(jclass clazz, jfieldID fieldID,
  1359. jlong value) {
  1360. functions->SetStaticLongField(this,clazz,fieldID,value);
  1361. }
  1362. void SetStaticFloatField(jclass clazz, jfieldID fieldID,
  1363. jfloat value) {
  1364. functions->SetStaticFloatField(this,clazz,fieldID,value);
  1365. }
  1366. void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
  1367. jdouble value) {
  1368. functions->SetStaticDoubleField(this,clazz,fieldID,value);
  1369. }
  1370. jstring NewString(const jchar *unicode, jsize len) {
  1371. return functions->NewString(this,unicode,len);
  1372. }
  1373. jsize GetStringLength(jstring str) {
  1374. return functions->GetStringLength(this,str);
  1375. }
  1376. const jchar *GetStringChars(jstring str, jboolean *isCopy) {
  1377. return functions->GetStringChars(this,str,isCopy);
  1378. }
  1379. void ReleaseStringChars(jstring str, const jchar *chars) {
  1380. functions->ReleaseStringChars(this,str,chars);
  1381. }
  1382. jstring NewStringUTF(const char *utf) {
  1383. return functions->NewStringUTF(this,utf);
  1384. }
  1385. jsize GetStringUTFLength(jstring str) {
  1386. return functions->GetStringUTFLength(this,str);
  1387. }
  1388. const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
  1389. return functions->GetStringUTFChars(this,str,isCopy);
  1390. }
  1391. void ReleaseStringUTFChars(jstring str, const char* chars) {
  1392. functions->ReleaseStringUTFChars(this,str,chars);
  1393. }
  1394. jsize GetArrayLength(jarray array) {
  1395. return functions->GetArrayLength(this,array);
  1396. }
  1397. jobjectArray NewObjectArray(jsize len, jclass clazz,
  1398. jobject init) {
  1399. return functions->NewObjectArray(this,len,clazz,init);
  1400. }
  1401. jobject GetObjectArrayElement(jobjectArray array, jsize index) {
  1402. return functions->GetObjectArrayElement(this,array,index);
  1403. }
  1404. void SetObjectArrayElement(jobjectArray array, jsize index,
  1405. jobject val) {
  1406. functions->SetObjectArrayElement(this,array,index,val);
  1407. }
  1408. jbooleanArray NewBooleanArray(jsize len) {
  1409. return functions->NewBooleanArray(this,len);
  1410. }
  1411. jbyteArray NewByteArray(jsize len) {
  1412. return functions->NewByteArray(this,len);
  1413. }
  1414. jcharArray NewCharArray(jsize len) {
  1415. return functions->NewCharArray(this,len);
  1416. }
  1417. jshortArray NewShortArray(jsize len) {
  1418. return functions->NewShortArray(this,len);
  1419. }
  1420. jintArray NewIntArray(jsize len) {
  1421. return functions->NewIntArray(this,len);
  1422. }
  1423. jlongArray NewLongArray(jsize len) {
  1424. return functions->NewLongArray(this,len);
  1425. }
  1426. jfloatArray NewFloatArray(jsize len) {
  1427. return functions->NewFloatArray(this,len);
  1428. }
  1429. jdoubleArray NewDoubleArray(jsize len) {
  1430. return functions->NewDoubleArray(this,len);
  1431. }
  1432. jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
  1433. return functions->GetBooleanArrayElements(this,array,isCopy);
  1434. }
  1435. jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
  1436. return functions->GetByteArrayElements(this,array,isCopy);
  1437. }
  1438. jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
  1439. return functions->GetCharArrayElements(this,array,isCopy);
  1440. }
  1441. jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
  1442. return functions->GetShortArrayElements(this,array,isCopy);
  1443. }
  1444. jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
  1445. return functions->GetIntArrayElements(this,array,isCopy);
  1446. }
  1447. jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
  1448. return functions->GetLongArrayElements(this,array,isCopy);
  1449. }
  1450. jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
  1451. return functions->GetFloatArrayElements(this,array,isCopy);
  1452. }
  1453. jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
  1454. return functions->GetDoubleArrayElements(this,array,isCopy);
  1455. }
  1456. void ReleaseBooleanArrayElements(jbooleanArray array,
  1457. jboolean *elems,
  1458. jint mode) {
  1459. functions->ReleaseBooleanArrayElements(this,array,elems,mode);
  1460. }
  1461. void ReleaseByteArrayElements(jbyteArray array,
  1462. jbyte *elems,
  1463. jint mode) {
  1464. functions->ReleaseByteArrayElements(this,array,elems,mode);
  1465. }
  1466. void ReleaseCharArrayElements(jcharArray array,
  1467. jchar *elems,
  1468. jint mode) {
  1469. functions->ReleaseCharArrayElements(this,array,elems,mode);
  1470. }
  1471. void ReleaseShortArrayElements(jshortArray array,
  1472. jshort *elems,
  1473. jint mode) {
  1474. functions->ReleaseShortArrayElements(this,array,elems,mode);
  1475. }
  1476. void ReleaseIntArrayElements(jintArray array,
  1477. jint *elems,
  1478. jint mode) {
  1479. functions->ReleaseIntArrayElements(this,array,elems,mode);
  1480. }
  1481. void ReleaseLongArrayElements(jlongArray array,
  1482. jlong *elems,
  1483. jint mode) {
  1484. functions->ReleaseLongArrayElements(this,array,elems,mode);
  1485. }
  1486. void ReleaseFloatArrayElements(jfloatArray array,
  1487. jfloat *elems,
  1488. jint mode) {
  1489. functions->ReleaseFloatArrayElements(this,array,elems,mode);
  1490. }
  1491. void ReleaseDoubleArrayElements(jdoubleArray array,
  1492. jdouble *elems,
  1493. jint mode) {
  1494. functions->ReleaseDoubleArrayElements(this,array,elems,mode);
  1495. }
  1496. void GetBooleanArrayRegion(jbooleanArray array,
  1497. jsize start, jsize len, jboolean *buf) {
  1498. functions->GetBooleanArrayRegion(this,array,start,len,buf);
  1499. }
  1500. void GetByteArrayRegion(jbyteArray array,
  1501. jsize start, jsize len, jbyte *buf) {
  1502. functions->GetByteArrayRegion(this,array,start,len,buf);
  1503. }
  1504. void GetCharArrayRegion(jcharArray array,
  1505. jsize start, jsize len, jchar *buf) {
  1506. functions->GetCharArrayRegion(this,array,start,len,buf);
  1507. }
  1508. void GetShortArrayRegion(jshortArray array,
  1509. jsize start, jsize len, jshort *buf) {
  1510. functions->GetShortArrayRegion(this,array,start,len,buf);
  1511. }
  1512. void GetIntArrayRegion(jintArray array,
  1513. jsize start, jsize len, jint *buf) {
  1514. functions->GetIntArrayRegion(this,array,start,len,buf);
  1515. }
  1516. void GetLongArrayRegion(jlongArray array,
  1517. jsize start, jsize len, jlong *buf) {
  1518. functions->GetLongArrayRegion(this,array,start,len,buf);
  1519. }
  1520. void GetFloatArrayRegion(jfloatArray array,
  1521. jsize start, jsize len, jfloat *buf) {
  1522. functions->GetFloatArrayRegion(this,array,start,len,buf);
  1523. }
  1524. void GetDoubleArrayRegion(jdoubleArray array,
  1525. jsize start, jsize len, jdouble *buf) {
  1526. functions->GetDoubleArrayRegion(this,array,start,len,buf);
  1527. }
  1528. void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
  1529. jboolean *buf) {
  1530. functions->SetBooleanArrayRegion(this,array,start,len,buf);
  1531. }
  1532. void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
  1533. jbyte *buf) {
  1534. functions->SetByteArrayRegion(this,array,start,len,buf);
  1535. }
  1536. void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
  1537. jchar *buf) {
  1538. functions->SetCharArrayRegion(this,array,start,len,buf);
  1539. }
  1540. void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
  1541. jshort *buf) {
  1542. functions->SetShortArrayRegion(this,array,start,len,buf);
  1543. }
  1544. void SetIntArrayRegion(jintArray array, jsize start, jsize len,
  1545. jint *buf) {
  1546. functions->SetIntArrayRegion(this,array,start,len,buf);
  1547. }
  1548. void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
  1549. jlong *buf) {
  1550. functions->SetLongArrayRegion(this,array,start,len,buf);
  1551. }
  1552. void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
  1553. jfloat *buf) {
  1554. functions->SetFloatArrayRegion(this,array,start,len,buf);
  1555. }
  1556. void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
  1557. jdouble *buf) {
  1558. functions->SetDoubleArrayRegion(this,array,start,len,buf);
  1559. }
  1560. jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
  1561. jint nMethods) {
  1562. return functions->RegisterNatives(this,clazz,methods,nMethods);
  1563. }
  1564. jint UnregisterNatives(jclass clazz) {
  1565. return functions->UnregisterNatives(this,clazz);
  1566. }
  1567. jint MonitorEnter(jobject obj) {
  1568. return functions->MonitorEnter(this,obj);
  1569. }
  1570. jint MonitorExit(jobject obj) {
  1571. return functions->MonitorExit(this,obj);
  1572. }
  1573. jint GetJavaVM(JavaVM **vm) {
  1574. return functions->GetJavaVM(this,vm);
  1575. }
  1576. #endif /* __cplusplus */
  1577. };
  1578. /* These structures will be VM-specific. */
  1579. typedef struct JDK1_1InitArgs {
  1580. jint version;
  1581. char **properties;
  1582. jint checkSource;
  1583. jint nativeStackSize;
  1584. jint javaStackSize;
  1585. jint minHeapSize;
  1586. jint maxHeapSize;
  1587. jint verifyMode;
  1588. char *classpath;
  1589. jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
  1590. void (JNICALL *exit)(jint code);
  1591. void (JNICALL *abort)();
  1592. jint enableClassGC;
  1593. jint enableVerboseGC;
  1594. jint disableAsyncGC;
  1595. jint verbose;
  1596. jboolean debugging;
  1597. jint debugPort;
  1598. } JDK1_1InitArgs;
  1599. typedef struct JDK1_1AttachArgs {
  1600. void * __padding; /* C compilers don't allow empty structures. */
  1601. } JDK1_1AttachArgs;
  1602. /* End VM-specific. */
  1603. struct JNIInvokeInterface_ {
  1604. void *reserved0;
  1605. void *reserved1;
  1606. void *reserved2;
  1607. jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
  1608. jint (JNICALL *AttachCurrentThread)
  1609. (JavaVM *vm, JNIEnv **penv, void *args);
  1610. jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
  1611. };
  1612. struct JavaVM_ {
  1613. const struct JNIInvokeInterface_ *functions;
  1614. void *reserved0;
  1615. void *reserved1;
  1616. void *reserved2;
  1617. #ifdef __cplusplus
  1618. jint DestroyJavaVM() {
  1619. return functions->DestroyJavaVM(this);
  1620. }
  1621. jint AttachCurrentThread(JNIEnv **penv, void *args) {
  1622. return functions->AttachCurrentThread(this, penv, args);
  1623. }
  1624. jint DetachCurrentThread() {
  1625. return functions->DetachCurrentThread(this);
  1626. }
  1627. #endif
  1628. };
  1629. JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *);
  1630. JNI_PUBLIC_API(jint) JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *);
  1631. JNI_PUBLIC_API(jint) JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
  1632. JNI_PUBLIC_API(jref) JNI_MakeLocalRef(JNIEnv *pJNIEnv, void *pHObject);
  1633. #ifdef __cplusplus
  1634. } /* extern "C" */
  1635. #endif /* __cplusplus */
  1636. #endif /* JNI_H */