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

#include "/tmp/buildd/tde-packaging/arch/tde-devel/tde-tdesdk/src/tdesdk-trinity-14.1.6/tdeunittest/dcopinterface.h"

#include <kdatastream.h>

namespace KUnitTest {

static const char* const DCOPInterface_ftable[3][3] = {
    { "bool", "addDebugInfo(TQString,TQString)", "addDebugInfo(TQString name,TQString info)" },
    { "bool", "addSlotDebugInfo(TQString,TQString,TQString)", "addSlotDebugInfo(TQString name,TQString slt,TQString info)" },
    { 0, 0, 0 }
};
static const int DCOPInterface_ftable_hiddens[2] = {
    0,
    0,
};

bool DCOPInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == DCOPInterface_ftable[0][1] ) { // bool addDebugInfo(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = DCOPInterface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << addDebugInfo(arg0, arg1 );
    } else if ( fun == DCOPInterface_ftable[1][1] ) { // bool addSlotDebugInfo(TQString,TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQString arg2;
	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;
	replyType = DCOPInterface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << addSlotDebugInfo(arg0, arg1, arg2 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList DCOPInterface::interfaces()
{
    QCStringList ifaces = DCOPObject::interfaces();
    ifaces += "KUnitTest::DCOPInterface";
    return ifaces;
}

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

} // namespace

