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

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

class KTempFileJBridge : public KTempFile
{
public:
	KTempFileJBridge(QString arg1,QString arg2,int arg3) : KTempFile(arg1,arg2,arg3) {};
	KTempFileJBridge(QString arg1,QString arg2) : KTempFile(arg1,arg2) {};
	KTempFileJBridge(QString arg1) : KTempFile(arg1) {};
	KTempFileJBridge() : KTempFile() {};
	KTempFileJBridge(bool arg1) : KTempFile(arg1) {};
	bool protected_create(const QString& arg1,const QString& arg2,int arg3) {
		return (bool) KTempFile::create(arg1,arg2,arg3);
	}
	void protected_setError(int arg1) {
		KTempFile::setError(arg1);
		return;
	}
	~KTempFileJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTempFile_close(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KTempFile*) QtSupport::getQt(env, obj))->close();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTempFile_create(JNIEnv* env, jobject obj, jstring filePrefix, jstring fileExtension, jint mode)
{
static QString* _qstring_filePrefix = 0;
static QString* _qstring_fileExtension = 0;
	jboolean xret = (jboolean) ((KTempFileJBridge*) QtSupport::getQt(env, obj))->protected_create((const QString&)*(QString*) QtSupport::toQString(env, filePrefix, &_qstring_filePrefix), (const QString&)*(QString*) QtSupport::toQString(env, fileExtension, &_qstring_fileExtension), (int) mode);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTempFile_dataStream(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempFile*) QtSupport::getQt(env, obj))->dataStream(), "org.kde.qt.QDataStream");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KTempFile_finalize(env, obj);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTempFile_file(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempFile*) QtSupport::getQt(env, obj))->file(), "org.kde.qt.QFile");
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_KTempFile_handle(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KTempFile*) QtSupport::getQt(env, obj))->handle();
	return xret;
}

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KTempFile_name(JNIEnv* env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KTempFile*) QtSupport::getQt(env, obj))->name();
	return QtSupport::fromQString(env, &_qstring);
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_newKTempFile__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filePrefix)
{
static QString* _qstring_filePrefix = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((QString)*(QString*) QtSupport::toQString(env, filePrefix, &_qstring_filePrefix)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_newKTempFile__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filePrefix, jstring fileExtension)
{
static QString* _qstring_filePrefix = 0;
static QString* _qstring_fileExtension = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((QString)*(QString*) QtSupport::toQString(env, filePrefix, &_qstring_filePrefix), (QString)*(QString*) QtSupport::toQString(env, fileExtension, &_qstring_fileExtension)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_newKTempFile__Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring filePrefix, jstring fileExtension, jint mode)
{
static QString* _qstring_filePrefix = 0;
static QString* _qstring_fileExtension = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((QString)*(QString*) QtSupport::toQString(env, filePrefix, &_qstring_filePrefix), (QString)*(QString*) QtSupport::toQString(env, fileExtension, &_qstring_fileExtension), (int) mode));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_newKTempFile__Z(JNIEnv* env, jobject obj, jboolean arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((bool) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_setAutoDelete(JNIEnv* env, jobject obj, jboolean autoDelete)
{
	((KTempFile*) QtSupport::getQt(env, obj))->setAutoDelete((bool) autoDelete);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_setError(JNIEnv* env, jobject obj, jint error)
{
	((KTempFileJBridge*) QtSupport::getQt(env, obj))->protected_setError((int) error);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KTempFile_status(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KTempFile*) QtSupport::getQt(env, obj))->status();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTempFile_sync(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KTempFile*) QtSupport::getQt(env, obj))->sync();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTempFile_textStream(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempFile*) QtSupport::getQt(env, obj))->textStream(), "org.kde.qt.QTextStream");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempFile_unlink(JNIEnv* env, jobject obj)
{
	((KTempFile*) QtSupport::getQt(env, obj))->unlink();
	return;
}

