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

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/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 QByteArray& arg1) : KMD5(arg1) {};
	void protected_finalize() {
		KMD5::finalize();
		return;
	}
	~KMD5JBridge() {QtSupport::qtKeyDeleted(this);}
};

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KMD5_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KMD5_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_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_kde_koala_KMD5_finalizeDigest(JNIEnv* env, jobject obj)
{
	((KMD5JBridge*) QtSupport::getQt(env, obj))->protected_finalize();
	return;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_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_kde_koala_KMD5_newKMD5__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring in)
{
static QCString* _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_kde_koala_KMD5_newKMD5__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring in, jint len)
{
static QCString* _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_kde_koala_KMD5_newKMD5___3B(JNIEnv* env, jobject obj, jbyteArray a)
{
static QByteArray* _qbyteArray_a = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMD5JBridge((const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, a, &_qbyteArray_a)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KMD5_update__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring in, jint len)
{
static QCString* _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_kde_koala_KMD5_update__Lorg_kde_qt_QIODevice_2(JNIEnv* env, jobject obj, jobject file)
{
	jboolean xret = (jboolean) ((KMD5*) QtSupport::getQt(env, obj))->update((QIODevice&)*(QIODevice*) QtSupport::getQt(env, file));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_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_kde_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_kde_koala_KMD5_update___3B(JNIEnv* env, jobject obj, jbyteArray in)
{
static QByteArray* _qbyteArray_in = 0;
	((KMD5*) QtSupport::getQt(env, obj))->update((const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, in, &_qbyteArray_in));
	return;
}

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

