1 #include "xmlvm.h"
2 #include "java_io_FileDescriptor.h"
3
4 #include "org_apache_harmony_luni_platform_IFileSystem.h"
5
6 __TIB_DEFINITION_org_apache_harmony_luni_platform_IFileSystem __TIB_org_apache_harmony_luni_platform_IFileSystem = {
7 0, // classInitializationBegan
8 0, // classInitialized
9 -1, // initializerThreadId
10 __INIT_org_apache_harmony_luni_platform_IFileSystem, // classInitializer
11 "org.apache.harmony.luni.platform.IFileSystem", // className
12 "org.apache.harmony.luni.platform", // package
13 JAVA_NULL, // enclosingClassName
14 JAVA_NULL, // enclosingMethodName
15 JAVA_NULL, // signature
16 (__TIB_DEFINITION_TEMPLATE*) &__TIB_java_lang_Object, // extends
17 -1, // sizeInstance
18 XMLVM_TYPE_INTERFACE};
19
20 JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IFileSystem;
21 JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IFileSystem_1ARRAY;
22 JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IFileSystem_2ARRAY;
23 JAVA_OBJECT __CLASS_org_apache_harmony_luni_platform_IFileSystem_3ARRAY;
24 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_SHARED_LOCK_TYPE;
25 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_EXCLUSIVE_LOCK_TYPE;
26 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_SET;
27 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_CUR;
28 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_END;
29 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDONLY;
30 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_WRONLY;
31 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWR;
32 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWRSYNC;
33 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_APPEND;
34 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_CREAT;
35 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_EXCL;
36 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NOCTTY;
37 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NONBLOCK;
38 static JAVA_INT _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_TRUNC;
39
40 static XMLVM_FIELD_REFLECTION_DATA __field_reflection_data[] = {
41 };
42
43 static XMLVM_METHOD_REFLECTION_DATA __method_reflection_data[] = {
44 };
45
__INIT_org_apache_harmony_luni_platform_IFileSystem()46 void __INIT_org_apache_harmony_luni_platform_IFileSystem()
47 {
48 staticInitializerLock(&__TIB_org_apache_harmony_luni_platform_IFileSystem);
49
50 // While the static initializer mutex is locked, locally store the value of
51 // whether class initialization began or not
52 int initBegan = __TIB_org_apache_harmony_luni_platform_IFileSystem.classInitializationBegan;
53
54 // Whether or not class initialization had already began, it has begun now
55 __TIB_org_apache_harmony_luni_platform_IFileSystem.classInitializationBegan = 1;
56
57 staticInitializerUnlock(&__TIB_org_apache_harmony_luni_platform_IFileSystem);
58
59 JAVA_LONG curThreadId = (JAVA_LONG)pthread_self();
60 if (initBegan) {
61 if (__TIB_org_apache_harmony_luni_platform_IFileSystem.initializerThreadId != curThreadId) {
62 // Busy wait until the other thread finishes initializing this class
63 while (!__TIB_org_apache_harmony_luni_platform_IFileSystem.classInitialized) {
64 // do nothing
65 }
66 }
67 } else {
68 __TIB_org_apache_harmony_luni_platform_IFileSystem.initializerThreadId = curThreadId;
69 XMLVM_CLASS_USED("org.apache.harmony.luni.platform.IFileSystem")
70 __INIT_IMPL_org_apache_harmony_luni_platform_IFileSystem();
71 }
72 }
73
__INIT_IMPL_org_apache_harmony_luni_platform_IFileSystem()74 void __INIT_IMPL_org_apache_harmony_luni_platform_IFileSystem()
75 {
76 __TIB_org_apache_harmony_luni_platform_IFileSystem.numInterfaces = 0;
77 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SHARED_LOCK_TYPE = 1;
78 _STATIC_org_apache_harmony_luni_platform_IFileSystem_EXCLUSIVE_LOCK_TYPE = 2;
79 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_SET = 1;
80 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_CUR = 2;
81 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_END = 4;
82 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDONLY = 0;
83 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_WRONLY = 1;
84 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWR = 16;
85 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWRSYNC = 32;
86 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_APPEND = 256;
87 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_CREAT = 4096;
88 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_EXCL = 65536;
89 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NOCTTY = 1048576;
90 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NONBLOCK = 16777216;
91 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_TRUNC = 268435456;
92 __TIB_org_apache_harmony_luni_platform_IFileSystem.declaredFields = &__field_reflection_data[0];
93 __TIB_org_apache_harmony_luni_platform_IFileSystem.numDeclaredFields = sizeof(__field_reflection_data) / sizeof(XMLVM_FIELD_REFLECTION_DATA);
94 //__TIB_org_apache_harmony_luni_platform_IFileSystem.methodDispatcherFunc = method_dispatcher;
95 __TIB_org_apache_harmony_luni_platform_IFileSystem.declaredMethods = &__method_reflection_data[0];
96 __TIB_org_apache_harmony_luni_platform_IFileSystem.numDeclaredMethods = sizeof(__method_reflection_data) / sizeof(XMLVM_METHOD_REFLECTION_DATA);
97
98 __CLASS_org_apache_harmony_luni_platform_IFileSystem = XMLVM_CREATE_CLASS_OBJECT(&__TIB_org_apache_harmony_luni_platform_IFileSystem);
99 __TIB_org_apache_harmony_luni_platform_IFileSystem.clazz = __CLASS_org_apache_harmony_luni_platform_IFileSystem;
100 __TIB_org_apache_harmony_luni_platform_IFileSystem.baseType = JAVA_NULL;
101 __CLASS_org_apache_harmony_luni_platform_IFileSystem_1ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_apache_harmony_luni_platform_IFileSystem);
102 __CLASS_org_apache_harmony_luni_platform_IFileSystem_2ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_apache_harmony_luni_platform_IFileSystem_1ARRAY);
103 __CLASS_org_apache_harmony_luni_platform_IFileSystem_3ARRAY = XMLVM_CREATE_ARRAY_CLASS_OBJECT(__CLASS_org_apache_harmony_luni_platform_IFileSystem_2ARRAY);
104
105 __TIB_org_apache_harmony_luni_platform_IFileSystem.classInitialized = 1;
106 }
107
org_apache_harmony_luni_platform_IFileSystem_GET_SHARED_LOCK_TYPE()108 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_SHARED_LOCK_TYPE()
109 {
110 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
111 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_SHARED_LOCK_TYPE;
112 }
113
org_apache_harmony_luni_platform_IFileSystem_PUT_SHARED_LOCK_TYPE(JAVA_INT v)114 void org_apache_harmony_luni_platform_IFileSystem_PUT_SHARED_LOCK_TYPE(JAVA_INT v)
115 {
116 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SHARED_LOCK_TYPE = v;
117 }
118
org_apache_harmony_luni_platform_IFileSystem_GET_EXCLUSIVE_LOCK_TYPE()119 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_EXCLUSIVE_LOCK_TYPE()
120 {
121 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
122 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_EXCLUSIVE_LOCK_TYPE;
123 }
124
org_apache_harmony_luni_platform_IFileSystem_PUT_EXCLUSIVE_LOCK_TYPE(JAVA_INT v)125 void org_apache_harmony_luni_platform_IFileSystem_PUT_EXCLUSIVE_LOCK_TYPE(JAVA_INT v)
126 {
127 _STATIC_org_apache_harmony_luni_platform_IFileSystem_EXCLUSIVE_LOCK_TYPE = v;
128 }
129
org_apache_harmony_luni_platform_IFileSystem_GET_SEEK_SET()130 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_SEEK_SET()
131 {
132 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
133 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_SET;
134 }
135
org_apache_harmony_luni_platform_IFileSystem_PUT_SEEK_SET(JAVA_INT v)136 void org_apache_harmony_luni_platform_IFileSystem_PUT_SEEK_SET(JAVA_INT v)
137 {
138 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_SET = v;
139 }
140
org_apache_harmony_luni_platform_IFileSystem_GET_SEEK_CUR()141 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_SEEK_CUR()
142 {
143 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
144 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_CUR;
145 }
146
org_apache_harmony_luni_platform_IFileSystem_PUT_SEEK_CUR(JAVA_INT v)147 void org_apache_harmony_luni_platform_IFileSystem_PUT_SEEK_CUR(JAVA_INT v)
148 {
149 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_CUR = v;
150 }
151
org_apache_harmony_luni_platform_IFileSystem_GET_SEEK_END()152 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_SEEK_END()
153 {
154 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
155 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_END;
156 }
157
org_apache_harmony_luni_platform_IFileSystem_PUT_SEEK_END(JAVA_INT v)158 void org_apache_harmony_luni_platform_IFileSystem_PUT_SEEK_END(JAVA_INT v)
159 {
160 _STATIC_org_apache_harmony_luni_platform_IFileSystem_SEEK_END = v;
161 }
162
org_apache_harmony_luni_platform_IFileSystem_GET_O_RDONLY()163 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_RDONLY()
164 {
165 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
166 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDONLY;
167 }
168
org_apache_harmony_luni_platform_IFileSystem_PUT_O_RDONLY(JAVA_INT v)169 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_RDONLY(JAVA_INT v)
170 {
171 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDONLY = v;
172 }
173
org_apache_harmony_luni_platform_IFileSystem_GET_O_WRONLY()174 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_WRONLY()
175 {
176 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
177 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_WRONLY;
178 }
179
org_apache_harmony_luni_platform_IFileSystem_PUT_O_WRONLY(JAVA_INT v)180 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_WRONLY(JAVA_INT v)
181 {
182 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_WRONLY = v;
183 }
184
org_apache_harmony_luni_platform_IFileSystem_GET_O_RDWR()185 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_RDWR()
186 {
187 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
188 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWR;
189 }
190
org_apache_harmony_luni_platform_IFileSystem_PUT_O_RDWR(JAVA_INT v)191 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_RDWR(JAVA_INT v)
192 {
193 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWR = v;
194 }
195
org_apache_harmony_luni_platform_IFileSystem_GET_O_RDWRSYNC()196 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_RDWRSYNC()
197 {
198 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
199 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWRSYNC;
200 }
201
org_apache_harmony_luni_platform_IFileSystem_PUT_O_RDWRSYNC(JAVA_INT v)202 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_RDWRSYNC(JAVA_INT v)
203 {
204 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_RDWRSYNC = v;
205 }
206
org_apache_harmony_luni_platform_IFileSystem_GET_O_APPEND()207 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_APPEND()
208 {
209 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
210 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_APPEND;
211 }
212
org_apache_harmony_luni_platform_IFileSystem_PUT_O_APPEND(JAVA_INT v)213 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_APPEND(JAVA_INT v)
214 {
215 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_APPEND = v;
216 }
217
org_apache_harmony_luni_platform_IFileSystem_GET_O_CREAT()218 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_CREAT()
219 {
220 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
221 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_CREAT;
222 }
223
org_apache_harmony_luni_platform_IFileSystem_PUT_O_CREAT(JAVA_INT v)224 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_CREAT(JAVA_INT v)
225 {
226 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_CREAT = v;
227 }
228
org_apache_harmony_luni_platform_IFileSystem_GET_O_EXCL()229 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_EXCL()
230 {
231 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
232 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_EXCL;
233 }
234
org_apache_harmony_luni_platform_IFileSystem_PUT_O_EXCL(JAVA_INT v)235 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_EXCL(JAVA_INT v)
236 {
237 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_EXCL = v;
238 }
239
org_apache_harmony_luni_platform_IFileSystem_GET_O_NOCTTY()240 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_NOCTTY()
241 {
242 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
243 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NOCTTY;
244 }
245
org_apache_harmony_luni_platform_IFileSystem_PUT_O_NOCTTY(JAVA_INT v)246 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_NOCTTY(JAVA_INT v)
247 {
248 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NOCTTY = v;
249 }
250
org_apache_harmony_luni_platform_IFileSystem_GET_O_NONBLOCK()251 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_NONBLOCK()
252 {
253 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
254 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NONBLOCK;
255 }
256
org_apache_harmony_luni_platform_IFileSystem_PUT_O_NONBLOCK(JAVA_INT v)257 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_NONBLOCK(JAVA_INT v)
258 {
259 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_NONBLOCK = v;
260 }
261
org_apache_harmony_luni_platform_IFileSystem_GET_O_TRUNC()262 JAVA_INT org_apache_harmony_luni_platform_IFileSystem_GET_O_TRUNC()
263 {
264 XMLVM_CLASS_INIT(org_apache_harmony_luni_platform_IFileSystem)
265 return _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_TRUNC;
266 }
267
org_apache_harmony_luni_platform_IFileSystem_PUT_O_TRUNC(JAVA_INT v)268 void org_apache_harmony_luni_platform_IFileSystem_PUT_O_TRUNC(JAVA_INT v)
269 {
270 _STATIC_org_apache_harmony_luni_platform_IFileSystem_O_TRUNC = v;
271 }
272
273