OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file is autogenerated by | 5 // This file is autogenerated by |
6 // base/android/jni_generator/jni_generator.py | 6 // base/android/jni_generator/jni_generator.py |
7 // For | 7 // For |
8 // java/io/InputStream | 8 // java/io/InputStream |
9 | 9 |
10 #ifndef java_io_InputStream_JNI | 10 #ifndef java_io_InputStream_JNI |
(...skipping 15 matching lines...) Expand all Loading... |
26 } // namespace | 26 } // namespace |
27 | 27 |
28 namespace JNI_InputStream { | 28 namespace JNI_InputStream { |
29 | 29 |
30 // Step 2: method stubs. | 30 // Step 2: method stubs. |
31 | 31 |
32 static base::subtle::AtomicWord g_InputStream_available = 0; | 32 static base::subtle::AtomicWord g_InputStream_available = 0; |
33 static jint Java_InputStream_available(JNIEnv* env, jobject obj) __attribute__ | 33 static jint Java_InputStream_available(JNIEnv* env, jobject obj) __attribute__ |
34 ((unused)); | 34 ((unused)); |
35 static jint Java_InputStream_available(JNIEnv* env, jobject obj) { | 35 static jint Java_InputStream_available(JNIEnv* env, jobject obj) { |
36 /* Must call RegisterNativesImpl() */ | |
37 CHECK_CLAZZ(env, obj, | 36 CHECK_CLAZZ(env, obj, |
38 InputStream_clazz(env), 0); | 37 InputStream_clazz(env), 0); |
39 jmethodID method_id = | 38 jmethodID method_id = |
40 base::android::MethodID::LazyGet< | 39 base::android::MethodID::LazyGet< |
41 base::android::MethodID::TYPE_INSTANCE>( | 40 base::android::MethodID::TYPE_INSTANCE>( |
42 env, InputStream_clazz(env), | 41 env, InputStream_clazz(env), |
43 "available", | 42 "available", |
44 "()I", | 43 "()I", |
45 &g_InputStream_available); | 44 &g_InputStream_available); |
46 | 45 |
47 jint ret = | 46 jint ret = |
48 env->CallIntMethod(obj, | 47 env->CallIntMethod(obj, |
49 method_id); | 48 method_id); |
50 jni_generator::CheckException(env); | 49 jni_generator::CheckException(env); |
51 return ret; | 50 return ret; |
52 } | 51 } |
53 | 52 |
54 static base::subtle::AtomicWord g_InputStream_close = 0; | 53 static base::subtle::AtomicWord g_InputStream_close = 0; |
55 static void Java_InputStream_close(JNIEnv* env, jobject obj) __attribute__ | 54 static void Java_InputStream_close(JNIEnv* env, jobject obj) __attribute__ |
56 ((unused)); | 55 ((unused)); |
57 static void Java_InputStream_close(JNIEnv* env, jobject obj) { | 56 static void Java_InputStream_close(JNIEnv* env, jobject obj) { |
58 /* Must call RegisterNativesImpl() */ | |
59 CHECK_CLAZZ(env, obj, | 57 CHECK_CLAZZ(env, obj, |
60 InputStream_clazz(env)); | 58 InputStream_clazz(env)); |
61 jmethodID method_id = | 59 jmethodID method_id = |
62 base::android::MethodID::LazyGet< | 60 base::android::MethodID::LazyGet< |
63 base::android::MethodID::TYPE_INSTANCE>( | 61 base::android::MethodID::TYPE_INSTANCE>( |
64 env, InputStream_clazz(env), | 62 env, InputStream_clazz(env), |
65 "close", | 63 "close", |
66 "()V", | 64 "()V", |
67 &g_InputStream_close); | 65 &g_InputStream_close); |
68 | 66 |
69 env->CallVoidMethod(obj, | 67 env->CallVoidMethod(obj, |
70 method_id); | 68 method_id); |
71 jni_generator::CheckException(env); | 69 jni_generator::CheckException(env); |
72 | 70 |
73 } | 71 } |
74 | 72 |
75 static base::subtle::AtomicWord g_InputStream_mark = 0; | 73 static base::subtle::AtomicWord g_InputStream_mark = 0; |
76 static void Java_InputStream_mark(JNIEnv* env, jobject obj, JniIntWrapper p0) | 74 static void Java_InputStream_mark(JNIEnv* env, jobject obj, JniIntWrapper p0) |
77 __attribute__ ((unused)); | 75 __attribute__ ((unused)); |
78 static void Java_InputStream_mark(JNIEnv* env, jobject obj, JniIntWrapper p0) { | 76 static void Java_InputStream_mark(JNIEnv* env, jobject obj, JniIntWrapper p0) { |
79 /* Must call RegisterNativesImpl() */ | |
80 CHECK_CLAZZ(env, obj, | 77 CHECK_CLAZZ(env, obj, |
81 InputStream_clazz(env)); | 78 InputStream_clazz(env)); |
82 jmethodID method_id = | 79 jmethodID method_id = |
83 base::android::MethodID::LazyGet< | 80 base::android::MethodID::LazyGet< |
84 base::android::MethodID::TYPE_INSTANCE>( | 81 base::android::MethodID::TYPE_INSTANCE>( |
85 env, InputStream_clazz(env), | 82 env, InputStream_clazz(env), |
86 "mark", | 83 "mark", |
87 "(I)V", | 84 "(I)V", |
88 &g_InputStream_mark); | 85 &g_InputStream_mark); |
89 | 86 |
90 env->CallVoidMethod(obj, | 87 env->CallVoidMethod(obj, |
91 method_id, as_jint(p0)); | 88 method_id, as_jint(p0)); |
92 jni_generator::CheckException(env); | 89 jni_generator::CheckException(env); |
93 | 90 |
94 } | 91 } |
95 | 92 |
96 static base::subtle::AtomicWord g_InputStream_markSupported = 0; | 93 static base::subtle::AtomicWord g_InputStream_markSupported = 0; |
97 static jboolean Java_InputStream_markSupported(JNIEnv* env, jobject obj) | 94 static jboolean Java_InputStream_markSupported(JNIEnv* env, jobject obj) |
98 __attribute__ ((unused)); | 95 __attribute__ ((unused)); |
99 static jboolean Java_InputStream_markSupported(JNIEnv* env, jobject obj) { | 96 static jboolean Java_InputStream_markSupported(JNIEnv* env, jobject obj) { |
100 /* Must call RegisterNativesImpl() */ | |
101 CHECK_CLAZZ(env, obj, | 97 CHECK_CLAZZ(env, obj, |
102 InputStream_clazz(env), false); | 98 InputStream_clazz(env), false); |
103 jmethodID method_id = | 99 jmethodID method_id = |
104 base::android::MethodID::LazyGet< | 100 base::android::MethodID::LazyGet< |
105 base::android::MethodID::TYPE_INSTANCE>( | 101 base::android::MethodID::TYPE_INSTANCE>( |
106 env, InputStream_clazz(env), | 102 env, InputStream_clazz(env), |
107 "markSupported", | 103 "markSupported", |
108 "()Z", | 104 "()Z", |
109 &g_InputStream_markSupported); | 105 &g_InputStream_markSupported); |
110 | 106 |
111 jboolean ret = | 107 jboolean ret = |
112 env->CallBooleanMethod(obj, | 108 env->CallBooleanMethod(obj, |
113 method_id); | 109 method_id); |
114 jni_generator::CheckException(env); | 110 jni_generator::CheckException(env); |
115 return ret; | 111 return ret; |
116 } | 112 } |
117 | 113 |
118 static base::subtle::AtomicWord g_InputStream_readI = 0; | 114 static base::subtle::AtomicWord g_InputStream_readI = 0; |
119 static jint Java_InputStream_readI(JNIEnv* env, jobject obj) __attribute__ | 115 static jint Java_InputStream_readI(JNIEnv* env, jobject obj) __attribute__ |
120 ((unused)); | 116 ((unused)); |
121 static jint Java_InputStream_readI(JNIEnv* env, jobject obj) { | 117 static jint Java_InputStream_readI(JNIEnv* env, jobject obj) { |
122 /* Must call RegisterNativesImpl() */ | |
123 CHECK_CLAZZ(env, obj, | 118 CHECK_CLAZZ(env, obj, |
124 InputStream_clazz(env), 0); | 119 InputStream_clazz(env), 0); |
125 jmethodID method_id = | 120 jmethodID method_id = |
126 base::android::MethodID::LazyGet< | 121 base::android::MethodID::LazyGet< |
127 base::android::MethodID::TYPE_INSTANCE>( | 122 base::android::MethodID::TYPE_INSTANCE>( |
128 env, InputStream_clazz(env), | 123 env, InputStream_clazz(env), |
129 "read", | 124 "read", |
130 "()I", | 125 "()I", |
131 &g_InputStream_readI); | 126 &g_InputStream_readI); |
132 | 127 |
133 jint ret = | 128 jint ret = |
134 env->CallIntMethod(obj, | 129 env->CallIntMethod(obj, |
135 method_id); | 130 method_id); |
136 jni_generator::CheckException(env); | 131 jni_generator::CheckException(env); |
137 return ret; | 132 return ret; |
138 } | 133 } |
139 | 134 |
140 static base::subtle::AtomicWord g_InputStream_readI_AB = 0; | 135 static base::subtle::AtomicWord g_InputStream_readI_AB = 0; |
141 static jint Java_InputStream_readI_AB(JNIEnv* env, jobject obj, jbyteArray p0) | 136 static jint Java_InputStream_readI_AB(JNIEnv* env, jobject obj, jbyteArray p0) |
142 __attribute__ ((unused)); | 137 __attribute__ ((unused)); |
143 static jint Java_InputStream_readI_AB(JNIEnv* env, jobject obj, jbyteArray p0) { | 138 static jint Java_InputStream_readI_AB(JNIEnv* env, jobject obj, jbyteArray p0) { |
144 /* Must call RegisterNativesImpl() */ | |
145 CHECK_CLAZZ(env, obj, | 139 CHECK_CLAZZ(env, obj, |
146 InputStream_clazz(env), 0); | 140 InputStream_clazz(env), 0); |
147 jmethodID method_id = | 141 jmethodID method_id = |
148 base::android::MethodID::LazyGet< | 142 base::android::MethodID::LazyGet< |
149 base::android::MethodID::TYPE_INSTANCE>( | 143 base::android::MethodID::TYPE_INSTANCE>( |
150 env, InputStream_clazz(env), | 144 env, InputStream_clazz(env), |
151 "read", | 145 "read", |
152 "([B)I", | 146 "([B)I", |
153 &g_InputStream_readI_AB); | 147 &g_InputStream_readI_AB); |
154 | 148 |
155 jint ret = | 149 jint ret = |
156 env->CallIntMethod(obj, | 150 env->CallIntMethod(obj, |
157 method_id, p0); | 151 method_id, p0); |
158 jni_generator::CheckException(env); | 152 jni_generator::CheckException(env); |
159 return ret; | 153 return ret; |
160 } | 154 } |
161 | 155 |
162 static base::subtle::AtomicWord g_InputStream_readI_AB_I_I = 0; | 156 static base::subtle::AtomicWord g_InputStream_readI_AB_I_I = 0; |
163 static jint Java_InputStream_readI_AB_I_I(JNIEnv* env, jobject obj, jbyteArray | 157 static jint Java_InputStream_readI_AB_I_I(JNIEnv* env, jobject obj, jbyteArray |
164 p0, | 158 p0, |
165 JniIntWrapper p1, | 159 JniIntWrapper p1, |
166 JniIntWrapper p2) __attribute__ ((unused)); | 160 JniIntWrapper p2) __attribute__ ((unused)); |
167 static jint Java_InputStream_readI_AB_I_I(JNIEnv* env, jobject obj, jbyteArray | 161 static jint Java_InputStream_readI_AB_I_I(JNIEnv* env, jobject obj, jbyteArray |
168 p0, | 162 p0, |
169 JniIntWrapper p1, | 163 JniIntWrapper p1, |
170 JniIntWrapper p2) { | 164 JniIntWrapper p2) { |
171 /* Must call RegisterNativesImpl() */ | |
172 CHECK_CLAZZ(env, obj, | 165 CHECK_CLAZZ(env, obj, |
173 InputStream_clazz(env), 0); | 166 InputStream_clazz(env), 0); |
174 jmethodID method_id = | 167 jmethodID method_id = |
175 base::android::MethodID::LazyGet< | 168 base::android::MethodID::LazyGet< |
176 base::android::MethodID::TYPE_INSTANCE>( | 169 base::android::MethodID::TYPE_INSTANCE>( |
177 env, InputStream_clazz(env), | 170 env, InputStream_clazz(env), |
178 "read", | 171 "read", |
179 "([BII)I", | 172 "([BII)I", |
180 &g_InputStream_readI_AB_I_I); | 173 &g_InputStream_readI_AB_I_I); |
181 | 174 |
182 jint ret = | 175 jint ret = |
183 env->CallIntMethod(obj, | 176 env->CallIntMethod(obj, |
184 method_id, p0, as_jint(p1), as_jint(p2)); | 177 method_id, p0, as_jint(p1), as_jint(p2)); |
185 jni_generator::CheckException(env); | 178 jni_generator::CheckException(env); |
186 return ret; | 179 return ret; |
187 } | 180 } |
188 | 181 |
189 static base::subtle::AtomicWord g_InputStream_reset = 0; | 182 static base::subtle::AtomicWord g_InputStream_reset = 0; |
190 static void Java_InputStream_reset(JNIEnv* env, jobject obj) __attribute__ | 183 static void Java_InputStream_reset(JNIEnv* env, jobject obj) __attribute__ |
191 ((unused)); | 184 ((unused)); |
192 static void Java_InputStream_reset(JNIEnv* env, jobject obj) { | 185 static void Java_InputStream_reset(JNIEnv* env, jobject obj) { |
193 /* Must call RegisterNativesImpl() */ | |
194 CHECK_CLAZZ(env, obj, | 186 CHECK_CLAZZ(env, obj, |
195 InputStream_clazz(env)); | 187 InputStream_clazz(env)); |
196 jmethodID method_id = | 188 jmethodID method_id = |
197 base::android::MethodID::LazyGet< | 189 base::android::MethodID::LazyGet< |
198 base::android::MethodID::TYPE_INSTANCE>( | 190 base::android::MethodID::TYPE_INSTANCE>( |
199 env, InputStream_clazz(env), | 191 env, InputStream_clazz(env), |
200 "reset", | 192 "reset", |
201 "()V", | 193 "()V", |
202 &g_InputStream_reset); | 194 &g_InputStream_reset); |
203 | 195 |
204 env->CallVoidMethod(obj, | 196 env->CallVoidMethod(obj, |
205 method_id); | 197 method_id); |
206 jni_generator::CheckException(env); | 198 jni_generator::CheckException(env); |
207 | 199 |
208 } | 200 } |
209 | 201 |
210 static base::subtle::AtomicWord g_InputStream_skip = 0; | 202 static base::subtle::AtomicWord g_InputStream_skip = 0; |
211 static jlong Java_InputStream_skip(JNIEnv* env, jobject obj, jlong p0) | 203 static jlong Java_InputStream_skip(JNIEnv* env, jobject obj, jlong p0) |
212 __attribute__ ((unused)); | 204 __attribute__ ((unused)); |
213 static jlong Java_InputStream_skip(JNIEnv* env, jobject obj, jlong p0) { | 205 static jlong Java_InputStream_skip(JNIEnv* env, jobject obj, jlong p0) { |
214 /* Must call RegisterNativesImpl() */ | |
215 CHECK_CLAZZ(env, obj, | 206 CHECK_CLAZZ(env, obj, |
216 InputStream_clazz(env), 0); | 207 InputStream_clazz(env), 0); |
217 jmethodID method_id = | 208 jmethodID method_id = |
218 base::android::MethodID::LazyGet< | 209 base::android::MethodID::LazyGet< |
219 base::android::MethodID::TYPE_INSTANCE>( | 210 base::android::MethodID::TYPE_INSTANCE>( |
220 env, InputStream_clazz(env), | 211 env, InputStream_clazz(env), |
221 "skip", | 212 "skip", |
222 "(J)J", | 213 "(J)J", |
223 &g_InputStream_skip); | 214 &g_InputStream_skip); |
224 | 215 |
225 jlong ret = | 216 jlong ret = |
226 env->CallLongMethod(obj, | 217 env->CallLongMethod(obj, |
227 method_id, p0); | 218 method_id, p0); |
228 jni_generator::CheckException(env); | 219 jni_generator::CheckException(env); |
229 return ret; | 220 return ret; |
230 } | 221 } |
231 | 222 |
232 static base::subtle::AtomicWord g_InputStream_Constructor = 0; | 223 static base::subtle::AtomicWord g_InputStream_Constructor = 0; |
233 static ScopedJavaLocalRef<jobject> Java_InputStream_Constructor(JNIEnv* env) | 224 static ScopedJavaLocalRef<jobject> Java_InputStream_Constructor(JNIEnv* env) |
234 __attribute__ ((unused)); | 225 __attribute__ ((unused)); |
235 static ScopedJavaLocalRef<jobject> Java_InputStream_Constructor(JNIEnv* env) { | 226 static ScopedJavaLocalRef<jobject> Java_InputStream_Constructor(JNIEnv* env) { |
236 /* Must call RegisterNativesImpl() */ | |
237 CHECK_CLAZZ(env, InputStream_clazz(env), | 227 CHECK_CLAZZ(env, InputStream_clazz(env), |
238 InputStream_clazz(env), NULL); | 228 InputStream_clazz(env), NULL); |
239 jmethodID method_id = | 229 jmethodID method_id = |
240 base::android::MethodID::LazyGet< | 230 base::android::MethodID::LazyGet< |
241 base::android::MethodID::TYPE_INSTANCE>( | 231 base::android::MethodID::TYPE_INSTANCE>( |
242 env, InputStream_clazz(env), | 232 env, InputStream_clazz(env), |
243 "<init>", | 233 "<init>", |
244 "()V", | 234 "()V", |
245 &g_InputStream_Constructor); | 235 &g_InputStream_Constructor); |
246 | 236 |
247 jobject ret = | 237 jobject ret = |
248 env->NewObject(InputStream_clazz(env), | 238 env->NewObject(InputStream_clazz(env), |
249 method_id); | 239 method_id); |
250 jni_generator::CheckException(env); | 240 jni_generator::CheckException(env); |
251 return ScopedJavaLocalRef<jobject>(env, ret); | 241 return ScopedJavaLocalRef<jobject>(env, ret); |
252 } | 242 } |
253 | 243 |
254 // Step 3: RegisterNatives. | 244 // Step 3: RegisterNatives. |
255 | 245 |
| 246 static bool RegisterNativesImpl(JNIEnv* env) __attribute__((unused)); |
256 static bool RegisterNativesImpl(JNIEnv* env) { | 247 static bool RegisterNativesImpl(JNIEnv* env) { |
257 if (base::android::IsManualJniRegistrationDisabled()) return true; | 248 if (base::android::IsManualJniRegistrationDisabled()) return true; |
258 | 249 |
259 return true; | 250 return true; |
260 } | 251 } |
261 | 252 |
262 } // namespace JNI_InputStream | 253 } // namespace JNI_InputStream |
263 | 254 |
264 #endif // java_io_InputStream_JNI | 255 #endif // java_io_InputStream_JNI |
OLD | NEW |