/***************************************************************************
                            kde_KServerSocket.cpp -  description
                             -------------------
    begin                : Tue Mar 19 20:11:49 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Mar 19 20:11:49 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_KServerSocket.h"
}

#include <ksock.h>

class KServerSocketBridge : public KServerSocket
{
public:
	KServerSocketBridge(unsigned short int _port, bool _bind) : KServerSocket(_port, _bind) {}
	KServerSocketBridge(const char* _path, bool _bind) : KServerSocket(_path, _bind) {}
	~KServerSocketBridge() {}
	bool  protected_init(short unsigned arg1) {
		return (bool ) KServerSocket::init(arg1);
	}
	bool  protected_init(const char* _path) {
		return (bool ) KServerSocket::init(_path);
	}
	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_KServerSocket * kde_new_KServerSocket(unsigned short _port, int _bind){
	return (kde_KServerSocket *) new KServerSocketBridge((unsigned short int)_port, (bool)_bind);
}
kde_KServerSocket * kde_new_KServerSocket1(char* _path, int _bind){
	return (kde_KServerSocket *) new KServerSocketBridge((char*)_path, (bool)_bind);
}
void kde_del_KServerSocket( kde_KServerSocket* p ){
	delete (KServerSocketBridge*) p;
}
int kde_KServerSocket_bindAndListen( kde_KServerSocket* instPointer){
	return (int) ((KServerSocketBridge*)instPointer)->bindAndListen();
}
int kde_KServerSocket_socket( kde_KServerSocket* instPointer){
	return (int) ((KServerSocketBridge*)instPointer)->socket();
}
unsigned short kde_KServerSocket_port( kde_KServerSocket* instPointer){
	return (unsigned short) ((KServerSocketBridge*)instPointer)->port();
}
//unsigned long kde_KServerSocket_ipv4_addr( kde_KServerSocket* instPointer){
//	return (unsigned long) ((KServerSocketBridge*)instPointer)->ipv4_addr();
//}
void kde_KServerSocket_slotAccept( kde_KServerSocket* instPointer,int arg1){
	((KServerSocketBridge*)instPointer)->slotAccept((int)arg1);
	return;
}
int kde_KServerSocket_init( kde_KServerSocket* instPointer,short arg1){
	return (int) ((KServerSocketBridge*)instPointer)->protected_init((short unsigned)arg1);
}
int kde_KServerSocket_init1( kde_KServerSocket* instPointer,char* _path){
	return (int) ((KServerSocketBridge*)instPointer)->protected_init((char*)_path);
}
