npunix.c File Reference

#include <stdio.h>
#include "npapi.h"
#include "npupp.h"

Go to the source code of this file.

Defines

#define XP_UNIX   1
#define PLUGINDEBUGSTR(msg)

Functions

void NPN_Version (int *plugin_major, int *plugin_minor, int *netscape_major, int *netscape_minor)
NPError NPN_GetValue (NPP instance, NPNVariable variable, void *r_value)
NPError NPN_SetValue (NPP instance, NPPVariable variable, void *value)
NPError NPN_GetURL (NPP instance, const char *url, const char *window)
NPError NPN_GetURLNotify (NPP instance, const char *url, const char *window, void *notifyData)
NPError NPN_PostURL (NPP instance, const char *url, const char *window, uint32 len, const char *buf, NPBool file)
NPError NPN_PostURLNotify (NPP instance, const char *url, const char *window, uint32 len, const char *buf, NPBool file, void *notifyData)
NPError NPN_RequestRead (NPStream *stream, NPByteRange *rangeList)
NPError NPN_NewStream (NPP instance, NPMIMEType type, const char *window, NPStream **stream_ptr)
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)
void * NPN_MemAlloc (uint32 size)
void NPN_MemFree (void *ptr)
uint32 NPN_MemFlush (uint32 size)
void NPN_ReloadPlugins (NPBool reloadPages)
void NPN_InvalidateRect (NPP instance, NPRect *invalidRect)
void NPN_InvalidateRegion (NPP instance, NPRegion invalidRegion)
void NPN_ForceRedraw (NPP instance)
void NPN_PushPopupsEnabledState (NPP instance, NPBool enabled)
void NPN_PopPopupsEnabledState (NPP instance)
NPIdentifier NPN_GetStringIdentifier (const NPUTF8 *name)
void NPN_GetStringIdentifiers (const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers)
NPIdentifier NPN_GetIntIdentifier (int32_t intid)
bool NPN_IdentifierIsString (NPIdentifier identifier)
NPUTF8NPN_UTF8FromIdentifier (NPIdentifier identifier)
int32_t NPN_IntFromIdentifier (NPIdentifier identifier)
NPObjectNPN_CreateObject (NPP npp, NPClass *aClass)
NPObjectNPN_RetainObject (NPObject *obj)
void NPN_ReleaseObject (NPObject *obj)
bool NPN_Invoke (NPP npp, NPObject *obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool NPN_InvokeDefault (NPP npp, NPObject *obj, const NPVariant *args, uint32_t argCount, NPVariant *result)
bool NPN_Evaluate (NPP npp, NPObject *obj, NPString *script, NPVariant *result)
bool NPN_GetProperty (NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result)
bool NPN_SetProperty (NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value)
bool NPN_RemoveProperty (NPP npp, NPObject *obj, NPIdentifier propertyName)
bool NPN_HasProperty (NPP npp, NPObject *obj, NPIdentifier propertyName)
bool NPN_HasMethod (NPP npp, NPObject *obj, NPIdentifier methodName)
void NPN_ReleaseVariantValue (NPVariant *variant)
void NPN_SetException (NPObject *obj, const NPUTF8 *message)
NPError Private_New (NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char *argn[], char *argv[], NPSavedData *saved)
NPError Private_Destroy (NPP instance, NPSavedData **save)
NPError Private_SetWindow (NPP instance, NPWindow *window)
NPError Private_NewStream (NPP instance, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype)
int32 Private_WriteReady (NPP instance, NPStream *stream)
int32 Private_Write (NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
void Private_StreamAsFile (NPP instance, NPStream *stream, const char *fname)
NPError Private_DestroyStream (NPP instance, NPStream *stream, NPError reason)
void Private_URLNotify (NPP instance, const char *url, NPReason reason, void *notifyData)
void Private_Print (NPP instance, NPPrint *platformPrint)
char * NP_GetMIMEDescription (void)
NPError NP_GetValue (void *future, NPPVariable variable, void *value)
NPError NP_Initialize (NPNetscapeFuncs *nsTable, NPPluginFuncs *pluginFuncs)
NPError NP_Shutdown (void)
void NPN_PluginThreadAsyncCall (NPP instance, void(*func)(void *), void *userData)

Variables

static NPNetscapeFuncs gNetscapeFuncs

Define Documentation

#define PLUGINDEBUGSTR ( msg   ) 

Definition at line 69 of file npunix.c.

#define XP_UNIX   1

Definition at line 54 of file npunix.c.


Function Documentation

char* NP_GetMIMEDescription ( void   ) 

Definition at line 494 of file npunix.c.

00495 {
00496     return NPP_GetMIMEDescription();
00497 }

NPError NP_GetValue ( void *  future,
NPPVariable  variable,
void *  value 
)

Definition at line 506 of file npunix.c.

00507 {
00508     return NPP_GetValue(future, variable, value);
00509 }

NPError NP_Initialize ( NPNetscapeFuncs nsTable,
NPPluginFuncs pluginFuncs 
)

Definition at line 529 of file npunix.c.

00530 {
00531     NPError err = NPERR_NO_ERROR;
00532 
00533     PLUGINDEBUGSTR("NP_Initialize");
00534     
00535     /* validate input parameters */
00536 
00537     if ((nsTable == NULL) || (pluginFuncs == NULL))
00538         err = NPERR_INVALID_FUNCTABLE_ERROR;
00539     
00540     /*
00541      * Check the major version passed in Netscape's function table.
00542      * We won't load if the major version is newer than what we expect.
00543      * Also check that the function tables passed in are big enough for
00544      * all the functions we need (they could be bigger, if Netscape added
00545      * new APIs, but that's OK with us -- we'll just ignore them).
00546      *
00547      */
00548 
00549     if (err == NPERR_NO_ERROR) {
00550         if ((nsTable->version >> 8) > NP_VERSION_MAJOR)
00551             err = NPERR_INCOMPATIBLE_VERSION_ERROR;
00552         if (nsTable->size < ((char *)&nsTable->posturlnotify - (char *)nsTable))
00553             err = NPERR_INVALID_FUNCTABLE_ERROR;
00554         if (pluginFuncs->size < sizeof(NPPluginFuncs))      
00555             err = NPERR_INVALID_FUNCTABLE_ERROR;
00556     }
00557         
00558     
00559     if (err == NPERR_NO_ERROR) {
00560         /*
00561          * Copy all the fields of Netscape function table into our
00562          * copy so we can call back into Netscape later.  Note that
00563          * we need to copy the fields one by one, rather than assigning
00564          * the whole structure, because the Netscape function table
00565          * could actually be bigger than what we expect.
00566          */
00567         gNetscapeFuncs.version       = nsTable->version;
00568         gNetscapeFuncs.size          = nsTable->size;
00569         gNetscapeFuncs.posturl       = nsTable->posturl;
00570         gNetscapeFuncs.geturl        = nsTable->geturl;
00571         gNetscapeFuncs.geturlnotify  = nsTable->geturlnotify;
00572         gNetscapeFuncs.requestread   = nsTable->requestread;
00573         gNetscapeFuncs.newstream     = nsTable->newstream;
00574         gNetscapeFuncs.write         = nsTable->write;
00575         gNetscapeFuncs.destroystream = nsTable->destroystream;
00576         gNetscapeFuncs.status        = nsTable->status;
00577         gNetscapeFuncs.uagent        = nsTable->uagent;
00578         gNetscapeFuncs.memalloc      = nsTable->memalloc;
00579         gNetscapeFuncs.memfree       = nsTable->memfree;
00580         gNetscapeFuncs.memflush      = nsTable->memflush;
00581         gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
00582 #ifdef OJI
00583         gNetscapeFuncs.getJavaEnv    = nsTable->getJavaEnv;
00584         gNetscapeFuncs.getJavaPeer   = nsTable->getJavaPeer;
00585 #endif
00586         gNetscapeFuncs.getvalue      = nsTable->getvalue;
00587         gNetscapeFuncs.setvalue      = nsTable->setvalue;
00588         gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
00589 
00590         if (nsTable->size >= ((char *)&nsTable->setexception - (char *)nsTable))
00591         {
00592           gNetscapeFuncs.invalidaterect = nsTable->invalidaterect;
00593           gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
00594           gNetscapeFuncs.forceredraw = nsTable->forceredraw;
00595           gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
00596           gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
00597           gNetscapeFuncs.getintidentifier = nsTable->getintidentifier;
00598           gNetscapeFuncs.identifierisstring = nsTable->identifierisstring;
00599           gNetscapeFuncs.utf8fromidentifier = nsTable->utf8fromidentifier;
00600           gNetscapeFuncs.intfromidentifier = nsTable->intfromidentifier;
00601           gNetscapeFuncs.createobject = nsTable->createobject;
00602           gNetscapeFuncs.retainobject = nsTable->retainobject;
00603           gNetscapeFuncs.releaseobject = nsTable->releaseobject;
00604           gNetscapeFuncs.invoke = nsTable->invoke;
00605           gNetscapeFuncs.invokeDefault = nsTable->invokeDefault;
00606           gNetscapeFuncs.evaluate = nsTable->evaluate;
00607           gNetscapeFuncs.getproperty = nsTable->getproperty;
00608           gNetscapeFuncs.setproperty = nsTable->setproperty;
00609           gNetscapeFuncs.removeproperty = nsTable->removeproperty;
00610           gNetscapeFuncs.hasproperty = nsTable->hasproperty;
00611           gNetscapeFuncs.hasmethod = nsTable->hasmethod;
00612           gNetscapeFuncs.releasevariantvalue = nsTable->releasevariantvalue;
00613           gNetscapeFuncs.setexception = nsTable->setexception;
00614         }
00615          else
00616         {
00617           gNetscapeFuncs.invalidaterect = NULL;
00618           gNetscapeFuncs.invalidateregion = NULL;
00619           gNetscapeFuncs.forceredraw = NULL;
00620           gNetscapeFuncs.getstringidentifier = NULL;
00621           gNetscapeFuncs.getstringidentifiers = NULL;
00622           gNetscapeFuncs.getintidentifier = NULL;
00623           gNetscapeFuncs.identifierisstring = NULL;
00624           gNetscapeFuncs.utf8fromidentifier = NULL;
00625           gNetscapeFuncs.intfromidentifier = NULL;
00626           gNetscapeFuncs.createobject = NULL;
00627           gNetscapeFuncs.retainobject = NULL;
00628           gNetscapeFuncs.releaseobject = NULL;
00629           gNetscapeFuncs.invoke = NULL;
00630           gNetscapeFuncs.invokeDefault = NULL;
00631           gNetscapeFuncs.evaluate = NULL;
00632           gNetscapeFuncs.getproperty = NULL;
00633           gNetscapeFuncs.setproperty = NULL;
00634           gNetscapeFuncs.removeproperty = NULL;
00635           gNetscapeFuncs.hasproperty = NULL;
00636           gNetscapeFuncs.releasevariantvalue = NULL;
00637           gNetscapeFuncs.setexception = NULL;
00638         }
00639         if (nsTable->size >=
00640             ((char *)&nsTable->poppopupsenabledstate - (char *)nsTable))
00641         {
00642           gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
00643           gNetscapeFuncs.poppopupsenabledstate  = nsTable->poppopupsenabledstate;
00644         }
00645          else
00646         {
00647           gNetscapeFuncs.pushpopupsenabledstate = NULL;
00648           gNetscapeFuncs.poppopupsenabledstate  = NULL;
00649         }
00650 
00651         gNetscapeFuncs.pluginthreadasynccall = nsTable->pluginthreadasynccall; 
00652 
00653         /*
00654          * Set up the plugin function table that Netscape will use to
00655          * call us.  Netscape needs to know about our version and size
00656          * and have a UniversalProcPointer for every function we
00657          * implement.
00658          */
00659         pluginFuncs->version    = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
00660         pluginFuncs->size       = sizeof(NPPluginFuncs);
00661         pluginFuncs->newp       = NewNPP_NewProc(Private_New);
00662         pluginFuncs->destroy    = NewNPP_DestroyProc(Private_Destroy);
00663         pluginFuncs->setwindow  = NewNPP_SetWindowProc(Private_SetWindow);
00664         pluginFuncs->newstream  = NewNPP_NewStreamProc(Private_NewStream);
00665         pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
00666         pluginFuncs->asfile     = NewNPP_StreamAsFileProc(Private_StreamAsFile);
00667         pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);
00668         pluginFuncs->write      = NewNPP_WriteProc(Private_Write);
00669         pluginFuncs->print      = NewNPP_PrintProc(Private_Print);
00670         pluginFuncs->urlnotify  = NewNPP_URLNotifyProc(Private_URLNotify);
00671         pluginFuncs->event      = NULL;
00672 #ifdef OJI
00673         pluginFuncs->javaClass  = Private_GetJavaClass();
00674 #endif
00675         // This function is supposedly loaded magically, but that doesn't
00676         // seem to be true.
00677         pluginFuncs->getvalue      = NewNPP_GetValueProc(NP_GetValue);
00678 
00679         err = NPP_Initialize();
00680     }
00681     
00682     return err;
00683 }

NPError NP_Shutdown ( void   ) 

Definition at line 693 of file npunix.c.

00694 {
00695     PLUGINDEBUGSTR("NP_Shutdown");
00696     NPP_Shutdown();
00697     return NPERR_NO_ERROR;
00698 }

NPObject* NPN_CreateObject ( NPP  npp,
NPClass aClass 
)

Definition at line 290 of file npunix.c.

00291 {
00292     return CallNPN_CreateObjectProc(gNetscapeFuncs.createobject, npp, aClass);
00293 }

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

Definition at line 170 of file npunix.c.

00171 {
00172     return CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream,
00173                         instance, stream, reason);
00174 }

