/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from dnssdwatcher.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-tdenetwork/src/tdenetwork-trinity-14.1.6/tdednssd/kdedmodule/dnssdwatcher.h"

#include <kdatastream.h>


static const char* const DNSSDWatcher_ftable[4][3] = {
    { "TQStringList", "watchedDirectories()", "watchedDirectories()" },
    { "void", "enteredDirectory(KURL)", "enteredDirectory(KURL dir)" },
    { "void", "leftDirectory(KURL)", "leftDirectory(KURL dir)" },
    { 0, 0, 0 }
};
static const int DNSSDWatcher_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool DNSSDWatcher::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == DNSSDWatcher_ftable[0][1] ) { // TQStringList watchedDirectories()
	replyType = DNSSDWatcher_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << watchedDirectories( );
    } else if ( fun == DNSSDWatcher_ftable[1][1] ) { // void enteredDirectory(KURL)
	KURL arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DNSSDWatcher_ftable[1][0]; 
	enteredDirectory(arg0 );
    } else if ( fun == DNSSDWatcher_ftable[2][1] ) { // void leftDirectory(KURL)
	KURL arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = DNSSDWatcher_ftable[2][0]; 
	leftDirectory(arg0 );
    } else {
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

QCStringList DNSSDWatcher::interfaces()
{
    QCStringList ifaces = KDEDModule::interfaces();
    ifaces += "DNSSDWatcher";
    return ifaces;
}

QCStringList DNSSDWatcher::functions()
{
    QCStringList funcs = KDEDModule::functions();
    for ( int i = 0; DNSSDWatcher_ftable[i][2]; i++ ) {
	if (DNSSDWatcher_ftable_hiddens[i])
	    continue;
	TQCString func = DNSSDWatcher_ftable[i][0];
	func += ' ';
	func += DNSSDWatcher_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


