//Auto-generated by kalyptus. DO NOT EDIT.
#include <kio/connection.h>
#include <qcstring.h>

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

class ConnectionJBridge : public KIO::Connection
{
public:
	ConnectionJBridge() : KIO::Connection() {};
	void protected_dequeue() {
		KIO::Connection::dequeue();
		return;
	}
	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;
	}
	bool eventFilter(QObject* object,QEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.Connection",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

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

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_close(JNIEnv* env, jobject obj)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->close();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_connect__(JNIEnv* env, jobject obj)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->connect();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_connect__Lorg_kde_qt_QObject_2(JNIEnv* env, jobject obj, jobject receiver)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->connect((QObject*) QtSupport::getQt(env, receiver));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_connect__Lorg_kde_qt_QObject_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobject receiver, jstring member)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->connect((QObject*) QtSupport::slotForReceiver(env, receiver, member), "1invoke()");
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_dequeue(JNIEnv* env, jobject obj)
{
	((ConnectionJBridge*) QtSupport::getQt(env, obj))->protected_dequeue();
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_Connection_fd_1from(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KIO::Connection*) QtSupport::getQt(env, obj))->fd_from();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_Connection_fd_1to(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KIO::Connection*) QtSupport::getQt(env, obj))->fd_to();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_init(JNIEnv* env, jobject obj, jint fd_in, jint fd_out)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->init((int) fd_in, (int) fd_out);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Connection_inited(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KIO::Connection*) QtSupport::getQt(env, obj))->inited();
	return xret;
}

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

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_Connection_read(JNIEnv* env, jobject obj, jintArray _cmd, jbyteArray data)
{
	int* _int__cmd = QtSupport::toIntPtr(env, _cmd);
static QByteArray* _qbyteArray_data = 0;
	jint xret = (jint) ((KIO::Connection*) QtSupport::getQt(env, obj))->read( (int*) _int__cmd, (QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, data, &_qbyteArray_data));
	env->SetIntArrayRegion(_cmd, 0, 1, (jint *) _int__cmd);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_resume(JNIEnv* env, jobject obj)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->resume();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_send__I(JNIEnv* env, jobject obj, jint cmd)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->send((int) cmd);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_send__I_3B(JNIEnv* env, jobject obj, jint cmd, jbyteArray arr)
{
static QByteArray* _qbyteArray_arr = 0;
	((KIO::Connection*) QtSupport::getQt(env, obj))->send((int) cmd, (const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, arr, &_qbyteArray_arr));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Connection_sendnow(JNIEnv* env, jobject obj, jint _cmd, jbyteArray data)
{
static QByteArray* _qbyteArray_data = 0;
	jboolean xret = (jboolean) ((KIO::Connection*) QtSupport::getQt(env, obj))->sendnow((int) _cmd, (const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, data, &_qbyteArray_data));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_Connection_suspend(JNIEnv* env, jobject obj)
{
	((KIO::Connection*) QtSupport::getQt(env, obj))->suspend();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_Connection_suspended(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KIO::Connection*) QtSupport::getQt(env, obj))->suspended();
	return xret;
}