bool NPN_Evaluate ( NPP  npp,
NPObject obj,
NPString script,
NPVariant result 
)

Definition at line 319 of file npunix.c.

00321 {
00322     return CallNPN_EvaluateProc(gNetscapeFuncs.evaluate, npp, obj, script, result);
00323 }

void NPN_ForceRedraw ( NPP  instance  ) 

Definition at line 237 of file npunix.c.

00238 {
00239     CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance);
00240 }

NPIdentifier NPN_GetIntIdentifier ( int32_t  intid  ) 

Definition at line 267 of file npunix.c.

00268 {
00269     return CallNPN_GetIntIdentifierProc(gNetscapeFuncs.getintidentifier, intid);
00270 }

bool NPN_GetProperty ( NPP  npp,
NPObject obj,
NPIdentifier  propertyName,
NPVariant result 
)

Definition at line 325 of file npunix.c.

00327 {
00328     return CallNPN_GetPropertyProc(gNetscapeFuncs.getproperty, npp, obj,
00329         propertyName, result);
00330 }

NPIdentifier NPN_GetStringIdentifier ( const NPUTF8 name  ) 

Definition at line 254 of file npunix.c.

00255 {
00256     return CallNPN_GetStringIdentifierProc(gNetscapeFuncs.getstringidentifier,
00257                                            name);
00258 }

