/***************************************************************************
                            CopyJob.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <kio/jobclasses.h>
#include <qstring.h>
#include <qcstring.h>

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

class CopyJobJBridge : public KIO::CopyJob
{
public:
	CopyJobJBridge(const KURL::List& src, const KURL& dest, CopyMode mode, bool asMethod, bool showProgressInfo) : CopyJob(src, dest, mode, asMethod, showProgressInfo) {}
	void protected_statNextSrc() {
		CopyJob::statNextSrc();
		return;
	}
	void protected_slotResultStating(KIO::Job* job) {
		CopyJob::slotResultStating(job);
		return;
	}
	void protected_startListing(const KURL& src) {
		CopyJob::startListing(src);
		return;
	}
	void protected_slotResultCreatingDirs(KIO::Job* job) {
		CopyJob::slotResultCreatingDirs(job);
		return;
	}
	void protected_slotResultConflictCreatingDirs(KIO::Job* job) {
		CopyJob::slotResultConflictCreatingDirs(job);
		return;
	}
	void protected_createNextDir() {
		CopyJob::createNextDir();
		return;
	}
	void protected_slotResultCopyingFiles(KIO::Job* job) {
		CopyJob::slotResultCopyingFiles(job);
		return;
	}
	void protected_slotResultConflictCopyingFiles(KIO::Job* job) {
		CopyJob::slotResultConflictCopyingFiles(job);
		return;
	}
	void protected_copyNextFile() {
		CopyJob::copyNextFile();
		return;
	}
	void protected_slotResultDeletingDirs(KIO::Job* job) {
		CopyJob::slotResultDeletingDirs(job);
		return;
	}
	void protected_deleteNextDir() {
		CopyJob::deleteNextDir();
		return;
	}
	void protected_skip(const KURL& sourceURL) {
		CopyJob::skip(sourceURL);
		return;
	}
	void protected_slotStart() {
		CopyJob::slotStart();
		return;
	}
	void protected_slotEntries(KIO::Job* arg1, const KIO::UDSEntryList& list) {
		CopyJob::slotEntries(arg1, list);
		return;
	}
	void protected_slotResult(KIO::Job* job) {
		CopyJob::slotResult(job);
		return;
	}
	void protected_slotProcessedSize(KIO::Job* arg1, KIO::filesize_t data_size) {
		CopyJob::slotProcessedSize(arg1, data_size);
		return;
	}
	void protected_slotTotalSize(KIO::Job* arg1, KIO::filesize_t size) {
		CopyJob::slotTotalSize(arg1, size);
		return;
	}
	void protected_slotReport() {
		CopyJob::slotReport();
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "childEvent", arg1, "org.kde.qt.QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "customEvent", arg1, "org.kde.qt.QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (! QtSupport::eventDelegate(this, "timerEvent", arg1, "org.kde.qt.QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};


JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_newCopyJob(JNIEnv *env, jobject obj, jobjectArray src, jobject dest, jint mode, jboolean asMethod, jboolean showProgressInfo)
{
static KURL::List * _qlist_src = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new CopyJobJBridge((KURL::List&) * (KURL::List *) KDESupport::toKURLList(env, src, &_qlist_src), (KURL&) *(KURL *) QtSupport::getQt(env, dest), (KIO::CopyJob::CopyMode) mode, (bool) asMethod, (bool) showProgressInfo));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_CopyJob_srcURLs(JNIEnv *env, jobject obj)
{
	KURL::List  _qlist;
	_qlist = ((KIO::CopyJob*) QtSupport::getQt(env, obj))->srcURLs();
	return (jobject) KDESupport::arrayWithKURLList(env, (KURL::List *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_CopyJob_destURL(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new KURL (((KIO::CopyJob*) QtSupport::getQt(env, obj))->destURL()), "org.kde.koala.KURL", TRUE);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_statNextSrc(JNIEnv *env, jobject obj)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_statNextSrc();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotResultStating(JNIEnv *env, jobject obj, jobject job)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotResultStating((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_startListing(JNIEnv *env, jobject obj, jobject src)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_startListing((KURL&) *(KURL *) QtSupport::getQt(env, src));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotResultCreatingDirs(JNIEnv *env, jobject obj, jobject job)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotResultCreatingDirs((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotResultConflictCreatingDirs(JNIEnv *env, jobject obj, jobject job)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotResultConflictCreatingDirs((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_createNextDir(JNIEnv *env, jobject obj)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_createNextDir();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotResultCopyingFiles(JNIEnv *env, jobject obj, jobject job)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotResultCopyingFiles((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotResultConflictCopyingFiles(JNIEnv *env, jobject obj, jobject job)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotResultConflictCopyingFiles((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_copyNextFile(JNIEnv *env, jobject obj)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_copyNextFile();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotResultDeletingDirs(JNIEnv *env, jobject obj, jobject job)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotResultDeletingDirs((KIO::Job*) QtSupport::getQt(env, job));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_deleteNextDir(JNIEnv *env, jobject obj)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_deleteNextDir();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_skip(JNIEnv *env, jobject obj, jobject sourceURL)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_skip((KURL&) *(KURL *) QtSupport::getQt(env, sourceURL));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotStart(JNIEnv *env, jobject obj)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotStart();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotEntries(JNIEnv *env, jobject obj, jobject arg1, jobject list)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotEntries((KIO::Job*) QtSupport::getQt(env, arg1), (KIO::UDSEntryList&) *(KIO::UDSEntryList *) QtSupport::getQt(env, list));
	return;
}

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

//JNIEXPORT void JNICALL
//Java_org_kde_koala_CopyJob_slotProcessedSize(JNIEnv *env, jobject obj, jobject arg1, j data_size)
//{
//	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotProcessedSize((KIO::Job*) QtSupport::getQt(env, arg1), (KIO::filesize_t) data_size);
//	return;
//}

//JNIEXPORT void JNICALL
//Java_org_kde_koala_CopyJob_slotTotalSize(JNIEnv *env, jobject obj, jobject arg1, j size)
//{
//	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotTotalSize((KIO::Job*) QtSupport::getQt(env, arg1), (KIO::filesize_t) size);
//	return;
//}

JNIEXPORT void JNICALL
Java_org_kde_koala_CopyJob_slotReport(JNIEnv *env, jobject obj)
{
	((CopyJobJBridge*) QtSupport::getQt(env, obj))->protected_slotReport();
	return;
}

