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

#include <kdatastream.h>


static const char* const Observer_ftable[3][3] = {
    { "void", "killJob(int)", "killJob(int progressId)" },
    { "KIO::MetaData", "metadata(int)", "metadata(int progressId)" },
    { 0, 0, 0 }
};
static const int Observer_ftable_hiddens[2] = {
    0,
    0,
};

bool Observer::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == Observer_ftable[0][1] ) { // void killJob(int)
	int arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = Observer_ftable[0][0]; 
	killJob(arg0 );
    } else if ( fun == Observer_ftable[1][1] ) { // KIO::MetaData metadata(int)
	int arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = Observer_ftable[1][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << metadata(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


