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

#include "/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/kresources/manageriface.h"

#include <kdatastream.h>

namespace KRES {

static const char* const ManagerIface_ftable[4][3] = {
    { "ASYNC", "dcopKResourceAdded(QString,QString)", "dcopKResourceAdded(QString managerId,QString resourceId)" },
    { "ASYNC", "dcopKResourceModified(QString,QString)", "dcopKResourceModified(QString managerId,QString resourceId)" },
    { "ASYNC", "dcopKResourceDeleted(QString,QString)", "dcopKResourceDeleted(QString managerId,QString resourceId)" },
    { 0, 0, 0 }
};
static const int ManagerIface_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool ManagerIface::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == ManagerIface_ftable[0][1] ) { // void dcopKResourceAdded(QString,QString)
	QString arg0;
	QString arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ManagerIface_ftable[0][0]; 
	dcopKResourceAdded(arg0, arg1 );
    } else if ( fun == ManagerIface_ftable[1][1] ) { // void dcopKResourceModified(QString,QString)
	QString arg0;
	QString arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ManagerIface_ftable[1][0]; 
	dcopKResourceModified(arg0, arg1 );
    } else if ( fun == ManagerIface_ftable[2][1] ) { // void dcopKResourceDeleted(QString,QString)
	QString arg0;
	QString arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = ManagerIface_ftable[2][0]; 
	dcopKResourceDeleted(arg0, arg1 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList ManagerIface::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; ManagerIface_ftable[i][2]; i++ ) {
	if (ManagerIface_ftable_hiddens[i])
	    continue;
	QCString func = ManagerIface_ftable[i][0];
	func += ' ';
	func += ManagerIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

void ManagerIface::signalKResourceAdded( QString arg0, QString arg1 )
{
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "signalKResourceAdded(QString,QString)", data );
}

void ManagerIface::signalKResourceModified( QString arg0, QString arg1 )
{
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "signalKResourceModified(QString,QString)", data );
}

void ManagerIface::signalKResourceDeleted( QString arg0, QString arg1 )
{
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "signalKResourceDeleted(QString,QString)", data );
}

} // namespace

