Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
npn_gate.cpp File Reference
#include "npapi.h"
#include "npupp.h"
#include "dbg.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

NPNetscapeFuncs NPNFuncs

Function Documentation

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

Definition at line 142 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_DestroyStream");

       int navMinorVersion = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

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

  return rv;
}
void NPN_ForceRedraw ( NPP  instance)

Definition at line 255 of file npn_gate.cpp.

{
  dbgOut1("wrapper: ForceRedraw");

  NPNFuncs.forceredraw(instance);
}

Definition at line 205 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_GetJavaEnv");

  JRIEnv * rv = NULL;
       rv = NPNFuncs.getJavaEnv();
  return rv;
}
jref NPN_GetJavaPeer ( NPP  instance)

Definition at line 214 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_GetJavaPeer");

  jref rv;
       rv = NPNFuncs.getJavaPeer(instance);
  return rv;
}
NPError NPN_GetURL ( NPP  instance,
const char *  url,
const char *  target 
)

Definition at line 70 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_GetURL");

  NPError rv = NPNFuncs.geturl(instance, url, target);
  return rv;
}
NPError NPN_GetURLNotify ( NPP  instance,
const char *  url,
const char *  target,
void notifyData 
)

Definition at line 54 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_GetURLNotify");

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

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

  return rv;
}
NPError NPN_GetValue ( NPP  instance,
NPNVariable  variable,
void value 
)

Definition at line 223 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_GetValue");

  NPError rv = NPERR_NO_ERROR;
  rv = NPNFuncs.getvalue(instance, variable, value);
  return rv;
}
void NPN_InvalidateRect ( NPP  instance,
NPRect invalidRect 
)

Definition at line 241 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_InvalidateRect");

  NPNFuncs.invalidaterect(instance, invalidRect);
}
void NPN_InvalidateRegion ( NPP  instance,
NPRegion  invalidRegion 
)

Definition at line 248 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_InvalidateRegion");

  NPNFuncs.invalidateregion(instance, invalidRegion);
}
void* NPN_MemAlloc ( uint32  size)

Definition at line 174 of file npn_gate.cpp.

{
  //bgOut1("wrapper: NPN_MemAlloc");

  void * rv = NULL;
  rv = NPNFuncs.memalloc(size);
  return rv;
}

Definition at line 190 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_MemFlush");

  uint32 rv = NPNFuncs.memflush(size);
  return rv;
}
void NPN_MemFree ( void ptr)

Definition at line 183 of file npn_gate.cpp.

{
  //dbgOut1("wrapper: NPN_MemFree");

  NPNFuncs.memfree(ptr);
}
NPError NPN_NewStream ( NPP  instance,
NPMIMEType  type,
const char *  target,
NPStream **  stream 
)

Definition at line 110 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_NewStream");

       int navMinorVersion = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

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

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

Definition at line 94 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_PostURL");

  NPError rv = NPNFuncs.posturl(instance, url, window, len, buf, file);
  return rv;
} 
NPError NPN_PostURLNotify ( NPP  instance,
const char *  url,
const char *  window,
uint32  len,
const char *  buf,
NPBool  file,
void notifyData 
)

Definition at line 78 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_PostURLNotify");

       int navMinorVers = NPNFuncs.version & 0xFF;

  NPError rv = NPERR_NO_ERROR;

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

  return rv;
}
void NPN_ReloadPlugins ( NPBool  reloadPages)

Definition at line 198 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_ReloadPlugins");

  NPNFuncs.reloadplugins(reloadPages);
}
NPError NPN_RequestRead ( NPStream stream,
NPByteRange rangeList 
)

Definition at line 102 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_RequestRead");

  NPError rv = NPNFuncs.requestread(stream, rangeList);
  return rv;
}
NPError NPN_SetValue ( NPP  instance,
NPPVariable  variable,
void value 
)

Definition at line 232 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_SetValue");

  NPError rv = NPERR_NO_ERROR;
  rv = NPNFuncs.setvalue(instance, variable, value);
  return rv;
}
void NPN_Status ( NPP  instance,
const char *  message 
)

Definition at line 158 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_Status");

  NPNFuncs.status(instance, message);
}
const char* NPN_UserAgent ( NPP  instance)

Definition at line 165 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_UserAgent");

  const char * rv = NULL;
  rv = NPNFuncs.uagent(instance);
  return rv;
}
void NPN_Version ( int plugin_major,
int plugin_minor,
int netscape_major,
int netscape_minor 
)

Definition at line 44 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_Version");

  *plugin_major   = NP_VERSION_MAJOR;
  *plugin_minor   = NP_VERSION_MINOR;
  *netscape_major = HIBYTE(NPNFuncs.version);
  *netscape_minor = LOBYTE(NPNFuncs.version);
}
int32 NPN_Write ( NPP  instance,
NPStream stream,
int32  len,
void buffer 
)

Definition at line 126 of file npn_gate.cpp.

{
  dbgOut1("wrapper: NPN_Write");

       int navMinorVersion = NPNFuncs.version & 0xFF;

  int32 rv = 0;

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

  return rv;
}

Variable Documentation

Definition at line 45 of file np_entry.cpp.