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

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

class TDEProcIOJBridge : public TDEProcIO
{
public:
	TDEProcIOJBridge(TQTextCodec* arg1) : TDEProcIO(arg1) {};
	TDEProcIOJBridge() : TDEProcIO() {};
	void protected_controlledEmission() {
		TDEProcIO::controlledEmission();
		return;
	}
	void protected_received(TDEProcess* arg1,char* arg2,int arg3) {
		TDEProcIO::received(arg1,arg2,arg3);
		return;
	}
	void protected_sent(TDEProcess* arg1) {
		TDEProcIO::sent(arg1);
		return;
	}
	~TDEProcIOJBridge() {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.TDEProcIO","commClose")) {
			TDEProcess::commClose();
		}
		return;
	}
	bool eventFilter(TQObject* object,TQEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.trinitydesktop.koala.TDEProcIO",object,event)) {
			return TQObject::eventFilter(object,event);
		} else {
			return true;
		}
	}
};

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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_TDEProcIO_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_TDEProcIO_finalize(env, obj);
	return;
}

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

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

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

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

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

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_TDEProcIO_readln__Ljava_lang_StringBuffer_2(JNIEnv* env, jobject obj, jobject line)
{
static TQString* _qstring_line = 0;
	jint xret = (jint) ((TDEProcIO*) 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_TDEProcIO_readln__Ljava_lang_StringBuffer_2Z(JNIEnv* env, jobject obj, jobject line, jboolean autoAck)
{
static TQString* _qstring_line = 0;
	jint xret = (jint) ((TDEProcIO*) 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_TDEProcIO_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) ((TDEProcIO*) 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_TDEProcIO_received(JNIEnv* env, jobject obj, jobject proc, jstring buffer, jint buflen)
{
static TQCString* _qstring_buffer = 0;
	((TDEProcIOJBridge*) 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_TDEProcIO_resetAll(JNIEnv* env, jobject obj)
{
	((TDEProcIO*) QtSupport::getQt(env, obj))->resetAll();
	return;
}

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

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

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

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

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

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_TDEProcIO_writeStdin__Ljava_lang_String_2Z(JNIEnv* env, jobject obj, jstring line, jboolean appendnewline)
{
static TQString* _qstring_line = 0;
	jboolean xret = (jboolean) ((TDEProcIO*) 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_TDEProcIO_writeStdin___3B(JNIEnv* env, jobject obj, jbyteArray data)
{
static TQByteArray* _qbyteArray_data = 0;
	jboolean xret = (jboolean) ((TDEProcIO*) QtSupport::getQt(env, obj))->writeStdin((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, data, &_qbyteArray_data));
	return xret;
}

