* src/native/jni.h: Removed.
[cacao.git] / src / native / jni.hpp
1 /* src/native/jni.hpp - JNI types and data structures
2
3    Copyright (C) 1996-2005, 2006, 2007, 2008
4    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
5
6    This file is part of CACAO.
7
8    This program is free software; you can redistribute it and/or
9    modify it under the terms of the GNU General Public License as
10    published by the Free Software Foundation; either version 2, or (at
11    your option) any later version.
12
13    This program is distributed in the hope that it will be useful, but
14    WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16    General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21    02110-1301, USA.
22
23 */
24
25
26 /* jni.h ***********************************************************************
27
28    ATTENTION: We include this file before we actually define our own
29    jni.h.  We do this because otherwise we can get into unresolvable
30    circular header dependencies.
31
32    GNU Classpath's headers define:
33
34    #define __CLASSPATH_JNI_MD_H__
35    #define _CLASSPATH_JNI_H
36
37    and jni.h uses:
38
39    _CLASSPATH_VM_JNI_TYPES_DEFINED
40    
41    OpenJDK's headers define:
42
43    #define _JAVASOFT_JNI_MD_H_
44    #define _JAVASOFT_JNI_H_
45
46    and jni.h uses:
47
48    JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H
49
50    CLASSPATH_JNI_MD_H and CLASSPATH_JNI_H are defined in config.h.
51
52 *******************************************************************************/
53
54 #include "config.h"
55
56 /* We include both headers with the absolute path so we can be sure
57    that the preprocessor does not take another header.  Furthermore we
58    include jni_md.h before jni.h as the latter includes the former. */
59
60 #include INCLUDE_JNI_MD_H
61 #include INCLUDE_JNI_H
62
63 #ifndef _JNI_HPP
64 #define _JNI_HPP
65
66 #include <stdint.h>
67
68 #include "vm/global.h"
69
70
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74
75 /* CACAO related stuff ********************************************************/
76
77 extern const struct JNIInvokeInterface_ _Jv_JNIInvokeInterface;
78 extern struct JNINativeInterface_ _Jv_JNINativeInterface;
79
80
81 /* hashtable_global_ref_entry *************************************************/
82
83 typedef struct hashtable_global_ref_entry hashtable_global_ref_entry;
84
85 struct hashtable_global_ref_entry {
86         java_object_t              *o;      /* object pointer of global ref       */
87         int32_t                     refs;   /* references of the current pointer  */
88         hashtable_global_ref_entry *hashlink; /* link for external chaining       */
89 };
90
91
92 /* function prototypes ********************************************************/
93
94 bool jni_init(void);
95 bool jni_version_check(int version);
96
97 #ifdef __cplusplus
98 }
99 #endif
100
101 #endif // _JNI_HPP
102
103
104 /*
105  * These are local overrides for various environment variables in Emacs.
106  * Please do not remove this and leave it at the end of the file, where
107  * Emacs will automagically detect them.
108  * ---------------------------------------------------------------------
109  * Local variables:
110  * mode: c++
111  * indent-tabs-mode: t
112  * c-basic-offset: 4
113  * tab-width: 4
114  * End:
115  * vim:noexpandtab:sw=4:ts=4:
116  */