harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r488244 [3/5] - in /harmony/enhanced/classlib/trunk/modules/luni: ./ src/main/native/include/shared/
Date Mon, 18 Dec 2006 11:53:32 GMT
Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/jni_types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/jni_types.h?view=auto&rev=488244
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/jni_types.h
(added)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/jni_types.h
Mon Dec 18 03:53:30 2006
@@ -0,0 +1,156 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Intel, Gregory Shimansky
+ * @version $Revision: 1.1.2.1.4.3 $
+ */  
+
+#ifndef _JNI_TYPES_H_
+#define _JNI_TYPES_H_
+
+/*
+ * @file JNI types used for OPEN interface
+ */
+
+#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
+
+#define JNIEXPORT __declspec(dllexport)
+#define JNIIMPORT __declspec(dllimport)
+#define JNICALL __stdcall
+
+typedef signed __int64 jlong;
+
+#else
+
+#define JNIEXPORT 
+#define JNIIMPORT
+#define JNICALL
+
+typedef signed long long jlong; 
+
+#endif
+
+/*
+ * Primitive types
+ */
+typedef unsigned char jboolean;
+typedef signed char jbyte;
+typedef unsigned short jchar;
+typedef signed short jshort;
+typedef signed int jint;
+typedef float jfloat;
+typedef double jdouble;
+typedef jint jsize;
+
+/*
+ * Java types
+ */
+struct _jobject;
+typedef struct _jobject*  jobject;
+typedef jobject           jclass;
+typedef jobject           jstring;
+typedef jobject           jarray;
+    typedef jarray        jobjectArray;
+    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 jobject           jthrowable;
+typedef jobject           jweak;
+
+typedef union jvalue {
+    jboolean z;
+    jbyte    b;
+    jchar    c;
+    jshort   s;
+    jint     i;
+    jlong    j;
+    jfloat   f;
+    jdouble  d;
+    jobject  l;
+} jvalue;
+
+struct _jfieldID;
+typedef struct _jfieldID* jfieldID;
+struct _jmethodID;
+typedef struct _jmethodID* jmethodID;
+
+/*
+ * Constants
+ */
+
+/*
+ * Boolean constants
+ */
+#define JNI_FALSE  0
+#define JNI_TRUE   1
+
+/*
+ * Return values
+ */
+#define JNI_OK     0
+#define JNI_ERR    (-1)
+#define JNI_EDETACHED (-2)
+#define JNI_EVERSION  (-3)
+#define JNI_ENOMEM    (-4)
+#define JNI_EEXIST    (-5)
+#define JNI_EINVAL    (-6)
+
+/*
+ * Release modes for working with arrays.
+ */
+#define JNI_COMMIT 1
+#define JNI_ABORT  2
+
+/*
+ * Used as a generic pointer to a function.
+ */ 
+typedef struct {
+    char *name;
+    char *signature;
+    void *fnPtr;
+} JNINativeMethod;
+
+/*
+ * JNI Native Method Interface
+ */
+struct JNINativeInterface_;
+struct JNIEnv_External;
+
+#ifdef __cplusplus
+typedef JNIEnv_External JNIEnv;
+#else
+typedef const struct JNINativeInterface_ *JNIEnv;
+#endif
+
+/*
+ * JNI Invocation Interface
+ */
+struct JNIInvokeInterface_;
+struct JavaVM_External;
+
+#ifdef __cplusplus
+typedef JavaVM_External JavaVM;
+#else
+typedef const struct JNIInvokeInterface_ *JavaVM;
+#endif
+
+#endif /* _JNI_TYPES_H_ */

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/jni_types.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message