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

#include "/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/interfaces/ktexteditor/undodcopinterface.h"

#include <kdatastream.h>
#include <qasciidict.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 QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    static QAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new QAsciiDict<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]; 
	QDataStream _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]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << undoCount( );
    } break;
    case 6: { // uint redoCount()
	replyType = UndoDCOPInterface_ftable[6][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << redoCount( );
    } break;
    case 7: { // uint undoSteps()
	replyType = UndoDCOPInterface_ftable[7][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << undoSteps( );
    } break;
    case 8: { // void setUndoSteps(uint)
	uint arg0;
	QDataStream 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;
	QCString func = UndoDCOPInterface_ftable[i][0];
	func += ' ';
	func += UndoDCOPInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

} // namespace

