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

#include "/tmp/buildd/tde-packaging/arch/tde-base/tde-tdeutils/src/tdeutils-trinity-14.1.6/kmilo/kmilod/kmilod.h"

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

namespace KMilo {

static const int KMiloD_fhash = 13;
static const char* const KMiloD_ftable[12][3] = {
    { "void", "setEnabled(bool)", "setEnabled(bool enabled)" },
    { "void", "enable()", "enable()" },
    { "void", "disable()", "disable()" },
    { "bool", "enabled()", "enabled()" },
    { "int", "pollMilliSeconds()", "pollMilliSeconds()" },
    { "bool", "setPollMilliSeconds(int)", "setPollMilliSeconds(int ms)" },
    { "void", "displayText(TQString)", "displayText(TQString text)" },
    { "void", "displayText(TQString,TQPixmap)", "displayText(TQString text,TQPixmap customPixmap)" },
    { "void", "displayProgress(TQString,int,TQPixmap)", "displayProgress(TQString text,int progress,TQPixmap customPixmap)" },
    { "void", "displayProgress(TQString,int)", "displayProgress(TQString text,int progress)" },
    { "void", "reconfigure()", "reconfigure()" },
    { 0, 0, 0 }
};
static const int KMiloD_ftable_hiddens[11] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KMiloD::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KMiloD_fhash, true, false );
	for ( int i = 0; KMiloD_ftable[i][1]; i++ )
	    fdict->insert( KMiloD_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void setEnabled(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMiloD_ftable[0][0]; 
	setEnabled(arg0 );
    } break;
    case 1: { // void enable()
	replyType = KMiloD_ftable[1][0]; 
	enable( );
    } break;
    case 2: { // void disable()
	replyType = KMiloD_ftable[2][0]; 
	disable( );
    } break;
    case 3: { // bool enabled()
	replyType = KMiloD_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << enabled( );
    } break;
    case 4: { // int pollMilliSeconds()
	replyType = KMiloD_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pollMilliSeconds( );
    } break;
    case 5: { // bool setPollMilliSeconds(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMiloD_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setPollMilliSeconds(arg0 );
    } break;
    case 6: { // void displayText(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMiloD_ftable[6][0]; 
	displayText(arg0 );
    } break;
    case 7: { // void displayText(TQString,TQPixmap)
	TQString arg0;
	TQPixmap arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KMiloD_ftable[7][0]; 
	displayText(arg0, arg1 );
    } break;
    case 8: { // void displayProgress(TQString,int,TQPixmap)
	TQString arg0;
	int arg1;
	TQPixmap 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 = KMiloD_ftable[8][0]; 
	displayProgress(arg0, arg1, arg2 );
    } break;
    case 9: { // void displayProgress(TQString,int)
	TQString arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KMiloD_ftable[9][0]; 
	displayProgress(arg0, arg1 );
    } break;
    case 10: { // void reconfigure()
	replyType = KMiloD_ftable[10][0]; 
	reconfigure( );
    } break;
    default: 
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

} // namespace

