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

#include <kdatastream.h>


static const char* const CvsJob_ftable[6][3] = {
    { "bool", "execute()", "execute()" },
    { "void", "cancel()", "cancel()" },
    { "bool", "isRunning()", "isRunning()" },
    { "TQString", "cvsCommand()", "cvsCommand()" },
    { "TQStringList", "output()", "output()" },
    { 0, 0, 0 }
};
static const int CvsJob_ftable_hiddens[5] = {
    0,
    0,
    0,
    0,
    0,
};

bool CvsJob::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == CvsJob_ftable[0][1] ) { // bool execute()
	replyType = CvsJob_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << execute( );
    } else if ( fun == CvsJob_ftable[1][1] ) { // void cancel()
	replyType = CvsJob_ftable[1][0]; 
	cancel( );
    } else if ( fun == CvsJob_ftable[2][1] ) { // bool isRunning()
	replyType = CvsJob_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isRunning( );
    } else if ( fun == CvsJob_ftable[3][1] ) { // TQString cvsCommand()
	replyType = CvsJob_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cvsCommand( );
    } else if ( fun == CvsJob_ftable[4][1] ) { // TQStringList output()
	replyType = CvsJob_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << output( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void CvsJob::jobExited( bool arg0, int arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "jobExited(bool,int)", data );
}

void CvsJob::receivedStdout( const TQString& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "receivedStdout(TQString)", data );
}

void CvsJob::receivedStderr( const TQString& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "receivedStderr(TQString)", data );
}


