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

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

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


static const int KommandoDaemon_fhash = 11;
static const char* const KommandoDaemon_ftable[9][3] = {
    { "void", "show()", "show()" },
    { "void", "hide()", "hide()" },
    { "void", "toggle()", "toggle()" },
    { "void", "execute()", "execute()" },
    { "void", "selectButton(int)", "selectButton(int num)" },
    { "void", "nextButton()", "nextButton()" },
    { "void", "previousButton()", "previousButton()" },
    { "void", "reparseConfiguration()", "reparseConfiguration()" },
    { 0, 0, 0 }
};
static const int KommandoDaemon_ftable_hiddens[8] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KommandoDaemon::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KommandoDaemon_fhash, true, false );
	for ( int i = 0; KommandoDaemon_ftable[i][1]; i++ )
	    fdict->insert( KommandoDaemon_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void show()
	replyType = KommandoDaemon_ftable[0][0]; 
	show( );
    } break;
    case 1: { // void hide()
	replyType = KommandoDaemon_ftable[1][0]; 
	hide( );
    } break;
    case 2: { // void toggle()
	replyType = KommandoDaemon_ftable[2][0]; 
	toggle( );
    } break;
    case 3: { // void execute()
	replyType = KommandoDaemon_ftable[3][0]; 
	execute( );
    } break;
    case 4: { // void selectButton(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KommandoDaemon_ftable[4][0]; 
	selectButton(arg0 );
    } break;
    case 5: { // void nextButton()
	replyType = KommandoDaemon_ftable[5][0]; 
	nextButton( );
    } break;
    case 6: { // void previousButton()
	replyType = KommandoDaemon_ftable[6][0]; 
	previousButton( );
    } break;
    case 7: { // void reparseConfiguration()
	replyType = KommandoDaemon_ftable[7][0]; 
	reparseConfiguration( );
    } break;
    default: 
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


