//Auto-generated by kalyptus. DO NOT EDIT.
#include <kio/global.h>
#include <kparts/browserextension.h>
#include <kdirsize.h>
#include <kurl.h>

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

class KDirSizeJBridge : public KDirSize
{
public:
	KDirSizeJBridge(const KURL& arg1) : KDirSize(arg1) {};
	KDirSizeJBridge(const KFileItemList& arg1) : KDirSize(arg1) {};
	void protected_setSync() {
		KDirSize::setSync();
		return;
	}
	void protected_startNextJob(const KURL& arg1) {
		KDirSize::startNextJob(arg1);
		return;
	}
	void protected_slotResult(KIO::Job* arg1) {
		KDirSize::slotResult(arg1);
		return;
	}
	void protected_processList() {
		KDirSize::processList();
		return;
	}
	void removeChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::removeChild(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void slotResult(KIO::Job* arg1) {
		if (!QtSupport::eventDelegate(this,"slotResult",(void*)arg1,"org.kde.koala.Job")) {
			KDirSize::slotResult(arg1);
		}
		return;
	}
	void insertChild(QObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.kde.qt.QObject")) {
			QObject::insertChild(arg1);
		}
		return;
	}
	bool eventFilter(QObject* object,QEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KDirSize",object,event)) {
			return QObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KDirSize_className(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((KDirSize*) QtSupport::getQt(env, obj))->className();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KDirSize_dirSizeJob__Ljava_util_ArrayList_2(JNIEnv* env, jclass cls, jobjectArray lstItems)
{
	(void) cls;
static KFileItemList* _qlist_lstItems = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KDirSizeJBridge::dirSizeJob((const KFileItemList&)*(QStrList*) KDESupport::toKFileItemList(env, lstItems, &_qlist_lstItems)), "org.kde.koala.KDirSize");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KDirSize_dirSizeJob__Lorg_kde_koala_KURL_2(JNIEnv* env, jclass cls, jobject directory)
{
	(void) cls;
	jobject xret = QtSupport::objectForQtKey(env, (void*)KDirSizeJBridge::dirSizeJob((const KURL&)*(const KURL*) QtSupport::getQt(env, directory)), "org.kde.koala.KDirSize");
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_KDirSize_dirSize(JNIEnv* env, jclass cls, jobject directory)
{
	(void) cls;
	jlong xret = (jlong) KDirSizeJBridge::dirSize((const KURL&)*(const KURL*) QtSupport::getQt(env, directory));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KDirSize_metaObject(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KDirSize*) QtSupport::getQt(env, obj))->metaObject(), "org.kde.qt.QMetaObject");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KDirSize_newKDirSize__Ljava_util_ArrayList_2(JNIEnv* env, jobject obj, jobjectArray lstItems)
{
static KFileItemList* _qlist_lstItems = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KDirSizeJBridge((const KFileItemList&)*(QStrList*) KDESupport::toKFileItemList(env, lstItems, &_qlist_lstItems)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KDirSize_newKDirSize__Lorg_kde_koala_KURL_2(JNIEnv* env, jobject obj, jobject directory)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KDirSizeJBridge((const KURL&)*(const KURL*) QtSupport::getQt(env, directory)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KDirSize_processList(JNIEnv* env, jobject obj)
{
	((KDirSizeJBridge*) QtSupport::getQt(env, obj))->protected_processList();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KDirSize_setSync(JNIEnv* env, jobject obj)
{
	((KDirSizeJBridge*) QtSupport::getQt(env, obj))->protected_setSync();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KDirSize_slotResult(JNIEnv* env, jobject obj, jobject job)
{
	((KDirSizeJBridge*) QtSupport::getQt(env, obj))->protected_slotResult((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KDirSize_startNextJob(JNIEnv* env, jobject obj, jobject url)
{
	((KDirSizeJBridge*) QtSupport::getQt(env, obj))->protected_startNextJob((const KURL&)*(const KURL*) QtSupport::getQt(env, url));
	return;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_KDirSize_totalFiles(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((KDirSize*) QtSupport::getQt(env, obj))->totalFiles();
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_KDirSize_totalSize(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((KDirSize*) QtSupport::getQt(env, obj))->totalSize();
	return xret;
}

JNIEXPORT jlong JNICALL
Java_org_kde_koala_KDirSize_totalSubdirs(JNIEnv* env, jobject obj)
{
	jlong xret = (jlong) ((KDirSize*) QtSupport::getQt(env, obj))->totalSubdirs();
	return xret;
}

