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

#include <kdatastream.h>


static const char* const KDirNotify_ftable[5][3] = {
    { "ASYNC", "FilesAdded(KURL)", "FilesAdded(KURL directory)" },
    { "ASYNC", "FilesRemoved(KURL::List)", "FilesRemoved(KURL::List fileList)" },
    { "ASYNC", "FilesChanged(KURL::List)", "FilesChanged(KURL::List fileList)" },
    { "ASYNC", "FileRenamed(KURL,KURL)", "FileRenamed(KURL src,KURL dst)" },
    { 0, 0, 0 }
};
static const int KDirNotify_ftable_hiddens[4] = {
    0,
    0,
    0,
    0,
};

bool KDirNotify::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == KDirNotify_ftable[0][1] ) { // void FilesAdded(KURL)
	KURL arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDirNotify_ftable[0][0]; 
	FilesAdded(arg0 );
    } else if ( fun == KDirNotify_ftable[1][1] ) { // void FilesRemoved(KURL::List)
	KURL::List arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDirNotify_ftable[1][0]; 
	FilesRemoved(arg0 );
    } else if ( fun == KDirNotify_ftable[2][1] ) { // void FilesChanged(KURL::List)
	KURL::List arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KDirNotify_ftable[2][0]; 
	FilesChanged(arg0 );
    } else if ( fun == KDirNotify_ftable[3][1] ) { // void FileRenamed(KURL,KURL)
	KURL arg0;
	KURL arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KDirNotify_ftable[3][0]; 
	FileRenamed(arg0, arg1 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


