Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
npp_gate.cpp File Reference
#include "windows.h"
#include "npupp.h"
#include "npapi.h"
#include "plugin.h"
#include "dbg.h"

Go to the source code of this file.

Functions

jref NPP_GetJavaClass ()
NPError NPP_New (NPMIMEType aType, NPP aInstance, uint16 aMode, int16 aArgc, char *aArgn[], char *aArgv[], NPSavedData *aSaved)
NPError NPP_Destroy (NPP aInstance, NPSavedData **aSave)
NPError NPP_SetWindow (NPP aInstance, NPWindow *aNPWindow)
NPError NPP_NewStream (NPP aInstance, NPMIMEType aType, NPStream *aStream, NPBool aSeekable, uint16 *aStype)
int32 NPP_WriteReady (NPP aInstance, NPStream *aStream)
int32 NPP_Write (NPP aInstance, NPStream *aStream, int32 aOffset, int32 len, void *aBuffer)
NPError NPP_DestroyStream (NPP aInstance, NPStream *aStream, NPError aReason)
void NPP_StreamAsFile (NPP aInstance, NPStream *aStream, const char *aName)
void NPP_Print (NPP aInstance, NPPrint *aPrintInfo)
void NPP_URLNotify (NPP aInstance, const char *aUrl, NPReason aReason, void *aNotifyData)
NPError NPP_GetValue (NPP aInstance, NPPVariable aVariable, void *aValue)
NPError NPP_SetValue (NPP aInstance, NPNVariable aVariable, void *aValue)
int16 NPP_HandleEvent (NPP aInstance, void *aEvent)

Variables

nsPluginThreadthePluginThread = NULL

Function Documentation

NPError NPP_Destroy ( NPP  aInstance,
NPSavedData **  aSave 
)

Definition at line 87 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_Destroy");

  if (!thePluginThread)
    return NPERR_GENERIC_ERROR;

  NPError ret = (NPError)thePluginThread->callNPP(action_npp_destroy, (DWORD)aInstance, (DWORD)aSave);

  delete thePluginThread;
  thePluginThread = NULL;

  return ret;
}

Here is the call graph for this function:

NPError NPP_DestroyStream ( NPP  aInstance,
NPStream aStream,
NPError  aReason 
)

Definition at line 138 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_DestroyStream");

  NPError rv = (NPError)thePluginThread->callNPP(action_npp_destroy_stream, (DWORD)aInstance, (DWORD)aStream, (DWORD)aReason);
  return rv;
}

Here is the call graph for this function:

Definition at line 47 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_GetJavaClass");
  jref rv = (jref)thePluginThread->callNPP(action_npp_get_java_class);
  return NULL;
}

Here is the call graph for this function:

NPError NPP_GetValue ( NPP  aInstance,
NPPVariable  aVariable,
void aValue 
)

Definition at line 167 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_GetValue");

  NPError rv = (NPError)thePluginThread->callNPP(action_npp_get_value, (DWORD)aInstance, (DWORD)aVariable, (DWORD)aValue);
  return rv;
}

Here is the call graph for this function:

int16 NPP_HandleEvent ( NPP  aInstance,
void aEvent 
)

Definition at line 183 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_HandleEvent");

  int16 rv = (int16)thePluginThread->callNPP(action_npp_handle_event, (DWORD)aInstance, (DWORD)aEvent);
  return rv;
}

Here is the call graph for this function:

NPError NPP_New ( NPMIMEType  aType,
NPP  aInstance,
uint16  aMode,
int16  aArgc,
char *  aArgn[],
char *  aArgv[],
NPSavedData aSaved 
)

Definition at line 54 of file npp_gate.cpp.

{   
  dbgOut1("wrapper: NPP_New");

  NPError rv = NPERR_NO_ERROR;

  // lamely assuming there is only one embed tag on the page!
  
  // if it is first time in, we don't have it yet
  // initiate a thread with plugin running in it
  thePluginThread = new nsPluginThread((DWORD)aType);

  if (!thePluginThread)
    return NPERR_GENERIC_ERROR;

  rv = (NPError)thePluginThread->callNPP(action_npp_new, 
                                         (DWORD)aType, 
                                         (DWORD)aInstance, 
                                         (DWORD)aMode, 
                                         (DWORD)aArgc, 
                                         (DWORD)aArgn, 
                                         (DWORD)aArgv, 
                                         (DWORD)aSaved);

  return rv;
}

Here is the call graph for this function:

NPError NPP_NewStream ( NPP  aInstance,
NPMIMEType  aType,
NPStream aStream,
NPBool  aSeekable,
uint16 aStype 
)

Definition at line 110 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_NewStream");

  NPError rv = (NPError)thePluginThread->callNPP(action_npp_new_stream, (DWORD)aInstance, (DWORD)aType, (DWORD)aStream, (DWORD)aSeekable, (DWORD)aStype);
  return rv;
}

Here is the call graph for this function:

void NPP_Print ( NPP  aInstance,
NPPrint aPrintInfo 
)

Definition at line 153 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_Print");

  thePluginThread->callNPP(action_npp_print, (DWORD)aInstance, (DWORD)aPrintInfo);
}

Here is the call graph for this function:

NPError NPP_SetValue ( NPP  aInstance,
NPNVariable  aVariable,
void aValue 
)

Definition at line 175 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_SetValue");

  NPError rv = (NPError)thePluginThread->callNPP(action_npp_set_value, (DWORD)aInstance, (DWORD)aVariable, (DWORD)aValue);
  return rv;
}

Here is the call graph for this function:

NPError NPP_SetWindow ( NPP  aInstance,
NPWindow aNPWindow 
)

Definition at line 102 of file npp_gate.cpp.

{    
  dbgOut1("wrapper: NPP_SetWindow");

  NPError rv = (NPError)thePluginThread->callNPP(action_npp_set_window, (DWORD)aInstance, (DWORD)aNPWindow);
  return rv;
}

Here is the call graph for this function:

void NPP_StreamAsFile ( NPP  aInstance,
NPStream aStream,
const char *  aName 
)

Definition at line 146 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_StreamAsFile");

  thePluginThread->callNPP(action_npp_stream_as_file, (DWORD)aInstance, (DWORD)aStream, (DWORD)aName);
}

Here is the call graph for this function:

void NPP_URLNotify ( NPP  aInstance,
const char *  aUrl,
NPReason  aReason,
void aNotifyData 
)

Definition at line 160 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_URLNotify");

  thePluginThread->callNPP(action_npp_url_notify, (DWORD)aInstance, (DWORD)aUrl, (DWORD)aReason, (DWORD)aNotifyData);
}

Here is the call graph for this function:

int32 NPP_Write ( NPP  aInstance,
NPStream aStream,
int32  aOffset,
int32  len,
void aBuffer 
)

Definition at line 130 of file npp_gate.cpp.

{   
  dbgOut1("wrapper: NPP_Write");

  int32 rv = (int32)thePluginThread->callNPP(action_npp_write, (DWORD)aInstance, (DWORD)aStream, (DWORD)aOffset, (DWORD)len, (DWORD)aBuffer);
  return rv;
}

Here is the call graph for this function:

int32 NPP_WriteReady ( NPP  aInstance,
NPStream aStream 
)

Definition at line 122 of file npp_gate.cpp.

{
  dbgOut1("wrapper: NPP_WriteReady");

  int32 rv = (int32)thePluginThread->callNPP(action_npp_write_ready, (DWORD)aInstance, (DWORD)aStream);
  return rv;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 45 of file npp_gate.cpp.