void NPN_GetStringIdentifiers ( const NPUTF8 **  names,
int32_t  nameCount,
NPIdentifier identifiers 
)

Definition at line 260 of file npunix.c.

00262 {
00263     CallNPN_GetStringIdentifiersProc(gNetscapeFuncs.getstringidentifiers,
00264         names, nameCount, identifiers);
00265 }

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

Definition at line 120 of file npunix.c.

00121 {
00122     return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);
00123 }

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

Definition at line 126 of file npunix.c.

00127 {
00128     return CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);
00129 }

NPError NPN_GetValue ( NPP  instance,
NPNVariable  variable,
void *  r_value 
)

Definition at line 106 of file npunix.c.

00107 {
00108     return CallNPN_GetValueProc(gNetscapeFuncs.getvalue,
00109                     instance, variable, r_value);
00110 }

bool NPN_HasMethod ( NPP  npp,
NPObject obj,
NPIdentifier  methodName 
)

Definition at line 351 of file npunix.c.

00352 {
00353     return CallNPN_HasMethodProc(gNetscapeFuncs.hasmethod, npp, obj, methodName);
00354 }

bool NPN_HasProperty ( NPP  npp,
NPObject obj,
NPIdentifier  propertyName 
)

Definition at line 345 of file npunix.c.

