//Auto-generated by kalyptus. DO NOT EDIT.
#include <kmdcodec.h>
#include <tqiodevice.h>
#include <tqcstring.h>

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

class KMD5JBridge : public KMD5
{
public:
	KMD5JBridge() : KMD5() {};
	KMD5JBridge(const char* arg1,int arg2) : KMD5(arg1,arg2) {};
	KMD5JBridge(const char* arg1) : KMD5(arg1) {};
	KMD5JBridge(const TQByteArray& arg1) : KMD5(arg1) {};
	void protected_finalize() {
		KMD5::finalize();
		return;
	}
	~KMD5JBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KMD5_base64Digest(JNIEnv* env, jobject obj)
{
	TQCString  _qstring;
	_qstring = ((KMD5*) QtSupport::getQt(env, obj))->base64Digest();
	return QtSupport::fromTQCString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KMD5_finalize(env, obj);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_finalizeDigest(JNIEnv* env, jobject obj)
{
	((KMD5JBridge*) QtSupport::getQt(env, obj))->protected_finalize();
	return;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KMD5_hexDigest__(JNIEnv* env, jobject obj)
{
	TQCString  _qstring;
	_qstring = ((KMD5*) QtSupport::getQt(env, obj))->hexDigest();
	return QtSupport::fromTQCString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_hexDigest__Ljava_lang_StringBuffer_2(JNIEnv* env, jobject obj, jobject arg1)
{
static TQCString* _qcstring_arg1 = 0;
	if (_qcstring_arg1 == 0) {
		_qcstring_arg1 = new TQCString();
	}
	((KMD5*) QtSupport::getQt(env, obj))->hexDigest((TQCString&)*(TQCString*) _qcstring_arg1);
	QtSupport::fromTQCStringToStringBuffer(env, _qcstring_arg1, arg1);
	return;
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_newKMD5__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring in)
{
static TQCString* _qstring_in = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMD5JBridge((const char*) QtSupport::toCharString(env, in, &_qstring_in)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_newKMD5__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring in, jint len)
{
static TQCString* _qstring_in = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMD5JBridge((const char*) QtSupport::toCharString(env, in, &_qstring_in), (int) len));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_newKMD5___3B(JNIEnv* env, jobject obj, jbyteArray a)
{
static TQByteArray* _qbyteArray_a = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMD5JBridge((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, a, &_qbyteArray_a)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_reset(JNIEnv* env, jobject obj)
{
	((KMD5*) QtSupport::getQt(env, obj))->reset();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_update__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring in)
{
static TQCString* _qstring_in = 0;
	((KMD5*) QtSupport::getQt(env, obj))->update((const char*) QtSupport::toCharString(env, in, &_qstring_in));
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_update__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring in, jint len)
{
static TQCString* _qstring_in = 0;
	((KMD5*) QtSupport::getQt(env, obj))->update((const char*) QtSupport::toCharString(env, in, &_qstring_in), (int) len);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KMD5_update__Lorg_trinitydesktop_qt_QIODevice_2(JNIEnv* env, jobject obj, jobject file)
{
	jboolean xret = (jboolean) ((KMD5*) QtSupport::getQt(env, obj))->update((TQIODevice&)*(TQIODevice*) QtSupport::getQt(env, file));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_update__S(JNIEnv* env, jobject obj, jshort in)
{
	((KMD5*) QtSupport::getQt(env, obj))->update((const unsigned char*) in);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_update__SI(JNIEnv* env, jobject obj, jshort in, jint len)
{
	((KMD5*) QtSupport::getQt(env, obj))->update((const unsigned char*) in, (int) len);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMD5_update___3B(JNIEnv* env, jobject obj, jbyteArray in)
{
static TQByteArray* _qbyteArray_in = 0;
	((KMD5*) QtSupport::getQt(env, obj))->update((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, in, &_qbyteArray_in));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KMD5_verify(JNIEnv* env, jobject obj, jstring arg1)
{
static TQCString* _qcstring_arg1 = 0;
	jboolean xret = (jboolean) ((KMD5*) QtSupport::getQt(env, obj))->verify((const TQCString&)*(TQCString*) QtSupport::toTQCString(env, arg1, &_qcstring_arg1));
	return xret;
}

