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

#include "/usr/src/ports/kdebase3/kdebase3-3.5.10-11.i686/src/kdebase-3.5.10/libkonq/konq_undo.h"

#include <kdatastream.h>


static const char* const KonqUndoManager_ftable[6][3] = {
    { "ASYNC", "push(KonqCommand)", "push(KonqCommand cmd)" },
    { "ASYNC", "pop()", "pop()" },
    { "ASYNC", "lock()", "lock()" },
    { "ASYNC", "unlock()", "unlock()" },
    { "KonqCommand::Stack", "get()", "get()" },
    { 0, 0, 0 }
};
static const int KonqUndoManager_ftable_hiddens[5] = {
    0,
    0,
    0,
    0,
    0,
};

bool KonqUndoManager::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == KonqUndoManager_ftable[0][1] ) { // void push(KonqCommand)
	KonqCommand arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqUndoManager_ftable[0][0]; 
	push(arg0 );
    } else if ( fun == KonqUndoManager_ftable[1][1] ) { // void pop()
	replyType = KonqUndoManager_ftable[1][0]; 
	pop( );
    } else if ( fun == KonqUndoManager_ftable[2][1] ) { // void lock()
	replyType = KonqUndoManager_ftable[2][0]; 
	lock( );
    } else if ( fun == KonqUndoManager_ftable[3][1] ) { // void unlock()
	replyType = KonqUndoManager_ftable[3][0]; 
	unlock( );
    } else if ( fun == KonqUndoManager_ftable[4][1] ) { // KonqCommand::Stack get()
	replyType = KonqUndoManager_ftable[4][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << get( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList KonqUndoManager::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; KonqUndoManager_ftable[i][2]; i++ ) {
	if (KonqUndoManager_ftable_hiddens[i])
	    continue;
	QCString func = KonqUndoManager_ftable[i][0];
	func += ' ';
	func += KonqUndoManager_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


