/* DO NOT EDIT THIS FILE - it is machine generated */
#include "jri.h"

/* Stubs for class AviPlayer */

#ifdef IMPLEMENT_AviPlayer
#define _implementing_AviPlayer
#endif /* IMPLEMENT_AviPlayer */
#define IMPLEMENT_AviPlayer
#include "AviPlayer.h"

#ifndef UNUSED_AviPlayer_observer
JRI_PUBLIC_VAR(JRIFieldID) FAR fieldID_AviPlayer_observer = JRIUninitialized;
#ifdef DEBUG
struct AviObserver;
JRI_PUBLIC_API(struct AviObserver *)
get_AviPlayer_observer(JRIEnv* env, struct AviPlayer* obj) {
	if (fieldID_AviPlayer_observer == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before accessing field observer LAviObserver;");
	}
	return (struct AviObserver *)
		JRI_GetField(env, obj, fieldID_AviPlayer_observer);
}
JRI_PUBLIC_API(void)
set_AviPlayer_observer(JRIEnv* env, struct AviPlayer* obj, struct AviObserver * v) {
	if (fieldID_AviPlayer_observer == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before accessing field observer LAviObserver;");
	}
	JRI_SetField(env, obj, fieldID_AviPlayer_observer, v);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_observer */

#ifndef UNUSED_AviPlayer_getObserver
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_getObserver = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct AviObserver *)
AviPlayer_getObserver(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_getObserver == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method getObserver ()LAviObserver;");
	}
	return (struct AviObserver *)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_getObserver);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_getObserver */

