/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from WebServer.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdenetwork/src/tdenetwork-trinity-14.1.6/kpf/src/WebServer.h"

#include <kdatastream.h>
#include <tqasciidict.h>

namespace KPF {

static const int WebServer_fhash = 23;
static const char* const WebServer_ftable[20][3] = {
    { "TQString", "root()", "root()" },
    { "TQString", "serverName()", "serverName()" },
    { "ulong", "bandwidthLimit()", "bandwidthLimit()" },
    { "uint", "connectionLimit()", "connectionLimit()" },
    { "uint", "listenPort()", "listenPort()" },
    { "bool", "followSymlinks()", "followSymlinks()" },
    { "bool", "customErrorMessages()", "customErrorMessages()" },
    { "void", "setBandwidthLimit(ulong)", "setBandwidthLimit(ulong)" },
    { "void", "setConnectionLimit(uint)", "setConnectionLimit(uint)" },
    { "void", "setListenPort(uint)", "setListenPort(uint)" },
    { "void", "setServerName(TQString)", "setServerName(TQString)" },
    { "void", "setFollowSymlinks(bool)", "setFollowSymlinks(bool)" },
    { "void", "setCustomErrorMessages(bool)", "setCustomErrorMessages(bool)" },
    { "void", "set(uint,ulong,uint,bool,TQString)", "set(uint listenPort,ulong bandwidthLimit,uint connectionLimit,bool followSymlinks,TQString serverName)" },
    { "void", "restart()", "restart()" },
    { "void", "pause(bool)", "pause(bool)" },
    { "bool", "paused()", "paused()" },
    { "bool", "portContention()", "portContention()" },
    { "uint", "connectionCount()", "connectionCount()" },
    { 0, 0, 0 }
};
static const int WebServer_ftable_hiddens[19] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool WebServer::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( WebServer_fhash, true, false );
	for ( int i = 0; WebServer_ftable[i][1]; i++ )
	    fdict->insert( WebServer_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQString root()
	replyType = WebServer_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << root( );
    } break;
    case 1: { // TQString serverName()
	replyType = WebServer_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << serverName( );
    } break;
    case 2: { // ulong bandwidthLimit()
	replyType = WebServer_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << bandwidthLimit( );
    } break;
    case 3: { // uint connectionLimit()
	replyType = WebServer_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << connectionLimit( );
    } break;
    case 4: { // uint listenPort()
	replyType = WebServer_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << listenPort( );
    } break;
    case 5: { // bool followSymlinks()
	replyType = WebServer_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << followSymlinks( );
    } break;
    case 6: { // bool customErrorMessages()
	replyType = WebServer_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << customErrorMessages( );
    } break;
    case 7: { // void setBandwidthLimit(ulong)
	ulong arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[7][0]; 
	setBandwidthLimit(arg0 );
    } break;
    case 8: { // void setConnectionLimit(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[8][0]; 
	setConnectionLimit(arg0 );
    } break;
    case 9: { // void setListenPort(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[9][0]; 
	setListenPort(arg0 );
    } break;
    case 10: { // void setServerName(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[10][0]; 
	setServerName(arg0 );
    } break;
    case 11: { // void setFollowSymlinks(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[11][0]; 
	setFollowSymlinks(arg0 );
    } break;
    case 12: { // void setCustomErrorMessages(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[12][0]; 
	setCustomErrorMessages(arg0 );
    } break;
    case 13: { // void set(uint,ulong,uint,bool,TQString)
	uint arg0;
	ulong arg1;
	uint arg2;
	bool arg3;
	TQString arg4;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	if (arg.atEnd()) return false;
	arg >> arg3;
	if (arg.atEnd()) return false;
	arg >> arg4;
	replyType = WebServer_ftable[13][0]; 
	set(arg0, arg1, arg2, arg3, arg4 );
    } break;
    case 14: { // void restart()
	replyType = WebServer_ftable[14][0]; 
	restart( );
    } break;
    case 15: { // void pause(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServer_ftable[15][0]; 
	pause(arg0 );
    } break;
    case 16: { // bool paused()
	replyType = WebServer_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << paused( );
    } break;
    case 17: { // bool portContention()
	replyType = WebServer_ftable[17][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << portContention( );
    } break;
    case 18: { // uint connectionCount()
	replyType = WebServer_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << connectionCount( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList WebServer::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "KPF::WebServer";
    return ifaces;
}

QCStringList WebServer::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; WebServer_ftable[i][2]; i++ ) {
	if (WebServer_ftable_hiddens[i])
	    continue;
	TQCString func = WebServer_ftable[i][0];
	func += ' ';
	func += WebServer_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

} // namespace

