/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from kmfactory.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/kdeprint/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 QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == KMFactory_ftable[0][1] ) { // void slot_pluginChanged(pid_t)
	pid_t arg0;
	QDataStream 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;
	QCString func = KMFactory_ftable[i][0];
	func += ' ';
	func += KMFactory_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

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

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


