//Auto-generated by kalyptus. DO NOT EDIT.
#include <ksslcertificatecache.h>
#include <qdatetime.h>
#include <ksslcertificate.h>
#include <qstring.h>
#include <qstringlist.h>

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KSSLCertificateCache_addCertificate__Lorg_kde_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_kde_koala_KSSLCertificateCache_addCertificate__Lorg_kde_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_kde_koala_KSSLCertificateCache_addHost(JNIEnv* env, jobject obj, jobject cert, jobject host)
{
static QString* _qstring_host = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->addHost((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, host, &_qstring_host));
	QtSupport::fromQStringToStringBuffer(env, _qstring_host, host);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSSLCertificateCache_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KSSLCertificateCache_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_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_kde_koala_KSSLCertificateCache_getCertByMD5Digest(JNIEnv* env, jobject obj, jstring key)
{
static QString* _qstring_key = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getCertByMD5Digest((const QString&)*(QString*) QtSupport::toQString(env, key, &_qstring_key)), "org.kde.koala.KSSLCertificate");
	return xret;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificateCache_getKDEKeyByEmail(JNIEnv* env, jobject obj, jstring email)
{
	QStringList  _qlist;
static QString* _qstring_email = 0;
	_qlist = ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getKDEKeyByEmail((const QString&)*(QString*) QtSupport::toQString(env, email, &_qstring_email));
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList*) &_qlist);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSSLCertificateCache_getPolicyByCN(JNIEnv* env, jobject obj, jobject cn)
{
static QString* _qstring_cn = 0;
	jint xret = (jint) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->getPolicyByCN((QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, cn, &_qstring_cn));
	QtSupport::fromQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_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_kde_koala_KSSLCertificateCache_isDisposed(JNIEnv* env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_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_kde_koala_KSSLCertificateCache_modifyByCN(JNIEnv* env, jobject obj, jobject cn, jint policy, jboolean permanent, jobject expires)
{
static QString* _qstring_cn = 0;
static QDateTime* _qdate_expires = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->modifyByCN((QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, cn, &_qstring_cn), (KSSLCertificateCache::KSSLCertificatePolicy) policy, (bool) permanent, (QDateTime&)*(QDateTime*) QtSupport::toQDateTime(env, expires, &_qdate_expires));
	QtSupport::fromQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_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_kde_koala_KSSLCertificateCache_reload(JNIEnv* env, jobject obj)
{
	((KSSLCertificateCache*) QtSupport::getQt(env, obj))->reload();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLCertificateCache_removeByCN(JNIEnv* env, jobject obj, jobject cn)
{
static QString* _qstring_cn = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->removeByCN((QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, cn, &_qstring_cn));
	QtSupport::fromQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_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_kde_koala_KSSLCertificateCache_removeHost(JNIEnv* env, jobject obj, jobject cert, jobject host)
{
static QString* _qstring_host = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->removeHost((KSSLCertificate&)*(KSSLCertificate*) QtSupport::getQt(env, cert), (QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, host, &_qstring_host));
	QtSupport::fromQStringToStringBuffer(env, _qstring_host, host);
	return xret;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLCertificateCache_seenCN(JNIEnv* env, jobject obj, jobject cn)
{
static QString* _qstring_cn = 0;
	jboolean xret = (jboolean) ((KSSLCertificateCache*) QtSupport::getQt(env, obj))->seenCN((QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, cn, &_qstring_cn));
	QtSupport::fromQStringToStringBuffer(env, _qstring_cn, cn);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_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;
}

