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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdelibs/src/tdelibs-trinity-14.1.6/interfaces/tdetexteditor/viewcursordcopinterface.h"

#include <kdatastream.h>
#include <tqasciidict.h>

namespace KTextEditor {

static const int ViewCursorDCOPInterface_fhash = 11;
static const char* const ViewCursorDCOPInterface_ftable[11][3] = {
    { "uint", "viewCursorInterfaceNumber()", "viewCursorInterfaceNumber()" },
    { "TQPoint", "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 TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<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]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << viewCursorInterfaceNumber( );
    } break;
    case 1: { // TQPoint cursorCoordinates()
	replyType = ViewCursorDCOPInterface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorCoordinates( );
    } break;
    case 2: { // void cursorPosition(uint,uint)
	uint arg0;
	uint arg1;
	TQDataStream 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;
	TQDataStream 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;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ViewCursorDCOPInterface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setCursorPosition(arg0, arg1 );
    } break;
    case 5: { // bool setCursorPositionReal(uint,uint)
	uint arg0;
	uint arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ViewCursorDCOPInterface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setCursorPositionReal(arg0, arg1 );
    } break;
    case 6: { // uint cursorLine()
	replyType = ViewCursorDCOPInterface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorLine( );
    } break;
    case 7: { // uint cursorColumn()
	replyType = ViewCursorDCOPInterface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << cursorColumn( );
    } break;
    case 8: { // uint cursorColumnReal()
	replyType = ViewCursorDCOPInterface_ftable[8][0]; 
	TQDataStream _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;
	TQCString func = ViewCursorDCOPInterface_ftable[i][0];
	func += ' ';
	func += ViewCursorDCOPInterface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

} // namespace

