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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KMimeMagic_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KMimeMagic_finalize(env, obj);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KMimeMagic_findBufferFileType(JNIEnv* env, jobject obj, jbyteArray arg1, jstring filename)
{
static TQByteArray* _qbyteArray_arg1 = 0;
static TQString* _qstring_filename = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KMimeMagic*) QtSupport::getQt(env, obj))->findBufferFileType((const TQByteArray&)*(TQByteArray*) QtSupport::toTQByteArray(env, arg1, &_qbyteArray_arg1), (const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename)), "org.trinitydesktop.koala.KMimeMagicResult");
	return xret;
}

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

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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KMimeMagic_newKMimeMagic__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring configFile)
{
static TQString* _qstring_configFile = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KMimeMagicJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, configFile, &_qstring_configFile)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

