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

#include "/tmp/buildd/tde-packaging/arch/tde-base/tde-tdegraphics/src/tdegraphics-trinity-14.1.6/kviewshell/tdemultipageInterface.h"

#include <kdatastream.h>


static const char* const tdemultipageInterface_ftable[4][3] = {
    { "ASYNC", "jumpToReference(TQString)", "jumpToReference(TQString reference)" },
    { "TQString", "name_of_current_file()", "name_of_current_file()" },
    { "bool", "is_file_loaded(TQString)", "is_file_loaded(TQString filename)" },
    { 0, 0, 0 }
};
static const int tdemultipageInterface_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool tdemultipageInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == tdemultipageInterface_ftable[0][1] ) { // void jumpToReference(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = tdemultipageInterface_ftable[0][0]; 
	jumpToReference(arg0 );
    } else if ( fun == tdemultipageInterface_ftable[1][1] ) { // TQString name_of_current_file()
	replyType = tdemultipageInterface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << name_of_current_file( );
    } else if ( fun == tdemultipageInterface_ftable[2][1] ) { // bool is_file_loaded(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = tdemultipageInterface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << is_file_loaded(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


