Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
np_entry.cpp File Reference
#include "xp.h"
#include "plugbase.h"
#include "logger.h"

Go to the source code of this file.

Functions

NPError OSCALL NP_Shutdown ()
static NPError fillPluginFunctionTable (NPPluginFuncs *aNPPFuncs)
static NPError fillNetscapeFunctionTable (NPNetscapeFuncs *aNPNFuncs)

Variables

CLoggerpLogger = NULL
static char szTarget [] = LOGGER_DEFAULT_TARGET
NPNetscapeFuncs NPNFuncs

Function Documentation

static NPError fillNetscapeFunctionTable ( NPNetscapeFuncs aNPNFuncs) [static]

Definition at line 105 of file np_entry.cpp.

static NPError fillPluginFunctionTable ( NPPluginFuncs aNPPFuncs) [static]

Definition at line 61 of file np_entry.cpp.

{
  if(aNPPFuncs == NULL)
    return NPERR_INVALID_FUNCTABLE_ERROR;

  // Set up the plugin function table that Netscape will use to
  // call us. Netscape needs to know about our version and size   
  // and have a UniversalProcPointer for every function we implement.

  aNPPFuncs->version       = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
#ifdef XP_MAC
  aNPPFuncs->newp          = NewNPP_NewProc(Private_New);
  aNPPFuncs->destroy       = NewNPP_DestroyProc(Private_Destroy);
  aNPPFuncs->setwindow     = NewNPP_SetWindowProc(Private_SetWindow);
  aNPPFuncs->newstream     = NewNPP_NewStreamProc(Private_NewStream);
  aNPPFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
  aNPPFuncs->asfile        = NewNPP_StreamAsFileProc(Private_StreamAsFile);
  aNPPFuncs->writeready    = NewNPP_WriteReadyProc(Private_WriteReady);
  aNPPFuncs->write         = NewNPP_WriteProc(Private_Write);
  aNPPFuncs->print         = NewNPP_PrintProc(Private_Print);
  aNPPFuncs->event         = NewNPP_HandleEventProc(Private_HandleEvent);    
  aNPPFuncs->urlnotify     = NewNPP_URLNotifyProc(Private_URLNotify);               
  aNPPFuncs->getvalue      = NewNPP_GetValueProc(Private_GetValue);
  aNPPFuncs->setvalue      = NewNPP_SetValueProc(Private_SetValue);
#else
  aNPPFuncs->newp          = NPP_New;
  aNPPFuncs->destroy       = NPP_Destroy;
  aNPPFuncs->setwindow     = NPP_SetWindow;
  aNPPFuncs->newstream     = NPP_NewStream;
  aNPPFuncs->destroystream = NPP_DestroyStream;
  aNPPFuncs->asfile        = NPP_StreamAsFile;
  aNPPFuncs->writeready    = NPP_WriteReady;
  aNPPFuncs->write         = NPP_Write;
  aNPPFuncs->print         = NPP_Print;
  aNPPFuncs->event         = NPP_HandleEvent;
  aNPPFuncs->urlnotify     = NPP_URLNotify;
  aNPPFuncs->getvalue      = NPP_GetValue;
  aNPPFuncs->setvalue      = NPP_SetValue;
#endif
  aNPPFuncs->javaClass     = NULL;

  return NPERR_NO_ERROR;
}

Here is the call graph for this function:

Definition at line 52 of file np_entry.cpp.

{
  if (pLogger) {
    delete pLogger;
    pLogger = NULL;
  }
  return NPERR_NO_ERROR;
}

Variable Documentation

Definition at line 50 of file np_entry.cpp.

Definition at line 47 of file np_entry.cpp.

char szTarget[] = LOGGER_DEFAULT_TARGET [static]

Definition at line 48 of file np_entry.cpp.