Back to index

lightning-sunbird  0.9+nobinonly
jri.h
Go to the documentation of this file.
00001 /* -*- Mode: C; tab-width: 4; -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is the Java Runtime Interface.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1996
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */  
00037 
00038 #ifndef JRI_H
00039 #define JRI_H
00040 
00041 #include "jritypes.h"
00042 
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif /* __cplusplus */
00046 
00047 /*******************************************************************************
00048  * JRIEnv
00049  ******************************************************************************/
00050 
00051 /* The type of the JRIEnv interface. */
00052 typedef struct JRIEnvInterface     JRIEnvInterface;
00053 
00054 /* The type of a JRIEnv instance. */
00055 typedef const JRIEnvInterface*     JRIEnv;
00056 
00057 /*******************************************************************************
00058  * JRIEnv Operations
00059  ******************************************************************************/
00060 
00061 #define JRI_DefineClass(env, classLoader, buf, bufLen)  \
00062        (((*(env))->DefineClass)(env, JRI_DefineClass_op, classLoader, buf, bufLen))
00063 
00064 #define JRI_FindClass(env, name)   \
00065        (((*(env))->FindClass)(env, JRI_FindClass_op, name))
00066 
00067 #define JRI_Throw(env, obj) \
00068        (((*(env))->Throw)(env, JRI_Throw_op, obj))
00069 
00070 #define JRI_ThrowNew(env, clazz, message) \
00071        (((*(env))->ThrowNew)(env, JRI_ThrowNew_op, clazz, message))
00072 
00073 #define JRI_ExceptionOccurred(env) \
00074        (((*(env))->ExceptionOccurred)(env, JRI_ExceptionOccurred_op))
00075 
00076 #define JRI_ExceptionDescribe(env) \
00077        (((*(env))->ExceptionDescribe)(env, JRI_ExceptionDescribe_op))
00078 
00079 #define JRI_ExceptionClear(env)    \
00080        (((*(env))->ExceptionClear)(env, JRI_ExceptionClear_op))
00081 
00082 #define JRI_NewGlobalRef(env, ref) \
00083        (((*(env))->NewGlobalRef)(env, JRI_NewGlobalRef_op, ref))
00084 
00085 #define JRI_DisposeGlobalRef(env, gref)   \
00086        (((*(env))->DisposeGlobalRef)(env, JRI_DisposeGlobalRef_op, gref))
00087 
00088 #define JRI_GetGlobalRef(env, gref)       \
00089        (((*(env))->GetGlobalRef)(env, JRI_GetGlobalRef_op, gref))
00090 
00091 #define JRI_SetGlobalRef(env, gref, ref)  \
00092        (((*(env))->SetGlobalRef)(env, JRI_SetGlobalRef_op, gref, ref))
00093 
00094 #define JRI_IsSameObject(env, a, b)       \
00095        (((*(env))->IsSameObject)(env, JRI_IsSameObject_op, a, b))
00096 
00097 #define JRI_NewObject(env)  ((*(env))->NewObject)
00098 #define JRI_NewObjectV(env, clazz, methodID, args)      \
00099        (((*(env))->NewObjectV)(env, JRI_NewObject_op_va_list, clazz, methodID, args))
00100 #define JRI_NewObjectA(env, clazz, method, args) \
00101        (((*(env))->NewObjectA)(env, JRI_NewObject_op_array, clazz, methodID, args))
00102 
00103 #define JRI_GetObjectClass(env, obj)      \
00104        (((*(env))->GetObjectClass)(env, JRI_GetObjectClass_op, obj))
00105 
00106 #define JRI_IsInstanceOf(env, obj, clazz) \
00107        (((*(env))->IsInstanceOf)(env, JRI_IsInstanceOf_op, obj, clazz))
00108 
00109 #define JRI_GetMethodID(env, clazz, name, sig)   \
00110        (((*(env))->GetMethodID)(env, JRI_GetMethodID_op, clazz, name, sig))
00111 
00112 #define JRI_CallMethod(env) ((*(env))->CallMethod)
00113 #define JRI_CallMethodV(env, obj, methodID, args)       \
00114        (((*(env))->CallMethodV)(env, JRI_CallMethod_op_va_list, obj, methodID, args))
00115 #define JRI_CallMethodA(env, obj, methodID, args)       \
00116        (((*(env))->CallMethodA)(env, JRI_CallMethod_op_array, obj, methodID, args))
00117 
00118 #define JRI_CallMethodBoolean(env) ((*(env))->CallMethodBoolean)
00119 #define JRI_CallMethodBooleanV(env, obj, methodID, args)       \
00120        (((*(env))->CallMethodBooleanV)(env, JRI_CallMethodBoolean_op_va_list, obj, methodID, args))
00121 #define JRI_CallMethodBooleanA(env, obj, methodID, args)       \
00122        (((*(env))->CallMethodBooleanA)(env, JRI_CallMethodBoolean_op_array, obj, methodID, args))
00123 
00124 #define JRI_CallMethodByte(env)    ((*(env))->CallMethodByte)
00125 #define JRI_CallMethodByteV(env, obj, methodID, args)   \
00126        (((*(env))->CallMethodByteV)(env, JRI_CallMethodByte_op_va_list, obj, methodID, args))
00127 #define JRI_CallMethodByteA(env, obj, methodID, args)   \
00128        (((*(env))->CallMethodByteA)(env, JRI_CallMethodByte_op_array, obj, methodID, args))
00129 
00130 #define JRI_CallMethodChar(env)    ((*(env))->CallMethodChar)
00131 #define JRI_CallMethodCharV(env, obj, methodID, args)   \
00132        (((*(env))->CallMethodCharV)(env, JRI_CallMethodChar_op_va_list, obj, methodID, args))
00133 #define JRI_CallMethodCharA(env, obj, methodID, args)   \
00134        (((*(env))->CallMethodCharA)(env, JRI_CallMethodChar_op_array, obj, methodID, args))
00135 
00136 #define JRI_CallMethodShort(env)   ((*(env))->CallMethodShort)
00137 #define JRI_CallMethodShortV(env, obj, methodID, args)  \
00138        (((*(env))->CallMethodShortV)(env, JRI_CallMethodShort_op_va_list, obj, methodID, args))
00139 #define JRI_CallMethodShortA(env, obj, methodID, args)  \
00140        (((*(env))->CallMethodShortA)(env, JRI_CallMethodShort_op_array, obj, methodID, args))
00141 
00142 #define JRI_CallMethodInt(env)     ((*(env))->CallMethodInt)
00143 #define JRI_CallMethodIntV(env, obj, methodID, args)    \
00144        (((*(env))->CallMethodIntV)(env, JRI_CallMethodInt_op_va_list, obj, methodID, args))
00145 #define JRI_CallMethodIntA(env, obj, methodID, args)    \
00146        (((*(env))->CallMethodIntA)(env, JRI_CallMethodInt_op_array, obj, methodID, args))
00147 
00148 #define JRI_CallMethodLong(env)    ((*(env))->CallMethodLong)
00149 #define JRI_CallMethodLongV(env, obj, methodID, args)   \
00150        (((*(env))->CallMethodLongV)(env, JRI_CallMethodLong_op_va_list, obj, methodID, args))
00151 #define JRI_CallMethodLongA(env, obj, methodID, args)   \
00152        (((*(env))->CallMethodLongA)(env, JRI_CallMethodLong_op_array, obj, methodID, args))
00153 
00154 #define JRI_CallMethodFloat(env)   ((*(env))->CallMethodFloat)
00155 #define JRI_CallMethodFloatV(env, obj, methodID, args)  \
00156        (((*(env))->CallMethodFloatV)(env, JRI_CallMethodFloat_op_va_list, obj, methodID, args))
00157 #define JRI_CallMethodFloatA(env, obj, methodID, args)  \
00158        (((*(env))->CallMethodFloatA)(env, JRI_CallMethodFloat_op_array, obj, methodID, args))
00159 
00160 #define JRI_CallMethodDouble(env)  ((*(env))->CallMethodDouble)
00161 #define JRI_CallMethodDoubleV(env, obj, methodID, args) \
00162        (((*(env))->CallMethodDoubleV)(env, JRI_CallMethodDouble_op_va_list, obj, methodID, args))
00163 #define JRI_CallMethodDoubleA(env, obj, methodID, args) \
00164        (((*(env))->CallMethodDoubleA)(env, JRI_CallMethodDouble_op_array, obj, methodID, args))
00165 
00166 #define JRI_GetFieldID(env, clazz, name, sig)    \
00167        (((*(env))->GetFieldID)(env, JRI_GetFieldID_op, clazz, name, sig))
00168 
00169 #define JRI_GetField(env, obj, fieldID)   \
00170        (((*(env))->GetField)(env, JRI_GetField_op, obj, fieldID))
00171 
00172 #define JRI_GetFieldBoolean(env, obj, fieldID)   \
00173        (((*(env))->GetFieldBoolean)(env, JRI_GetFieldBoolean_op, obj, fieldID))
00174 
00175 #define JRI_GetFieldByte(env, obj, fieldID)      \
00176        (((*(env))->GetFieldByte)(env, JRI_GetFieldByte_op, obj, fieldID))
00177 
00178 #define JRI_GetFieldChar(env, obj, fieldID)      \
00179        (((*(env))->GetFieldChar)(env, JRI_GetFieldChar_op, obj, fieldID))
00180 
00181 #define JRI_GetFieldShort(env, obj, fieldID)     \
00182        (((*(env))->GetFieldShort)(env, JRI_GetFieldShort_op, obj, fieldID))
00183 
00184 #define JRI_GetFieldInt(env, obj, fieldID)       \
00185        (((*(env))->GetFieldInt)(env, JRI_GetFieldInt_op, obj, fieldID))
00186 
00187 #define JRI_GetFieldLong(env, obj, fieldID)      \
00188        (((*(env))->GetFieldLong)(env, JRI_GetFieldLong_op, obj, fieldID))
00189 
00190 #define JRI_GetFieldFloat(env, obj, fieldID)     \
00191        (((*(env))->GetFieldFloat)(env, JRI_GetFieldFloat_op, obj, fieldID))
00192 
00193 #define JRI_GetFieldDouble(env, obj, fieldID)    \
00194        (((*(env))->GetFieldDouble)(env, JRI_GetFieldDouble_op, obj, fieldID))
00195 
00196 #define JRI_SetField(env, obj, fieldID, value)   \
00197        (((*(env))->SetField)(env, JRI_SetField_op, obj, fieldID, value))
00198 
00199 #define JRI_SetFieldBoolean(env, obj, fieldID, value)   \
00200        (((*(env))->SetFieldBoolean)(env, JRI_SetFieldBoolean_op, obj, fieldID, value))
00201 
00202 #define JRI_SetFieldByte(env, obj, fieldID, value)      \
00203        (((*(env))->SetFieldByte)(env, JRI_SetFieldByte_op, obj, fieldID, value))
00204 
00205 #define JRI_SetFieldChar(env, obj, fieldID, value)      \
00206        (((*(env))->SetFieldChar)(env, JRI_SetFieldChar_op, obj, fieldID, value))
00207 
00208 #define JRI_SetFieldShort(env, obj, fieldID, value)     \
00209        (((*(env))->SetFieldShort)(env, JRI_SetFieldShort_op, obj, fieldID, value))
00210 
00211 #define JRI_SetFieldInt(env, obj, fieldID, value)       \
00212        (((*(env))->SetFieldInt)(env, JRI_SetFieldInt_op, obj, fieldID, value))
00213 
00214 #define JRI_SetFieldLong(env, obj, fieldID, value)      \
00215        (((*(env))->SetFieldLong)(env, JRI_SetFieldLong_op, obj, fieldID, value))
00216 
00217 #define JRI_SetFieldFloat(env, obj, fieldID, value)     \
00218        (((*(env))->SetFieldFloat)(env, JRI_SetFieldFloat_op, obj, fieldID, value))
00219 
00220 #define JRI_SetFieldDouble(env, obj, fieldID, value)    \
00221        (((*(env))->SetFieldDouble)(env, JRI_SetFieldDouble_op, obj, fieldID, value))
00222 
00223 #define JRI_IsSubclassOf(env, a, b)       \
00224        (((*(env))->IsSubclassOf)(env, JRI_IsSubclassOf_op, a, b))
00225 
00226 #define JRI_GetStaticMethodID(env, clazz, name, sig)    \
00227        (((*(env))->GetStaticMethodID)(env, JRI_GetStaticMethodID_op, clazz, name, sig))
00228 
00229 #define JRI_CallStaticMethod(env)  ((*(env))->CallStaticMethod)
00230 #define JRI_CallStaticMethodV(env, clazz, methodID, args)      \
00231        (((*(env))->CallStaticMethodV)(env, JRI_CallStaticMethod_op_va_list, clazz, methodID, args))
00232 #define JRI_CallStaticMethodA(env, clazz, methodID, args)      \
00233        (((*(env))->CallStaticMethodA)(env, JRI_CallStaticMethod_op_array, clazz, methodID, args))
00234 
00235 #define JRI_CallStaticMethodBoolean(env)  ((*(env))->CallStaticMethodBoolean)
00236 #define JRI_CallStaticMethodBooleanV(env, clazz, methodID, args)      \
00237        (((*(env))->CallStaticMethodBooleanV)(env, JRI_CallStaticMethodBoolean_op_va_list, clazz, methodID, args))
00238 #define JRI_CallStaticMethodBooleanA(env, clazz, methodID, args)      \
00239        (((*(env))->CallStaticMethodBooleanA)(env, JRI_CallStaticMethodBoolean_op_array, clazz, methodID, args))
00240 
00241 #define JRI_CallStaticMethodByte(env)     ((*(env))->CallStaticMethodByte)
00242 #define JRI_CallStaticMethodByteV(env, clazz, methodID, args)  \
00243        (((*(env))->CallStaticMethodByteV)(env, JRI_CallStaticMethodByte_op_va_list, clazz, methodID, args))
00244 #define JRI_CallStaticMethodByteA(env, clazz, methodID, args)  \
00245        (((*(env))->CallStaticMethodByteA)(env, JRI_CallStaticMethodByte_op_array, clazz, methodID, args))
00246 
00247 #define JRI_CallStaticMethodChar(env)     ((*(env))->CallStaticMethodChar)
00248 #define JRI_CallStaticMethodCharV(env, clazz, methodID, args)  \
00249        (((*(env))->CallStaticMethodCharV)(env, JRI_CallStaticMethodChar_op_va_list, clazz, methodID, args))
00250 #define JRI_CallStaticMethodCharA(env, clazz, methodID, args)  \
00251        (((*(env))->CallStaticMethodCharA)(env, JRI_CallStaticMethodChar_op_array, clazz, methodID, args))
00252 
00253 #define JRI_CallStaticMethodShort(env)    ((*(env))->CallStaticMethodShort)
00254 #define JRI_CallStaticMethodShortV(env, clazz, methodID, args) \
00255        (((*(env))->CallStaticMethodShortV)(env, JRI_CallStaticMethodShort_op_va_list, clazz, methodID, args))
00256 #define JRI_CallStaticMethodShortA(env, clazz, methodID, args) \
00257        (((*(env))->CallStaticMethodShortA)(env, JRI_CallStaticMethodShort_op_array, clazz, methodID, args))
00258 
00259 #define JRI_CallStaticMethodInt(env)      ((*(env))->CallStaticMethodInt)
00260 #define JRI_CallStaticMethodIntV(env, clazz, methodID, args)   \
00261        (((*(env))->CallStaticMethodIntV)(env, JRI_CallStaticMethodInt_op_va_list, clazz, methodID, args))
00262 #define JRI_CallStaticMethodIntA(env, clazz, methodID, args)   \
00263        (((*(env))->CallStaticMethodIntA)(env, JRI_CallStaticMethodInt_op_array, clazz, methodID, args))
00264 
00265 #define JRI_CallStaticMethodLong(env)     ((*(env))->CallStaticMethodLong)
00266 #define JRI_CallStaticMethodLongV(env, clazz, methodID, args)  \
00267        (((*(env))->CallStaticMethodLongV)(env, JRI_CallStaticMethodLong_op_va_list, clazz, methodID, args))
00268 #define JRI_CallStaticMethodLongA(env, clazz, methodID, args)  \
00269        (((*(env))->CallStaticMethodLongA)(env, JRI_CallStaticMethodLong_op_array, clazz, methodID, args))
00270 
00271 #define JRI_CallStaticMethodFloat(env)    ((*(env))->CallStaticMethodFloat)
00272 #define JRI_CallStaticMethodFloatV(env, clazz, methodID, args) \
00273        (((*(env))->CallStaticMethodFloatV)(env, JRI_CallStaticMethodFloat_op_va_list, clazz, methodID, args))
00274 #define JRI_CallStaticMethodFloatA(env, clazz, methodID, args) \
00275        (((*(env))->CallStaticMethodFloatA)(env, JRI_CallStaticMethodFloat_op_array, clazz, methodID, args))
00276 
00277 #define JRI_CallStaticMethodDouble(env)   ((*(env))->CallStaticMethodDouble)
00278 #define JRI_CallStaticMethodDoubleV(env, clazz, methodID, args)       \
00279        (((*(env))->CallStaticMethodDoubleV)(env, JRI_CallStaticMethodDouble_op_va_list, clazz, methodID, args))
00280 #define JRI_CallStaticMethodDoubleA(env, clazz, methodID, args)       \
00281        (((*(env))->CallStaticMethodDoubleA)(env, JRI_CallStaticMethodDouble_op_array, clazz, methodID, args))
00282 
00283 #define JRI_GetStaticFieldID(env, clazz, name, sig)     \
00284        (((*(env))->GetStaticFieldID)(env, JRI_GetStaticFieldID_op, clazz, name, sig))
00285 
00286 #define JRI_GetStaticField(env, clazz, fieldID)  \
00287        (((*(env))->GetStaticField)(env, JRI_GetStaticField_op, clazz, fieldID))
00288 
00289 #define JRI_GetStaticFieldBoolean(env, clazz, fieldID)  \
00290        (((*(env))->GetStaticFieldBoolean)(env, JRI_GetStaticFieldBoolean_op, clazz, fieldID))
00291 
00292 #define JRI_GetStaticFieldByte(env, clazz, fieldID)     \
00293        (((*(env))->GetStaticFieldByte)(env, JRI_GetStaticFieldByte_op, clazz, fieldID))
00294 
00295 #define JRI_GetStaticFieldChar(env, clazz, fieldID)     \
00296        (((*(env))->GetStaticFieldChar)(env, JRI_GetStaticFieldChar_op, clazz, fieldID))
00297 
00298 #define JRI_GetStaticFieldShort(env, clazz, fieldID)    \
00299        (((*(env))->GetStaticFieldShort)(env, JRI_GetStaticFieldShort_op, clazz, fieldID))
00300 
00301 #define JRI_GetStaticFieldInt(env, clazz, fieldID)      \
00302        (((*(env))->GetStaticFieldInt)(env, JRI_GetStaticFieldInt_op, clazz, fieldID))
00303 
00304 #define JRI_GetStaticFieldLong(env, clazz, fieldID)     \
00305        (((*(env))->GetStaticFieldLong)(env, JRI_GetStaticFieldLong_op, clazz, fieldID))
00306 
00307 #define JRI_GetStaticFieldFloat(env, clazz, fieldID)    \
00308        (((*(env))->GetStaticFieldFloat)(env, JRI_GetStaticFieldFloat_op, clazz, fieldID))
00309 
00310 #define JRI_GetStaticFieldDouble(env, clazz, fieldID)   \
00311        (((*(env))->GetStaticFieldDouble)(env, JRI_GetStaticFieldDouble_op, clazz, fieldID))
00312 
00313 #define JRI_SetStaticField(env, clazz, fieldID, value)  \
00314        (((*(env))->SetStaticField)(env, JRI_SetStaticField_op, clazz, fieldID, value))
00315 
00316 #define JRI_SetStaticFieldBoolean(env, clazz, fieldID, value)  \
00317        (((*(env))->SetStaticFieldBoolean)(env, JRI_SetStaticFieldBoolean_op, clazz, fieldID, value))
00318 
00319 #define JRI_SetStaticFieldByte(env, clazz, fieldID, value)     \
00320        (((*(env))->SetStaticFieldByte)(env, JRI_SetStaticFieldByte_op, clazz, fieldID, value))
00321 
00322 #define JRI_SetStaticFieldChar(env, clazz, fieldID, value)     \
00323        (((*(env))->SetStaticFieldChar)(env, JRI_SetStaticFieldChar_op, clazz, fieldID, value))
00324 
00325 #define JRI_SetStaticFieldShort(env, clazz, fieldID, value)    \
00326        (((*(env))->SetStaticFieldShort)(env, JRI_SetStaticFieldShort_op, clazz, fieldID, value))
00327 
00328 #define JRI_SetStaticFieldInt(env, clazz, fieldID, value)      \
00329        (((*(env))->SetStaticFieldInt)(env, JRI_SetStaticFieldInt_op, clazz, fieldID, value))
00330 
00331 #define JRI_SetStaticFieldLong(env, clazz, fieldID, value)     \
00332        (((*(env))->SetStaticFieldLong)(env, JRI_SetStaticFieldLong_op, clazz, fieldID, value))
00333 
00334 #define JRI_SetStaticFieldFloat(env, clazz, fieldID, value)    \
00335        (((*(env))->SetStaticFieldFloat)(env, JRI_SetStaticFieldFloat_op, clazz, fieldID, value))
00336 
00337 #define JRI_SetStaticFieldDouble(env, clazz, fieldID, value)   \
00338        (((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value))
00339 
00340 #define JRI_NewString(env, unicode, len)  \
00341        (((*(env))->NewString)(env, JRI_NewString_op, unicode, len))
00342 
00343 #define JRI_GetStringLength(env, string)  \
00344        (((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string))
00345 
00346 #define JRI_GetStringChars(env, string)   \
00347        (((*(env))->GetStringChars)(env, JRI_GetStringChars_op, string))
00348 
00349 #define JRI_NewStringUTF(env, utf, len)   \
00350        (((*(env))->NewStringUTF)(env, JRI_NewStringUTF_op, utf, len))
00351 
00352 #define JRI_GetStringUTFLength(env, string)      \
00353        (((*(env))->GetStringUTFLength)(env, JRI_GetStringUTFLength_op, string))
00354 
00355 #define JRI_GetStringUTFChars(env, string)       \
00356        (((*(env))->GetStringUTFChars)(env, JRI_GetStringUTFChars_op, string))
00357 
00358 #define JRI_NewScalarArray(env, length, elementSig, initialElements)  \
00359        (((*(env))->NewScalarArray)(env, JRI_NewScalarArray_op, length, elementSig, initialElements))
00360 
00361 #define JRI_GetScalarArrayLength(env, array)     \
00362        (((*(env))->GetScalarArrayLength)(env, JRI_GetScalarArrayLength_op, array))
00363 
00364 #define JRI_GetScalarArrayElements(env, array)   \
00365        (((*(env))->GetScalarArrayElements)(env, JRI_GetScalarArrayElements_op, array))
00366 
00367 #define JRI_NewObjectArray(env, length, elementClass, initialElement) \
00368        (((*(env))->NewObjectArray)(env, JRI_NewObjectArray_op, length, elementClass, initialElement))
00369 
00370 #define JRI_GetObjectArrayLength(env, array)     \
00371        (((*(env))->GetObjectArrayLength)(env, JRI_GetObjectArrayLength_op, array))
00372 
00373 #define JRI_GetObjectArrayElement(env, array, index)    \
00374        (((*(env))->GetObjectArrayElement)(env, JRI_GetObjectArrayElement_op, array, index))
00375 
00376 #define JRI_SetObjectArrayElement(env, array, index, value)    \
00377        (((*(env))->SetObjectArrayElement)(env, JRI_SetObjectArrayElement_op, array, index, value))
00378 
00379 #define JRI_RegisterNatives(env, clazz, nameAndSigArray, nativeProcArray)    \
00380        (((*(env))->RegisterNatives)(env, JRI_RegisterNatives_op, clazz, nameAndSigArray, nativeProcArray))
00381 
00382 #define JRI_UnregisterNatives(env, clazz) \
00383        (((*(env))->UnregisterNatives)(env, JRI_UnregisterNatives_op, clazz))
00384 
00385 #define JRI_NewStringPlatform(env, string, len, encoding, encodingLength)    \
00386        (((*(env))->NewStringPlatform)(env, JRI_NewStringPlatform_op, string, len, encoding, encodingLength))
00387 
00388 #define JRI_GetStringPlatformChars(env, string, encoding, encodingLength)    \
00389        (((*(env))->GetStringPlatformChars)(env, JRI_GetStringPlatformChars_op, string, encoding, encodingLength))
00390 
00391 
00392 /*******************************************************************************
00393  * JRIEnv Interface
00394  ******************************************************************************/
00395 
00396 struct java_lang_ClassLoader;
00397 struct java_lang_Class;
00398 struct java_lang_Throwable;
00399 struct java_lang_Object;
00400 struct java_lang_String;
00401 
00402 struct JRIEnvInterface {
00403        void*  reserved0;
00404        void*  reserved1;
00405        void*  reserved2;
00406        void*  reserved3;
00407        struct java_lang_Class*     (*FindClass)(JRIEnv* env, jint op, const char* a);
00408        void   (*Throw)(JRIEnv* env, jint op, struct java_lang_Throwable* a);
00409        void   (*ThrowNew)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b);
00410        struct java_lang_Throwable* (*ExceptionOccurred)(JRIEnv* env, jint op);
00411        void   (*ExceptionDescribe)(JRIEnv* env, jint op);
00412        void   (*ExceptionClear)(JRIEnv* env, jint op);
00413        jglobal       (*NewGlobalRef)(JRIEnv* env, jint op, void* a);
00414        void   (*DisposeGlobalRef)(JRIEnv* env, jint op, jglobal a);
00415        void*  (*GetGlobalRef)(JRIEnv* env, jint op, jglobal a);
00416        void   (*SetGlobalRef)(JRIEnv* env, jint op, jglobal a, void* b);
00417        jbool  (*IsSameObject)(JRIEnv* env, jint op, void* a, void* b);
00418        void*  (*NewObject)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00419        void*  (*NewObjectV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00420        void*  (*NewObjectA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00421        struct java_lang_Class*     (*GetObjectClass)(JRIEnv* env, jint op, void* a);
00422        jbool  (*IsInstanceOf)(JRIEnv* env, jint op, void* a, struct java_lang_Class* b);
00423        jint   (*GetMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
00424        void*  (*CallMethod)(JRIEnv* env, jint op, void* a, jint b, ...);
00425        void*  (*CallMethodV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00426        void*  (*CallMethodA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00427        jbool  (*CallMethodBoolean)(JRIEnv* env, jint op, void* a, jint b, ...);
00428        jbool  (*CallMethodBooleanV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00429        jbool  (*CallMethodBooleanA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00430        jbyte  (*CallMethodByte)(JRIEnv* env, jint op, void* a, jint b, ...);
00431        jbyte  (*CallMethodByteV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00432        jbyte  (*CallMethodByteA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00433        jchar  (*CallMethodChar)(JRIEnv* env, jint op, void* a, jint b, ...);
00434        jchar  (*CallMethodCharV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00435        jchar  (*CallMethodCharA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00436        jshort (*CallMethodShort)(JRIEnv* env, jint op, void* a, jint b, ...);
00437        jshort (*CallMethodShortV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00438        jshort (*CallMethodShortA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00439        jint   (*CallMethodInt)(JRIEnv* env, jint op, void* a, jint b, ...);
00440        jint   (*CallMethodIntV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00441        jint   (*CallMethodIntA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00442        jlong  (*CallMethodLong)(JRIEnv* env, jint op, void* a, jint b, ...);
00443        jlong  (*CallMethodLongV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00444        jlong  (*CallMethodLongA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00445        jfloat (*CallMethodFloat)(JRIEnv* env, jint op, void* a, jint b, ...);
00446        jfloat (*CallMethodFloatV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00447        jfloat (*CallMethodFloatA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00448        jdouble       (*CallMethodDouble)(JRIEnv* env, jint op, void* a, jint b, ...);
00449        jdouble       (*CallMethodDoubleV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
00450        jdouble       (*CallMethodDoubleA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
00451        jint   (*GetFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
00452        void*  (*GetField)(JRIEnv* env, jint op, void* a, jint b);
00453        jbool  (*GetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b);
00454        jbyte  (*GetFieldByte)(JRIEnv* env, jint op, void* a, jint b);
00455        jchar  (*GetFieldChar)(JRIEnv* env, jint op, void* a, jint b);
00456        jshort (*GetFieldShort)(JRIEnv* env, jint op, void* a, jint b);
00457        jint   (*GetFieldInt)(JRIEnv* env, jint op, void* a, jint b);
00458        jlong  (*GetFieldLong)(JRIEnv* env, jint op, void* a, jint b);
00459        jfloat (*GetFieldFloat)(JRIEnv* env, jint op, void* a, jint b);
00460        jdouble       (*GetFieldDouble)(JRIEnv* env, jint op, void* a, jint b);
00461        void   (*SetField)(JRIEnv* env, jint op, void* a, jint b, void* c);
00462        void   (*SetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b, jbool c);
00463        void   (*SetFieldByte)(JRIEnv* env, jint op, void* a, jint b, jbyte c);
00464        void   (*SetFieldChar)(JRIEnv* env, jint op, void* a, jint b, jchar c);
00465        void   (*SetFieldShort)(JRIEnv* env, jint op, void* a, jint b, jshort c);
00466        void   (*SetFieldInt)(JRIEnv* env, jint op, void* a, jint b, jint c);
00467        void   (*SetFieldLong)(JRIEnv* env, jint op, void* a, jint b, jlong c);
00468        void   (*SetFieldFloat)(JRIEnv* env, jint op, void* a, jint b, jfloat c);
00469        void   (*SetFieldDouble)(JRIEnv* env, jint op, void* a, jint b, jdouble c);
00470        jbool  (*IsSubclassOf)(JRIEnv* env, jint op, struct java_lang_Class* a, struct java_lang_Class* b);
00471        jint   (*GetStaticMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
00472        void*  (*CallStaticMethod)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00473        void*  (*CallStaticMethodV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00474        void*  (*CallStaticMethodA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00475        jbool  (*CallStaticMethodBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00476        jbool  (*CallStaticMethodBooleanV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00477        jbool  (*CallStaticMethodBooleanA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00478        jbyte  (*CallStaticMethodByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00479        jbyte  (*CallStaticMethodByteV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00480        jbyte  (*CallStaticMethodByteA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00481        jchar  (*CallStaticMethodChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00482        jchar  (*CallStaticMethodCharV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00483        jchar  (*CallStaticMethodCharA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00484        jshort (*CallStaticMethodShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00485        jshort (*CallStaticMethodShortV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00486        jshort (*CallStaticMethodShortA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00487        jint   (*CallStaticMethodInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00488        jint   (*CallStaticMethodIntV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00489        jint   (*CallStaticMethodIntA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00490        jlong  (*CallStaticMethodLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00491        jlong  (*CallStaticMethodLongV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00492        jlong  (*CallStaticMethodLongA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00493        jfloat (*CallStaticMethodFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00494        jfloat (*CallStaticMethodFloatV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00495        jfloat (*CallStaticMethodFloatA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00496        jdouble       (*CallStaticMethodDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
00497        jdouble       (*CallStaticMethodDoubleV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
00498        jdouble       (*CallStaticMethodDoubleA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
00499        jint   (*GetStaticFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
00500        void*  (*GetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00501        jbool  (*GetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00502        jbyte  (*GetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00503        jchar  (*GetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00504        jshort (*GetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00505        jint   (*GetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00506        jlong  (*GetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00507        jfloat (*GetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00508        jdouble       (*GetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
00509        void   (*SetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, void* c);
00510        void   (*SetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbool c);
00511        void   (*SetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbyte c);
00512        void   (*SetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jchar c);
00513        void   (*SetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jshort c);
00514        void   (*SetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jint c);
00515        void   (*SetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jlong c);
00516        void   (*SetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jfloat c);
00517        void   (*SetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jdouble c);
00518        struct java_lang_String*    (*NewString)(JRIEnv* env, jint op, const jchar* a, jint b);
00519        jint   (*GetStringLength)(JRIEnv* env, jint op, struct java_lang_String* a);
00520        const jchar*  (*GetStringChars)(JRIEnv* env, jint op, struct java_lang_String* a);
00521        struct java_lang_String*    (*NewStringUTF)(JRIEnv* env, jint op, const jbyte* a, jint b);
00522        jint   (*GetStringUTFLength)(JRIEnv* env, jint op, struct java_lang_String* a);
00523        const jbyte*  (*GetStringUTFChars)(JRIEnv* env, jint op, struct java_lang_String* a);
00524        void*  (*NewScalarArray)(JRIEnv* env, jint op, jint a, const char* b, const jbyte* c);
00525        jint   (*GetScalarArrayLength)(JRIEnv* env, jint op, void* a);
00526        jbyte* (*GetScalarArrayElements)(JRIEnv* env, jint op, void* a);
00527        void*  (*NewObjectArray)(JRIEnv* env, jint op, jint a, struct java_lang_Class* b, void* c);
00528        jint   (*GetObjectArrayLength)(JRIEnv* env, jint op, void* a);
00529        void*  (*GetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b);
00530        void   (*SetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b, void* c);
00531        void   (*RegisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a, char** b, void** c);
00532        void   (*UnregisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a);
00533        struct java_lang_Class*     (*DefineClass)(JRIEnv* env, jint op, struct java_lang_ClassLoader* a, jbyte* b, jsize bLen);
00534        struct java_lang_String*    (*NewStringPlatform)(JRIEnv* env, jint op, const jbyte* a, jint b, const jbyte* c, jint d);
00535        const jbyte*  (*GetStringPlatformChars)(JRIEnv* env, jint op, struct java_lang_String* a, const jbyte* b, jint c);
00536 };
00537 
00538 /*
00539 ** ****************************************************************************
00540 ** JRIEnv Operation IDs
00541 ** ***************************************************************************
00542 */
00543 
00544 typedef enum JRIEnvOperations {
00545        JRI_Reserved0_op,
00546        JRI_Reserved1_op,
00547        JRI_Reserved2_op,
00548        JRI_Reserved3_op,
00549        JRI_FindClass_op,
00550        JRI_Throw_op,
00551        JRI_ThrowNew_op,
00552        JRI_ExceptionOccurred_op,
00553        JRI_ExceptionDescribe_op,
00554        JRI_ExceptionClear_op,
00555        JRI_NewGlobalRef_op,
00556        JRI_DisposeGlobalRef_op,
00557        JRI_GetGlobalRef_op,
00558        JRI_SetGlobalRef_op,
00559        JRI_IsSameObject_op,
00560        JRI_NewObject_op,
00561        JRI_NewObject_op_va_list,
00562        JRI_NewObject_op_array,
00563        JRI_GetObjectClass_op,
00564        JRI_IsInstanceOf_op,
00565        JRI_GetMethodID_op,
00566        JRI_CallMethod_op,
00567        JRI_CallMethod_op_va_list,
00568        JRI_CallMethod_op_array,
00569        JRI_CallMethodBoolean_op,
00570        JRI_CallMethodBoolean_op_va_list,
00571        JRI_CallMethodBoolean_op_array,
00572        JRI_CallMethodByte_op,
00573        JRI_CallMethodByte_op_va_list,
00574        JRI_CallMethodByte_op_array,
00575        JRI_CallMethodChar_op,
00576        JRI_CallMethodChar_op_va_list,
00577        JRI_CallMethodChar_op_array,
00578        JRI_CallMethodShort_op,
00579        JRI_CallMethodShort_op_va_list,
00580        JRI_CallMethodShort_op_array,
00581        JRI_CallMethodInt_op,
00582        JRI_CallMethodInt_op_va_list,
00583        JRI_CallMethodInt_op_array,
00584        JRI_CallMethodLong_op,
00585        JRI_CallMethodLong_op_va_list,
00586        JRI_CallMethodLong_op_array,
00587        JRI_CallMethodFloat_op,
00588        JRI_CallMethodFloat_op_va_list,
00589        JRI_CallMethodFloat_op_array,
00590        JRI_CallMethodDouble_op,
00591        JRI_CallMethodDouble_op_va_list,
00592        JRI_CallMethodDouble_op_array,
00593        JRI_GetFieldID_op,
00594        JRI_GetField_op,
00595        JRI_GetFieldBoolean_op,
00596        JRI_GetFieldByte_op,
00597        JRI_GetFieldChar_op,
00598        JRI_GetFieldShort_op,
00599        JRI_GetFieldInt_op,
00600        JRI_GetFieldLong_op,
00601        JRI_GetFieldFloat_op,
00602        JRI_GetFieldDouble_op,
00603        JRI_SetField_op,
00604        JRI_SetFieldBoolean_op,
00605        JRI_SetFieldByte_op,
00606        JRI_SetFieldChar_op,
00607        JRI_SetFieldShort_op,
00608        JRI_SetFieldInt_op,
00609        JRI_SetFieldLong_op,
00610        JRI_SetFieldFloat_op,
00611        JRI_SetFieldDouble_op,
00612        JRI_IsSubclassOf_op,
00613        JRI_GetStaticMethodID_op,
00614        JRI_CallStaticMethod_op,
00615        JRI_CallStaticMethod_op_va_list,
00616        JRI_CallStaticMethod_op_array,
00617        JRI_CallStaticMethodBoolean_op,
00618        JRI_CallStaticMethodBoolean_op_va_list,
00619        JRI_CallStaticMethodBoolean_op_array,
00620        JRI_CallStaticMethodByte_op,
00621        JRI_CallStaticMethodByte_op_va_list,
00622        JRI_CallStaticMethodByte_op_array,
00623        JRI_CallStaticMethodChar_op,
00624        JRI_CallStaticMethodChar_op_va_list,
00625        JRI_CallStaticMethodChar_op_array,
00626        JRI_CallStaticMethodShort_op,
00627        JRI_CallStaticMethodShort_op_va_list,
00628        JRI_CallStaticMethodShort_op_array,
00629        JRI_CallStaticMethodInt_op,
00630        JRI_CallStaticMethodInt_op_va_list,
00631        JRI_CallStaticMethodInt_op_array,
00632        JRI_CallStaticMethodLong_op,
00633        JRI_CallStaticMethodLong_op_va_list,
00634        JRI_CallStaticMethodLong_op_array,
00635        JRI_CallStaticMethodFloat_op,
00636        JRI_CallStaticMethodFloat_op_va_list,
00637        JRI_CallStaticMethodFloat_op_array,
00638        JRI_CallStaticMethodDouble_op,
00639        JRI_CallStaticMethodDouble_op_va_list,
00640        JRI_CallStaticMethodDouble_op_array,
00641        JRI_GetStaticFieldID_op,
00642        JRI_GetStaticField_op,
00643        JRI_GetStaticFieldBoolean_op,
00644        JRI_GetStaticFieldByte_op,
00645        JRI_GetStaticFieldChar_op,
00646        JRI_GetStaticFieldShort_op,
00647        JRI_GetStaticFieldInt_op,
00648        JRI_GetStaticFieldLong_op,
00649        JRI_GetStaticFieldFloat_op,
00650        JRI_GetStaticFieldDouble_op,
00651        JRI_SetStaticField_op,
00652        JRI_SetStaticFieldBoolean_op,
00653        JRI_SetStaticFieldByte_op,
00654        JRI_SetStaticFieldChar_op,
00655        JRI_SetStaticFieldShort_op,
00656        JRI_SetStaticFieldInt_op,
00657        JRI_SetStaticFieldLong_op,
00658        JRI_SetStaticFieldFloat_op,
00659        JRI_SetStaticFieldDouble_op,
00660        JRI_NewString_op,
00661        JRI_GetStringLength_op,
00662        JRI_GetStringChars_op,
00663        JRI_NewStringUTF_op,
00664        JRI_GetStringUTFLength_op,
00665        JRI_GetStringUTFChars_op,
00666        JRI_NewScalarArray_op,
00667        JRI_GetScalarArrayLength_op,
00668        JRI_GetScalarArrayElements_op,
00669        JRI_NewObjectArray_op,
00670        JRI_GetObjectArrayLength_op,
00671        JRI_GetObjectArrayElement_op,
00672        JRI_SetObjectArrayElement_op,
00673        JRI_RegisterNatives_op,
00674        JRI_UnregisterNatives_op,
00675        JRI_DefineClass_op,
00676        JRI_NewStringPlatform_op,
00677        JRI_GetStringPlatformChars_op
00678 } JRIEnvOperations;
00679 
00680 #ifdef __cplusplus
00681 } /* extern "C" */
00682 #endif /* __cplusplus */
00683 
00684 #endif /* JRI_H */
00685 /******************************************************************************/