00346 {
00347     return CallNPN_HasPropertyProc(gNetscapeFuncs.hasproperty, npp, obj,
00348         propertyName);
00349 }

bool NPN_IdentifierIsString ( NPIdentifier  identifier  ) 

Definition at line 272 of file npunix.c.

00273 {
00274     return CallNPN_IdentifierIsStringProc(gNetscapeFuncs.identifierisstring,
00275         identifier);
00276 }

int32_t NPN_IntFromIdentifier ( NPIdentifier  identifier  ) 

Definition at line 284 of file npunix.c.

00285 {
00286     return CallNPN_IntFromIdentifierProc(gNetscapeFuncs.intfromidentifier,
00287         identifier);
00288 }

void NPN_InvalidateRect ( NPP  instance,
NPRect invalidRect 
)

Definition at line 223 of file npunix.c.

00224 {
00225     CallNPN_InvalidateRectProc(gNetscapeFuncs.invalidaterect, instance,
00226         invalidRect);
00227 }

void NPN_InvalidateRegion ( NPP  instance,
NPRegion  invalidRegion 
)

Definition at line 230 of file npunix.c.

00231 {
00232     CallNPN_InvalidateRegionProc(gNetscapeFuncs.invalidateregion, instance,
00233         invalidRegion);
00234 }

