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

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


static const int KrashDCOPInterface_fhash = 13;
static const char* const KrashDCOPInterface_ftable[12][3] = {
    { "TQString", "programName()", "programName()" },
    { "TQCString", "appName()", "appName()" },
    { "int", "signalNumber()", "signalNumber()" },
    { "int", "pid()", "pid()" },
    { "bool", "startedByKdeinit()", "startedByKdeinit()" },
    { "bool", "safeMode()", "safeMode()" },
    { "TQString", "signalName()", "signalName()" },
    { "TQString", "signalText()", "signalText()" },
    { "TQString", "whatToDoText()", "whatToDoText()" },
    { "TQString", "errorDescriptionText()", "errorDescriptionText()" },
    { "ASYNC", "registerDebuggingApplication(TQString)", "registerDebuggingApplication(TQString launchName)" },
    { 0, 0, 0 }
};
static const int KrashDCOPInterface_ftable_hiddens[11] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KrashDCOPInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KrashDCOPInterface_fhash, true, false );
	for ( int i = 0; KrashDCOPInterface_ftable[i][1]; i++ )
	    fdict->insert( KrashDCOPInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQString programName()
	replyType = KrashDCOPInterface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << programName( );
    } break;
    case 1: { // TQCString appName()
	replyType = KrashDCOPInterface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << appName( );
    } break;
    case 2: { // int signalNumber()
	replyType = KrashDCOPInterface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << signalNumber( );
    } break;
    case 3: { // int pid()
	replyType = KrashDCOPInterface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pid( );
    } break;
    case 4: { // bool startedByKdeinit()
	replyType = KrashDCOPInterface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << startedByKdeinit( );
    } break;
    case 5: { // bool safeMode()
	replyType = KrashDCOPInterface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << safeMode( );
    } break;
    case 6: { // TQString signalName()
	replyType = KrashDCOPInterface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << signalName( );
    } break;
    case 7: { // TQString signalText()
	replyType = KrashDCOPInterface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << signalText( );
    } break;
    case 8: { // TQString whatToDoText()
	replyType = KrashDCOPInterface_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << whatToDoText( );
    } break;
    case 9: { // TQString errorDescriptionText()
	replyType = KrashDCOPInterface_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << errorDescriptionText( );
    } break;
    case 10: { // void registerDebuggingApplication(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KrashDCOPInterface_ftable[10][0]; 
	registerDebuggingApplication(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void KrashDCOPInterface::acceptDebuggingApplication()
{
    TQByteArray data;
    emitDCOPSignal( "acceptDebuggingApplication()", data );
}


