//Auto-generated by kalyptus. DO NOT EDIT.
#include <kprocess.h>
#include <tqstring.h>
#include <kprocio.h>
#include <tqcstring.h>

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

class KProcIOJBridge : public KProcIO
{
public:
	KProcIOJBridge(TQTextCodec* arg1) : KProcIO(arg1) {};
	KProcIOJBridge() : KProcIO() {};
	void protected_controlledEmission() {
		KProcIO::controlledEmission();
		return;
	}
	void protected_received(TDEProcess* arg1,char* arg2,int arg3) {
		KProcIO::received(arg1,arg2,arg3);
		return;
	}
	void protected_sent(TDEProcess* arg1) {
		KProcIO::sent(arg1);
		return;
	}
	~KProcIOJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(TQObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.trinitydesktop.qt.TQObject")) {
			TQObject::removeChild(arg1);
		}
		return;
	}
	void customEvent(TQCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.trinitydesktop.qt.TQCustomEvent")) {
			TQObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(TQTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.trinitydesktop.qt.TQTimerEvent")) {
			TQObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(TQChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.trinitydesktop.qt.TQChildEvent")) {
			TQObject::childEvent(arg1);
		}
		return;
	}
	void insertChild(TQObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.trinitydesktop.qt.TQObject")) {
			TQObject::insertChild(arg1);
		}
		return;
	}
	void commClose() {
		if (!QtSupport::voidDelegate(this,"org.trinitydesktop.koala.KProcIO","commClose")) {
			TDEProcess::commClose();
		}
		return;
	}
	bool eventFilter(TQObject* object,TQEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.trinitydesktop.koala.KProcIO",object,event)) {
			return TQObject::eventFilter(object,event);
		} else {
			return true;
		}
	}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_ackRead(JNIEnv* env, jobject obj)
{
	((KProcIO*) QtSupport::getQt(env, obj))->ackRead();
	return;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KProcIO_className(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((KProcIO*) QtSupport::getQt(env, obj))->className();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_closeWhenDone(JNIEnv* env, jobject obj)
{
	((KProcIO*) QtSupport::getQt(env, obj))->closeWhenDone();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_controlledEmission(JNIEnv* env, jobject obj)
{
	((KProcIOJBridge*) QtSupport::getQt(env, obj))->protected_controlledEmission();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KProcIO_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_enableReadSignals(JNIEnv* env, jobject obj, jboolean enable)
{
	((KProcIO*) QtSupport::getQt(env, obj))->enableReadSignals((bool) enable);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj) && ((KProcIO*)QtSupport::getQt(env, obj))->parent() == 0) {
		delete (KProcIO*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KProcIO_metaObject(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KProcIO*) QtSupport::getQt(env, obj))->metaObject(), "org.trinitydesktop.qt.TQMetaObject");
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_newKProcIO__Lorg_trinitydesktop_qt_QTextCodec_2(JNIEnv* env, jobject obj, jobject codec)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KProcIOJBridge((TQTextCodec*) QtSupport::getQt(env, codec)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KProcIO_readln__Ljava_lang_StringBuffer_2(JNIEnv* env, jobject obj, jobject line)
{
static TQString* _qstring_line = 0;
	jint xret = (jint) ((KProcIO*) QtSupport::getQt(env, obj))->readln((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, line, &_qstring_line));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_line, line);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KProcIO_readln__Ljava_lang_StringBuffer_2Z(JNIEnv* env, jobject obj, jobject line, jboolean autoAck)
{
static TQString* _qstring_line = 0;
	jint xret = (jint) ((KProcIO*) QtSupport::getQt(env, obj))->readln((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, line, &_qstring_line), (bool) autoAck);
	QtSupport::fromTQStringToStringBuffer(env, _qstring_line, line);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KProcIO_readln__Ljava_lang_StringBuffer_2Z_3Z(JNIEnv* env, jobject obj, jobject line, jboolean autoAck, jbooleanArray partial)
{
static TQString* _qstring_line = 0;
	bool* _bool_partial = QtSupport::toBooleanPtr(env, partial);
	jint xret = (jint) ((KProcIO*) QtSupport::getQt(env, obj))->readln((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, line, &_qstring_line), (bool) autoAck,  (bool*) _bool_partial);
	QtSupport::fromTQStringToStringBuffer(env, _qstring_line, line);
	env->SetBooleanArrayRegion(partial, 0, 1, (jboolean*) _bool_partial);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_received(JNIEnv* env, jobject obj, jobject proc, jstring buffer, jint buflen)
{
static TQCString* _qstring_buffer = 0;
	((KProcIOJBridge*) QtSupport::getQt(env, obj))->protected_received((TDEProcess*) QtSupport::getQt(env, proc), (char*) QtSupport::toCharString(env, buffer, &_qstring_buffer), (int) buflen);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_resetAll(JNIEnv* env, jobject obj)
{
	((KProcIO*) QtSupport::getQt(env, obj))->resetAll();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_sent(JNIEnv* env, jobject obj, jobject arg1)
{
	((KProcIOJBridge*) QtSupport::getQt(env, obj))->protected_sent((TDEProcess*) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KProcIO_setComm(JNIEnv* env, jobject obj, jint comm)
{
	((KProcIO*) QtSupport::getQt(env, obj))->setComm((TDEProcess::Communication) comm);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KProcIO_start__(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KProcIO*) QtSupport::getQt(env, obj))->start();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KProcIO_start__I(JNIEnv* env, jobject obj, jint runmode)
{
	jboolean xret = (jboolean) ((KProcIO*) QtSupport::getQt(env, obj))->start((TDEProcess::RunMode) runmode);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KProcIO_start__IZ(JNIEnv* env, jobject obj, jint runmode, jboolean includeStderr)
{
	jboolean xret = (jboolean) ((KProcIO*) QtSupport::getQt(env, obj))->start((TDEProcess::RunMode) runmode, (bool) includeStderr);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KProcIO_writeStdin__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring line)
{
static TQString* _qstring_line = 0;
	jboolean xret = (jboolean) ((KProcIO*) QtSupport::getQt(env, obj))->writeStdin((const TQString&)*(TQString*) QtSupport::toTQString(env, line, &_qstring_line));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KProcIO_writeStdin__Ljava_lang_String_2Z(JNIEnv* env, jobject obj, jstring line, jboolean appendnewline)
{
static TQString* _qstring_line = 0;
	jboolean xret = (jboolean) ((KProcIO*) QtSupport::getQt(env, obj))->writeStdin((const TQString&)*(TQString*) QtSupport::toTQString(env, line, &_qstring_line), (bool) appendnewline);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KProcIO_writeStdin___3B(JNIEnv* env, jobject obj, jbyteArray data)
{
static TQByteArray* _qbyteArray_data = 0;
	jboolean xret = (jboolean) ((KProcIO*) QtSupport::getQt(env, obj))->writeStdin((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, data, &_qbyteArray_data));
	return xret;
}

