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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdelibs/src/tdelibs-trinity-14.1.6/tderesources/manageriface.h"

#include <kdatastream.h>

namespace KRES {

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

bool ManagerIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == ManagerIface_ftable[0][1] ) { // void dcopKResourceAdded(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream 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(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream 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(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream 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;
	TQCString func = ManagerIface_ftable[i][0];
	func += ' ';
	func += ManagerIface_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

void ManagerIface::signalKResourceAdded( TQString arg0, TQString arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "signalKResourceAdded(TQString,TQString)", data );
}

void ManagerIface::signalKResourceModified( TQString arg0, TQString arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "signalKResourceModified(TQString,TQString)", data );
}

void ManagerIface::signalKResourceDeleted( TQString arg0, TQString arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "signalKResourceDeleted(TQString,TQString)", data );
}

} // namespace

