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

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


static const int KSMServerInterface_fhash = 17;
static const char* const KSMServerInterface_ftable[15][3] = {
    { "void", "logout(int,int,int)", "logout(int,int,int)" },
    { "void", "logoutTimed(int,int,TQString)", "logoutTimed(int,int,TQString)" },
    { "bool", "suspend(int)", "suspend(int)" },
    { "TQStringList", "suspendOptions()", "suspendOptions()" },
    { "void", "restoreSessionInternal()", "restoreSessionInternal()" },
    { "void", "restoreSessionDoneInternal()", "restoreSessionDoneInternal()" },
    { "TQStringList", "sessionList()", "sessionList()" },
    { "TQString", "currentSession()", "currentSession()" },
    { "void", "saveCurrentSession()", "saveCurrentSession()" },
    { "void", "saveCurrentSessionAs(TQString)", "saveCurrentSessionAs(TQString)" },
    { "void", "autoStart2()", "autoStart2()" },
    { "void", "suspendStartup(TQCString)", "suspendStartup(TQCString)" },
    { "void", "resumeStartup(TQCString)", "resumeStartup(TQCString)" },
    { "void", "reconfigure()", "reconfigure()" },
    { 0, 0, 0 }
};
static const int KSMServerInterface_ftable_hiddens[14] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KSMServerInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KSMServerInterface_fhash, true, false );
	for ( int i = 0; KSMServerInterface_ftable[i][1]; i++ )
	    fdict->insert( KSMServerInterface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void logout(int,int,int)
	int arg0;
	int arg1;
	int 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 = KSMServerInterface_ftable[0][0]; 
	logout(arg0, arg1, arg2 );
    } break;
    case 1: { // void logoutTimed(int,int,TQString)
	int arg0;
	int arg1;
	TQString 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 = KSMServerInterface_ftable[1][0]; 
	logoutTimed(arg0, arg1, arg2 );
    } break;
    case 2: { // bool suspend(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSMServerInterface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << suspend(arg0 );
    } break;
    case 3: { // TQStringList suspendOptions()
	replyType = KSMServerInterface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << suspendOptions( );
    } break;
    case 4: { // void restoreSessionInternal()
	replyType = KSMServerInterface_ftable[4][0]; 
	restoreSessionInternal( );
    } break;
    case 5: { // void restoreSessionDoneInternal()
	replyType = KSMServerInterface_ftable[5][0]; 
	restoreSessionDoneInternal( );
    } break;
    case 6: { // TQStringList sessionList()
	replyType = KSMServerInterface_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sessionList( );
    } break;
    case 7: { // TQString currentSession()
	replyType = KSMServerInterface_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentSession( );
    } break;
    case 8: { // void saveCurrentSession()
	replyType = KSMServerInterface_ftable[8][0]; 
	saveCurrentSession( );
    } break;
    case 9: { // void saveCurrentSessionAs(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSMServerInterface_ftable[9][0]; 
	saveCurrentSessionAs(arg0 );
    } break;
    case 10: { // void autoStart2()
	replyType = KSMServerInterface_ftable[10][0]; 
	autoStart2( );
    } break;
    case 11: { // void suspendStartup(TQCString)
	TQCString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSMServerInterface_ftable[11][0]; 
	suspendStartup(arg0 );
    } break;
    case 12: { // void resumeStartup(TQCString)
	TQCString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KSMServerInterface_ftable[12][0]; 
	resumeStartup(arg0 );
    } break;
    case 13: { // void reconfigure()
	replyType = KSMServerInterface_ftable[13][0]; 
	reconfigure( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


