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

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

class KArJBridge : public KAr
{
public:
	KArJBridge(const QString& arg1) : KAr(arg1) {};
	KArJBridge(QIODevice* arg1) : KAr(arg1) {};
	bool protected_openArchive(int arg1) {
		return (bool) KAr::openArchive(arg1);
	}
	bool protected_closeArchive() {
		return (bool) KAr::closeArchive();
	}
	~KArJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KAr_closeArchive(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KArJBridge*) QtSupport::getQt(env, obj))->protected_closeArchive();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KAr_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KAr_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KAr_doneWriting(JNIEnv* env, jobject obj, jint arg1)
{
	jboolean xret = (jboolean) ((KAr*) QtSupport::getQt(env, obj))->doneWriting((uint) arg1);
	return xret;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KAr_newKAr__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 KArJBridge((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_KAr_newKAr__Lorg_kde_qt_QIODeviceInterface_2(JNIEnv* env, jobject obj, jobject dev)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KArJBridge((QIODevice*) QtSupport::getQt(env, dev)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KAr_openArchive(JNIEnv* env, jobject obj, jint mode)
{
	jboolean xret = (jboolean) ((KArJBridge*) QtSupport::getQt(env, obj))->protected_openArchive((int) mode);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KAr_prepareWriting(JNIEnv* env, jobject obj, jstring arg1, jstring arg2, jstring arg3, jint arg4)
{
static QString* _qstring_arg1 = 0;
static QString* _qstring_arg2 = 0;
static QString* _qstring_arg3 = 0;
	jboolean xret = (jboolean) ((KAr*) QtSupport::getQt(env, obj))->prepareWriting((const QString&)*(QString*) QtSupport::toQString(env, arg1, &_qstring_arg1), (const QString&)*(QString*) QtSupport::toQString(env, arg2, &_qstring_arg2), (const QString&)*(QString*) QtSupport::toQString(env, arg3, &_qstring_arg3), (uint) arg4);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KAr_writeDir(JNIEnv* env, jobject obj, jstring arg1, jstring arg2, jstring arg3)
{
static QString* _qstring_arg1 = 0;
static QString* _qstring_arg2 = 0;
static QString* _qstring_arg3 = 0;
	jboolean xret = (jboolean) ((KAr*) QtSupport::getQt(env, obj))->writeDir((const QString&)*(QString*) QtSupport::toQString(env, arg1, &_qstring_arg1), (const QString&)*(QString*) QtSupport::toQString(env, arg2, &_qstring_arg2), (const QString&)*(QString*) QtSupport::toQString(env, arg3, &_qstring_arg3));
	return xret;
}

