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

#include "./kbibiface.h"

#include <kdatastream.h>


static const char* const KBibIface_ftable[4][3] = {
    { "int", "insertFile(QString,int,bool)", "insertFile(QString url,int fileType,bool notInsertExisting)" },
    { "QString", "cite()", "cite()" },
    { "void", "setActive()", "setActive()" },
    { 0, 0, 0 }
};
static const int KBibIface_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool KBibIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == KBibIface_ftable[0][1] ) { // int insertFile(QString,int,bool)
	QString arg0;
	int arg1;
	bool arg2;
	QDataStream 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 = KBibIface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << insertFile(arg0, arg1, arg2 );
    } else if ( fun == KBibIface_ftable[1][1] ) { // QString cite()
	replyType = KBibIface_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cite( );
    } else if ( fun == KBibIface_ftable[2][1] ) { // void setActive()
	replyType = KBibIface_ftable[2][0]; 
	setActive( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


