/***************************************************************************
                            kde_Job.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

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

extern "C" {
#include "kde_Job.h"
}

#include <kio/jobclasses.h>

class JobBridge : public KIO::Job
{
public:
	~JobBridge() {}
	JobBridge(bool showProgressInfo) : Job(showProgressInfo) {}
	void protected_addSubjob(Job* job, bool inheritMetaData) {
		Job::addSubjob(job, inheritMetaData);
		return;
	}
	void protected_removeSubjob(Job* job) {
		Job::removeSubjob(job);
		return;
	}
	void protected_emitPercent(KIO::filesize_t processedSize, KIO::filesize_t totalSize) {
		Job::emitPercent(processedSize, totalSize);
		return;
	}
	void protected_emitSpeed(unsigned long bytes_per_second) {
		Job::emitSpeed(bytes_per_second);
		return;
	}
	void protected_emitResult() {
		Job::emitResult();
		return;
	}
	void protected_slotResult(KIO::Job* job) {
		Job::slotResult(job);
		return;
	}
	void protected_slotSpeed(KIO::Job* arg1, unsigned long bytes_per_second) {
		Job::slotSpeed(arg1, bytes_per_second);
		return;
	}
	void protected_slotInfoMessage(KIO::Job* arg1, const QString& arg2) {
		Job::slotInfoMessage(arg1, arg2);
		return;
	}
	void protected_slotSpeedTimeout() {
		Job::slotSpeedTimeout();
		return;
	}
	void childEvent(QChildEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "childEvent", arg1, "QChildEvent")) {
			QObject::childEvent(arg1);
		}
		return;
	}
	void customEvent(QCustomEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "customEvent", arg1, "QCustomEvent")) {
			QObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(QTimerEvent* arg1) {
		if (Qt_EventDelegate == 0L || !(*Qt_EventDelegate)(this, "timerEvent", arg1, "QTimerEvent")) {
			QObject::timerEvent(arg1);
		}
		return;
	}
};

void kde_del_Job( kde_Job* p ){
	delete (JobBridge*) p;
}
void kde_Job_kill( kde_Job* instPointer,int quietly){
	((JobBridge*)instPointer)->kill((bool)quietly);
	return;
}
int kde_Job_error( kde_Job* instPointer){
	return (int) ((JobBridge*)instPointer)->error();
}
int kde_Job_progressId( kde_Job* instPointer){
	return (int) ((JobBridge*)instPointer)->progressId();
}
qt_QString * kde_Job_errorText( kde_Job* instPointer){
	return (qt_QString *) (const QString *)&((JobBridge*)instPointer)->errorText();
}
qt_QString * kde_Job_errorString( kde_Job* instPointer){
	return (qt_QString *)new QString(((JobBridge*)instPointer)->errorString());
}
//qt_QString * kde_Job_htmlErrorString( kde_Job* instPointer){
//	return (qt_QString *)new QString(((JobBridge*)instPointer)->htmlErrorString());
//}
void kde_Job_showErrorDialog( kde_Job* instPointer,qt_QWidget * parent){
	((JobBridge*)instPointer)->showErrorDialog((QWidget*)parent);
	return;
}
void kde_Job_setAutoErrorHandlingEnabled( kde_Job* instPointer,int enable, qt_QWidget * parentWidget){
	((JobBridge*)instPointer)->setAutoErrorHandlingEnabled((bool)enable, (QWidget*)parentWidget);
	return;
}
int kde_Job_isAutoErrorHandlingEnabled( kde_Job* instPointer){
	return (int) ((JobBridge*)instPointer)->isAutoErrorHandlingEnabled();
}
void kde_Job_setWindow( kde_Job* instPointer,qt_QWidget * window){
	((JobBridge*)instPointer)->setWindow((QWidget*)window);
	return;
}
qt_QWidget * kde_Job_window( kde_Job* instPointer){
	return (qt_QWidget *) ((JobBridge*)instPointer)->window();
}
void kde_Job_setMetaData( kde_Job* instPointer,kde_MetaData* arg1){
	((JobBridge*)instPointer)->setMetaData((KIO::MetaData&)* (KIO::MetaData*)arg1);
	return;
}
void kde_Job_addMetaData( kde_Job* instPointer,qt_QString * key, qt_QString * value){
	((JobBridge*)instPointer)->addMetaData((QString&)* (QString*)key, (QString&)* (QString*)value);
	return;
}
kde_MetaData* kde_Job_outgoingMetaData( kde_Job* instPointer){
	return (kde_MetaData*)new KIO::MetaData(((JobBridge*)instPointer)->outgoingMetaData());
}
kde_MetaData* kde_Job_metaData( kde_Job* instPointer){
	return (kde_MetaData*)new KIO::MetaData(((JobBridge*)instPointer)->metaData());
}
qt_QString * kde_Job_queryMetaData( kde_Job* instPointer,qt_QString * key){
	return (qt_QString *)new QString(((JobBridge*)instPointer)->queryMetaData((QString&)* (QString*)key));
}
kde_Job * kde_new_Job(int showProgressInfo){
	return (kde_Job *) new JobBridge((bool)showProgressInfo);
}
void kde_Job_addSubjob( kde_Job* instPointer,void* job, int inheritMetaData){
	((JobBridge*)instPointer)->protected_addSubjob((KIO::Job*)job, (bool)inheritMetaData);
	return;
}
void kde_Job_removeSubjob( kde_Job* instPointer,void* job){
	((JobBridge*)instPointer)->protected_removeSubjob((KIO::Job*)job);
	return;
}
void kde_Job_emitPercent( kde_Job* instPointer,KIO::filesize_t processedSize, KIO::filesize_t totalSize){
	((JobBridge*)instPointer)->protected_emitPercent((KIO::filesize_t)processedSize, (KIO::filesize_t)totalSize);
	return;
}
void kde_Job_emitSpeed( kde_Job* instPointer,unsigned long bytes_per_second){
	((JobBridge*)instPointer)->protected_emitSpeed((unsigned long)bytes_per_second);
	return;
}
void kde_Job_emitResult( kde_Job* instPointer){
	((JobBridge*)instPointer)->protected_emitResult();
	return;
}
void kde_Job_slotResult( kde_Job* instPointer,kde_Job* job){
	((JobBridge*)instPointer)->protected_slotResult((KIO::Job*)job);
	return;
}
void kde_Job_slotSpeed( kde_Job* instPointer,kde_Job* arg1, unsigned long bytes_per_second){
	((JobBridge*)instPointer)->protected_slotSpeed((KIO::Job*)arg1, (unsigned long)bytes_per_second);
	return;
}
void kde_Job_slotInfoMessage( kde_Job* instPointer,kde_Job* arg1, qt_QString * arg2){
	((JobBridge*)instPointer)->protected_slotInfoMessage((KIO::Job*)arg1, (QString&)* (QString*)arg2);
	return;
}
void kde_Job_slotSpeedTimeout( kde_Job* instPointer){
	((JobBridge*)instPointer)->protected_slotSpeedTimeout();
	return;
}
