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

#include <kdatastream.h>


static const char* const NSPluginClassIface_ftable[3][3] = {
    { "DCOPRef", "newInstance(TQString,TQString,TQ_INT8,TQStringList,TQStringList,TQString,TQString,TQ_INT8,TQ_INT8,TQByteArray,TQ_UINT32)", "newInstance(TQString url,TQString mimeType,TQ_INT8 embed,TQStringList argn,TQStringList argv,TQString appId,TQString callbackId,TQ_INT8 reload,TQ_INT8 doPost,TQByteArray postData,TQ_UINT32 xembed)" },
    { "TQString", "getMIMEDescription()", "getMIMEDescription()" },
    { 0, 0, 0 }
};
static const int NSPluginClassIface_ftable_hiddens[2] = {
    0,
    0,
};

bool NSPluginClassIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == NSPluginClassIface_ftable[0][1] ) { // DCOPRef newInstance(TQString,TQString,TQ_INT8,TQStringList,TQStringList,TQString,TQString,TQ_INT8,TQ_INT8,TQByteArray,TQ_UINT32)
	TQString arg0;
	TQString arg1;
	TQ_INT8 arg2;
	TQStringList arg3;
	TQStringList arg4;
	TQString arg5;
	TQString arg6;
	TQ_INT8 arg7;
	TQ_INT8 arg8;
	TQByteArray arg9;
	TQ_UINT32 arg10;
	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;
	if (arg.atEnd()) return false;
	arg >> arg4;
	if (arg.atEnd()) return false;
	arg >> arg5;
	if (arg.atEnd()) return false;
	arg >> arg6;
	if (arg.atEnd()) return false;
	arg >> arg7;
	if (arg.atEnd()) return false;
	arg >> arg8;
	if (arg.atEnd()) return false;
	arg >> arg9;
	if (arg.atEnd()) return false;
	arg >> arg10;
	replyType = NSPluginClassIface_ftable[0][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << newInstance(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10 );
    } else if ( fun == NSPluginClassIface_ftable[1][1] ) { // TQString getMIMEDescription()
	replyType = NSPluginClassIface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << getMIMEDescription( );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


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


static const int NSPluginInstanceIface_fhash = 11;
static const char* const NSPluginInstanceIface_ftable[9][3] = {
    { "void", "shutdown()", "shutdown()" },
    { "int", "winId()", "winId()" },
    { "int", "setWindow(TQ_INT8)", "setWindow(TQ_INT8 remove)" },
    { "void", "resizePlugin(TQ_INT32,TQ_INT32)", "resizePlugin(TQ_INT32 w,TQ_INT32 h)" },
    { "void", "javascriptResult(TQ_INT32,TQString)", "javascriptResult(TQ_INT32 id,TQString result)" },
    { "void", "displayPlugin()", "displayPlugin()" },
    { "void", "gotFocusIn()", "gotFocusIn()" },
    { "void", "gotFocusOut()", "gotFocusOut()" },
    { 0, 0, 0 }
};
static const int NSPluginInstanceIface_ftable_hiddens[8] = {
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
};

bool NSPluginInstanceIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    static TQAsciiDict<int>* fdict = 0;
    if ( !fdict ) {
	fdict = new TQAsciiDict<int>( NSPluginInstanceIface_fhash, true, false );
	for ( int i = 0; NSPluginInstanceIface_ftable[i][1]; i++ )
	    fdict->insert( NSPluginInstanceIface_ftable[i][1],  new int( i ) );
    }
    int* fp = fdict->find( fun );
    switch ( fp?*fp:-1) {
    case 0: { // void shutdown()
	replyType = NSPluginInstanceIface_ftable[0][0]; 
	shutdown( );
    } break;
    case 1: { // int winId()
	replyType = NSPluginInstanceIface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << winId( );
    } break;
    case 2: { // int setWindow(TQ_INT8)
	TQ_INT8 arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NSPluginInstanceIface_ftable[2][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << setWindow(arg0 );
    } break;
    case 3: { // void resizePlugin(TQ_INT32,TQ_INT32)
	TQ_INT32 arg0;
	TQ_INT32 arg1;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	if (arg.atEnd()) return false;
	arg >> arg1;
	replyType = NSPluginInstanceIface_ftable[3][0]; 
	resizePlugin(arg0, arg1 );
    } break;
    case 4: { // void javascriptResult(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 = NSPluginInstanceIface_ftable[4][0]; 
	javascriptResult(arg0, arg1 );
    } break;
    case 5: { // void displayPlugin()
	replyType = NSPluginInstanceIface_ftable[5][0]; 
	displayPlugin( );
    } break;
    case 6: { // void gotFocusIn()
	replyType = NSPluginInstanceIface_ftable[6][0]; 
	gotFocusIn( );
    } break;
    case 7: { // void gotFocusOut()
	replyType = NSPluginInstanceIface_ftable[7][0]; 
	gotFocusOut( );
    } break;
    default: 
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


#include <kdatastream.h>


static const char* const NSPluginViewerIface_ftable[3][3] = {
    { "void", "shutdown()", "shutdown()" },
    { "DCOPRef", "newClass(TQString)", "newClass(TQString plugin)" },
    { 0, 0, 0 }
};
static const int NSPluginViewerIface_ftable_hiddens[2] = {
    0,
    0,
};

bool NSPluginViewerIface::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
{
    if ( fun == NSPluginViewerIface_ftable[0][1] ) { // void shutdown()
	replyType = NSPluginViewerIface_ftable[0][0]; 
	shutdown( );
    } else if ( fun == NSPluginViewerIface_ftable[1][1] ) { // DCOPRef newClass(TQString)
	TQString arg0;
	TQDataStream arg( data, IO_ReadOnly );
	if (arg.atEnd()) return false;
	arg >> arg0;
	replyType = NSPluginViewerIface_ftable[1][0]; 
	TQDataStream _replyStream( replyData, IO_WriteOnly );
	_replyStream << newClass(arg0 );
    } else {
	return DCOPObject::process( fun, data, replyType, replyData );
    }
    return true;
}

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

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


