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

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

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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_Connection_connect__Lorg_trinitydesktop_qt_QObject_2(JNIEnv* env, jobject obj, jobject receiver)
{
	((TDEIO::Connection*) QtSupport::getQt(env, obj))->connect((TQObject*) QtSupport::getQt(env, receiver));
	return;
}

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

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

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

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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_Connection_read(JNIEnv* env, jobject obj, jintArray _cmd, jbyteArray data)
{
	int* _int__cmd = QtSupport::toIntPtr(env, _cmd);
static TQByteArray* _qbyteArray_data = 0;
	jint xret = (jint) ((TDEIO::Connection*) QtSupport::getQt(env, obj))->read( (int*) _int__cmd, (TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, data, &_qbyteArray_data));
	env->SetIntArrayRegion(_cmd, 0, 1, (jint *) _int__cmd);
	return xret;
}

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

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

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

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

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

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

