/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from dcop.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/kpdf/shell/dcop.h"

#include <kdatastream.h>


static const char* const KPDFShellDCOPIface_ftable[5][3] = {
    { "void", "openURL(KURL)", "openURL(KURL url)" },
    { "void", "addTab()", "addTab()" },
    { "void", "removeTab()", "removeTab()" },
    { "KURL", "currentTabURL()", "currentTabURL()" },
    { 0, 0, 0 }
};
static const int KPDFShellDCOPIface_ftable_hiddens[4] = {
    0,
    0,
    0,
    0,
};

bool KPDFShellDCOPIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KPDFShellDCOPIface_ftable[0][1] ) { // void openURL(KURL)
	KURL arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KPDFShellDCOPIface_ftable[0][0]; 
	openURL(arg0 );
    } else if ( fun == KPDFShellDCOPIface_ftable[1][1] ) { // void addTab()
	replyType = KPDFShellDCOPIface_ftable[1][0]; 
	addTab( );
    } else if ( fun == KPDFShellDCOPIface_ftable[2][1] ) { // void removeTab()
	replyType = KPDFShellDCOPIface_ftable[2][0]; 
	removeTab( );
    } else if ( fun == KPDFShellDCOPIface_ftable[3][1] ) { // KURL currentTabURL()
	replyType = KPDFShellDCOPIface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentTabURL( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


