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

#include <kdatastream.h>


static const char* const RSSArticle_ftable[4][3] = {
    { "TQString", "title()", "title()" },
    { "TQString", "description()", "description()" },
    { "TQString", "link()", "link()" },
    { 0, 0, 0 }
};
static const int RSSArticle_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool RSSArticle::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == RSSArticle_ftable[0][1] ) { // TQString title()
	replyType = RSSArticle_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << title( );
    } else if ( fun == RSSArticle_ftable[1][1] ) { // TQString description()
	replyType = RSSArticle_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << description( );
    } else if ( fun == RSSArticle_ftable[2][1] ) { // TQString link()
	replyType = RSSArticle_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << link( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


#include <kdatastream.h>
#include <tqasciidict.h>


static const int RSSDocument_fhash = 29;
static const char* const RSSDocument_ftable[24][3] = {
    { "TQString", "webMaster()", "webMaster()" },
    { "TQString", "managingEditor()", "managingEditor()" },
    { "TQString", "rating()", "rating()" },
    { "TQDateTime", "lastBuildDate()", "lastBuildDate()" },
    { "TQDateTime", "pubDate()", "pubDate()" },
    { "TQString", "copyright()", "copyright()" },
    { "TQStringList", "articles()", "articles()" },
    { "int", "count()", "count()" },
    { "DCOPRef", "article(int)", "article(int idx)" },
    { "TQString", "link()", "link()" },
    { "TQString", "description()", "description()" },
    { "TQString", "title()", "title()" },
    { "TQString", "verbVersion()", "verbVersion()" },
    { "TQString", "pixmapURL()", "pixmapURL()" },
    { "TQPixmap", "pixmap()", "pixmap()" },
    { "bool", "documentValid()", "documentValid()" },
    { "bool", "pixmapValid()", "pixmapValid()" },
    { "void", "refresh()", "refresh()" },
    { "int", "maxAge()", "maxAge()" },
    { "void", "setMaxAge(int)", "setMaxAge(int minutes)" },
    { "int", "state(TQString)", "state(TQString title)" },
    { "void", "setState(TQString,int)", "setState(TQString title,int s)" },
    { "void", "read(TQString)", "read(TQString title)" },
    { 0, 0, 0 }
};
static const int RSSDocument_ftable_hiddens[23] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool RSSDocument::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( RSSDocument_fhash, true, false );
	for ( int i = 0; RSSDocument_ftable[i][1]; i++ )
	    fdict->insert( RSSDocument_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // TQString webMaster()
	replyType = RSSDocument_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << webMaster( );
    } break;
    case 1: { // TQString managingEditor()
	replyType = RSSDocument_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << managingEditor( );
    } break;
    case 2: { // TQString rating()
	replyType = RSSDocument_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << rating( );
    } break;
    case 3: { // TQDateTime lastBuildDate()
	replyType = RSSDocument_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << lastBuildDate( );
    } break;
    case 4: { // TQDateTime pubDate()
	replyType = RSSDocument_ftable[4][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pubDate( );
    } break;
    case 5: { // TQString copyright()
	replyType = RSSDocument_ftable[5][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << copyright( );
    } break;
    case 6: { // TQStringList articles()
	replyType = RSSDocument_ftable[6][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << articles( );
    } break;
    case 7: { // int count()
	replyType = RSSDocument_ftable[7][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << count( );
    } break;
    case 8: { // DCOPRef article(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSDocument_ftable[8][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << article(arg0 );
    } break;
    case 9: { // TQString link()
	replyType = RSSDocument_ftable[9][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << link( );
    } break;
    case 10: { // TQString description()
	replyType = RSSDocument_ftable[10][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << description( );
    } break;
    case 11: { // TQString title()
	replyType = RSSDocument_ftable[11][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << title( );
    } break;
    case 12: { // TQString verbVersion()
	replyType = RSSDocument_ftable[12][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << verbVersion( );
    } break;
    case 13: { // TQString pixmapURL()
	replyType = RSSDocument_ftable[13][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pixmapURL( );
    } break;
    case 14: { // TQPixmap pixmap()
	replyType = RSSDocument_ftable[14][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pixmap( );
    } break;
    case 15: { // bool documentValid()
	replyType = RSSDocument_ftable[15][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << documentValid( );
    } break;
    case 16: { // bool pixmapValid()
	replyType = RSSDocument_ftable[16][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << pixmapValid( );
    } break;
    case 17: { // void refresh()
	replyType = RSSDocument_ftable[17][0]; 
	refresh( );
    } break;
    case 18: { // int maxAge()
	replyType = RSSDocument_ftable[18][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << maxAge( );
    } break;
    case 19: { // void setMaxAge(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSDocument_ftable[19][0]; 
	setMaxAge(arg0 );
    } break;
    case 20: { // int state(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSDocument_ftable[20][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << state(arg0 );
    } break;
    case 21: { // void setState(TQString,int)
	TQString arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = RSSDocument_ftable[21][0]; 
	setState(arg0, arg1 );
    } break;
    case 22: { // void read(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSDocument_ftable[22][0]; 
	read(arg0 );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void RSSDocument::pixmapUpdating( DCOPRef arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "pixmapUpdating(DCOPRef)", data );
}

void RSSDocument::pixmapUpdated( DCOPRef arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "pixmapUpdated(DCOPRef)", data );
}

void RSSDocument::documentUpdating( DCOPRef arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "documentUpdating(DCOPRef)", data );
}

void RSSDocument::documentUpdated( DCOPRef arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "documentUpdated(DCOPRef)", data );
}

void RSSDocument::documentUpdateError( DCOPRef arg0, int arg1 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "documentUpdateError(DCOPRef,int)", data );
}


#include <kdatastream.h>


static const char* const RSSService_ftable[6][3] = {
    { "DCOPRef", "add(TQString)", "add(TQString url)" },
    { "TQStringList", "list()", "list()" },
    { "void", "remove(TQString)", "remove(TQString url)" },
    { "DCOPRef", "document(TQString)", "document(TQString url)" },
    { "void", "exit()", "exit()" },
    { 0, 0, 0 }
};
static const int RSSService_ftable_hiddens[5] = {
    0,
    0,
    0,
    0,
    0,
};

bool RSSService::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == RSSService_ftable[0][1] ) { // DCOPRef add(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSService_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << add(arg0 );
    } else if ( fun == RSSService_ftable[1][1] ) { // TQStringList list()
	replyType = RSSService_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << list( );
    } else if ( fun == RSSService_ftable[2][1] ) { // void remove(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSService_ftable[2][0]; 
	remove(arg0 );
    } else if ( fun == RSSService_ftable[3][1] ) { // DCOPRef document(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = RSSService_ftable[3][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << document(arg0 );
    } else if ( fun == RSSService_ftable[4][1] ) { // void exit()
	replyType = RSSService_ftable[4][0]; 
	exit( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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

void RSSService::added( TQString arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "added(TQString)", data );
}

void RSSService::removed( TQString arg0 )
{
    TQByteArray data;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    emitDCOPSignal( "removed(TQString)", data );
}


