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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tork/src/tork-trinity-14.1.6/src/dcoptork.h"

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


static const int DCOPTork_fhash = 17;
static const char* const DCOPTork_ftable[15][3] = {
    { "void", "startEverything()", "startEverything()" },
    { "void", "stopTor()", "stopTor()" },
    { "void", "toggleTDESetting()", "toggleTDESetting()" },
    { "bool", "getTDESetting()", "getTDESetting()" },
    { "void", "anonymousEmail()", "anonymousEmail()" },
    { "void", "anonymousFirefox()", "anonymousFirefox()" },
    { "void", "anonymizedFirefox(TQString)", "anonymizedFirefox(TQString url)" },
    { "void", "anonymizedOpera(TQString)", "anonymizedOpera(TQString url)" },
    { "void", "anonymousOpera()", "anonymousOpera()" },
    { "void", "anonymousKonversation()", "anonymousKonversation()" },
    { "void", "anonymousGaim()", "anonymousGaim()" },
    { "void", "anonymousPidgin()", "anonymousPidgin()" },
    { "void", "anonymousKonsole()", "anonymousKonsole()" },
    { "void", "anonymousKopete()", "anonymousKopete()" },
    { 0, 0, 0 }
};
static const int DCOPTork_ftable_hiddens[14] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool DCOPTork::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( DCOPTork_fhash, true, false );
	for ( int i = 0; DCOPTork_ftable[i][1]; i++ )
	    fdict->insert( DCOPTork_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void startEverything()
	replyType = DCOPTork_ftable[0][0]; 
	startEverything( );
    } break;
    case 1: { // void stopTor()
	replyType = DCOPTork_ftable[1][0]; 
	stopTor( );
    } break;
    case 2: { // void toggleTDESetting()
	replyType = DCOPTork_ftable[2][0]; 
	toggleTDESetting( );
    } break;
    case 3: { // bool getTDESetting()
	replyType = DCOPTork_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getTDESetting( );
    } break;
    case 4: { // void anonymousEmail()
	replyType = DCOPTork_ftable[4][0]; 
	anonymousEmail( );
    } break;
    case 5: { // void anonymousFirefox()
	replyType = DCOPTork_ftable[5][0]; 
	anonymousFirefox( );
    } break;
    case 6: { // void anonymizedFirefox(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPTork_ftable[6][0]; 
	anonymizedFirefox(arg0 );
    } break;
    case 7: { // void anonymizedOpera(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DCOPTork_ftable[7][0]; 
	anonymizedOpera(arg0 );
    } break;
    case 8: { // void anonymousOpera()
	replyType = DCOPTork_ftable[8][0]; 
	anonymousOpera( );
    } break;
    case 9: { // void anonymousKonversation()
	replyType = DCOPTork_ftable[9][0]; 
	anonymousKonversation( );
    } break;
    case 10: { // void anonymousGaim()
	replyType = DCOPTork_ftable[10][0]; 
	anonymousGaim( );
    } break;
    case 11: { // void anonymousPidgin()
	replyType = DCOPTork_ftable[11][0]; 
	anonymousPidgin( );
    } break;
    case 12: { // void anonymousKonsole()
	replyType = DCOPTork_ftable[12][0]; 
	anonymousKonsole( );
    } break;
    case 13: { // void anonymousKopete()
	replyType = DCOPTork_ftable[13][0]; 
	anonymousKopete( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


