//Auto-generated by kalyptus. DO NOT EDIT.
#include <ksslcertificatecache.h>
#include <tqdatetime.h>
#include <ksslcertificate.h>
#include <tqstring.h>
#include <tqstringlist.h>

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

class KSSLCertificateCacheJBridge : public KSSLCertificateCache
{
public:
	KSSLCertificateCacheJBridge() : KSSLCertificateCache() {};
	~KSSLCertificateCacheJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_addCertificate__Lorg_trinitydesktop_koala_KSSLCertificate_2I(JNIEnv* env, jobject obj, jobject cert, jint policy)
{
	((KSSLCertificateCache*) QtSupport::getQt(env, obj))->addCertificate((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (KSSLCertificateCache::KSSLCertificatePolicy) policy);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_addCertificate__Lorg_trinitydesktop_koala_KSSLCertificate_2IZ(JNIEnv* env, jobject obj, jobject cert, jint policy, jboolean permanent)
{
	((KSSLCertificateCache*) QtSupport::getQt(env, obj))->addCertificate((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (KSSLCertificateCache::KSSLCertificatePolicy) policy, (bool) permanent);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_addHost(JNIEnv* env, jobject obj, jobject cert, jobject host)
{
static TQString* _qstring_host = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->addHost((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, host, &_qstring_host));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_host, host);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KSSLCertificateCache_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_getCertByMD5Digest(JNIEnv* env, jobject obj, jstring key)
{
static TQString* _qstring_key = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getCertByMD5Digest((const TQString&)*(TQString*) QtSupport::toTQString(env, key, &_qstring_key)), "org.trinitydesktop.koala.KSSLCertificate");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_getHostList(JNIEnv* env, jobject obj, jobject cert)
{
	TQStringList  _qlist;
	_qlist = ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getHostList((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert));
	return (jobject) QtSupport::arrayWithTQStringList(env, (TQStringList*) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_getKDEKeyByEmail(JNIEnv* env, jobject obj, jstring email)
{
	TQStringList  _qlist;
static TQString* _qstring_email = 0;
	_qlist = ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getKDEKeyByEmail((const TQString&)*(TQString*) QtSupport::toTQString(env, email, &_qstring_email));
	return (jobject) QtSupport::arrayWithTQStringList(env, (TQStringList*) &_qlist);
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_getPolicyByCN(JNIEnv* env, jobject obj, jobject cn)
{
static TQString* _qstring_cn = 0;
	jint xret = (jint) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getPolicyByCN((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, cn, &_qstring_cn));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_getPolicyByCertificate(JNIEnv* env, jobject obj, jobject cert)
{
	jint xret = (jint) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getPolicyByCertificate((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert));
	return xret;
}

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_isPermanent(JNIEnv* env, jobject obj, jobject cert)
{
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->isPermanent((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_modifyByCN(JNIEnv* env, jobject obj, jobject cn, jint policy, jboolean permanent, jobject expires)
{
static TQString* _qstring_cn = 0;
static TQDateTime* _qdate_expires = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->modifyByCN((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, cn, &_qstring_cn), (KSSLCertificateCache::KSSLCertificatePolicy) policy, (bool) permanent, (TQDateTime&)*(TQDateTime*) QtSupport::toTQDateTime(env, expires, &_qdate_expires));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_modifyByCertificate(JNIEnv* env, jobject obj, jobject cert, jint policy, jboolean permanent, jobject expires)
{
static TQDateTime* _qdate_expires = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->modifyByCertificate((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (KSSLCertificateCache::KSSLCertificatePolicy) policy, (bool) permanent, (TQDateTime&)*(TQDateTime*) QtSupport::toTQDateTime(env, expires, &_qdate_expires));
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_reload(JNIEnv* env, jobject obj)
{
	((KSSLCertificateCache*) QtSupport::getQt(env, obj))->reload();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_removeByCN(JNIEnv* env, jobject obj, jobject cn)
{
static TQString* _qstring_cn = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->removeByCN((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, cn, &_qstring_cn));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_removeByCertificate(JNIEnv* env, jobject obj, jobject cert)
{
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->removeByCertificate((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_removeHost(JNIEnv* env, jobject obj, jobject cert, jobject host)
{
static TQString* _qstring_host = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->removeHost((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, host, &_qstring_host));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_host, host);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_saveToDisk(JNIEnv* env, jobject obj)
{
	((KSSLCertificateCache*) QtSupport::getQt(env, obj))->saveToDisk();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_seenCN(JNIEnv* env, jobject obj, jobject cn)
{
static TQString* _qstring_cn = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->seenCN((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, cn, &_qstring_cn));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSSLCertificateCache_seenCertificate(JNIEnv* env, jobject obj, jobject cert)
{
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->seenCertificate((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert));
	return xret;
}