bool NPN_Invoke ( NPP  npp,
NPObject obj,
NPIdentifier  methodName,
const NPVariant args,
uint32_t  argCount,
NPVariant result 
)

Definition at line 305 of file npunix.c.

00307 {
00308     return CallNPN_InvokeProc(gNetscapeFuncs.invoke, npp, obj, methodName,
00309         args, argCount, result);
00310 }

bool NPN_InvokeDefault ( NPP  npp,
NPObject obj,
const NPVariant args,
uint32_t  argCount,
NPVariant result 
)

Definition at line 312 of file npunix.c.

00314 {
00315     return CallNPN_InvokeDefaultProc(gNetscapeFuncs.invokeDefault, npp, obj,
00316         args, argCount, result);
00317 }

void* NPN_MemAlloc ( uint32  size  ) 

Definition at line 189 of file npunix.c.

00190 {
00191     return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
00192 }

uint32 NPN_MemFlush ( uint32  size  ) 

Definition at line 199 of file npunix.c.

00200 {
00201     return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
00202 }

void NPN_MemFree ( void *  ptr  ) 

Definition at line 194 of file npunix.c.

00195 {
00196     CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
00197 }

NPError NPN_NewStream ( NPP  instance,
NPMIMEType  type,
const char *  window,
NPStream **  stream_ptr 
)

Definition at line 155 of file npunix.c.

00157 {
00158     return CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance,
00159                     type, window, stream_ptr);
00160 }

void NPN_PluginThreadAsyncCall ( NPP  instance,
void(*)(void *)  func,
void *  userData 
)

Definition at line 700 of file npunix.c.

00702 {
00703    CallNPN_PluginThreadAsyncCallProc (
00704        gNetscapeFuncs.pluginthreadasynccall,
00705        instance,
00706        func,
00707        userData);
00708 } 

void NPN_PopPopupsEnabledState ( NPP  instance  ) 

Definition at line 248 of file npunix.c.

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

Definition at line 132 of file npunix.c.

00134 {
00135     return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,
00136                     url, window, len, buf, file);
00137 }

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

Definition at line 140 of file npunix.c.

00142 {
00143     return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify,
00144             instance, url, window, len, buf, file, notifyData);
00145 }

void NPN_PushPopupsEnabledState ( NPP  instance,
NPBool  enabled 
)

Definition at line 242 of file npunix.c.

00243 {
00244     CallNPN_PushPopupsEnabledStateProc(gNetscapeFuncs.pushpopupsenabledstate,
00245         instance, enabled);
00246 }

void NPN_ReleaseObject ( NPObject obj  ) 

Definition at line 300 of file npunix.c.

void NPN_ReleaseVariantValue ( NPVariant variant  ) 

Definition at line 356 of file npunix.c.

void NPN_ReloadPlugins ( NPBool  reloadPages  ) 

Definition at line 204 of file npunix.c.

00205 {
00206     CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
00207 }

bool NPN_RemoveProperty ( NPP  npp,
NPObject obj,
NPIdentifier  propertyName 
)

Definition at line 339 of file npunix.c.

00340 {
00341     return CallNPN_RemovePropertyProc(gNetscapeFuncs.removeproperty, npp, obj,
00342         propertyName);
00343 }

NPError NPN_RequestRead ( NPStream stream,
NPByteRange rangeList 
)

Definition at line 148 of file npunix.c.

00149 {
00150     return CallNPN_RequestReadProc(gNetscapeFuncs.requestread,
00151                     stream, rangeList);
00152 }

NPObject* NPN_RetainObject ( NPObject obj  ) 

Definition at line 295 of file npunix.c.

00296 {
00297     return CallNPN_RetainObjectProc(gNetscapeFuncs.retainobject, obj);
00298 }

void NPN_SetException ( NPObject obj,
const NPUTF8 message 
)

Definition at line 361 of file npunix.c.

00362 {
00363     CallNPN_SetExceptionProc(gNetscapeFuncs.setexception, obj, message);
00364 }

bool NPN_SetProperty ( NPP  npp,
NPObject obj,
NPIdentifier  propertyName,
const NPVariant value 
)

Definition at line 332 of file npunix.c.

00334 {
00335     return CallNPN_SetPropertyProc(gNetscapeFuncs.setproperty, npp, obj,
00336         propertyName, value);
00337 }

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

Definition at line 113 of file npunix.c.

00114 {
00115     return CallNPN_SetValueProc(gNetscapeFuncs.setvalue,
00116                     instance, variable, value);
00117 }

