/***************************************************************************
                            kde_Connection.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_Connection.h"
}

#include <qcstring.h>
#include <qobject.h>
#include <kio/connection.h>

class ConnectionBridge : public KIO::Connection
{
public:
	ConnectionBridge() : Connection() {}
	~ConnectionBridge() {}
	void protected_dequeue() {
		Connection::dequeue();
		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;
	}
};

kde_Connection * kde_new_Connection(){
	return (kde_Connection *) new ConnectionBridge();
}
void kde_del_Connection( kde_Connection* p ){
	delete (ConnectionBridge*) p;
}
void kde_Connection_init( kde_Connection* instPointer,kde_KSocket* sock){
	((ConnectionBridge*)instPointer)->init((KSocket*)sock);
	return;
}
void kde_Connection_init1( kde_Connection* instPointer,int fd_in, int fd_out){
	((ConnectionBridge*)instPointer)->init((int)fd_in, (int)fd_out);
	return;
}
void kde_Connection_connect( kde_Connection* instPointer,qt_QObject * receiver, char* member){
	((ConnectionBridge*)instPointer)->connect((QObject*)receiver, (char*)member);
	return;
}
void kde_Connection_close( kde_Connection* instPointer){
	((ConnectionBridge*)instPointer)->close();
	return;
}
int kde_Connection_fd_from( kde_Connection* instPointer){
	return (int) ((ConnectionBridge*)instPointer)->fd_from();
}
int kde_Connection_fd_to( kde_Connection* instPointer){
	return (int) ((ConnectionBridge*)instPointer)->fd_to();
}
int kde_Connection_inited( kde_Connection* instPointer){
	return (int) ((ConnectionBridge*)instPointer)->inited();
}
void kde_Connection_send( kde_Connection* instPointer,int cmd, qt_QByteArray* arr){
	((ConnectionBridge*)instPointer)->send((int)cmd, (QByteArray&)* (QByteArray*)arr);
	return;
}
int kde_Connection_sendnow( kde_Connection* instPointer,int _cmd, qt_QByteArray* data){
	return (int) ((ConnectionBridge*)instPointer)->sendnow((int)_cmd, (QByteArray&)* (QByteArray*)data);
}
int kde_Connection_read( kde_Connection* instPointer,int* _cmd, qt_QByteArray* arg1){
	return (int) ((ConnectionBridge*)instPointer)->read((int*)_cmd, (QByteArray&)* (QByteArray*)arg1);
}
void kde_Connection_suspend( kde_Connection* instPointer){
	((ConnectionBridge*)instPointer)->suspend();
	return;
}
void kde_Connection_resume( kde_Connection* instPointer){
	((ConnectionBridge*)instPointer)->resume();
	return;
}
int kde_Connection_suspended( kde_Connection* instPointer){
	return (int) ((ConnectionBridge*)instPointer)->suspended();
}
void kde_Connection_dequeue( kde_Connection* instPointer){
	((ConnectionBridge*)instPointer)->protected_dequeue();
	return;
}
