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

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

class KShellProcessJBridge : public KShellProcess
{
public:
	KShellProcessJBridge(const char* arg1) : KShellProcess(arg1) {};
	KShellProcessJBridge() : KShellProcess() {};
	~KShellProcessJBridge() {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.KShellProcess","commClose")) {
			KProcess::commClose();
		}
		return;
	}
	bool eventFilter(QObject* object,QEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KShellProcess",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KShellProcess_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KShellProcess_finalize(env, obj);
	return;
}

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

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KShellProcess_newKShellProcess__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring shellname)
{
static QCString* _qstring_shellname = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KShellProcessJBridge((const char*) QtSupport::toCharString(env, shellname, &_qstring_shellname)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KShellProcess_quote(JNIEnv* env, jclass cls, jstring arg)
{
	QString  _qstring;
	(void) cls;
static QString* _qstring_arg = 0;
	_qstring = KShellProcessJBridge::quote((const QString&)*(QString*) QtSupport::toQString(env, arg, &_qstring_arg));
	return QtSupport::fromQString(env, &_qstring);
}

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

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

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

