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

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

class KSSLPKCS12JBridge : public KSSLPKCS12
{
public:
	KSSLPKCS12JBridge() : KSSLPKCS12() {};
	bool protected_parse(QString arg1) {
		return (bool) KSSLPKCS12::parse(arg1);
	}
	~KSSLPKCS12JBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLPKCS12_changePassword(JNIEnv* env, jobject obj, jstring pold, jstring pnew)
{
static QString* _qstring_pold = 0;
static QString* _qstring_pnew = 0;
	jboolean xret = (jboolean) ((KSSLPKCS12*) QtSupport::getQt(env, obj))->changePassword((QString)*(QString*) QtSupport::toQString(env, pold, &_qstring_pold), (QString)*(QString*) QtSupport::toQString(env, pnew, &_qstring_pnew));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSSLPKCS12_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KSSLPKCS12_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLPKCS12_fromString__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring base64)
{
	(void) cls;
static QString* _qstring_base64 = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLPKCS12JBridge::fromString((QString)*(QString*) QtSupport::toQString(env, base64, &_qstring_base64)), "org.kde.koala.KSSLPKCS12");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLPKCS12_fromString__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring base64, jstring password)
{
	(void) cls;
static QString* _qstring_base64 = 0;
static QString* _qstring_password = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLPKCS12JBridge::fromString((QString)*(QString*) QtSupport::toQString(env, base64, &_qstring_base64), (QString)*(QString*) QtSupport::toQString(env, password, &_qstring_password)), "org.kde.koala.KSSLPKCS12");
	return xret;
}

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

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

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

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLPKCS12_loadCertFile__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename)
{
	(void) cls;
static QString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLPKCS12JBridge::loadCertFile((QString)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename)), "org.kde.koala.KSSLPKCS12");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KSSLPKCS12_loadCertFile__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename, jstring password)
{
	(void) cls;
static QString* _qstring_filename = 0;
static QString* _qstring_password = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLPKCS12JBridge::loadCertFile((QString)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename), (QString)*(QString*) QtSupport::toQString(env, password, &_qstring_password)), "org.kde.koala.KSSLPKCS12");
	return xret;
}

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLPKCS12_parse(JNIEnv* env, jobject obj, jstring pass)
{
static QString* _qstring_pass = 0;
	jboolean xret = (jboolean) ((KSSLPKCS12JBridge*) QtSupport::getQt(env, obj))->protected_parse((QString)*(QString*) QtSupport::toQString(env, pass, &_qstring_pass));
	return xret;
}

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSSLPKCS12_toFile(JNIEnv* env, jobject obj, jstring filename)
{
static QString* _qstring_filename = 0;
	jboolean xret = (jboolean) ((KSSLPKCS12*) QtSupport::getQt(env, obj))->toFile((QString)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename));
	return xret;
}

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

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

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

