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

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

class KMimeMagicJBridge : public KMimeMagic
{
public:
	KMimeMagicJBridge() : KMimeMagic() {};
	KMimeMagicJBridge(const QString& arg1) : KMimeMagic(arg1) {};
	static void protected_initStatic() {
		KMimeMagic::initStatic();
		return;
	}
	~KMimeMagicJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_koala_KMimeMagic_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KMimeMagic_finalize(env, obj);
	return;
}

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

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KMimeMagic_findBufferFileType(JNIEnv* env, jobject obj, jbyteArray arg1, jstring filename)
{
static QByteArray* _qbyteArray_arg1 = 0;
static QString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findBufferFileType((const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, arg1, &_qbyteArray_arg1), (const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename)), "org.kde.koala.KMimeMagicResult");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KMimeMagic_findBufferType(JNIEnv* env, jobject obj, jbyteArray p)
{
static QByteArray* _qbyteArray_p = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findBufferType((const QByteArray&)*(QByteArray*) QtSupport::toQByteArray(env, p, &_qbyteArray_p)), "org.kde.koala.KMimeMagicResult");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KMimeMagic_findFileType(JNIEnv* env, jobject obj, jstring _filename)
{
static QString* _qstring__filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findFileType((const QString&)*(QString*) QtSupport::toQString(env, _filename, &_qstring__filename)), "org.kde.koala.KMimeMagicResult");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KMimeMagic_initStatic(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	KMimeMagicJBridge::protected_initStatic();
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KMimeMagic_mergeBufConfig(JNIEnv* env, jobject obj, jstring arg1)
{
static QCString* _qstring_arg1 = 0;
	jboolean xret = (jboolean) ((KMimeMagic*) QtSupport::getQt(env, obj))->mergeBufConfig((char*) QtSupport::toCharString(env, arg1, &_qstring_arg1));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KMimeMagic_mergeConfig(JNIEnv* env, jobject obj, jstring configFile)
{
static QString* _qstring_configFile = 0;
	jboolean xret = (jboolean) ((KMimeMagic*) QtSupport::getQt(env, obj))->mergeConfig((const QString&)*(QString*) QtSupport::toQString(env, configFile, &_qstring_configFile));
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KMimeMagic_newKMimeMagic__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring configFile)
{
static QString* _qstring_configFile = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMimeMagicJBridge((const QString&)*(QString*) QtSupport::toQString(env, configFile, &_qstring_configFile)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KMimeMagic_self(JNIEnv* env, jclass cls)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KMimeMagicJBridge::self(), "org.kde.koala.KMimeMagic");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KMimeMagic_setFollowLinks(JNIEnv* env, jobject obj, jboolean _enable)
{
	((KMimeMagic*) QtSupport::getQt(env, obj))->setFollowLinks((bool) _enable);
	return;
}