void NPN_Status ( NPP  instance,
const char *  message 
)

Definition at line 177 of file npunix.c.

00178 {
00179     CallNPN_StatusProc(gNetscapeFuncs.status, instance, message);
00180 }

const char* NPN_UserAgent ( NPP  instance  ) 

Definition at line 183 of file npunix.c.

00184 {
00185     return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);
00186 }

NPUTF8* NPN_UTF8FromIdentifier ( NPIdentifier  identifier  ) 

Definition at line 278 of file npunix.c.

00279 {
00280     return CallNPN_UTF8FromIdentifierProc(gNetscapeFuncs.utf8fromidentifier,
00281         identifier);
00282 }

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

Definition at line 93 of file npunix.c.

00095 {
00096     *plugin_major = NP_VERSION_MAJOR;
00097     *plugin_minor = NP_VERSION_MINOR;
00098 
00099     /* Major version is in high byte */
00100     *netscape_major = gNetscapeFuncs.version >> 8;
00101     /* Minor version is in low byte */
00102     *netscape_minor = gNetscapeFuncs.version & 0xFF;
00103 }

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

Definition at line 163 of file npunix.c.

00164 {
00165     return CallNPN_WriteProc(gNetscapeFuncs.write, instance,
00166                     stream, len, buffer);
00167 }

NPError Private_Destroy ( NPP  instance,
NPSavedData **  save 
)

Definition at line 389 of file npunix.c.

00390 {
00391     PLUGINDEBUGSTR("Destroy");
00392     return NPP_Destroy(instance, save);
00393 }

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

Definition at line 442 of file npunix.c.

00443 {
00444     NPError err;
00445     PLUGINDEBUGSTR("DestroyStream");
00446     err = NPP_DestroyStream(instance, stream, reason);
00447     return err;
00448 }

NPError Private_New ( NPMIMEType  pluginType,
NPP  instance,
uint16  mode,
int16  argc,
char *  argn[],
char *  argv[],
NPSavedData saved 
)

Definition at line 379 of file npunix.c.

00381 {
00382     NPError ret;
00383     PLUGINDEBUGSTR("New");
00384     ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
00385     return ret; 
00386 }

NPError Private_NewStream ( NPP  instance,
NPMIMEType  type,
NPStream stream,
NPBool  seekable,
uint16 stype 
)

Definition at line 405 of file npunix.c.

00407 {
00408     NPError err;
00409     PLUGINDEBUGSTR("NewStream");
00410     err = NPP_NewStream(instance, type, stream, seekable, stype);
00411     return err;
00412 }

void Private_Print ( NPP  instance,
NPPrint platformPrint 
)

Definition at line 462 of file npunix.c.

00463 {
00464     PLUGINDEBUGSTR("Print");
00465     NPP_Print(instance, platformPrint);
00466 }

NPError Private_SetWindow ( NPP  instance,
NPWindow window 
)

Definition at line 396 of file npunix.c.

00397 {
00398     NPError err;
00399     PLUGINDEBUGSTR("SetWindow");
00400     err = NPP_SetWindow(instance, window);
00401     return err;
00402 }

void Private_StreamAsFile ( NPP  instance,
NPStream stream,
const char *  fname 
)

Definition at line 434 of file npunix.c.

00435 {
00436     PLUGINDEBUGSTR("StreamAsFile");
00437     NPP_StreamAsFile(instance, stream, fname);
00438 }

void Private_URLNotify ( NPP  instance,
const char *  url,
NPReason  reason,
void *  notifyData 
)

Definition at line 451 of file npunix.c.

00454 {
00455     PLUGINDEBUGSTR("URLNotify");
00456     NPP_URLNotify(instance, url, reason, notifyData);
00457 }

int32 Private_Write ( NPP  instance,
NPStream stream,
int32  offset,
int32  len,
void *  buffer 
)

Definition at line 424 of file npunix.c.

00426 {
00427     unsigned int result;
00428     PLUGINDEBUGSTR("Write");
00429     result = NPP_Write(instance, stream, offset, len, buffer);
00430     return result;
00431 }

int32 Private_WriteReady ( NPP  instance,
NPStream stream 
)

Definition at line 415 of file npunix.c.

00416 {
00417     unsigned int result;
00418     PLUGINDEBUGSTR("WriteReady");
00419     result = NPP_WriteReady(instance, stream);
00420     return result;
00421 }


Variable Documentation

Definition at line 79 of file npunix.c.

Generated on Wed Jul 4 16:03:30 2012 for RIO by  doxygen 1.6.3