//Auto-generated by kalyptus. DO NOT EDIT.
#include <kfilterdev.h>
#include <tqglobal.h>
#include <tqiodevice.h>
#include <tqstring.h>
#include <tqcstring.h>

#include <qtjava/QtSupport.h>
#include <tdejava/TDESupport.h>
#include <tdejava/KFilterDev.h>

class KFilterDevJBridge : public KFilterDev
{
public:
	KFilterDevJBridge(KFilterBase* arg1,bool arg2) : KFilterDev(arg1,arg2) {};
	KFilterDevJBridge(KFilterBase* arg1) : KFilterDev(arg1) {};
	void public_close() {
		KFilterDev::close();
		return;
	}
	void public_flush() {
		KFilterDev::flush();
		return;
	}
	~KFilterDevJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KFilterDev_atEnd(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KFilterDev*) QtSupport::getQt(env, obj))->atEnd();
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_koala_KFilterDev_at__(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((KFilterDev*) QtSupport::getQt(env, obj))->at();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KFilterDev_at__J(JNIEnv* env, jobject obj, jlong arg1)
{
	jboolean xret = (jboolean) ((KFilterDev*) QtSupport::getQt(env, obj))->at((TQIODevice::Offset) arg1);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_close(JNIEnv* env, jobject obj)
{
	((KFilterDevJBridge*) QtSupport::getQt(env, obj))->public_close();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KFilterDev_deviceForFile__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring fileName)
{
	(void) cls;
static TQString* _qstring_fileName = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KFilterDevJBridge::deviceForFile((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName)), "org.trinitydesktop.qt.TQIODeviceInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KFilterDev_deviceForFile__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring fileName, jstring mimetype)
{
	(void) cls;
static TQString* _qstring_fileName = 0;
static TQString* _qstring_mimetype = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KFilterDevJBridge::deviceForFile((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName), (const TQString&)*(TQString*) QtSupport::toTQString(env, mimetype, &_qstring_mimetype)), "org.trinitydesktop.qt.TQIODeviceInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KFilterDev_deviceForFile__Ljava_lang_String_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jstring fileName, jstring mimetype, jboolean forceFilter)
{
	(void) cls;
static TQString* _qstring_fileName = 0;
static TQString* _qstring_mimetype = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KFilterDevJBridge::deviceForFile((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName), (const TQString&)*(TQString*) QtSupport::toTQString(env, mimetype, &_qstring_mimetype), (bool) forceFilter), "org.trinitydesktop.qt.TQIODeviceInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KFilterDev_device__Lorg_trinitydesktop_qt_QIODeviceInterface_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jobject inDevice, jstring mimetype)
{
	(void) cls;
static TQString* _qstring_mimetype = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KFilterDevJBridge::device((TQIODevice*) QtSupport::getQt(env, inDevice), (const TQString&)*(TQString*) QtSupport::toTQString(env, mimetype, &_qstring_mimetype)), "org.trinitydesktop.qt.TQIODeviceInterface");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KFilterDev_device__Lorg_trinitydesktop_qt_QIODeviceInterface_2Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jobject inDevice, jstring mimetype, jboolean autoDeleteInDevice)
{
	(void) cls;
static TQString* _qstring_mimetype = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KFilterDevJBridge::device((TQIODevice*) QtSupport::getQt(env, inDevice), (const TQString&)*(TQString*) QtSupport::toTQString(env, mimetype, &_qstring_mimetype), (bool) autoDeleteInDevice), "org.trinitydesktop.qt.TQIODeviceInterface");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KFilterDev_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (KFilterDev*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_flush(JNIEnv* env, jobject obj)
{
	((KFilterDevJBridge*) QtSupport::getQt(env, obj))->public_flush();
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KFilterDev_getch(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KFilterDev*) QtSupport::getQt(env, obj))->getch();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KFilterDev_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_newKFilterDev__Lorg_trinitydesktop_koala_KFilterBase_2(JNIEnv* env, jobject obj, jobject filter)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KFilterDevJBridge((KFilterBase*) QtSupport::getQt(env, filter)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_newKFilterDev__Lorg_trinitydesktop_koala_KFilterBase_2Z(JNIEnv* env, jobject obj, jobject filter, jboolean autoDeleteFilterBase)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KFilterDevJBridge((KFilterBase*) QtSupport::getQt(env, filter), (bool) autoDeleteFilterBase));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KFilterDev_open(JNIEnv* env, jobject obj, jint mode)
{
	jboolean xret = (jboolean) ((KFilterDev*) QtSupport::getQt(env, obj))->open((int) mode);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KFilterDev_putch(JNIEnv* env, jobject obj, jint arg1)
{
	jint xret = (jint) ((KFilterDev*) QtSupport::getQt(env, obj))->putch((int) arg1);
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_koala_KFilterDev_readBlock(JNIEnv* env, jobject obj, jobject data, jlong maxlen)
{
static TQCString* _qstring_data = 0;
	if (_qstring_data == 0) { _qstring_data = new TQCString(); }
	_qstring_data->resize((uint) maxlen);
	jlong xret = (jlong) ((KFilterDev*) QtSupport::getQt(env, obj))->readBlock((char*) _qstring_data->data(), (TQ_ULONG) maxlen);
	QtSupport::fromTQCStringToStringBuffer(env, _qstring_data, data);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_setOrigFileName(JNIEnv* env, jobject obj, jstring fileName)
{
static TQCString* _qcstring_fileName = 0;
	((KFilterDev*) QtSupport::getQt(env, obj))->setOrigFileName((const TQCString&)*(TQCString*) QtSupport::toTQCString(env, fileName, &_qcstring_fileName));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KFilterDev_setSkipHeaders(JNIEnv* env, jobject obj)
{
	((KFilterDev*) QtSupport::getQt(env, obj))->setSkipHeaders();
	return;
}

JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_koala_KFilterDev_size(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((KFilterDev*) QtSupport::getQt(env, obj))->size();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KFilterDev_ungetch(JNIEnv* env, jobject obj, jint arg1)
{
	jint xret = (jint) ((KFilterDev*) QtSupport::getQt(env, obj))->ungetch((int) arg1);
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_trinitydesktop_koala_KFilterDev_writeBlock(JNIEnv* env, jobject obj, jstring data, jlong len)
{
static TQCString* _qstring_data = 0;
	jlong xret = (jlong) ((KFilterDev*) QtSupport::getQt(env, obj))->writeBlock((const char*) QtSupport::toCharString(env, data, &_qstring_data), (TQ_ULONG) len);
	return xret;
}

