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

#include <kdatastream.h>


static const char* const NSPluginCallbackIface_ftable[5][3] = {
    { "ASYNC", "requestURL(TQString,TQString)", "requestURL(TQString url,TQString target)" },
    { "ASYNC", "postURL(TQString,TQString,TQByteArray,TQString)", "postURL(TQString url,TQString target,TQByteArray data,TQString mime)" },
    { "ASYNC", "statusMessage(TQString)", "statusMessage(TQString msg)" },
    { "ASYNC", "evalJavaScript(TQ_INT32,TQString)", "evalJavaScript(TQ_INT32 id,TQString script)" },
    { 0, 0, 0 }
};
static const int NSPluginCallbackIface_ftable_hiddens[4] = {
    0,
    0,
    0,
    0,
};

bool NSPluginCallbackIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == NSPluginCallbackIface_ftable[0][1] ) { // void requestURL(TQString,TQString)
	TQString arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = NSPluginCallbackIface_ftable[0][0]; 
	requestURL(arg0, arg1 );
    } else if ( fun == NSPluginCallbackIface_ftable[1][1] ) { // void postURL(TQString,TQString,TQByteArray,TQString)
	TQString arg0;
	TQString arg1;
	TQByteArray arg2;
	TQString arg3;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	if (arg.atEnd()) return false;
	arg >> arg2;
	if (arg.atEnd()) return false;
	arg >> arg3;
	replyType = NSPluginCallbackIface_ftable[1][0]; 
	postURL(arg0, arg1, arg2, arg3 );
    } else if ( fun == NSPluginCallbackIface_ftable[2][1] ) { // void statusMessage(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NSPluginCallbackIface_ftable[2][0]; 
	statusMessage(arg0 );
    } else if ( fun == NSPluginCallbackIface_ftable[3][1] ) { // void evalJavaScript(TQ_INT32,TQString)
	TQ_INT32 arg0;
	TQString arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = NSPluginCallbackIface_ftable[3][0]; 
	evalJavaScript(arg0, arg1 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


