Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
jni.h File Reference
#include <stdio.h>
#include <stdarg.h>
#include "jni_md.h"

Go to the source code of this file.

Classes

union  jvalue
struct  JNINativeMethod
struct  JNINativeInterface_
struct  JNIEnv_
struct  JavaVMOption
struct  JavaVMInitArgs
struct  JavaVMAttachArgs
struct  JDK1_1InitArgs
struct  JDK1_1AttachArgs
struct  JNIInvokeInterface_
struct  JavaVM_

Defines

#define JNI_FALSE   0
#define JNI_TRUE   1
#define JNI_OK   0 /* success */
#define JNI_ERR   (-1) /* unknown error */
#define JNI_EDETACHED   (-2) /* thread detached from the VM */
#define JNI_EVERSION   (-3) /* JNI version error */
#define JNI_ENOMEM   (-4) /* not enough memory */
#define JNI_EEXIST   (-5) /* VM already created */
#define JNI_EINVAL   (-6) /* invalid arguments */
#define JNI_COMMIT   1
#define JNI_ABORT   2
#define JDK1_2
#define _JNI_IMPORT_OR_EXPORT_   JNIIMPORT
#define JNI_VERSION_1_1   0x00010001
#define JNI_VERSION_1_2   0x00010002

Typedefs

typedef unsigned char jboolean
typedef unsigned short jchar
typedef short jshort
typedef float jfloat
typedef double jdouble
typedef jint jsize
typedef struct _jobject * jobject
typedef jobject jclass
typedef jobject jthrowable
typedef jobject jstring
typedef jobject jarray
typedef jarray jbooleanArray
typedef jarray jbyteArray
typedef jarray jcharArray
typedef jarray jshortArray
typedef jarray jintArray
typedef jarray jlongArray
typedef jarray jfloatArray
typedef jarray jdoubleArray
typedef jarray jobjectArray
typedef jobject jweak
typedef union jvalue jvalue
typedef struct _jfieldID * jfieldID
typedef struct _jmethodID * jmethodID
typedef struct
JNINativeInterface_
JNIEnv
typedef struct
JNIInvokeInterface_
JavaVM
typedef struct JavaVMOption JavaVMOption
typedef struct JavaVMInitArgs JavaVMInitArgs
typedef struct JavaVMAttachArgs JavaVMAttachArgs
typedef struct JDK1_1InitArgs JDK1_1InitArgs
typedef struct JDK1_1AttachArgs JDK1_1AttachArgs

Functions

_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs (void *args)
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM (JavaVM **pvm, void **penv, void *args)
_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetCreatedJavaVMs (JavaVM **, jsize, jsize *)
JNIEXPORT jint JNICALL JNI_OnLoad (JavaVM *vm, void *reserved)
JNIEXPORT void JNICALL JNI_OnUnload (JavaVM *vm, void *reserved)

Class Documentation

union jvalue

Definition at line 128 of file jni.h.

Class Members
jbyte b
jchar c
jdouble d
jfloat f
jint i
jlong j
jobject l
jshort s
jboolean z
struct JNINativeMethod

Definition at line 172 of file jni.h.

Class Members
void * fnPtr
char * name
char * signature
struct JNIEnv_

Definition at line 729 of file jni.h.

Collaboration diagram for JNIEnv_:
Class Members
struct JNINativeInterface_ * functions
void * reserved0
void * reserved1
struct JavaVMOption

Definition at line 1842 of file jni.h.

Class Members
void * extraInfo
char * optionString
struct JavaVMInitArgs

Definition at line 1847 of file jni.h.

Collaboration diagram for JavaVMInitArgs:
Class Members
jboolean ignoreUnrecognized
jint nOptions
JavaVMOption * options
jint version
struct JavaVMAttachArgs

Definition at line 1855 of file jni.h.

Class Members
jobject group
char * name
jint version
struct JDK1_1AttachArgs

Definition at line 1764 of file jni.h.

Class Members
void * __padding
struct JavaVM_

Definition at line 1783 of file jni.h.

Collaboration diagram for JavaVM_:
Class Members
struct JNIInvokeInterface_ * functions
void * reserved0
void * reserved1
void * reserved2

Define Documentation

Definition at line 1941 of file jni.h.

