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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/kate/app/kateappIface.h"

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


static const int KateAppDCOPIface_fhash = 13;
static const char* const KateAppDCOPIface_ftable[12][3] = {
    { "DCOPRef", "documentManager()", "documentManager()" },
    { "DCOPRef", "activeMainWindow()", "activeMainWindow()" },
    { "uint", "activeMainWindowNumber()", "activeMainWindowNumber()" },
    { "uint", "mainWindows()", "mainWindows()" },
    { "DCOPRef", "mainWindow(uint)", "mainWindow(uint n)" },
    { "bool", "openURL(KURL,TQString)", "openURL(KURL url,TQString encoding)" },
    { "bool", "openURL(KURL,TQString,bool)", "openURL(KURL url,TQString encoding,bool isTempFile)" },
    { "bool", "setCursor(int,int)", "setCursor(int line,int column)" },
    { "bool", "openInput(TQString)", "openInput(TQString text)" },
    { "bool", "activateSession(TQString)", "activateSession(TQString session)" },
    { "TQString", "session()", "session()" },
    { 0, 0, 0 }
};
static const int KateAppDCOPIface_ftable_hiddens[11] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KateAppDCOPIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KateAppDCOPIface_fhash, true, false );
	for ( int i = 0; KateAppDCOPIface_ftable[i][1]; i++ )
	    fdict->insert( KateAppDCOPIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // DCOPRef documentManager()
	replyType = KateAppDCOPIface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << documentManager( );
    } break;
    case 1: { // DCOPRef activeMainWindow()
	replyType = KateAppDCOPIface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << activeMainWindow( );
    } break;
    case 2: { // uint activeMainWindowNumber()
	replyType = KateAppDCOPIface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << activeMainWindowNumber( );
    } break;
    case 3: { // uint mainWindows()
	replyType = KateAppDCOPIface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mainWindows( );
    } break;
    case 4: { // DCOPRef mainWindow(uint)
	uint arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KateAppDCOPIface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << mainWindow(arg0 );
    } break;
    case 5: { // bool openURL(KURL,TQString)
	KURL arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KateAppDCOPIface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openURL(arg0, arg1 );
    } break;
    case 6: { // bool openURL(KURL,TQString,bool)
	KURL arg0;
	TQString arg1;
	bool arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = KateAppDCOPIface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openURL(arg0, arg1, arg2 );
    } break;
    case 7: { // bool setCursor(int,int)
	int arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KateAppDCOPIface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setCursor(arg0, arg1 );
    } break;
    case 8: { // bool openInput(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KateAppDCOPIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << openInput(arg0 );
    } break;
    case 9: { // bool activateSession(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KateAppDCOPIface_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << activateSession(arg0 );
    } break;
    case 10: { // TQString session()
	replyType = KateAppDCOPIface_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << session( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


