Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
npn_gate.cpp File Reference
#include "xp.h"
#include "npapi.h"
#include "npupp.h"
#include "logger.h"

Go to the source code of this file.

Functions

void NPN_Version (int *plugin_major, int *plugin_minor, int *netscape_major, int *netscape_minor)
NPError NPN_GetURLNotify (NPP instance, const char *url, const char *target, void *notifyData)
NPError NPN_GetURL (NPP instance, const char *url, const char *target)
NPError NPN_PostURLNotify (NPP instance, const char *url, const char *window, uint32 len, const char *buf, NPBool file, void *notifyData)
NPError NPN_PostURL (NPP instance, const char *url, const char *window, uint32 len, const char *buf, NPBool file)
NPError NPN_RequestRead (NPStream *stream, NPByteRange *rangeList)
NPError NPN_NewStream (NPP instance, NPMIMEType type, const char *target, NPStream **stream)
int32 NPN_Write (NPP instance, NPStream *stream, int32 len, void *buffer)
NPError NPN_DestroyStream (NPP instance, NPStream *stream, NPError reason)
void NPN_Status (NPP instance, const char *message)
const char * NPN_UserAgent (NPP instance)
voidNPN_MemAlloc (uint32 size)
void NPN_MemFree (void *ptr)
uint32 NPN_MemFlush (uint32 size)
void NPN_ReloadPlugins (NPBool reloadPages)
JRIEnvNPN_GetJavaEnv (void)
jref NPN_GetJavaPeer (NPP instance)
NPError NPN_GetValue (NPP instance, NPNVariable variable, void *value)
NPError NPN_SetValue (NPP instance, NPPVariable variable, void *value)
void NPN_InvalidateRect (NPP instance, NPRect *invalidRect)
void NPN_InvalidateRegion (NPP instance, NPRegion invalidRegion)
void NPN_ForceRedraw (NPP instance)

Variables

Loggerlogger
NPNetscapeFuncs NPNFuncs

Function Documentation

NPError NPN_DestroyStream ( NPP  instance,
NPStream stream,
NPError  reason 
)

Definition at line 181 of file npn_gate.cpp.

{
       int navMinorVersion = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

  if(logger)
    logger->logCall(action_npn_destroy_stream, (DWORD)instance, (DWORD)stream, (DWORD)reason);

  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
              rv = NPNFuncs.destroystream(instance, stream, reason);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

void NPN_ForceRedraw ( NPP  instance)

Definition at line 344 of file npn_gate.cpp.

Here is the call graph for this function:

Definition at line 268 of file npn_gate.cpp.

Here is the call graph for this function:

jref NPN_GetJavaPeer ( NPP  instance)

Definition at line 283 of file npn_gate.cpp.

{
  jref rv;

  if(logger)
    logger->logCall(action_npn_get_java_peer, (DWORD)instance);

       rv = NPNFuncs.getJavaPeer(instance);

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

NPError NPN_GetURL ( NPP  instance,
const char *  url,
const char *  target 
)

Definition at line 82 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_get_url, (DWORD)instance, (DWORD)url, (DWORD)target);

  NPError rv = NPNFuncs.geturl(instance, url, target);

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

NPError NPN_GetURLNotify ( NPP  instance,
const char *  url,
const char *  target,
void notifyData 
)

Definition at line 62 of file npn_gate.cpp.

{
       int navMinorVers = NPNFuncs.version & 0xFF;
       
  NPError rv = NPERR_NO_ERROR;

  if(logger)
    logger->logCall(action_npn_get_url_notify, (DWORD)instance, (DWORD)url, (DWORD)target, (DWORD)notifyData);

  if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
              rv = NPNFuncs.geturlnotify(instance, url, target, notifyData);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

NPError NPN_GetValue ( NPP  instance,
NPNVariable  variable,
void value 
)

Definition at line 298 of file npn_gate.cpp.

{
  NPError rv = NPERR_NO_ERROR;

  if(logger)
    logger->logCall(action_npn_get_value, (DWORD)instance, (DWORD)variable, (DWORD)value);

  rv = NPNFuncs.getvalue(instance, variable, value);

  if(logger)
    logger->logReturn(action_npn_get_value);

  return rv;
}

Here is the call graph for this function:

void NPN_InvalidateRect ( NPP  instance,
NPRect invalidRect 
)

Definition at line 328 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_invalidate_rect, (DWORD)instance, (DWORD)invalidRect);

  NPNFuncs.invalidaterect(instance, invalidRect);
}

Here is the call graph for this function:

void NPN_InvalidateRegion ( NPP  instance,
NPRegion  invalidRegion 
)

Definition at line 336 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_invalidate_region, (DWORD)instance, (DWORD)invalidRegion);

  NPNFuncs.invalidateregion(instance, invalidRegion);
}