Definition at line 1892 of file jni.h.

#define JNI_ABORT   2

Definition at line 168 of file jni.h.

#define JNI_COMMIT   1

Definition at line 167 of file jni.h.

#define JNI_EDETACHED   (-2) /* thread detached from the VM */

Definition at line 157 of file jni.h.

#define JNI_EEXIST   (-5) /* VM already created */

Definition at line 160 of file jni.h.

#define JNI_EINVAL   (-6) /* invalid arguments */

Definition at line 161 of file jni.h.

#define JNI_ENOMEM   (-4) /* not enough memory */

Definition at line 159 of file jni.h.

#define JNI_ERR   (-1) /* unknown error */

Definition at line 156 of file jni.h.

#define JNI_EVERSION   (-3) /* JNI version error */

Definition at line 158 of file jni.h.

#define JNI_FALSE   0

Definition at line 148 of file jni.h.

#define JNI_OK   0 /* success */

Definition at line 155 of file jni.h.

#define JNI_TRUE   1

Definition at line 149 of file jni.h.

#define JNI_VERSION_1_1   0x00010001

Definition at line 1959 of file jni.h.

#define JNI_VERSION_1_2   0x00010002

Definition at line 1960 of file jni.h.


Typedef Documentation

typedef jobject jarray

Definition at line 109 of file jni.h.

typedef struct JNIInvokeInterface_* JavaVM

Definition at line 206 of file jni.h.

typedef struct JavaVMOption JavaVMOption
typedef unsigned char jboolean

Definition at line 61 of file jni.h.

Definition at line 110 of file jni.h.

typedef jarray jbyteArray

Definition at line 111 of file jni.h.

typedef unsigned short jchar

Definition at line 62 of file jni.h.

typedef jarray jcharArray

Definition at line 112 of file jni.h.

typedef jobject jclass

Definition at line 106 of file jni.h.

typedef double jdouble

Definition at line 65 of file jni.h.

Definition at line 117 of file jni.h.

typedef struct _jfieldID* jfieldID

Definition at line 137 of file jni.h.

typedef float jfloat

Definition at line 64 of file jni.h.

Definition at line 116 of file jni.h.

typedef jarray jintArray

Definition at line 114 of file jni.h.

typedef jarray jlongArray

Definition at line 115 of file jni.h.

typedef struct _jmethodID* jmethodID

Definition at line 140 of file jni.h.

typedef struct JNINativeInterface_* JNIEnv

Definition at line 192 of file jni.h.

typedef struct _jobject* jobject

Definition at line 105 of file jni.h.

Definition at line 118 of file jni.h.

typedef short jshort

Definition at line 63 of file jni.h.

Definition at line 113 of file jni.h.

typedef jint jsize

Definition at line 67 of file jni.h.

typedef jobject jstring

Definition at line 108 of file jni.h.

Definition at line 107 of file jni.h.

typedef union jvalue jvalue
typedef jobject jweak

Definition at line 122 of file jni.h.


Function Documentation

_JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM ( JavaVM **  pvm,
void **  penv,
void args 
)

Definition at line 112 of file JavaVMFramework.cpp.

{
#if DEBUG
    kprintf("_JNI_CreateJavaVM = 0x%08X\n", _JNI_CreateJavaVM);
#endif
    if (_JNI_CreateJavaVM) return _JNI_CreateJavaVM(pvm, penv, args);
    return -1;
}

Definition at line 99 of file JavaVMFramework.cpp.

{
#if DEBUG
    kprintf("_JNI_GetDefaultJavaVMInitArgs = 0x%08X\n", _JNI_GetDefaultJavaVMInitArgs);
#endif
    if (_JNI_GetDefaultJavaVMInitArgs) return _JNI_GetDefaultJavaVMInitArgs(args);
    return -1;
}
JNIEXPORT jint JNICALL JNI_OnLoad ( JavaVM vm,
void reserved 
)

Definition at line 54 of file nsJavaXPCOMGlue.cpp.

{
  // Let the JVM know that we are using JDK 1.2 JNI features.
  return JNI_VERSION_1_2;
}
JNIEXPORT void JNICALL JNI_OnUnload ( JavaVM vm,
void reserved 
)

Definition at line 61 of file nsJavaXPCOMGlue.cpp.

{
}