//Auto-generated by kalyptus. DO NOT EDIT.
#include <ksslconnectioninfo.h>
#include <ksslpeerinfo.h>
#include <tqstring.h>
#include <kssl.h>

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

class KSSLJBridge : public KSSL
{
public:
	KSSLJBridge(bool arg1) : KSSL(arg1) {};
	KSSLJBridge() : KSSL() {};
	~KSSLJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_TLSInit(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->TLSInit();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KSSL_accept(JNIEnv* env, jobject obj, jint sock)
{
	jint xret = (jint) ((KSSL*) QtSupport::getQt(env, obj))->accept((int) sock);
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KSSL_connect(JNIEnv* env, jobject obj, jint sock)
{
	jint xret = (jint) ((KSSL*) QtSupport::getQt(env, obj))->connect((int) sock);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSL_connectionInfo(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)(KSSLConnectionInfo *) &((KSSL*) QtSupport::getQt(env, obj))->connectionInfo(), "org.trinitydesktop.koala.KSSLConnectionInfo");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSL_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KSSL_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_doesSSLWork(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	jboolean xret = (jboolean) KSSLJBridge::doesSSLWork();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSL_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (KSSL*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_initialize(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->initialize();
	return xret;
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSL_newKSSL__Z(JNIEnv* env, jobject obj, jboolean init)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSSLJBridge((bool) init));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSL_peerInfo(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)(KSSLPeerInfo *) &((KSSL*) QtSupport::getQt(env, obj))->peerInfo(), "org.trinitydesktop.koala.KSSLPeerInfo");
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KSSL_pending(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KSSL*) QtSupport::getQt(env, obj))->pending();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_reInitialize(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->reInitialize();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_reconfig(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->reconfig();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_reusingSession(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->reusingSession();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KSSL_seedWithEGD(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KSSL*) QtSupport::getQt(env, obj))->seedWithEGD();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSL_session(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KSSL*) QtSupport::getQt(env, obj))->session(), "org.trinitydesktop.koala.KSSLSession");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSL_setAutoReconfig(JNIEnv* env, jobject obj, jboolean ar)
{
	((KSSL*) QtSupport::getQt(env, obj))->setAutoReconfig((bool) ar);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_setClientCertificate(JNIEnv* env, jobject obj, jobject pkcs)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->setClientCertificate((KSSLPKCS12*) QtSupport::getQt(env, pkcs));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSL_setPeerHost__(JNIEnv* env, jobject obj)
{
	((KSSL*) QtSupport::getQt(env, obj))->setPeerHost();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSL_setPeerHost__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring realHost)
{
static TQString* _qstring_realHost = 0;
	((KSSL*) QtSupport::getQt(env, obj))->setPeerHost((TQString)*(TQString*) QtSupport::toTQString(env, realHost, &_qstring_realHost));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_takeSession(JNIEnv* env, jobject obj, jobject session)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->takeSession((KSSLSession*) QtSupport::getQt(env, session));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSL_setSettings(JNIEnv* env, jobject obj, jobject settings)
{
	jboolean xret = (jboolean) ((KSSL*) QtSupport::getQt(env, obj))->setSettings((KSSLSettings*) QtSupport::getQt(env, settings));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSL_settings(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KSSL*) QtSupport::getQt(env, obj))->settings(), "org.trinitydesktop.koala.KSSLSettings");
	return xret;
}

