/****************************************************************************
**
** DCOP Stub Implementation created by dcopidl2cpp from NSPluginClassIface.kidl
**
** WARNING! All changes made in this file will be lost!
**
*****************************************************************************/

#include "NSPluginClassIface_stub.h"
#include <dcopclient.h>

#include <kdatastream.h>


NSPluginClassIface_stub::NSPluginClassIface_stub( const TQCString& app, const TQCString& obj )
  : DCOPStub( app, obj )
{
}

NSPluginClassIface_stub::NSPluginClassIface_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
  : DCOPStub( client, app, obj )
{
}

NSPluginClassIface_stub::NSPluginClassIface_stub( const DCOPRef& ref )
  : DCOPStub( ref )
{
}

DCOPRef NSPluginClassIface_stub::newInstance( 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 )
{
    DCOPRef result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    arg << arg2;
    arg << arg3;
    arg << arg4;
    arg << arg5;
    arg << arg6;
    arg << arg7;
    arg << arg8;
    arg << arg9;
    arg << arg10;
    if ( dcopClient()->call( app(), obj(), "newInstance(TQString,TQString,TQ_INT8,TQStringList,TQStringList,TQString,TQString,TQ_INT8,TQ_INT8,TQByteArray,TQ_UINT32)", data, replyType, replyData ) ) {
	if ( replyType == "DCOPRef" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

TQString NSPluginClassIface_stub::getMIMEDescription()
{
    TQString result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "getMIMEDescription()", data, replyType, replyData ) ) {
	if ( replyType == "TQString" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}




NSPluginInstanceIface_stub::NSPluginInstanceIface_stub( const TQCString& app, const TQCString& obj )
  : DCOPStub( app, obj )
{
}

NSPluginInstanceIface_stub::NSPluginInstanceIface_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
  : DCOPStub( client, app, obj )
{
}

NSPluginInstanceIface_stub::NSPluginInstanceIface_stub( const DCOPRef& ref )
  : DCOPStub( ref )
{
}

void NSPluginInstanceIface_stub::shutdown()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "shutdown()", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

int NSPluginInstanceIface_stub::winId()
{
    int result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "winId()", data, replyType, replyData ) ) {
	if ( replyType == "int" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

int NSPluginInstanceIface_stub::setWindow( TQ_INT8 arg0 )
{
    int result = 0;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "setWindow(TQ_INT8)", data, replyType, replyData ) ) {
	if ( replyType == "int" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}

void NSPluginInstanceIface_stub::resizePlugin( TQ_INT32 arg0, TQ_INT32 arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    if ( dcopClient()->call( app(), obj(), "resizePlugin(TQ_INT32,TQ_INT32)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void NSPluginInstanceIface_stub::javascriptResult( TQ_INT32 arg0, TQString arg1 )
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    arg << arg1;
    if ( dcopClient()->call( app(), obj(), "javascriptResult(TQ_INT32,TQString)", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void NSPluginInstanceIface_stub::displayPlugin()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "displayPlugin()", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void NSPluginInstanceIface_stub::gotFocusIn()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "gotFocusIn()", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

void NSPluginInstanceIface_stub::gotFocusOut()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "gotFocusOut()", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}




NSPluginViewerIface_stub::NSPluginViewerIface_stub( const TQCString& app, const TQCString& obj )
  : DCOPStub( app, obj )
{
}

NSPluginViewerIface_stub::NSPluginViewerIface_stub( DCOPClient* client, const TQCString& app, const TQCString& obj )
  : DCOPStub( client, app, obj )
{
}

NSPluginViewerIface_stub::NSPluginViewerIface_stub( const DCOPRef& ref )
  : DCOPStub( ref )
{
}

void NSPluginViewerIface_stub::shutdown()
{
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    if ( dcopClient()->call( app(), obj(), "shutdown()", data, replyType, replyData ) ) {
	setStatus( CallSucceeded );
    } else { 
	callFailed();
    }
}

DCOPRef NSPluginViewerIface_stub::newClass( TQString arg0 )
{
    DCOPRef result;
    if ( !dcopClient()  ) {
	setStatus( CallFailed );
	return result;
    }
    TQByteArray data, replyData;
    TQCString replyType;
    TQDataStream arg( data, IO_WriteOnly );
    arg << arg0;
    if ( dcopClient()->call( app(), obj(), "newClass(TQString)", data, replyType, replyData ) ) {
	if ( replyType == "DCOPRef" ) {
	    TQDataStream _reply_stream( replyData, IO_ReadOnly );
	    _reply_stream >> result;
	    setStatus( CallSucceeded );
	} else {
	    callFailed();
	}
    } else { 
	callFailed();
    }
    return result;
}


