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

#include "/tmp/buildd/tde-packaging/arch/tde-base/tde-tdeutils/src/tdeutils-trinity-14.1.6/tdelirc/irkick/irkick.h"

#include <kdatastream.h>


static const char* const IRKick_ftable[8][3] = {
    { "bool", "isConnected()", "isConnected()" },
    { "bool", "haveFullList()", "haveFullList()" },
    { "TQStringList", "remotes()", "remotes()" },
    { "TQStringList", "buttons(TQString)", "buttons(TQString theRemote)" },
    { "void", "stealNextPress(TQString,TQString,TQString)", "stealNextPress(TQString app,TQString module,TQString method)" },
    { "void", "dontStealNextPress()", "dontStealNextPress()" },
    { "void", "reloadConfiguration()", "reloadConfiguration()" },
    { 0, 0, 0 }
};
static const int IRKick_ftable_hiddens[7] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool IRKick::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == IRKick_ftable[0][1] ) { // bool isConnected()
	replyType = IRKick_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << isConnected( );
    } else if ( fun == IRKick_ftable[1][1] ) { // bool haveFullList()
	replyType = IRKick_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << haveFullList( );
    } else if ( fun == IRKick_ftable[2][1] ) { // TQStringList remotes()
	replyType = IRKick_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << remotes( );
    } else if ( fun == IRKick_ftable[3][1] ) { // TQStringList buttons(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = IRKick_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << buttons(arg0 );
    } else if ( fun == IRKick_ftable[4][1] ) { // void stealNextPress(TQString,TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQString arg2;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	replyType = IRKick_ftable[4][0]; 
	stealNextPress(arg0, arg1, arg2 );
    } else if ( fun == IRKick_ftable[5][1] ) { // void dontStealNextPress()
	replyType = IRKick_ftable[5][0]; 
	dontStealNextPress( );
    } else if ( fun == IRKick_ftable[6][1] ) { // void reloadConfiguration()
	replyType = IRKick_ftable[6][0]; 
	reloadConfiguration( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList IRKick::functions()
{
    QCStringList funcs = DCOPObject::functions();
    for ( int i = 0; IRKick_ftable[i][2]; i++ ) {
	if (IRKick_ftable_hiddens[i])
	    continue;
	TQCString func = IRKick_ftable[i][0];
	func += ' ';
	func += IRKick_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


