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

#include "/tmp/buildd/tde-packaging/arch/tde-core/tde-tdebase/src/tdebase-trinity-14.1.6/konqueror/preloader/preloader.h"

#include <kdatastream.h>


static const char* const KonqyPreloader_ftable[6][3] = {
    { "bool", "registerPreloadedKonqy(TQCString,int)", "registerPreloadedKonqy(TQCString id,int screen)" },
    { "TQCString", "getPreloadedKonqy(int)", "getPreloadedKonqy(int screen)" },
    { "ASYNC", "unregisterPreloadedKonqy(TQCString)", "unregisterPreloadedKonqy(TQCString id)" },
    { "void", "reconfigure()", "reconfigure()" },
    { "void", "unloadAllPreloaded()", "unloadAllPreloaded()" },
    { 0, 0, 0 }
};
static const int KonqyPreloader_ftable_hiddens[5] = {
    0,
    0,
    0,
    0,
    0,
};

bool KonqyPreloader::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == KonqyPreloader_ftable[0][1] ) { // bool registerPreloadedKonqy(TQCString,int)
	TQCString arg0;
	int arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = KonqyPreloader_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << registerPreloadedKonqy(arg0, arg1 );
    } else if ( fun == KonqyPreloader_ftable[1][1] ) { // TQCString getPreloadedKonqy(int)
	int arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqyPreloader_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getPreloadedKonqy(arg0 );
    } else if ( fun == KonqyPreloader_ftable[2][1] ) { // void unregisterPreloadedKonqy(TQCString)
	TQCString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = KonqyPreloader_ftable[2][0]; 
	unregisterPreloadedKonqy(arg0 );
    } else if ( fun == KonqyPreloader_ftable[3][1] ) { // void reconfigure()
	replyType = KonqyPreloader_ftable[3][0]; 
	reconfigure( );
    } else if ( fun == KonqyPreloader_ftable[4][1] ) { // void unloadAllPreloaded()
	replyType = KonqyPreloader_ftable[4][0]; 
	unloadAllPreloaded( );
    } else {
	return KDEDModule::process( fun, data, replyType, replyData );
    }
    return true;
}

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

QCStringList KonqyPreloader::functions()
{
    QCStringList funcs = KDEDModule::functions();
    for ( int i = 0; KonqyPreloader_ftable[i][2]; i++ ) {
	if (KonqyPreloader_ftable_hiddens[i])
	    continue;
	TQCString func = KonqyPreloader_ftable[i][0];
	func += ' ';
	func += KonqyPreloader_ftable[i][2];
	funcs << func;
    }
    return funcs;
}


