mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
247 lines
8.6 KiB
Plaintext
247 lines
8.6 KiB
Plaintext
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
|
|
// This file is autogenerated by
|
|
// base/android/jni_generator/jni_generator.py
|
|
// For
|
|
// java/io/InputStream
|
|
|
|
#ifndef java_io_InputStream_JNI
|
|
#define java_io_InputStream_JNI
|
|
|
|
#include <jni.h>
|
|
|
|
#include "base/android/jni_generator/jni_generator_helper.h"
|
|
|
|
|
|
// Step 1: Forward declarations.
|
|
|
|
JNI_REGISTRATION_EXPORT extern const char kClassPath_java_io_InputStream[];
|
|
const char kClassPath_java_io_InputStream[] = "java/io/InputStream";
|
|
// Leaking this jclass as we cannot use LazyInstance from some threads.
|
|
JNI_REGISTRATION_EXPORT base::subtle::AtomicWord g_java_io_InputStream_clazz = 0;
|
|
#ifndef java_io_InputStream_clazz_defined
|
|
#define java_io_InputStream_clazz_defined
|
|
inline jclass java_io_InputStream_clazz(JNIEnv* env) {
|
|
return base::android::LazyGetClass(env, kClassPath_java_io_InputStream,
|
|
&g_java_io_InputStream_clazz);
|
|
}
|
|
#endif
|
|
|
|
|
|
// Step 2: Constants (optional).
|
|
|
|
|
|
// Step 3: Method stubs.
|
|
namespace JNI_InputStream {
|
|
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_available = 0;
|
|
static jint Java_InputStream_available(JNIEnv* env, const base::android::JavaRef<jobject>& obj)
|
|
__attribute__ ((unused));
|
|
static jint Java_InputStream_available(JNIEnv* env, const base::android::JavaRef<jobject>& obj) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env), 0);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"available",
|
|
"()I",
|
|
&g_java_io_InputStream_available);
|
|
|
|
jint ret =
|
|
env->CallIntMethod(obj.obj(),
|
|
method_id);
|
|
jni_generator::CheckException(env);
|
|
return ret;
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_close = 0;
|
|
static void Java_InputStream_close(JNIEnv* env, const base::android::JavaRef<jobject>& obj)
|
|
__attribute__ ((unused));
|
|
static void Java_InputStream_close(JNIEnv* env, const base::android::JavaRef<jobject>& obj) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env));
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"close",
|
|
"()V",
|
|
&g_java_io_InputStream_close);
|
|
|
|
env->CallVoidMethod(obj.obj(),
|
|
method_id);
|
|
jni_generator::CheckException(env);
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_mark = 0;
|
|
static void Java_InputStream_mark(JNIEnv* env, const base::android::JavaRef<jobject>& obj,
|
|
JniIntWrapper p0) __attribute__ ((unused));
|
|
static void Java_InputStream_mark(JNIEnv* env, const base::android::JavaRef<jobject>& obj,
|
|
JniIntWrapper p0) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env));
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"mark",
|
|
"(I)V",
|
|
&g_java_io_InputStream_mark);
|
|
|
|
env->CallVoidMethod(obj.obj(),
|
|
method_id, as_jint(p0));
|
|
jni_generator::CheckException(env);
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_markSupported = 0;
|
|
static jboolean Java_InputStream_markSupported(JNIEnv* env, const base::android::JavaRef<jobject>&
|
|
obj) __attribute__ ((unused));
|
|
static jboolean Java_InputStream_markSupported(JNIEnv* env, const base::android::JavaRef<jobject>&
|
|
obj) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env), false);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"markSupported",
|
|
"()Z",
|
|
&g_java_io_InputStream_markSupported);
|
|
|
|
jboolean ret =
|
|
env->CallBooleanMethod(obj.obj(),
|
|
method_id);
|
|
jni_generator::CheckException(env);
|
|
return ret;
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_readI = 0;
|
|
static jint Java_InputStream_readI(JNIEnv* env, const base::android::JavaRef<jobject>& obj)
|
|
__attribute__ ((unused));
|
|
static jint Java_InputStream_readI(JNIEnv* env, const base::android::JavaRef<jobject>& obj) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env), 0);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"read",
|
|
"()I",
|
|
&g_java_io_InputStream_readI);
|
|
|
|
jint ret =
|
|
env->CallIntMethod(obj.obj(),
|
|
method_id);
|
|
jni_generator::CheckException(env);
|
|
return ret;
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_readI_AB = 0;
|
|
static jint Java_InputStream_readI_AB(JNIEnv* env, const base::android::JavaRef<jobject>& obj, const
|
|
base::android::JavaRef<jbyteArray>& p0) __attribute__ ((unused));
|
|
static jint Java_InputStream_readI_AB(JNIEnv* env, const base::android::JavaRef<jobject>& obj, const
|
|
base::android::JavaRef<jbyteArray>& p0) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env), 0);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"read",
|
|
"([B)I",
|
|
&g_java_io_InputStream_readI_AB);
|
|
|
|
jint ret =
|
|
env->CallIntMethod(obj.obj(),
|
|
method_id, p0.obj());
|
|
jni_generator::CheckException(env);
|
|
return ret;
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_readI_AB_I_I = 0;
|
|
static jint Java_InputStream_readI_AB_I_I(JNIEnv* env, const base::android::JavaRef<jobject>& obj,
|
|
const base::android::JavaRef<jbyteArray>& p0,
|
|
JniIntWrapper p1,
|
|
JniIntWrapper p2) __attribute__ ((unused));
|
|
static jint Java_InputStream_readI_AB_I_I(JNIEnv* env, const base::android::JavaRef<jobject>& obj,
|
|
const base::android::JavaRef<jbyteArray>& p0,
|
|
JniIntWrapper p1,
|
|
JniIntWrapper p2) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env), 0);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"read",
|
|
"([BII)I",
|
|
&g_java_io_InputStream_readI_AB_I_I);
|
|
|
|
jint ret =
|
|
env->CallIntMethod(obj.obj(),
|
|
method_id, p0.obj(), as_jint(p1), as_jint(p2));
|
|
jni_generator::CheckException(env);
|
|
return ret;
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_reset = 0;
|
|
static void Java_InputStream_reset(JNIEnv* env, const base::android::JavaRef<jobject>& obj)
|
|
__attribute__ ((unused));
|
|
static void Java_InputStream_reset(JNIEnv* env, const base::android::JavaRef<jobject>& obj) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env));
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"reset",
|
|
"()V",
|
|
&g_java_io_InputStream_reset);
|
|
|
|
env->CallVoidMethod(obj.obj(),
|
|
method_id);
|
|
jni_generator::CheckException(env);
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_skip = 0;
|
|
static jlong Java_InputStream_skip(JNIEnv* env, const base::android::JavaRef<jobject>& obj, jlong
|
|
p0) __attribute__ ((unused));
|
|
static jlong Java_InputStream_skip(JNIEnv* env, const base::android::JavaRef<jobject>& obj, jlong
|
|
p0) {
|
|
CHECK_CLAZZ(env, obj.obj(),
|
|
java_io_InputStream_clazz(env), 0);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"skip",
|
|
"(J)J",
|
|
&g_java_io_InputStream_skip);
|
|
|
|
jlong ret =
|
|
env->CallLongMethod(obj.obj(),
|
|
method_id, p0);
|
|
jni_generator::CheckException(env);
|
|
return ret;
|
|
}
|
|
|
|
static base::subtle::AtomicWord g_java_io_InputStream_Constructor = 0;
|
|
static base::android::ScopedJavaLocalRef<jobject> Java_InputStream_Constructor(JNIEnv* env)
|
|
__attribute__ ((unused));
|
|
static base::android::ScopedJavaLocalRef<jobject> Java_InputStream_Constructor(JNIEnv* env) {
|
|
CHECK_CLAZZ(env, java_io_InputStream_clazz(env),
|
|
java_io_InputStream_clazz(env), NULL);
|
|
jmethodID method_id = base::android::MethodID::LazyGet<
|
|
base::android::MethodID::TYPE_INSTANCE>(
|
|
env, java_io_InputStream_clazz(env),
|
|
"<init>",
|
|
"()V",
|
|
&g_java_io_InputStream_Constructor);
|
|
|
|
jobject ret =
|
|
env->NewObject(java_io_InputStream_clazz(env),
|
|
method_id);
|
|
jni_generator::CheckException(env);
|
|
return base::android::ScopedJavaLocalRef<jobject>(env, ret);
|
|
}
|
|
|
|
} // namespace JNI_InputStream
|
|
|
|
#endif // java_io_InputStream_JNI
|