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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdeedu/src/tdeedu-trinity-14.1.6/kstars/kstars/simclockinterface.h"

#include <kdatastream.h>


static const char* const SimClockInterface_ftable[5][3] = {
    { "ASYNC", "stop()", "stop()" },
    { "ASYNC", "start()", "start()" },
    { "ASYNC", "setUTC(KStarsDateTime)", "setUTC(KStarsDateTime newtime)" },
    { "ASYNC", "setClockScale(float)", "setClockScale(float s)" },
    { 0, 0, 0 }
};
static const int SimClockInterface_ftable_hiddens[4] = {
    0,
    0,
    0,
    0,
};

bool SimClockInterface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == SimClockInterface_ftable[0][1] ) { // void stop()
	replyType = SimClockInterface_ftable[0][0]; 
	stop( );
    } else if ( fun == SimClockInterface_ftable[1][1] ) { // void start()
	replyType = SimClockInterface_ftable[1][0]; 
	start( );
    } else if ( fun == SimClockInterface_ftable[2][1] ) { // void setUTC(KStarsDateTime)
	KStarsDateTime arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SimClockInterface_ftable[2][0]; 
	setUTC(arg0 );
    } else if ( fun == SimClockInterface_ftable[3][1] ) { // void setClockScale(float)
	float arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = SimClockInterface_ftable[3][0]; 
	setClockScale(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


