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

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

class KSaveFileJBridge : public KSaveFile
{
public:
	KSaveFileJBridge(const QString& arg1,int arg2) : KSaveFile(arg1,arg2) {};
	KSaveFileJBridge(const QString& arg1) : KSaveFile(arg1) {};
	~KSaveFileJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_koala_KSaveFile_abort(JNIEnv* env, jobject obj)
{
	((KSaveFile*) QtSupport::getQt(env, obj))->abort();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSaveFile_backupFile__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename)
{
	(void) cls;
static QString* _qstring_filename = 0;
	jboolean xret = (jboolean) KSaveFileJBridge::backupFile((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSaveFile_backupFile__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename, jstring backupDir)
{
	(void) cls;
static QString* _qstring_filename = 0;
static QString* _qstring_backupDir = 0;
	jboolean xret = (jboolean) KSaveFileJBridge::backupFile((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename), (const QString&)*(QString*) QtSupport::toQString(env, backupDir, &_qstring_backupDir));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KSaveFile_backupFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename, jstring backupDir, jstring backupExtension)
{
	(void) cls;
static QString* _qstring_filename = 0;
static QString* _qstring_backupDir = 0;
static QString* _qstring_backupExtension = 0;
	jboolean xret = (jboolean) KSaveFileJBridge::backupFile((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename), (const QString&)*(QString*) QtSupport::toQString(env, backupDir, &_qstring_backupDir), (const QString&)*(QString*) QtSupport::toQString(env, backupExtension, &_qstring_backupExtension));
	return xret;
}

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KSaveFile_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KSaveFile_finalize(env, obj);
	return;
}

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

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

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KSaveFile_newKSaveFile__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filename)
{
static QString* _qstring_filename = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSaveFileJBridge((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KSaveFile_newKSaveFile__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring filename, jint mode)
{
static QString* _qstring_filename = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSaveFileJBridge((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename), (int) mode));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

