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

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

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


static const int KRenameDCOP_fhash = 17;
static const char* const KRenameDCOP_ftable[15][3] = {
    { "void", "addFileOrDir(TQString)", "addFileOrDir(TQString name)" },
    { "void", "addDir(TQString,TQString,bool,bool,bool)", "addDir(TQString name,TQString filter,bool recursive,bool hidden,bool dirnames)" },
    { "void", "updatePre()", "updatePre()" },
    { "void", "setFileNameTemplate(TQString)", "setFileNameTemplate(TQString t)" },
    { "TQString", "fileNameTemplate()", "fileNameTemplate()" },
    { "void", "setExtensionTemplate(TQString)", "setExtensionTemplate(TQString t)" },
    { "TQString", "extensionTemplate()", "extensionTemplate()" },
    { "void", "setUseExtension(bool)", "setUseExtension(bool b)" },
    { "bool", "useExtension()", "useExtension()" },
    { "void", "setCounterStart(int)", "setCounterStart(int index)" },
    { "int", "counterStart()", "counterStart()" },
    { "void", "start()", "start()" },
    { "TQStringList", "tokens()", "tokens()" },
    { "TQString", "parseString(TQString,TQString)", "parseString(TQString token,TQString string)" },
    { 0, 0, 0 }
};
static const int KRenameDCOP_ftable_hiddens[14] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KRenameDCOP::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KRenameDCOP_fhash, true, false );
	for ( int i = 0; KRenameDCOP_ftable[i][1]; i++ )
	    fdict->insert( KRenameDCOP_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void addFileOrDir(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KRenameDCOP_ftable[0][0]; 
	addFileOrDir(arg0 );
    } break;
    case 1: { // void addDir(TQString,TQString,bool,bool,bool)
	TQString arg0;
	TQString arg1;
	bool arg2;
	bool arg3;
	bool arg4;
	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;
	if (arg.atEnd()) return false;
	arg >> arg3;
	if (arg.atEnd()) return false;
	arg >> arg4;
	replyType = KRenameDCOP_ftable[1][0]; 
	addDir(arg0, arg1, arg2, arg3, arg4 );
    } break;
    case 2: { // void updatePre()
	replyType = KRenameDCOP_ftable[2][0]; 
	updatePre( );
    } break;
    case 3: { // void setFileNameTemplate(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KRenameDCOP_ftable[3][0]; 
	setFileNameTemplate(arg0 );
    } break;
    case 4: { // TQString fileNameTemplate()
	replyType = KRenameDCOP_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << fileNameTemplate( );
    } break;
    case 5: { // void setExtensionTemplate(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KRenameDCOP_ftable[5][0]; 
	setExtensionTemplate(arg0 );
    } break;
    case 6: { // TQString extensionTemplate()
	replyType = KRenameDCOP_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << extensionTemplate( );
    } break;
    case 7: { // void setUseExtension(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KRenameDCOP_ftable[7][0]; 
	setUseExtension(arg0 );
    } break;
    case 8: { // bool useExtension()
	replyType = KRenameDCOP_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << useExtension( );
    } break;
    case 9: { // void setCounterStart(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KRenameDCOP_ftable[9][0]; 
	setCounterStart(arg0 );
    } break;
    case 10: { // int counterStart()
	replyType = KRenameDCOP_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << counterStart( );
    } break;
    case 11: { // void start()
	replyType = KRenameDCOP_ftable[11][0]; 
	start( );
    } break;
    case 12: { // TQStringList tokens()
	replyType = KRenameDCOP_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << tokens( );
    } break;
    case 13: { // TQString parseString(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 = KRenameDCOP_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << parseString(arg0, arg1 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


