1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * Mozilla/Firefox plugin for VLC
4 * Copyright (C) 2009, Jean-Paul Saman <jpsaman@videolan.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 * The Original Code is mozilla.org code.
22 * The Initial Developer of the Original Code is
23 * Netscape Communications Corporation.
24 * Portions created by the Initial Developer are Copyright (C) 1998
25 * the Initial Developer. All Rights Reserved.
28 * Stephen Mak <smak@sun.com>
35 * Netscape Client Plugin API
36 * - Wrapper function to interface with the Netscape Navigator
38 * dp Suresh <dp@netscape.com>
40 *----------------------------------------------------------------------
42 * YOU WILL NOT NEED TO EDIT THIS FILE.
43 *----------------------------------------------------------------------
52 #ifdef HAVE_NPFUNCTIONS_H
53 #include <npfunctions.h>
58 #include "../vlcshell.h"
61 * Define PLUGIN_TRACE to have the wrapper functions print
62 * messages to stderr whenever they are called.
67 #define PLUGINDEBUGSTR(msg) fprintf(stderr, "%s\n", msg)
69 #define PLUGINDEBUGSTR(msg)
72 /***********************************************************************
76 ***********************************************************************/
78 static NPNetscapeFuncs gNetscapeFuncs; /* Netscape Function table */
80 /***********************************************************************
82 * Wrapper functions : plugin calling Netscape Navigator
84 * These functions let the plugin developer just call the APIs
85 * as documented and defined in npapi.h, without needing to know
86 * about the function table and call macros in npupp.h.
88 ***********************************************************************/
91 NPN_Version(int* plugin_major, int* plugin_minor,
92 int* netscape_major, int* netscape_minor)
94 *plugin_major = NP_VERSION_MAJOR;
95 *plugin_minor = NP_VERSION_MINOR;
97 /* Major version is in high byte */
98 *netscape_major = gNetscapeFuncs.version >> 8;
99 /* Minor version is in low byte */
100 *netscape_minor = gNetscapeFuncs.version & 0xFF;
104 NPN_GetValue(NPP instance, NPNVariable variable, void *r_value)
106 return CallNPN_GetValueProc(gNetscapeFuncs.getvalue,
107 instance, variable, r_value);
111 NPN_SetValue(NPP instance, NPPVariable variable, void *value)
113 return CallNPN_SetValueProc(gNetscapeFuncs.setvalue,
114 instance, variable, value);
118 NPN_GetURL(NPP instance, const char* url, const char* window)
120 return CallNPN_GetURLProc(gNetscapeFuncs.geturl, instance, url, window);
124 NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData)
126 return CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);
130 NPN_PostURL(NPP instance, const char* url, const char* window,
131 uint32 len, const char* buf, NPBool file)
133 return CallNPN_PostURLProc(gNetscapeFuncs.posturl, instance,
134 url, window, len, buf, file);
138 NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len,
139 const char* buf, NPBool file, void* notifyData)
141 return CallNPN_PostURLNotifyProc(gNetscapeFuncs.posturlnotify,
142 instance, url, window, len, buf, file, notifyData);
146 NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
148 return CallNPN_RequestReadProc(gNetscapeFuncs.requestread,
153 NPN_NewStream(NPP instance, NPMIMEType type, const char *window,
154 NPStream** stream_ptr)
156 return CallNPN_NewStreamProc(gNetscapeFuncs.newstream, instance,
157 type, window, stream_ptr);
161 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer)
163 return CallNPN_WriteProc(gNetscapeFuncs.write, instance,
164 stream, len, buffer);
168 NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
170 return CallNPN_DestroyStreamProc(gNetscapeFuncs.destroystream,
171 instance, stream, reason);
175 NPN_Status(NPP instance, const char* message)
177 CallNPN_StatusProc(gNetscapeFuncs.status, instance, message);
181 NPN_UserAgent(NPP instance)
183 return CallNPN_UserAgentProc(gNetscapeFuncs.uagent, instance);
187 NPN_MemAlloc(uint32 size)
189 return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
192 void NPN_MemFree(void* ptr)
194 CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
197 uint32 NPN_MemFlush(uint32 size)
199 return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
202 void NPN_ReloadPlugins(NPBool reloadPages)
204 CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
208 JRIEnv* NPN_GetJavaEnv()
210 return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
213 jref NPN_GetJavaPeer(NPP instance)
215 return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
221 NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
223 CallNPN_InvalidateRectProc(gNetscapeFuncs.invalidaterect, instance,
228 NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
230 CallNPN_InvalidateRegionProc(gNetscapeFuncs.invalidateregion, instance,
235 NPN_ForceRedraw(NPP instance)
237 CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance);
240 void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
242 CallNPN_PushPopupsEnabledStateProc(gNetscapeFuncs.pushpopupsenabledstate,
246 void NPN_PopPopupsEnabledState(NPP instance)
248 CallNPN_PopPopupsEnabledStateProc(gNetscapeFuncs.poppopupsenabledstate,
252 NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
254 int minor = gNetscapeFuncs.version & 0xFF;
257 return CallNPN_GetStringIdentifierProc(
258 gNetscapeFuncs.getstringidentifier, name);
263 void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
264 NPIdentifier *identifiers)
266 int minor = gNetscapeFuncs.version & 0xFF;
269 CallNPN_GetStringIdentifiersProc(gNetscapeFuncs.getstringidentifiers,
270 names, nameCount, identifiers);
274 NPIdentifier NPN_GetIntIdentifier(int32_t intid)
276 int minor = gNetscapeFuncs.version & 0xFF;
279 return CallNPN_GetIntIdentifierProc(gNetscapeFuncs.getintidentifier, intid);
284 bool NPN_IdentifierIsString(NPIdentifier identifier)
286 int minor = gNetscapeFuncs.version & 0xFF;
289 return CallNPN_IdentifierIsStringProc(
290 gNetscapeFuncs.identifierisstring,
296 NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
298 int minor = gNetscapeFuncs.version & 0xFF;
301 return CallNPN_UTF8FromIdentifierProc(
302 gNetscapeFuncs.utf8fromidentifier,
308 int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
310 int minor = gNetscapeFuncs.version & 0xFF;
313 return CallNPN_IntFromIdentifierProc(
314 gNetscapeFuncs.intfromidentifier,
320 NPObject *NPN_CreateObject(NPP npp, NPClass *aClass)
322 int minor = gNetscapeFuncs.version & 0xFF;
324 return CallNPN_CreateObjectProc(gNetscapeFuncs.createobject, npp, aClass);
328 NPObject *NPN_RetainObject(NPObject *obj)
330 int minor = gNetscapeFuncs.version & 0xFF;
332 return CallNPN_RetainObjectProc(gNetscapeFuncs.retainobject, obj);
336 void NPN_ReleaseObject(NPObject *obj)
338 int minor = gNetscapeFuncs.version & 0xFF;
340 CallNPN_ReleaseObjectProc(gNetscapeFuncs.releaseobject, obj);
343 bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName,
344 const NPVariant *args, uint32_t argCount, NPVariant *result)
346 int minor = gNetscapeFuncs.version & 0xFF;
348 return CallNPN_InvokeProc(gNetscapeFuncs.invoke, npp, obj, methodName,
349 args, argCount, result);
353 bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args,
354 uint32_t argCount, NPVariant *result)
356 int minor = gNetscapeFuncs.version & 0xFF;
358 return CallNPN_InvokeDefaultProc(gNetscapeFuncs.invokeDefault, npp, obj,
359 args, argCount, result);
363 bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script,
366 int minor = gNetscapeFuncs.version & 0xFF;
368 return CallNPN_EvaluateProc(gNetscapeFuncs.evaluate, npp, obj,
373 bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
376 int minor = gNetscapeFuncs.version & 0xFF;
378 return CallNPN_GetPropertyProc(gNetscapeFuncs.getproperty, npp, obj,
379 propertyName, result);
383 bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
384 const NPVariant *value)
386 int minor = gNetscapeFuncs.version & 0xFF;
388 return CallNPN_SetPropertyProc(gNetscapeFuncs.setproperty, npp, obj,
389 propertyName, value);
393 bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
395 int minor = gNetscapeFuncs.version & 0xFF;
397 return CallNPN_RemovePropertyProc(gNetscapeFuncs.removeproperty, npp, obj,
402 bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
404 int minor = gNetscapeFuncs.version & 0xFF;
406 return CallNPN_HasPropertyProc(gNetscapeFuncs.hasproperty, npp, obj,
411 bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName)
413 int minor = gNetscapeFuncs.version & 0xFF;
415 return CallNPN_HasMethodProc(gNetscapeFuncs.hasmethod, npp,
420 void NPN_ReleaseVariantValue(NPVariant *variant)
422 int minor = gNetscapeFuncs.version & 0xFF;
424 CallNPN_ReleaseVariantValueProc(gNetscapeFuncs.releasevariantvalue, variant);
427 void NPN_SetException(NPObject* obj, const NPUTF8 *message)
429 int minor = gNetscapeFuncs.version & 0xFF;
431 CallNPN_SetExceptionProc(gNetscapeFuncs.setexception, obj, message);
434 /***********************************************************************
436 * Wrapper functions : Netscape Navigator -> plugin
438 * These functions let the plugin developer just create the APIs
439 * as documented and defined in npapi.h, without needing to
440 * install those functions in the function table or worry about
441 * setting up globals for 68K plugins.
443 ***********************************************************************/
445 /* Function prototypes */
446 NPError Private_New(NPMIMEType pluginType, NPP instance, uint16 mode,
447 int16 argc, char* argn[], char* argv[], NPSavedData* saved);
448 NPError Private_Destroy(NPP instance, NPSavedData** save);
449 NPError Private_SetWindow(NPP instance, NPWindow* window);
450 NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
451 NPBool seekable, uint16* stype);
452 int32 Private_WriteReady(NPP instance, NPStream* stream);
453 int32 Private_Write(NPP instance, NPStream* stream, int32 offset,
454 int32 len, void* buffer);
455 void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
456 NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason);
457 void Private_URLNotify(NPP instance, const char* url,
458 NPReason reason, void* notifyData);
459 void Private_Print(NPP instance, NPPrint* platformPrint);
460 NPError Private_GetValue(NPP instance, NPPVariable variable, void *r_value);
461 NPError Private_SetValue(NPP instance, NPPVariable variable, void *r_value);
463 JRIGlobalRef Private_GetJavaClass(void);
466 /* function implementations */
468 Private_New(NPMIMEType pluginType, NPP instance, uint16 mode,
469 int16 argc, char* argn[], char* argv[], NPSavedData* saved)
472 PLUGINDEBUGSTR("New");
473 ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
478 Private_Destroy(NPP instance, NPSavedData** save)
480 PLUGINDEBUGSTR("Destroy");
481 return NPP_Destroy(instance, save);
485 Private_SetWindow(NPP instance, NPWindow* window)
488 PLUGINDEBUGSTR("SetWindow");
489 err = NPP_SetWindow(instance, window);
494 Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
495 NPBool seekable, uint16* stype)
498 PLUGINDEBUGSTR("NewStream");
499 err = NPP_NewStream(instance, type, stream, seekable, stype);
504 Private_WriteReady(NPP instance, NPStream* stream)
507 PLUGINDEBUGSTR("WriteReady");
508 result = NPP_WriteReady(instance, stream);
513 Private_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
517 PLUGINDEBUGSTR("Write");
518 result = NPP_Write(instance, stream, offset, len, buffer);
523 Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
525 PLUGINDEBUGSTR("StreamAsFile");
526 NPP_StreamAsFile(instance, stream, fname);
531 Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
534 PLUGINDEBUGSTR("DestroyStream");
535 err = NPP_DestroyStream(instance, stream, reason);
540 Private_URLNotify(NPP instance, const char* url,
541 NPReason reason, void* notifyData)
543 PLUGINDEBUGSTR("URLNotify");
544 NPP_URLNotify(instance, url, reason, notifyData);
548 Private_Print(NPP instance, NPPrint* platformPrint)
550 PLUGINDEBUGSTR("Print");
551 NPP_Print(instance, platformPrint);
555 Private_GetValue(NPP instance, NPPVariable variable, void *r_value)
557 PLUGINDEBUGSTR("GetValue");
558 return NPP_GetValue(instance, variable, r_value);
562 Private_SetValue(NPP instance, NPPVariable variable, void *r_value)
564 PLUGINDEBUGSTR("SetValue");
565 return NPP_SetValue(instance, variable, r_value);
570 Private_GetJavaClass(void)
572 jref clazz = NPP_GetJavaClass();
574 JRIEnv* env = NPN_GetJavaEnv();
575 return JRI_NewGlobalRef(env, clazz);
581 /***********************************************************************
583 * These functions are located automagically by netscape.
585 ***********************************************************************/
588 * NP_GetMIMEDescription
589 * - Netscape needs to know about this symbol
590 * - Netscape uses the return value to identify when an object instance
591 * of this plugin should be created.
594 NP_GetMIMEDescription(void)
596 return NPP_GetMIMEDescription();
600 * NP_GetValue [optional]
601 * - Netscape needs to know about this symbol.
602 * - Interfaces with plugin to get values for predefined variables
603 * that the navigator needs.
606 NP_GetValue(void* future, NPPVariable variable, void *value)
608 return NPP_GetValue(future, variable, value);
613 * - Netscape needs to know about this symbol.
614 * - It calls this function after looking up its symbol before it
615 * is about to create the first ever object of this kind.
618 * nsTable - The netscape function table. If developers just use these
619 * wrappers, they don't need to worry about all these function
623 * - This functions needs to fill the plugin function table
624 * pluginFuncs and return it. Netscape Navigator plugin
625 * library will use this function table to call the plugin.
629 NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
631 NPError err = NPERR_NO_ERROR;
633 PLUGINDEBUGSTR("NP_Initialize");
635 /* validate input parameters */
636 if ((nsTable == NULL) || (pluginFuncs == NULL))
637 err = NPERR_INVALID_FUNCTABLE_ERROR;
640 * Check the major version passed in Netscape's function table.
641 * We won't load if the major version is newer than what we expect.
642 * Also check that the function tables passed in are big enough for
643 * all the functions we need (they could be bigger, if Netscape added
644 * new APIs, but that's OK with us -- we'll just ignore them).
647 if (err == NPERR_NO_ERROR) {
648 if ((nsTable->version >> 8) > NP_VERSION_MAJOR)
649 err = NPERR_INCOMPATIBLE_VERSION_ERROR;
650 if (nsTable->size < ((char *)&nsTable->posturlnotify - (char *)nsTable))
651 err = NPERR_INVALID_FUNCTABLE_ERROR;
652 if (pluginFuncs->size < sizeof(NPPluginFuncs))
653 err = NPERR_INVALID_FUNCTABLE_ERROR;
656 if (err == NPERR_NO_ERROR)
659 * Copy all the fields of Netscape function table into our
660 * copy so we can call back into Netscape later. Note that
661 * we need to copy the fields one by one, rather than assigning
662 * the whole structure, because the Netscape function table
663 * could actually be bigger than what we expect.
665 int minor = nsTable->version & 0xFF;
667 gNetscapeFuncs.version = nsTable->version;
668 gNetscapeFuncs.size = nsTable->size;
669 gNetscapeFuncs.posturl = nsTable->posturl;
670 gNetscapeFuncs.geturl = nsTable->geturl;
671 gNetscapeFuncs.requestread = nsTable->requestread;
672 gNetscapeFuncs.newstream = nsTable->newstream;
673 gNetscapeFuncs.write = nsTable->write;
674 gNetscapeFuncs.destroystream = nsTable->destroystream;
675 gNetscapeFuncs.status = nsTable->status;
676 gNetscapeFuncs.uagent = nsTable->uagent;
677 gNetscapeFuncs.memalloc = nsTable->memalloc;
678 gNetscapeFuncs.memfree = nsTable->memfree;
679 gNetscapeFuncs.memflush = nsTable->memflush;
680 gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
682 if( minor >= NPVERS_HAS_LIVECONNECT )
684 gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv;
685 gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
688 gNetscapeFuncs.getvalue = nsTable->getvalue;
689 gNetscapeFuncs.setvalue = nsTable->setvalue;
691 if( minor >= NPVERS_HAS_NOTIFICATION )
693 gNetscapeFuncs.geturlnotify = nsTable->geturlnotify;
694 gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
697 if (nsTable->size >= ((char *)&nsTable->setexception - (char *)nsTable))
699 gNetscapeFuncs.invalidaterect = nsTable->invalidaterect;
700 gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
701 gNetscapeFuncs.forceredraw = nsTable->forceredraw;
702 /* npruntime support */
705 gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
706 gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
707 gNetscapeFuncs.getintidentifier = nsTable->getintidentifier;
708 gNetscapeFuncs.identifierisstring = nsTable->identifierisstring;
709 gNetscapeFuncs.utf8fromidentifier = nsTable->utf8fromidentifier;
710 gNetscapeFuncs.intfromidentifier = nsTable->intfromidentifier;
711 gNetscapeFuncs.createobject = nsTable->createobject;
712 gNetscapeFuncs.retainobject = nsTable->retainobject;
713 gNetscapeFuncs.releaseobject = nsTable->releaseobject;
714 gNetscapeFuncs.invoke = nsTable->invoke;
715 gNetscapeFuncs.invokeDefault = nsTable->invokeDefault;
716 gNetscapeFuncs.evaluate = nsTable->evaluate;
717 gNetscapeFuncs.getproperty = nsTable->getproperty;
718 gNetscapeFuncs.setproperty = nsTable->setproperty;
719 gNetscapeFuncs.removeproperty = nsTable->removeproperty;
720 gNetscapeFuncs.hasproperty = nsTable->hasproperty;
721 gNetscapeFuncs.hasmethod = nsTable->hasmethod;
722 gNetscapeFuncs.releasevariantvalue = nsTable->releasevariantvalue;
723 gNetscapeFuncs.setexception = nsTable->setexception;
728 gNetscapeFuncs.invalidaterect = NULL;
729 gNetscapeFuncs.invalidateregion = NULL;
730 gNetscapeFuncs.forceredraw = NULL;
731 gNetscapeFuncs.getstringidentifier = NULL;
732 gNetscapeFuncs.getstringidentifiers = NULL;
733 gNetscapeFuncs.getintidentifier = NULL;
734 gNetscapeFuncs.identifierisstring = NULL;
735 gNetscapeFuncs.utf8fromidentifier = NULL;
736 gNetscapeFuncs.intfromidentifier = NULL;
737 gNetscapeFuncs.createobject = NULL;
738 gNetscapeFuncs.retainobject = NULL;
739 gNetscapeFuncs.releaseobject = NULL;
740 gNetscapeFuncs.invoke = NULL;
741 gNetscapeFuncs.invokeDefault = NULL;
742 gNetscapeFuncs.evaluate = NULL;
743 gNetscapeFuncs.getproperty = NULL;
744 gNetscapeFuncs.setproperty = NULL;
745 gNetscapeFuncs.removeproperty = NULL;
746 gNetscapeFuncs.hasproperty = NULL;
747 gNetscapeFuncs.releasevariantvalue = NULL;
748 gNetscapeFuncs.setexception = NULL;
751 ((char *)&nsTable->poppopupsenabledstate - (char *)nsTable))
753 gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
754 gNetscapeFuncs.poppopupsenabledstate = nsTable->poppopupsenabledstate;
758 gNetscapeFuncs.pushpopupsenabledstate = NULL;
759 gNetscapeFuncs.poppopupsenabledstate = NULL;
763 * Set up the plugin function table that Netscape will use to
764 * call us. Netscape needs to know about our version and size
765 * and have a UniversalProcPointer for every function we
768 pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
769 pluginFuncs->size = sizeof(NPPluginFuncs);
770 pluginFuncs->newp = NewNPP_NewProc(Private_New);
771 pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
772 pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
773 pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);
774 pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
775 pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile);
776 pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);
777 pluginFuncs->write = NewNPP_WriteProc(Private_Write);
778 pluginFuncs->print = NewNPP_PrintProc(Private_Print);
779 pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
780 pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
782 pluginFuncs->event = NULL;
783 if( minor >= NPVERS_HAS_NOTIFICATION )
785 pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
788 if( minor >= NPVERS_HAS_LIVECONNECT )
789 pluginFuncs->javaClass = Private_GetJavaClass();
791 pluginFuncs->javaClass = NULL;
793 pluginFuncs->javaClass = NULL;
796 err = NPP_Initialize();
803 * NP_Shutdown [optional]
804 * - Netscape needs to know about this symbol.
805 * - It calls this function after looking up its symbol after
806 * the last object of this kind has been destroyed.
812 PLUGINDEBUGSTR("NP_Shutdown");
814 return NPERR_NO_ERROR;