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

#include "/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/interfaces/ktexteditor/encodingdcopinterface.h"

#include <kdatastream.h>

namespace KTextEditor {

static const char* const EncodingDCOPInterface_ftable[4][3] = {
    { "uint", "encodingInterfaceNumber()", "encodingInterfaceNumber()" },
    { "void", "setEncoding(QString)", "setEncoding(QString e)" },
    { "QString", "encoding()", "encoding()" },
    { 0, 0, 0 }
};
static const int EncodingDCOPInterface_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool EncodingDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == EncodingDCOPInterface_ftable[0][1] ) { // uint encodingInterfaceNumber()
	replyType = EncodingDCOPInterface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << encodingInterfaceNumber( );
    } else if ( fun == EncodingDCOPInterface_ftable[1][1] ) { // void setEncoding(QString)
	QString arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = EncodingDCOPInterface_ftable[1][0]; 
	setEncoding(arg0 );
    } else if ( fun == EncodingDCOPInterface_ftable[2][1] ) { // QString encoding()
	replyType = EncodingDCOPInterface_ftable[2][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << encoding( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

} // namespace

