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

#include "/tmp/buildd/tde-packaging/arch/tde-extra/tde-krecipes/src/krecipes-trinity-14.1.6/src/krecipesiface.h"

#include <kdatastream.h>


static const char* const KrecipesIface_ftable[4][3] = {
    { "DCOPRef", "currentDatabase()", "currentDatabase()" },
    { "void", "reload()", "reload()" },
    { "void", "exportRecipes(TQValueList<int>)", "exportRecipes(TQValueList<int> ids)" },
    { 0, 0, 0 }
};
static const int KrecipesIface_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool KrecipesIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KrecipesIface_ftable[0][1] ) { // DCOPRef currentDatabase()
	replyType = KrecipesIface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << currentDatabase( );
    } else if ( fun == KrecipesIface_ftable[1][1] ) { // void reload()
	replyType = KrecipesIface_ftable[1][0]; 
	reload( );
    } else if ( fun == KrecipesIface_ftable[2][1] ) { // void exportRecipes(TQValueList<int>)
	TQValueList<int> arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KrecipesIface_ftable[2][0]; 
	exportRecipes(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


