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

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


static const int KScreensaverIface_fhash = 11;
static const char* const KScreensaverIface_ftable[10][3] = {
    { "void", "lock()", "lock()" },
    { "void", "save()", "save()" },
    { "void", "quit()", "quit()" },
    { "bool", "isEnabled()", "isEnabled()" },
    { "bool", "enable(bool)", "enable(bool e)" },
    { "bool", "isBlanked()", "isBlanked()" },
    { "void", "configure()", "configure()" },
    { "void", "setBlankOnly(bool)", "setBlankOnly(bool blankOnly)" },
    { "void", "saverLockReady()", "saverLockReady()" },
    { 0, 0, 0 }
};
static const int KScreensaverIface_ftable_hiddens[9] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool KScreensaverIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( KScreensaverIface_fhash, true, false );
	for ( int i = 0; KScreensaverIface_ftable[i][1]; i++ )
	    fdict->insert( KScreensaverIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void lock()
	replyType = KScreensaverIface_ftable[0][0]; 
	lock( );
    } break;
    case 1: { // void save()
	replyType = KScreensaverIface_ftable[1][0]; 
	save( );
    } break;
    case 2: { // void quit()
	replyType = KScreensaverIface_ftable[2][0]; 
	quit( );
    } break;
    case 3: { // bool isEnabled()
	replyType = KScreensaverIface_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isEnabled( );
    } break;
    case 4: { // bool enable(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KScreensaverIface_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << enable(arg0 );
    } break;
    case 5: { // bool isBlanked()
	replyType = KScreensaverIface_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isBlanked( );
    } break;
    case 6: { // void configure()
	replyType = KScreensaverIface_ftable[6][0]; 
	configure( );
    } break;
    case 7: { // void setBlankOnly(bool)
	bool arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KScreensaverIface_ftable[7][0]; 
	setBlankOnly(arg0 );
    } break;
    case 8: { // void saverLockReady()
	replyType = KScreensaverIface_ftable[8][0]; 
	saverLockReady( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


