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

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTempDir_create(JNIEnv* env, jobject obj, jstring directoryPrefix, jint mode)
{
static QString* _qstring_directoryPrefix = 0;
	jboolean xret = (jboolean) ((KTempDirJBridge*) QtSupport::getQt(env, obj))->protected_create((const QString&)*(QString*) QtSupport::toQString(env, directoryPrefix, &_qstring_directoryPrefix), (int) mode);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempDir_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KTempDir_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTempDir_existing(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KTempDir*) QtSupport::getQt(env, obj))->existing();
	return xret;
}

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

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempDir_newKTempDir__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring directoryPrefix)
{
static QString* _qstring_directoryPrefix = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempDirJBridge((QString)*(QString*) QtSupport::toQString(env, directoryPrefix, &_qstring_directoryPrefix)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTempDir_newKTempDir__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring directoryPrefix, jint mode)
{
static QString* _qstring_directoryPrefix = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempDirJBridge((QString)*(QString*) QtSupport::toQString(env, directoryPrefix, &_qstring_directoryPrefix), (int) mode));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KTempDir_qDir(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempDir*) QtSupport::getQt(env, obj))->qDir(), "org.kde.qt.QDir");
	return xret;
}

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

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

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

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