#ifndef UNUSED_AviPlayer_advise
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_advise = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_advise(JRIEnv* env, struct AviPlayer* self, struct AviObserver *a, jint b) {
	if (methodID_AviPlayer_advise == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method advise (LAviObserver;I)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_advise, a, b);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_advise */

#ifndef UNUSED_AviPlayer_setTimeOut
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_setTimeOut = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(void)
AviPlayer_setTimeOut(JRIEnv* env, struct AviPlayer* self, jint a) {
	if (methodID_AviPlayer_setTimeOut == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method setTimeOut (I)V");
	}
	(void)JRI_CallMethod(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_setTimeOut, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_setTimeOut */

#ifndef UNUSED_AviPlayer_play
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_play = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_play(JRIEnv* env, struct AviPlayer* self, jbool a) {
	if (methodID_AviPlayer_play == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method play (Z)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_play, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_play */

#ifndef UNUSED_AviPlayer_stop
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_stop = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_stop(JRIEnv* env, struct AviPlayer* self, jbool a) {
	if (methodID_AviPlayer_stop == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method stop (Z)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_stop, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_stop */

#ifndef UNUSED_AviPlayer_seek
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_seek = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_seek(JRIEnv* env, struct AviPlayer* self, jbool a, jint b) {
	if (methodID_AviPlayer_seek == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method seek (ZI)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_seek, a, b);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_seek */

#ifndef UNUSED_AviPlayer_rewind
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_rewind = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_rewind(JRIEnv* env, struct AviPlayer* self, jbool a) {
	if (methodID_AviPlayer_rewind == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method rewind (Z)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_rewind, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_rewind */

#ifndef UNUSED_AviPlayer_forward
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_forward = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_forward(JRIEnv* env, struct AviPlayer* self, jbool a) {
	if (methodID_AviPlayer_forward == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method forward (Z)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_forward, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_forward */

#ifndef UNUSED_AviPlayer_frameForward
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_frameForward = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_frameForward(JRIEnv* env, struct AviPlayer* self, jbool a) {
	if (methodID_AviPlayer_frameForward == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method frameForward (Z)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_frameForward, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_frameForward */

#ifndef UNUSED_AviPlayer_frameBack
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_frameBack = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_frameBack(JRIEnv* env, struct AviPlayer* self, jbool a) {
	if (methodID_AviPlayer_frameBack == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method frameBack (Z)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_frameBack, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_frameBack */

#ifndef UNUSED_AviPlayer_play_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_play_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_play_1(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_play_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method play ()Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_play_1);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_play_1 */

#ifndef UNUSED_AviPlayer_stop_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_stop_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_stop_1(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_stop_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method stop ()Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_stop_1);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_stop_1 */

#ifndef UNUSED_AviPlayer_seek_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_seek_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_seek_1(JRIEnv* env, struct AviPlayer* self, jint a) {
	if (methodID_AviPlayer_seek_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method seek (I)Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_seek_1, a);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_seek_1 */

#ifndef UNUSED_AviPlayer_rewind_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_rewind_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_rewind_1(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_rewind_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method rewind ()Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_rewind_1);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_rewind_1 */

#ifndef UNUSED_AviPlayer_forward_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_forward_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_forward_1(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_forward_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method forward ()Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_forward_1);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_forward_1 */

#ifndef UNUSED_AviPlayer_frameForward_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_frameForward_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_frameForward_1(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_frameForward_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method frameForward ()Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_frameForward_1);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_frameForward_1 */

#ifndef UNUSED_AviPlayer_frameBack_1
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_frameBack_1 = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(jbool)
AviPlayer_frameBack_1(JRIEnv* env, struct AviPlayer* self) {
	if (methodID_AviPlayer_frameBack_1 == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method frameBack ()Z");
	}
	return JRI_CallMethodBoolean(env)(env, JRI_CallMethod_op, self, methodID_AviPlayer_frameBack_1);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_frameBack_1 */

#ifndef UNUSED_AviPlayer_new
JRI_PUBLIC_VAR(JRIMethodID) FAR methodID_AviPlayer_new = JRIUninitialized;
#ifdef DEBUG
JRI_PUBLIC_API(struct AviPlayer*)
AviPlayer_new(JRIEnv* env, struct java_lang_Class* clazz) {
	if (methodID_AviPlayer_new == JRIUninitialized) {
		assert(!"Forgot to call use_AviPlayer(env) before calling method <init> ()V");
	}
	return (struct AviPlayer*)JRI_NewObject(env)(env, JRI_NewObject_op, clazz, methodID_AviPlayer_new);
}
#endif /* DEBUG */
#endif /* UNUSED_AviPlayer_new */

#ifndef UNUSED_use_AviPlayer

static jglobal _globalclass_AviPlayer = NULL;

JRI_PUBLIC_API(struct java_lang_Class*)
use_AviPlayer(JRIEnv* env)
{
	if (_globalclass_AviPlayer == NULL) {
		struct java_lang_Class* clazz = JRI_FindClass(env, classname_AviPlayer);
		if (clazz == NULL) {
			JRI_ThrowNew(env, JRI_FindClass(env, "java/lang/ClassNotFoundException"), classname_AviPlayer);
			return NULL;
		}
		usefield_AviPlayer_observer(env, clazz);
		usemethod_AviPlayer_getObserver(env, clazz);
		usemethod_AviPlayer_advise(env, clazz);
		usemethod_AviPlayer_setTimeOut(env, clazz);
		usemethod_AviPlayer_play(env, clazz);
		usemethod_AviPlayer_stop(env, clazz);
		usemethod_AviPlayer_seek(env, clazz);
		usemethod_AviPlayer_rewind(env, clazz);
		usemethod_AviPlayer_forward(env, clazz);
		usemethod_AviPlayer_frameForward(env, clazz);
		usemethod_AviPlayer_frameBack(env, clazz);
		usemethod_AviPlayer_play_1(env, clazz);
		usemethod_AviPlayer_stop_1(env, clazz);
		usemethod_AviPlayer_seek_1(env, clazz);
		usemethod_AviPlayer_rewind_1(env, clazz);
		usemethod_AviPlayer_forward_1(env, clazz);
		usemethod_AviPlayer_frameForward_1(env, clazz);
		usemethod_AviPlayer_frameBack_1(env, clazz);
		usemethod_AviPlayer_new(env, clazz);
		_globalclass_AviPlayer = JRI_NewGlobalRef(env, clazz);
		return clazz;
	}
	else {
		return (struct java_lang_Class*)JRI_GetGlobalRef(env, _globalclass_AviPlayer);
	}
}

JRI_PUBLIC_API(void)
unuse_AviPlayer(JRIEnv* env)
{
	if (_globalclass_AviPlayer != NULL) {
		struct java_lang_Class* clazz = (struct java_lang_Class*)JRI_GetGlobalRef(env, _globalclass_AviPlayer);
		unusefield_AviPlayer_observer(env, clazz);
		unusemethod_AviPlayer_getObserver(env, clazz);
		unusemethod_AviPlayer_advise(env, clazz);
		unusemethod_AviPlayer_setTimeOut(env, clazz);
		unusemethod_AviPlayer_play(env, clazz);
		unusemethod_AviPlayer_stop(env, clazz);
		unusemethod_AviPlayer_seek(env, clazz);
		unusemethod_AviPlayer_rewind(env, clazz);
		unusemethod_AviPlayer_forward(env, clazz);
		unusemethod_AviPlayer_frameForward(env, clazz);
		unusemethod_AviPlayer_frameBack(env, clazz);
		unusemethod_AviPlayer_play_1(env, clazz);
		unusemethod_AviPlayer_stop_1(env, clazz);
		unusemethod_AviPlayer_seek_1(env, clazz);
		unusemethod_AviPlayer_rewind_1(env, clazz);
		unusemethod_AviPlayer_forward_1(env, clazz);
		unusemethod_AviPlayer_frameForward_1(env, clazz);
		unusemethod_AviPlayer_frameBack_1(env, clazz);
		unusemethod_AviPlayer_new(env, clazz);
		JRI_DisposeGlobalRef(env, _globalclass_AviPlayer);
		_globalclass_AviPlayer = NULL;
		clazz = NULL;	/* prevent unused variable 'clazz' warning */
	}
}

#endif /* UNUSED_use_AviPlayer */

#ifdef _implementing_AviPlayer

JRI_PUBLIC_API(struct java_lang_Class*)
register_AviPlayer(JRIEnv* env)
{
	char* nativeNamesAndSigs[] = {
		"setTimeOut(I)V",
		"play(Z)Z",
		"stop(Z)Z",
		"seek(ZI)Z",
		"rewind(Z)Z",
		"forward(Z)Z",
		"frameForward(Z)Z",
		"frameBack(Z)Z",
		NULL
	};
	void* nativeProcs[] = {
		(void*)native_AviPlayer_setTimeOut,
		(void*)native_AviPlayer_play,
		(void*)native_AviPlayer_stop,
		(void*)native_AviPlayer_seek,
		(void*)native_AviPlayer_rewind,
		(void*)native_AviPlayer_forward,
		(void*)native_AviPlayer_frameForward,
		(void*)native_AviPlayer_frameBack,
		NULL
	};
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_AviPlayer);
	if (clazz == NULL) {
		JRI_ThrowNew(env, JRI_FindClass(env, "java/lang/ClassNotFoundException"), classname_AviPlayer);
		return NULL;
	}
	JRI_RegisterNatives(env, clazz, nativeNamesAndSigs, nativeProcs);
	use_AviPlayer(env);
	return clazz;
}

JRI_PUBLIC_API(void)
unregister_AviPlayer(JRIEnv* env)
{
	struct java_lang_Class* clazz = JRI_FindClass(env, classname_AviPlayer);
	JRI_UnregisterNatives(env, clazz);
	unuse_AviPlayer(env);
}

#endif /* _implementing_AviPlayer */

/* These stub routines are generated for compatibility with the JDK: */

#ifndef NO_JDK

/* SYMBOL: "AviPlayer/setTimeOut(I)V", Java_AviPlayer_setTimeOut_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_setTimeOut_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	(void) native_AviPlayer_setTimeOut(_EE_,_P_[0].p,((_P_[1].i)));
	return _P_;
}

/* SYMBOL: "AviPlayer/play(Z)Z", Java_AviPlayer_play_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_play_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_play(_EE_,_P_[0].p,((_P_[1].i))) ? 1 : 0);
	return _P_ + 1;
}

/* SYMBOL: "AviPlayer/stop(Z)Z", Java_AviPlayer_stop_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_stop_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_stop(_EE_,_P_[0].p,((_P_[1].i))) ? 1 : 0);
	return _P_ + 1;
}

/* SYMBOL: "AviPlayer/seek(ZI)Z", Java_AviPlayer_seek_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_seek_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_seek(_EE_,_P_[0].p,((_P_[1].i)),((_P_[2].i))) ? 1 : 0);
	return _P_ + 1;
}

/* SYMBOL: "AviPlayer/rewind(Z)Z", Java_AviPlayer_rewind_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_rewind_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_rewind(_EE_,_P_[0].p,((_P_[1].i))) ? 1 : 0);
	return _P_ + 1;
}

/* SYMBOL: "AviPlayer/forward(Z)Z", Java_AviPlayer_forward_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_forward_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_forward(_EE_,_P_[0].p,((_P_[1].i))) ? 1 : 0);
	return _P_ + 1;
}

/* SYMBOL: "AviPlayer/frameForward(Z)Z", Java_AviPlayer_frameForward_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_frameForward_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_frameForward(_EE_,_P_[0].p,((_P_[1].i))) ? 1 : 0);
	return _P_ + 1;
}

/* SYMBOL: "AviPlayer/frameBack(Z)Z", Java_AviPlayer_frameBack_stub */
JRI_NATIVE_STUB(JRI_JDK_stack_item*)
Java_AviPlayer_frameBack_stub(JRI_JDK_stack_item* _P_, JRIEnv* _EE_) {
	_P_[0].i = (native_AviPlayer_frameBack(_EE_,_P_[0].p,((_P_[1].i))) ? 1 : 0);
	return _P_ + 1;
}

#endif /* NO_JDK */

