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

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/KProcIO.h>

class KProcIOJBridge : public KProcIO
{
public:
	KProcIOJBridge(QTextCodec* arg1) : KProcIO(arg1) {};
	KProcIOJBridge() : KProcIO() {};
	void protected_controlledEmission() {
		KProcIO::controlledEmission();
		return;
	}
	void protected_received(KProcess* arg1,char* arg2,int arg3) {
		KProcIO::received(arg1,arg2,arg3);
		return;
	}
	void protected_sent(KProcess* arg1) {
		KProcIO::sent(arg1);
		return;
	}
	~KProcIOJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::removeChild(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void insertChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::insertChild(arg1);
		}
		return;
	}
	void commClose() {
		if (!QtSupport::voidDelegate(this,"org.kde.koala.KProcIO","commClose")) {
			KProcess::commClose();
		}
		return;
	}
	bool eventFilter(QObject* object,QEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KProcIO",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

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

JNIEXPORT jstring JNICALL
Java_org_kde_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_kde_koala_KProcIO_closeWhenDone(JNIEnv* env, jobject obj)
{
	((KProcIO*) QtSupport::getQt(env, obj))->closeWhenDone();
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KProcIO_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KProcIO_finalize(env, obj);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_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_kde_koala_KProcIO_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

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

JNIEXPORT void JNICALL
Java_org_kde_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_kde_koala_KProcIO_newKProcIO__Lorg_kde_qt_QTextCodec_2(JNIEnv* env, jobject obj, jobject codec)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KProcIOJBridge((QTextCodec*) QtSupport::getQt(env, codec)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProcIO_readln__Ljava_lang_StringBuffer_2(JNIEnv* env, jobject obj, jobject line)
{
static QString* _qstring_line = 0;
	jint xret = (jint) ((KProcIO*) QtSupport::getQt(env, obj))->readln((QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, line, &_qstring_line));
	QtSupport::fromQStringToStringBuffer(env, _qstring_line, line);
	return xret;
}

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

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

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

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

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

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

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

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

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

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

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

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

