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

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

class KSSLCertificateJBridge : public KSSLCertificate
{
public:
	KSSLCertificateJBridge(const KSSLCertificate& arg1) : KSSLCertificate(arg1) {};
	KSSLCertificateJBridge() : KSSLCertificate() {};
	KSSLCertificate::KSSLValidation protected_processError(int arg1) {
		return (KSSLCertificate::KSSLValidation) KSSLCertificate::processError(arg1);
	}
	~KSSLCertificateJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificate_chain(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)(KSSLCertChain *) &((KSSLCertificate*) QtSupport::getQt(env, obj))->chain(), "org.kde.koala.KSSLCertChain");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSSLCertificate_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KSSLCertificate_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificate_fromString(JNIEnv* env, jclass cls, jstring cert)
{
	(void) cls;
static QCString* _qcstring_cert = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLCertificateJBridge::fromString((QCString)*(QCString*) QtSupport::toQCString(env, cert, &_qcstring_cert)), "org.kde.koala.KSSLCertificate");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSSLCertificate_getEmails(JNIEnv* env, jobject obj, jobjectArray to)
{
static QStringList* _qlist_to = 0;
	((KSSLCertificate*) QtSupport::getQt(env, obj))->getEmails((QStringList&)*(QStringList*) QtSupport::toQStringList(env, to, &_qlist_to));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getIssuer(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getIssuer();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getKDEKey(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getKDEKey();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getKeyType(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getKeyType();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getMD5DigestFromKDEKey(JNIEnv* env, jclass cls, jstring k)
{
	QString  _qstring;
	(void) cls;
static QString* _qstring_k = 0;
	_qstring = KSSLCertificateJBridge::getMD5DigestFromKDEKey((const QString&)*(QString*) QtSupport::toQString(env, k, &_qstring_k));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getMD5DigestText(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getMD5DigestText();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getNotAfter(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getNotAfter();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getNotBefore(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getNotBefore();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getPublicKeyText(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getPublicKeyText();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificate_getQDTNotAfter(JNIEnv* env, jobject obj)
{
	QDateTime  _qdate;
	_qdate = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getQDTNotAfter();
	return (jobject) QtSupport::fromQDateTime(env, (QDateTime*) &_qdate);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificate_getQDTNotBefore(JNIEnv* env, jobject obj)
{
	QDateTime  _qdate;
	_qdate = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getQDTNotBefore();
	return (jobject) QtSupport::fromQDateTime(env, (QDateTime*) &_qdate);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getSerialNumber(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getSerialNumber();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getSignatureText(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getSignatureText();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_getSubject(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getSubject();
	return QtSupport::fromQString(env, &_qstring);
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLCertificate_isSigner(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSLCertificate*) QtSupport::getQt(env, obj))->isSigner();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLCertificate_isValid__(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KSSLCertificate*) QtSupport::getQt(env, obj))->isValid();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLCertificate_isValid__I(JNIEnv* env, jobject obj, jint p)
{
	jboolean xret = (jboolean) ((KSSLCertificate*) QtSupport::getQt(env, obj))->isValid((KSSLCertificate::KSSLPurpose) p);
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KSSLCertificate_newKSSLCertificate__Lorg_kde_koala_KSSLCertificate_2(JNIEnv* env, jobject obj, jobject x)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSSLCertificateJBridge((const KSSLCertificate&)*(const KSSLCertificate*) QtSupport::getQt(env, x)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSSLCertificate_processError(JNIEnv* env, jobject obj, jint ec)
{
	jint xret = (jint) ((KSSLCertificateJBridge*) QtSupport::getQt(env, obj))->protected_processError((int) ec);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificate_replicate(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KSSLCertificate*) QtSupport::getQt(env, obj))->replicate(), "org.kde.koala.KSSLCertificate");
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSSLCertificate_revalidate__(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KSSLCertificate*) QtSupport::getQt(env, obj))->revalidate();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSSLCertificate_revalidate__I(JNIEnv* env, jobject obj, jint p)
{
	jint xret = (jint) ((KSSLCertificate*) QtSupport::getQt(env, obj))->revalidate((KSSLCertificate::KSSLPurpose) p);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLCertificate_setCert(JNIEnv* env, jobject obj, jobject cert)
{
static QString* _qstring_cert = 0;
	jboolean xret = (jboolean) ((KSSLCertificate*) QtSupport::getQt(env, obj))->setCert((QString&)*(QString*) QtSupport::toQStringFromStringBuffer(env, cert, &_qstring_cert));
	QtSupport::fromQStringToStringBuffer(env, _qstring_cert, cert);
	return xret;
}

JNIEXPORT jbyteArray JNICALL
Java_org_kde_koala_KSSLCertificate_toDer(JNIEnv* env, jobject obj)
{
	QByteArray _qbyteArray;
	_qbyteArray = ((KSSLCertificate*) QtSupport::getQt(env, obj))->toDer();
	return QtSupport::fromQByteArray(env, &_qbyteArray);
}

JNIEXPORT jbyteArray JNICALL
Java_org_kde_koala_KSSLCertificate_toNetscape(JNIEnv* env, jobject obj)
{
	QByteArray _qbyteArray;
	_qbyteArray = ((KSSLCertificate*) QtSupport::getQt(env, obj))->toNetscape();
	return QtSupport::fromQByteArray(env, &_qbyteArray);
}

JNIEXPORT jbyteArray JNICALL
Java_org_kde_koala_KSSLCertificate_toPem(JNIEnv* env, jobject obj)
{
	QByteArray _qbyteArray;
	_qbyteArray = ((KSSLCertificate*) QtSupport::getQt(env, obj))->toPem();
	return QtSupport::fromQByteArray(env, &_qbyteArray);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_toString(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->toString();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_toText(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->toText();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSSLCertificate_validate__(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KSSLCertificate*) QtSupport::getQt(env, obj))->validate();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KSSLCertificate_validate__I(JNIEnv* env, jobject obj, jint p)
{
	jint xret = (jint) ((KSSLCertificate*) QtSupport::getQt(env, obj))->validate((KSSLCertificate::KSSLPurpose) p);
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KSSLCertificate_verifyText(JNIEnv* env, jclass cls, jint x)
{
	QString  _qstring;
	(void) cls;
	_qstring = KSSLCertificateJBridge::verifyText((KSSLCertificate::KSSLValidation) x);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLCertificate_x509V3Extensions(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)(KSSLX509V3 *) &((KSSLCertificate*) QtSupport::getQt(env, obj))->x509V3Extensions(), "org.kde.koala.KSSLX509V3");
	return xret;
}

