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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSSLPKCS12_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KSSLPKCS12_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLPKCS12_fromString__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring base64)
{
	(void) cls;
static TQString* _qstring_base64 = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLPKCS12JBridge::fromString((TQString)*(TQString*) QtSupport::toTQString(env, base64, &_qstring_base64)), "org.trinitydesktop.koala.KSSLPKCS12");
	return xret;
}

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

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

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

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLPKCS12_loadCertFile__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename)
{
	(void) cls;
static TQString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KSSLPKCS12JBridge::loadCertFile((TQString)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename)), "org.trinitydesktop.koala.KSSLPKCS12");
	return xret;
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLPKCS12_parse(JNIEnv* env, jobject obj, jstring pass)
{
static TQString* _qstring_pass = 0;
	jboolean xret = (jboolean) ((KSSLPKCS12JBridge*) QtSupport::getQt(env, obj))->protected_parse((TQString)*(TQString*) QtSupport::toTQString(env, pass, &_qstring_pass));
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KSSLPKCS12_toFile(JNIEnv* env, jobject obj, jstring filename)
{
static TQString* _qstring_filename = 0;
	jboolean xret = (jboolean) ((KSSLPKCS12*) QtSupport::getQt(env, obj))->toFile((TQString)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename));
	return xret;
}

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

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

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

