/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from kdirnotify.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/tdeio/tdeio/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 TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KDirNotify_ftable[0][1] ) { // void FilesAdded(KURL)
	KURL arg0;
	TQDataStream 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;
	TQDataStream 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;
	TQDataStream 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;
	TQDataStream 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;
	TQCString func = KDirNotify_ftable[i][0];
	func += ' ';
	func += KDirNotify_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


