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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/tdeioslave/media/medianotifier/medianotifier.h"

#include <kdatastream.h>


static const char* const MediaNotifier_ftable[3][3] = {
    { "void", "onMediumChange(TQString,bool)", "onMediumChange(TQString name,bool allowNotification)" },
    { "void", "onMediumRemove(TQString,bool)", "onMediumRemove(TQString name,bool allowNotification)" },
    { 0, 0, 0 }
};
static const int MediaNotifier_ftable_hiddens[2] = {
    0,
    0,
};

bool MediaNotifier::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == MediaNotifier_ftable[0][1] ) { // void onMediumChange(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MediaNotifier_ftable[0][0]; 
	onMediumChange(arg0, arg1 );
    } else if ( fun == MediaNotifier_ftable[1][1] ) { // void onMediumRemove(TQString,bool)
	TQString arg0;
	bool arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = MediaNotifier_ftable[1][0]; 
	onMediumRemove(arg0, arg1 );
    } else {
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