Here is the call graph for this function:

void* NPN_MemAlloc ( uint32  size)

Definition at line 224 of file npn_gate.cpp.

{
  void * rv = NULL;
  
  if(logger)
    logger->logCall(action_npn_mem_alloc, (DWORD)size);

  rv = NPNFuncs.memalloc(size);

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

Definition at line 247 of file npn_gate.cpp.

Here is the call graph for this function:

void NPN_MemFree ( void ptr)

Definition at line 239 of file npn_gate.cpp.

Here is the call graph for this function:

NPError NPN_NewStream ( NPP  instance,
NPMIMEType  type,
const char *  target,
NPStream **  stream 
)

Definition at line 141 of file npn_gate.cpp.

{
       int navMinorVersion = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

  if(logger)
    logger->logCall(action_npn_new_stream, (DWORD)instance, (DWORD)type, (DWORD)target, (DWORD)stream);

       if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
              rv = NPNFuncs.newstream(instance, type, target, stream);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

NPError NPN_PostURL ( NPP  instance,
const char *  url,
const char *  window,
uint32  len,
const char *  buf,
NPBool  file 
)

Definition at line 115 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_post_url, (DWORD)instance, (DWORD)url, (DWORD)window, (DWORD)len, (DWORD)buf, (DWORD)file);

  NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);

  if(logger)
    logger->logReturn();

  return rv;
} 

Here is the call graph for this function:

NPError NPN_PostURLNotify ( NPP  instance,
const char *  url,
const char *  window,
uint32  len,
const char *  buf,
NPBool  file,
void notifyData 
)

Definition at line 95 of file npn_gate.cpp.

{
       int navMinorVers = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

  if(logger)
    logger->logCall(action_npn_post_url_notify, (DWORD)instance, (DWORD)url, (DWORD)window, (DWORD)len, (DWORD)buf, (DWORD)file, (DWORD)notifyData);

       if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
              rv = NPNFuncs.posturlnotify(instance, url, window, len, buf, file, notifyData);
       else
              rv = NPERR_INCOMPATIBLE_VERSION_ERROR;

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

void NPN_ReloadPlugins ( NPBool  reloadPages)

Definition at line 260 of file npn_gate.cpp.

Here is the call graph for this function:

NPError NPN_RequestRead ( NPStream stream,
NPByteRange rangeList 
)

Definition at line 128 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_request_read, (DWORD)stream, (DWORD)rangeList);

  NPError rv = NPNFuncs.requestread(stream, rangeList);

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

NPError NPN_SetValue ( NPP  instance,
NPPVariable  variable,
void value 
)

Definition at line 313 of file npn_gate.cpp.

{
  NPError rv = NPERR_NO_ERROR;

  if(logger)
    logger->logCall(action_npn_set_value, (DWORD)instance, (DWORD)variable, (DWORD)value);

  rv = NPNFuncs.setvalue(instance, variable, value);

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

void NPN_Status ( NPP  instance,
const char *  message 
)

Definition at line 201 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_status, (DWORD)instance, (DWORD)message);

  NPNFuncs.status(instance, message);
}

Here is the call graph for this function:

const char* NPN_UserAgent ( NPP  instance)

Definition at line 209 of file npn_gate.cpp.

{
  const char * rv = NULL;

  if(logger)
    logger->logCall(action_npn_user_agent, (DWORD)instance);

  rv = NPNFuncs.uagent(instance);

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:

void NPN_Version ( int plugin_major,
int plugin_minor,
int netscape_major,
int netscape_minor 
)

Definition at line 48 of file npn_gate.cpp.

{
  if(logger)
    logger->logCall(action_npn_version, (DWORD)plugin_major, (DWORD)plugin_minor, (DWORD)netscape_major, (DWORD)netscape_minor);

  *plugin_major   = NP_VERSION_MAJOR;
  *plugin_minor   = NP_VERSION_MINOR;
  *netscape_major = HIBYTE(NPNFuncs.version);
  *netscape_minor = LOBYTE(NPNFuncs.version);

  if(logger)
    logger->logReturn();
}

Here is the call graph for this function:

int32 NPN_Write ( NPP  instance,
NPStream stream,
int32  len,
void buffer 
)

Definition at line 161 of file npn_gate.cpp.

{
       int navMinorVersion = NPNFuncs.version & 0xFF;

  int32 rv = 0;

  if(logger)
    logger->logCall(action_npn_write, (DWORD)instance, (DWORD)stream, (DWORD)len, (DWORD)buffer);

  if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
              rv = NPNFuncs.write(instance, stream, len, buffer);
       else
              rv = -1;

  if(logger)
    logger->logReturn();

  return rv;
}

Here is the call graph for this function:


Variable Documentation

Definition at line 50 of file np_entry.cpp.

Definition at line 45 of file np_entry.cpp.