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

#include "/tmp/buildd/tde-packaging/arch/tde-devel/tde-kxmleditor/src/kxmleditor-trinity-14.1.6/part/dcopiface_part_ro.h"

#include <kdatastream.h>


static const char* const KXMLEditorPartIfaceReadOnly_ftable[4][3] = {
    { "TQString", "saveAsFile(TQString)", "saveAsFile(TQString path_to_file)" },
    { "TQString", "selectNode(TQString)", "selectNode(TQString pathToNode)" },
    { "TQString", "currentNode()", "currentNode()" },
    { 0, 0, 0 }
};
static const int KXMLEditorPartIfaceReadOnly_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool KXMLEditorPartIfaceReadOnly::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KXMLEditorPartIfaceReadOnly_ftable[0][1] ) { // TQString saveAsFile(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KXMLEditorPartIfaceReadOnly_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << saveAsFile(arg0 );
    } else if ( fun == KXMLEditorPartIfaceReadOnly_ftable[1][1] ) { // TQString selectNode(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KXMLEditorPartIfaceReadOnly_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << selectNode(arg0 );
    } else if ( fun == KXMLEditorPartIfaceReadOnly_ftable[2][1] ) { // TQString currentNode()
	replyType = KXMLEditorPartIfaceReadOnly_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentNode( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


#include <kdatastream.h>


static const char* const KXMLEditorPartIfaceReadWrite_ftable[3][3] = {
    { "TQString", "openURL(TQString)", "openURL(TQString szURL)" },
    { "TQString", "close()", "close()" },
    { 0, 0, 0 }
};
static const int KXMLEditorPartIfaceReadWrite_ftable_hiddens[2] = {
    0,
    0,
};

bool KXMLEditorPartIfaceReadWrite::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KXMLEditorPartIfaceReadWrite_ftable[0][1] ) { // TQString openURL(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KXMLEditorPartIfaceReadWrite_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openURL(arg0 );
    } else if ( fun == KXMLEditorPartIfaceReadWrite_ftable[1][1] ) { // TQString close()
	replyType = KXMLEditorPartIfaceReadWrite_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << close( );
    } else {
	return KXMLEditorPartIfaceReadOnly::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList KXMLEditorPartIfaceReadWrite::interfaces()
{
    QCStringList ifaces = KXMLEditorPartIfaceReadOnly::interfaces();
    ifaces += "KXMLEditorPartIfaceReadWrite";
    return ifaces;
}

QCStringList KXMLEditorPartIfaceReadWrite::functions()
{
    QCStringList funcs = KXMLEditorPartIfaceReadOnly::functions();
    for ( int i = 0; KXMLEditorPartIfaceReadWrite_ftable[i][2]; i++ ) {
	if (KXMLEditorPartIfaceReadWrite_ftable_hiddens[i])
	    continue;
	TQCString func = KXMLEditorPartIfaceReadWrite_ftable[i][0];
	func += ' ';
	func += KXMLEditorPartIfaceReadWrite_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


