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

#include "./sessioniface.h"

#include <kdatastream.h>


static const char* const SessionIface_ftable[3][3] = {
    { "bool", "closeSession()", "closeSession()" },
    { "bool", "sendSignal(int)", "sendSignal(int signal)" },
    { 0, 0, 0 }
};

bool SessionIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == SessionIface_ftable[0][1] ) { // bool closeSession()
	replyType = SessionIface_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << closeSession( );
    } else if ( fun == SessionIface_ftable[1][1] ) { // bool sendSignal(int)
	int arg0;
	QDataStream arg( data, IO_ReadOnly );
	arg >> arg0;
	replyType = SessionIface_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << sendSignal(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return TRUE;
}

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

QCStringList SessionIface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; SessionIface_ftable[i][2]; i++ ) {
	QCString func = SessionIface_ftable[i][0];
	func += ' ';
	func += SessionIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


