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

#include <kdatastream.h>
#include <qasciidict.h>

namespace KTextEditor {

static const int ViewCursorDCOPInterface_fhash = 11;
static const char* const ViewCursorDCOPInterface_ftable[11][3] = {
    { "uint", "viewCursorInterfaceNumber()", "viewCursorInterfaceNumber()" },
    { "QPoint", "cursorCoordinates()", "cursorCoordinates()" },
    { "void", "cursorPosition(uint,uint)", "cursorPosition(uint line,uint col)" },
    { "void", "cursorPositionReal(uint,uint)", "cursorPositionReal(uint line,uint col)" },
    { "bool", "setCursorPosition(uint,uint)", "setCursorPosition(uint line,uint col)" },
    { "bool", "setCursorPositionReal(uint,uint)", "setCursorPositionReal(uint line,uint col)" },
    { "uint", "cursorLine()", "cursorLine()" },
    { "uint", "cursorColumn()", "cursorColumn()" },
    { "uint", "cursorColumnReal()", "cursorColumnReal()" },
    { "void", "cursorPositionChanged()", "cursorPositionChanged()" },
    { 0, 0, 0 }
};
static const int ViewCursorDCOPInterface_ftable_hiddens[10] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool ViewCursorDCOPInterface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    static QAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new QAsciiDict<int>( ViewCursorDCOPInterface_fhash, true, false );
	for ( int i = 0; ViewCursorDCOPInterface_ftable[i][1]; i++ )
	    fdict->insert( ViewCursorDCOPInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // uint viewCursorInterfaceNumber()
	replyType = ViewCursorDCOPInterface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << viewCursorInterfaceNumber( );
    } break;
    case 1: { // QPoint cursorCoordinates()
	replyType = ViewCursorDCOPInterface_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorCoordinates( );
    } break;
    case 2: { // void cursorPosition(uint,uint)
	uint arg0;
	uint arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ViewCursorDCOPInterface_ftable[2][0]; 
	cursorPosition(arg0, arg1 );
    } break;
    case 3: { // void cursorPositionReal(uint,uint)
	uint arg0;
	uint arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ViewCursorDCOPInterface_ftable[3][0]; 
	cursorPositionReal(arg0, arg1 );
    } break;
    case 4: { // bool setCursorPosition(uint,uint)
	uint arg0;
	uint arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ViewCursorDCOPInterface_ftable[4][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setCursorPosition(arg0, arg1 );
    } break;
    case 5: { // bool setCursorPositionReal(uint,uint)
	uint arg0;
	uint arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ViewCursorDCOPInterface_ftable[5][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setCursorPositionReal(arg0, arg1 );
    } break;
    case 6: { // uint cursorLine()
	replyType = ViewCursorDCOPInterface_ftable[6][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorLine( );
    } break;
    case 7: { // uint cursorColumn()
	replyType = ViewCursorDCOPInterface_ftable[7][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorColumn( );
    } break;
    case 8: { // uint cursorColumnReal()
	replyType = ViewCursorDCOPInterface_ftable[8][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorColumnReal( );
    } break;
    case 9: { // void cursorPositionChanged()
	replyType = ViewCursorDCOPInterface_ftable[9][0]; 
	cursorPositionChanged( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

} // namespace

