/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from WebServerManager.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/WebServerManager.h"

#include <kdatastream.h>

namespace KPF {

static const char* const WebServerManager_ftable[5][3] = {
    { "TQValueList<DCOPRef>", "serverList()", "serverList()" },
    { "DCOPRef", "createServer(TQString,uint,uint,uint,bool,TQString)", "createServer(TQString root,uint listenPort,uint bandwidthLimit,uint connectionLimit,bool followSymlinks,TQString serverName)" },
    { "void", "disableServer(DCOPRef)", "disableServer(DCOPRef)" },
    { "void", "quit()", "quit()" },
    { 0, 0, 0 }
};
static const int WebServerManager_ftable_hiddens[4] = {
    0,
    0,
    0,
    0,
};

bool WebServerManager::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == WebServerManager_ftable[0][1] ) { // TQValueList<DCOPRef> serverList()
	replyType = WebServerManager_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << serverList( );
    } else if ( fun == WebServerManager_ftable[1][1] ) { // DCOPRef createServer(TQString,uint,uint,uint,bool,TQString)
	TQString arg0;
	uint arg1;
	uint arg2;
	uint arg3;
	bool arg4;
	TQString arg5;
	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;
	if (arg.atEnd()) return false;
	arg >> arg5;
	replyType = WebServerManager_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << createServer(arg0, arg1, arg2, arg3, arg4, arg5 );
    } else if ( fun == WebServerManager_ftable[2][1] ) { // void disableServer(DCOPRef)
	DCOPRef arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = WebServerManager_ftable[2][0]; 
	disableServer(arg0 );
    } else if ( fun == WebServerManager_ftable[3][1] ) { // void quit()
	replyType = WebServerManager_ftable[3][0]; 
	quit( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

} // namespace

