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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdelibs/src/tdelibs-trinity-14.1.6/interfaces/tdetexteditor/undodcopinterface.h"

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

namespace KTextEditor {

static const int UndoDCOPInterface_fhash = 11;
static const char* const UndoDCOPInterface_ftable[11][3] = {
    { "uint", "undoInterfaceNumber()", "undoInterfaceNumber()" },
    { "void", "undo()", "undo()" },
    { "void", "redo()", "redo()" },
    { "void", "clearUndo()", "clearUndo()" },
    { "void", "clearRedo()", "clearRedo()" },
    { "uint", "undoCount()", "undoCount()" },
    { "uint", "redoCount()", "redoCount()" },
    { "uint", "undoSteps()", "undoSteps()" },
    { "void", "setUndoSteps(uint)", "setUndoSteps(uint steps)" },
    { "void", "undoChanged()", "undoChanged()" },
    { 0, 0, 0 }
};
static const int UndoDCOPInterface_ftable_hiddens[10] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool UndoDCOPInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( UndoDCOPInterface_fhash, true, false );
	for ( int i = 0; UndoDCOPInterface_ftable[i][1]; i++ )
	    fdict->insert( UndoDCOPInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // uint undoInterfaceNumber()
	replyType = UndoDCOPInterface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << undoInterfaceNumber( );
    } break;
    case 1: { // void undo()
	replyType = UndoDCOPInterface_ftable[1][0]; 
	undo( );
    } break;
    case 2: { // void redo()
	replyType = UndoDCOPInterface_ftable[2][0]; 
	redo( );
    } break;
    case 3: { // void clearUndo()
	replyType = UndoDCOPInterface_ftable[3][0]; 
	clearUndo( );
    } break;
    case 4: { // void clearRedo()
	replyType = UndoDCOPInterface_ftable[4][0]; 
	clearRedo( );
    } break;
    case 5: { // uint undoCount()
	replyType = UndoDCOPInterface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << undoCount( );
    } break;
    case 6: { // uint redoCount()
	replyType = UndoDCOPInterface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << redoCount( );
    } break;
    case 7: { // uint undoSteps()
	replyType = UndoDCOPInterface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << undoSteps( );
    } break;
    case 8: { // void setUndoSteps(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = UndoDCOPInterface_ftable[8][0]; 
	setUndoSteps(arg0 );
    } break;
    case 9: { // void undoChanged()
	replyType = UndoDCOPInterface_ftable[9][0]; 
	undoChanged( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

} // namespace

