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

#include "/usr/src/ports/kdebase3/kdebase3-3.5.10-11.x86_64/src/kdebase-3.5.10/libkonq/favicons/favicons.h"

#include <kdatastream.h>


static const char* const FaviconsModule_ftable[4][3] = {
    { "QString", "iconForURL(KURL)", "iconForURL(KURL url)" },
    { "ASYNC", "setIconForURL(KURL,KURL)", "setIconForURL(KURL url,KURL iconURL)" },
    { "ASYNC", "downloadHostIcon(KURL)", "downloadHostIcon(KURL url)" },
    { 0, 0, 0 }
};
static const int FaviconsModule_ftable_hiddens[3] = {
    0,
    0,
    0,
};

bool FaviconsModule::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
{
    if ( fun == FaviconsModule_ftable[0][1] ) { // QString iconForURL(KURL)
	KURL arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = FaviconsModule_ftable[0][0]; 
	QDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << iconForURL(arg0 );
    } else if ( fun == FaviconsModule_ftable[1][1] ) { // void setIconForURL(KURL,KURL)
	KURL arg0;
	KURL arg1;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = FaviconsModule_ftable[1][0]; 
	setIconForURL(arg0, arg1 );
    } else if ( fun == FaviconsModule_ftable[2][1] ) { // void downloadHostIcon(KURL)
	KURL arg0;
	QDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = FaviconsModule_ftable[2][0]; 
	downloadHostIcon(arg0 );
    } else {
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList FaviconsModule::functions()
{
    QCStringList funcs = KDEDModule::functions();
    for ( int i = 0; FaviconsModule_ftable[i][2]; i++ ) {
	if (FaviconsModule_ftable_hiddens[i])
	    continue;
	QCString func = FaviconsModule_ftable[i][0];
	func += ' ';
	func += FaviconsModule_ftable[i][2];
	funcs << func;
    }
    return funcs;
}

void FaviconsModule::iconChanged( bool arg0, QString arg1, QString arg2 )
{
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    emitDCOPSignal( "iconChanged(bool,QString,QString)", data );
}

void FaviconsModule::infoMessage( KURL arg0, QString arg1 )
{
    QByteArray data;
    QDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    emitDCOPSignal( "infoMessage(KURL,QString)", data );
}


