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

#include <qtjava/QtSupport.h>
#include <tdejava/TDESupport.h>
#include <tdejava/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_trinitydesktop_koala_KSSLCertificate_chain(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)(KSSLCertChain *) &((KSSLCertificate*) QtSupport::getQt(env, obj))->chain(), "org.trinitydesktop.koala.KSSLCertChain");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLCertificate_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KSSLCertificate_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLCertificate_fromString(JNIEnv* env, jclass cls, jstring cert)
{
	(void) cls;
static TQCString* _qcstring_cert = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLCertificateJBridge::fromString((TQCString)*(TQCString*) QtSupport::toTQCString(env, cert, &_qcstring_cert)), "org.trinitydesktop.koala.KSSLCertificate");
	return xret;
}

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

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

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

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

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KSSLCertificate_getMD5DigestFromKDEKey(JNIEnv* env, jclass cls, jstring k)
{
	TQString  _qstring;
	(void) cls;
static TQString* _qstring_k = 0;
	_qstring = KSSLCertificateJBridge::getMD5DigestFromKDEKey((const TQString&)*(TQString*) QtSupport::toTQString(env, k, &_qstring_k));
	return QtSupport::fromTQString(env, &_qstring);
}

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

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KSSLCertificate_getMD5Digest(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((KSSLCertificate*) QtSupport::getQt(env, obj))->getMD5Digest();
	return QtSupport::fromTQString(env, &_qstring);
}

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

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

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

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

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

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

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

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

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

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

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_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_trinitydesktop_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_trinitydesktop_koala_KSSLCertificate_newKSSLCertificate__Lorg_trinitydesktop_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_trinitydesktop_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_trinitydesktop_koala_KSSLCertificate_replicate(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KSSLCertificate*) QtSupport::getQt(env, obj))->replicate(), "org.trinitydesktop.koala.KSSLCertificate");
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLCertificate_setCert(JNIEnv* env, jobject obj, jobject cert)
{
static TQString* _qstring_cert = 0;
	jboolean xret = (jboolean) ((KSSLCertificate*) QtSupport::getQt(env, obj))->setCert((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, cert, &_qstring_cert));
	QtSupport::fromTQStringToStringBuffer(env, _qstring_cert, cert);
	return xret;
}

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

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

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

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

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

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

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLCertificate_verifyText(JNIEnv* env, jclass cls, jint x)
{
	TQString  _qstring;
	(void) cls;
	_qstring = KSSLCertificateJBridge::verifyText((KSSLCertificate::KSSLValidation) x);
	return QtSupport::fromTQString(env, &_qstring);
}

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

