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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdelibs/src/tdelibs-trinity-14.1.6/tdeio/misc/kpac/proxyscout.h"

#include <kdatastream.h>

namespace KPAC {

static const char* const ProxyScout_ftable[4][3] = {
    { "TQString", "proxyForURL(KURL)", "proxyForURL(KURL url)" },
    { "ASYNC", "blackListProxy(TQString)", "blackListProxy(TQString proxy)" },
    { "ASYNC", "reset()", "reset()" },
    { 0, 0, 0 }
};
static const int ProxyScout_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool ProxyScout::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == ProxyScout_ftable[0][1] ) { // TQString proxyForURL(KURL)
	KURL arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = ProxyScout_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << proxyForURL(arg0 );
    } else if ( fun == ProxyScout_ftable[1][1] ) { // void blackListProxy(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = ProxyScout_ftable[1][0]; 
	blackListProxy(arg0 );
    } else if ( fun == ProxyScout_ftable[2][1] ) { // void reset()
	replyType = ProxyScout_ftable[2][0]; 
	reset( );
    } else {
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList ProxyScout::interfaces()
{
    QCStringList ifaces = KDEDModule::interfaces();
    ifaces += "KPAC::ProxyScout";
    return ifaces;
}

QCStringList ProxyScout::functions()
{
    QCStringList funcs = KDEDModule::functions();
    for ( int i = 0; ProxyScout_ftable[i][2]; i++ ) {
	if (ProxyScout_ftable_hiddens[i])
	    continue;
	TQCString func = ProxyScout_ftable[i][0];
	func += ' ';
	func += ProxyScout_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

} // namespace

