/****************************************************************************
**
** DCOP Skeleton generated by dcopidl2cpp from query.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/dcoprss/query.h"

#include <kdatastream.h>


static const char* const QueryService_ftable[7][3] = {
    { "TQStringList", "listActive()", "listActive()" },
    { "void", "findFeeds(TQString)", "findFeeds(TQString query)" },
    { "void", "findSites(TQString)", "findSites(TQString query)" },
    { "void", "getFeedInfo(TQVariant)", "getFeedInfo(TQVariant ids)" },
    { "void", "getCategories(TQString)", "getCategories(TQString category)" },
    { "void", "getFeedsInCategory(TQString)", "getFeedsInCategory(TQString category)" },
    { 0, 0, 0 }
};
static const int QueryService_ftable_hiddens[6] = {
    0,
    0,
    0,
    0,
    0,
    0,
};

bool QueryService::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == QueryService_ftable[0][1] ) { // TQStringList listActive()
	replyType = QueryService_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << listActive( );
    } else if ( fun == QueryService_ftable[1][1] ) { // void findFeeds(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = QueryService_ftable[1][0]; 
	findFeeds(arg0 );
    } else if ( fun == QueryService_ftable[2][1] ) { // void findSites(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = QueryService_ftable[2][0]; 
	findSites(arg0 );
    } else if ( fun == QueryService_ftable[3][1] ) { // void getFeedInfo(TQVariant)
	TQVariant arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = QueryService_ftable[3][0]; 
	getFeedInfo(arg0 );
    } else if ( fun == QueryService_ftable[4][1] ) { // void getCategories(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = QueryService_ftable[4][0]; 
	getCategories(arg0 );
    } else if ( fun == QueryService_ftable[5][1] ) { // void getFeedsInCategory(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = QueryService_ftable[5][0]; 
	getFeedsInCategory(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void QueryService::feedIds( TQValueList<int> arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "feedIds(TQValueList<int>)", data );
}

void QueryService::feedInfo( TQMap<TQString,TQString> arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "feedInfo(TQMap<TQString,TQString>)", data );
}

void QueryService::feedInfo( TQValueList<RSSNewsFeed> arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "feedInfo(TQValueList<RSSNewsFeed>)", data );
}

void QueryService::gotCategories( const TQStringList& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "gotCategories(TQStringList)", data );
}

void QueryService::gotFeedsInCategory( const TQValueList<int>& arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "gotFeedsInCategory(TQValueList<int>)", data );
}


