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

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

class KTarJBridge : public KTar
{
public:
	KTarJBridge(const QString& arg1,const QString& arg2) : KTar(arg1,arg2) {};
	KTarJBridge(const QString& arg1) : KTar(arg1) {};
	KTarJBridge(QIODevice* arg1) : KTar(arg1) {};
	bool protected_openArchive(int arg1) {
		return (bool) KTar::openArchive(arg1);
	}
	bool protected_closeArchive() {
		return (bool) KTar::closeArchive();
	}
	bool protected_prepareWriting_impl(const QString& arg1,const QString& arg2,const QString& arg3,uint arg4,mode_t arg5,time_t arg6,time_t arg7,time_t arg8) {
		return (bool) KTar::prepareWriting_impl(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
	}
	bool protected_writeDir_impl(const QString& arg1,const QString& arg2,const QString& arg3,mode_t arg4,time_t arg5,time_t arg6,time_t arg7) {
		return (bool) KTar::writeDir_impl(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
	}
	bool protected_writeSymLink_impl(const QString& arg1,const QString& arg2,const QString& arg3,const QString& arg4,mode_t arg5,time_t arg6,time_t arg7,time_t arg8) {
		return (bool) KTar::writeSymLink_impl(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
	}
	~KTarJBridge() {QtSupport::qtKeyDeleted(this);}
};

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KTar_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KTar_finalize(env, obj);
	return;
}

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

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

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KTar_newKTar__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 KTarJBridge((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_KTar_newKTar__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filename, jstring mimetype)
{
static QString* _qstring_filename = 0;
static QString* _qstring_mimetype = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTarJBridge((const QString&)*(QString*) QtSupport::toQString(env, filename, &_qstring_filename), (const QString&)*(QString*) QtSupport::toQString(env, mimetype, &_qstring_mimetype)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_prepareWriting_1impl(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size, jlong perm, jint atime, jint mtime, jint ctime)
{
static QString* _qstring_name = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTarJBridge*) QtSupport::getQt(env, obj))->protected_prepareWriting_impl((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (uint) size, (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_prepareWriting__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size)
{
static QString* _qstring_name = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTar*) QtSupport::getQt(env, obj))->prepareWriting((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (uint) size);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_prepareWriting__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2IJIII(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jint size, jlong perm, jint atime, jint mtime, jint ctime)
{
static QString* _qstring_name = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTar*) QtSupport::getQt(env, obj))->prepareWriting((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (uint) size, (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KTar_setOrigFileName(JNIEnv* env, jobject obj, jstring fileName)
{
static QCString* _qcstring_fileName = 0;
	((KTar*) QtSupport::getQt(env, obj))->setOrigFileName((const QCString&)*(QCString*) QtSupport::toQCString(env, fileName, &_qcstring_fileName));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_writeDir_1impl(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jlong perm, jint atime, jint mtime, jint ctime)
{
static QString* _qstring_name = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTarJBridge*) QtSupport::getQt(env, obj))->protected_writeDir_impl((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_writeDir__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group)
{
static QString* _qstring_name = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTar*) QtSupport::getQt(env, obj))->writeDir((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_writeDir__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2JIII(JNIEnv* env, jobject obj, jstring name, jstring user, jstring group, jlong perm, jint atime, jint mtime, jint ctime)
{
static QString* _qstring_name = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTar*) QtSupport::getQt(env, obj))->writeDir((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_writeSymLink_1impl(JNIEnv* env, jobject obj, jstring name, jstring target, jstring user, jstring group, jlong perm, jint atime, jint mtime, jint ctime)
{
static QString* _qstring_name = 0;
static QString* _qstring_target = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTarJBridge*) QtSupport::getQt(env, obj))->protected_writeSymLink_impl((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, target, &_qstring_target), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KTar_writeSymLink(JNIEnv* env, jobject obj, jstring name, jstring target, jstring user, jstring group, jlong perm, jint atime, jint mtime, jint ctime)
{
static QString* _qstring_name = 0;
static QString* _qstring_target = 0;
static QString* _qstring_user = 0;
static QString* _qstring_group = 0;
	jboolean xret = (jboolean) ((KTar*) QtSupport::getQt(env, obj))->writeSymLink((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name), (const QString&)*(QString*) QtSupport::toQString(env, target, &_qstring_target), (const QString&)*(QString*) QtSupport::toQString(env, user, &_qstring_user), (const QString&)*(QString*) QtSupport::toQString(env, group, &_qstring_group), (mode_t) perm, (time_t) atime, (time_t) mtime, (time_t) ctime);
	return xret;
}

