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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-kile/src/kile-trinity-14.1.6/src/kile/kileappIface.h"

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


static const int KileAppDCOPIface_fhash = 11;
static const char* const KileAppDCOPIface_ftable[10][3] = {
    { "void", "openDocument(TQString)", "openDocument(TQString)" },
    { "void", "insertText(TQString)", "insertText(TQString)" },
    { "void", "fileSelected(TQString)", "fileSelected(TQString)" },
    { "void", "closeDocument()", "closeDocument()" },
    { "void", "openProject(TQString)", "openProject(TQString)" },
    { "void", "setLine(TQString)", "setLine(TQString)" },
    { "void", "setActive()", "setActive()" },
    { "int", "run(TQString)", "run(TQString)" },
    { "int", "runWith(TQString,TQString)", "runWith(TQString,TQString)" },
    { 0, 0, 0 }
};
static const int KileAppDCOPIface_ftable_hiddens[9] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KileAppDCOPIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KileAppDCOPIface_fhash, true, false );
	for ( int i = 0; KileAppDCOPIface_ftable[i][1]; i++ )
	    fdict->insert( KileAppDCOPIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void openDocument(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KileAppDCOPIface_ftable[0][0]; 
	openDocument(arg0 );
    } break;
    case 1: { // void insertText(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KileAppDCOPIface_ftable[1][0]; 
	insertText(arg0 );
    } break;
    case 2: { // void fileSelected(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KileAppDCOPIface_ftable[2][0]; 
	fileSelected(arg0 );
    } break;
    case 3: { // void closeDocument()
	replyType = KileAppDCOPIface_ftable[3][0]; 
	closeDocument( );
    } break;
    case 4: { // void openProject(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KileAppDCOPIface_ftable[4][0]; 
	openProject(arg0 );
    } break;
    case 5: { // void setLine(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KileAppDCOPIface_ftable[5][0]; 
	setLine(arg0 );
    } break;
    case 6: { // void setActive()
	replyType = KileAppDCOPIface_ftable[6][0]; 
	setActive( );
    } break;
    case 7: { // int run(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KileAppDCOPIface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << run(arg0 );
    } break;
    case 8: { // int runWith(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KileAppDCOPIface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << runWith(arg0, arg1 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


