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

#include "/tmp/buildd/tde-packaging/arch/tde-devel/tde-tdevelop/src/tdevelop-trinity-14.1.6/lib/interfaces/KDevPartControllerIface.h"

#include <kdatastream.h>


static const char* const KDevPartControllerIface_ftable[7][3] = {
    { "void", "editDocument(TQString,int)", "editDocument(TQString url,int lineNum)" },
    { "void", "showDocument(TQString,bool)", "showDocument(TQString url,bool newWin)" },
    { "void", "saveAllFiles()", "saveAllFiles()" },
    { "void", "revertAllFiles()", "revertAllFiles()" },
    { "bool", "closeAllFiles()", "closeAllFiles()" },
    { "uint", "documentState(KURL)", "documentState(KURL url)" },
    { 0, 0, 0 }
};
static const int KDevPartControllerIface_ftable_hiddens[6] = {
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KDevPartControllerIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KDevPartControllerIface_ftable[0][1] ) { // void editDocument(TQString,int)
	TQString arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KDevPartControllerIface_ftable[0][0]; 
	editDocument(arg0, arg1 );
    } else if ( fun == KDevPartControllerIface_ftable[1][1] ) { // void showDocument(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KDevPartControllerIface_ftable[1][0]; 
	showDocument(arg0, arg1 );
    } else if ( fun == KDevPartControllerIface_ftable[2][1] ) { // void saveAllFiles()
	replyType = KDevPartControllerIface_ftable[2][0]; 
	saveAllFiles( );
    } else if ( fun == KDevPartControllerIface_ftable[3][1] ) { // void revertAllFiles()
	replyType = KDevPartControllerIface_ftable[3][0]; 
	revertAllFiles( );
    } else if ( fun == KDevPartControllerIface_ftable[4][1] ) { // bool closeAllFiles()
	replyType = KDevPartControllerIface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << closeAllFiles( );
    } else if ( fun == KDevPartControllerIface_ftable[5][1] ) { // uint documentState(KURL)
	KURL arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDevPartControllerIface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << documentState(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


