Crossfire JXClient, Trunk
|
Go to the documentation of this file.
36 #ifndef _JAVASOFT_JNI_H_
37 #define _JAVASOFT_JNI_H_
55 #ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
68 class _jclass :
public _jobject {};
69 class _jthrowable :
public _jobject {};
70 class _jstring :
public _jobject {};
71 class _jarray :
public _jobject {};
72 class _jbooleanArray :
public _jarray {};
73 class _jbyteArray :
public _jarray {};
74 class _jcharArray :
public _jarray {};
75 class _jshortArray :
public _jarray {};
76 class _jintArray :
public _jarray {};
77 class _jlongArray :
public _jarray {};
78 class _jfloatArray :
public _jarray {};
79 class _jdoubleArray :
public _jarray {};
80 class _jobjectArray :
public _jarray {};
162 #define JNI_EDETACHED (-2)
163 #define JNI_EVERSION (-3)
164 #define JNI_ENOMEM (-4)
165 #define JNI_EEXIST (-5)
166 #define JNI_EINVAL (-6)
825 return functions->ExceptionOccurred(
this);
827 void ExceptionDescribe() {
830 void ExceptionClear() {
833 void FatalError(
const char *
msg) {
1839 void DeleteWeakGlobalRef(
jweak ref) {
1910 jint DestroyJavaVM() {
1916 jint DetachCurrentThread() {
1917 return functions->DetachCurrentThread(
this);
1923 jint AttachCurrentThreadAsDaemon(
void **
penv,
void *
args) {
1929 #ifdef _JNI_IMPLEMENTATION_
1930 #define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
1932 #define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
1950 #define JNI_VERSION_1_1 0x00010001
1951 #define JNI_VERSION_1_2 0x00010002
1952 #define JNI_VERSION_1_4 0x00010004
1953 #define JNI_VERSION_1_6 0x00010006
1954 #define JNI_VERSION_1_8 0x00010008
jint *JNICALL * GetIntArrayElements(JNIEnv *env, jintArray array, jboolean *isCopy)
jclass const char const char * sig
jclass jmethodID jclass jmethodID va_list args
jsize(JNICALL *GetStringLength)(JNIEnv *env
jclass const JNINativeMethod * methods
jclass jmethodID const jvalue * args
jobject jclass jmethodID methodID
struct _jmethodID * jmethodID
jclass jmethodID methodID
jobject jclass jmethodID jobject jclass jmethodID va_list args
jshort *JNICALL * GetShortArrayElements(JNIEnv *env, jshortArray array, jboolean *isCopy)
jshort(JNICALL *CallShortMethod)(JNIEnv *env
is injected On entry to all methods
jclass jfieldID jdouble value
jlongArray jsize jsize const jlong * buf
the functions do not always return the right values for PostScript fonts There are still some bugs around the error handling Most of these problems will usually get fixed when some parameters are or the screen is refreshed Many fonts on Solaris fails to retrieve outlines and as the result
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args)
jstring const jchar * chars
jclass jfieldID jobject value
jclass jfieldID jshort value
struct _jobject * jobject
jobject jfieldID jbyte val
jobject jfieldID jlong val
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args)
jclass jfieldID jfloat value
jstring jsize jsize char * buf
jchar *JNICALL * GetCharArrayElements(JNIEnv *env, jcharArray array, jboolean *isCopy)
jfloat *JNICALL * GetFloatArrayElements(JNIEnv *env, jfloatArray array, jboolean *isCopy)
jintArray(JNICALL *NewIntArray)(JNIEnv *env
jlong(JNICALL *CallLongMethod)(JNIEnv *env
jobjectRefType(JNICALL *GetObjectRefType)(JNIEnv *env
jobject jfieldID jint val
jfloatArray jsize jsize const jfloat * buf
jlongArray(JNICALL *NewLongArray)(JNIEnv *env
jclass jfieldID jboolean isStatic
const struct JNIInvokeInterface_ * functions
jclass const JNINativeMethod jint nMethods
jstring(JNICALL *NewString)(JNIEnv *env
jobject jclass jmethodID const jvalue * args
jclass jfieldID jbyte value
jfloat(JNICALL *CallFloatMethod)(JNIEnv *env
const struct JNIInvokeInterface_ * JavaVM
enum _jobjectType jobjectRefType
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
const jchar *JNICALL * GetStringChars(JNIEnv *env, jstring str, jboolean *isCopy)
jbyteArray(JNICALL *NewByteArray)(JNIEnv *env
jobject jfieldID jboolean val
jobject jmethodID methodID
jobject jfieldID jdouble val
jobject jmethodID const jvalue * args
jcharArray jsize jsize const jchar * buf
struct JavaVMAttachArgs JavaVMAttachArgs
jobjectArray(JNICALL *NewObjectArray)(JNIEnv *env
jobject jfieldID jobject val
jobject jclass jmethodID jobject obj
jboolean *JNICALL * GetBooleanArrayElements(JNIEnv *env, jbooleanArray array, jboolean *isCopy)
jbyte(JNICALL *CallByteMethod)(JNIEnv *env
jweak(JNICALL *NewWeakGlobalRef)(JNIEnv *env
jstring const char * chars
jsize jclass jobject init
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *)
const struct JNINativeInterface_ * JNIEnv
jthrowable(JNICALL *ExceptionOccurred)(JNIEnv *env)
jfloatArray(JNICALL *NewFloatArray)(JNIEnv *env
jbyte *JNICALL * GetByteArrayElements(JNIEnv *env, jbyteArray array, jboolean *isCopy)
const jchar *JNICALL * GetStringCritical(JNIEnv *env, jstring string, jboolean *isCopy)
void *JNICALL * GetDirectBufferAddress(JNIEnv *env, jobject buf)
jobject jfieldID jchar val
jclass jmethodID jclass jmethodID methodID
const struct JNINativeInterface_ * functions
jint(JNICALL *DestroyJavaVM)(JavaVM *vm)
jobject jfieldID jshort val
jchar(JNICALL *CallCharMethod)(JNIEnv *env
jclass jmethodID jclass cls
jbooleanArray(JNICALL *NewBooleanArray)(JNIEnv *env
jstring const jchar * cstring
void(JNICALL *ExceptionDescribe)(JNIEnv *env)
const char jobject const jbyte jsize len
jdoubleArray(JNICALL *NewDoubleArray)(JNIEnv *env
jdouble(JNICALL *CallDoubleMethod)(JNIEnv *env
jobject jmethodID jobject obj
jclass jfieldID jboolean value
jdoubleArray jdouble jint mode
jclass jfieldID jlong value
jfieldID(JNICALL *FromReflectedField)(JNIEnv *env
jclass jmethodID jboolean isStatic
const char jobject loader
jboolean(JNICALL *IsAssignableFrom)(JNIEnv *env
jclass jfieldID jint value
jobject jfieldID jfloat val
jshortArray jshort jint mode
jmethodID(JNICALL *FromReflectedMethod)(JNIEnv *env
jshortArray(JNICALL *NewShortArray)(JNIEnv *env
jdoubleArray jsize jsize const jdouble * buf
jobject(JNICALL *ToReflectedMethod)(JNIEnv *env
jclass(JNICALL *DefineClass)(JNIEnv *env
jbyteArray jsize jsize const jbyte * buf
jbooleanArray jboolean jint mode
jint(JNICALL *GetVersion)(JNIEnv *env)
const char jobject const jbyte * buf
jcharArray(JNICALL *NewCharArray)(JNIEnv *env
jlongArray jlong jint mode
const char *JNICALL * GetStringUTFChars(JNIEnv *env, jstring str, jboolean *isCopy)
jcharArray jchar jint mode
jbyteArray jbyte jint mode
jbooleanArray jsize jsize l
jdouble *JNICALL * GetDoubleArrayElements(JNIEnv *env, jdoubleArray array, jboolean *isCopy)
jlong *JNICALL * GetLongArrayElements(JNIEnv *env, jlongArray array, jboolean *isCopy)
jfloatArray jfloat jint mode
jclass jfieldID jchar value
void *JNICALL * GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboolean *isCopy)
JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved)
jbooleanArray jsize jsize const jboolean * buf
jbooleanArray jboolean * elems
jshortArray jsize jsize const jshort * buf
struct _jfieldID * jfieldID
jobjectArray jsize jobject val
struct JavaVMOption JavaVMOption
jbooleanArray jsize start
A Simple Chat Server Example the server takes input from a it handles the startup and handles incoming connections on the listening sockets It keeps a list of connected client and provides methods for sending a message to them Client represents a connected it provides methods for reading writing from to the underlying socket It also contains a buffer of input read from the user DataReader provides the interface of the two states a user can be in Waiting for a name(and not receiving any messages while doing so, implemented by NameReader) and waiting for messages from the user(implemented by MessageReader). ClientReader contains the "main loop" for a connected client. NameReader is the initial state for a new client
#define _JNI_IMPORT_OR_EXPORT_
struct JavaVMInitArgs JavaVMInitArgs
jboolean ignoreUnrecognized
jintArray jsize jsize const jint * buf