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

#include <kdatastream.h>


static const char* const KMFactory_ftable[3][3] = {
    { "ASYNC", "slot_pluginChanged(pid_t)", "slot_pluginChanged(pid_t)" },
    { "ASYNC", "slot_configChanged()", "slot_configChanged()" },
    { 0, 0, 0 }
};
static const int KMFactory_ftable_hiddens[2] = {
    0,
    0,
};

bool KMFactory::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KMFactory_ftable[0][1] ) { // void slot_pluginChanged(pid_t)
	pid_t arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KMFactory_ftable[0][0]; 
	slot_pluginChanged(arg0 );
    } else if ( fun == KMFactory_ftable[1][1] ) { // void slot_configChanged()
	replyType = KMFactory_ftable[1][0]; 
	slot_configChanged( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void KMFactory::pluginChanged( pid_t arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "pluginChanged(pid_t)", data );
}

void KMFactory::configChanged()
{
    TQByteArray data;
    emitDCOPSignal( "configChanged()", data );
}


