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_t 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_t 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_t 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);
186 void *NPN_MemAlloc(uint32_t size)
188 return CallNPN_MemAllocProc(gNetscapeFuncs.memalloc, size);
191 void NPN_MemFree(void* ptr)
193 CallNPN_MemFreeProc(gNetscapeFuncs.memfree, ptr);
196 uint32_t NPN_MemFlush(uint32_t size)
198 return CallNPN_MemFlushProc(gNetscapeFuncs.memflush, size);
201 void NPN_ReloadPlugins(NPBool reloadPages)
203 CallNPN_ReloadPluginsProc(gNetscapeFuncs.reloadplugins, reloadPages);
207 JRIEnv* NPN_GetJavaEnv()
209 return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
212 jref NPN_GetJavaPeer(NPP instance)
214 return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
220 NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
222 CallNPN_InvalidateRectProc(gNetscapeFuncs.invalidaterect, instance,
227 NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
229 CallNPN_InvalidateRegionProc(gNetscapeFuncs.invalidateregion, instance,
234 NPN_ForceRedraw(NPP instance)
236 CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance);
239 void NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
241 CallNPN_PushPopupsEnabledStateProc(gNetscapeFuncs.pushpopupsenabledstate,
245 void NPN_PopPopupsEnabledState(NPP instance)
247 CallNPN_PopPopupsEnabledStateProc(gNetscapeFuncs.poppopupsenabledstate,
251 NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name)
253 int minor = gNetscapeFuncs.version & 0xFF;
256 return CallNPN_GetStringIdentifierProc(
257 gNetscapeFuncs.getstringidentifier, name);
262 void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
263 NPIdentifier *identifiers)
265 int minor = gNetscapeFuncs.version & 0xFF;
268 CallNPN_GetStringIdentifiersProc(gNetscapeFuncs.getstringidentifiers,
269 names, nameCount, identifiers);
273 NPIdentifier NPN_GetIntIdentifier(int32_t intid)
275 int minor = gNetscapeFuncs.version & 0xFF;
278 return CallNPN_GetIntIdentifierProc(gNetscapeFuncs.getintidentifier, intid);
283 bool NPN_IdentifierIsString(NPIdentifier identifier)
285 int minor = gNetscapeFuncs.version & 0xFF;
288 return CallNPN_IdentifierIsStringProc(
289 gNetscapeFuncs.identifierisstring,
295 NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier)
297 int minor = gNetscapeFuncs.version & 0xFF;
300 return CallNPN_UTF8FromIdentifierProc(
301 gNetscapeFuncs.utf8fromidentifier,
307 int32_t NPN_IntFromIdentifier(NPIdentifier identifier)
309 int minor = gNetscapeFuncs.version & 0xFF;
312 return CallNPN_IntFromIdentifierProc(
313 gNetscapeFuncs.intfromidentifier,
319 NPObject *NPN_CreateObject(NPP npp, NPClass *aClass)
321 int minor = gNetscapeFuncs.version & 0xFF;
323 return CallNPN_CreateObjectProc(gNetscapeFuncs.createobject, npp, aClass);
327 NPObject *NPN_RetainObject(NPObject *obj)
329 int minor = gNetscapeFuncs.version & 0xFF;
331 return CallNPN_RetainObjectProc(gNetscapeFuncs.retainobject, obj);
335 void NPN_ReleaseObject(NPObject *obj)
337 int minor = gNetscapeFuncs.version & 0xFF;
339 CallNPN_ReleaseObjectProc(gNetscapeFuncs.releaseobject, obj);
342 bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName,
343 const NPVariant *args, uint32_t argCount, NPVariant *result)
345 int minor = gNetscapeFuncs.version & 0xFF;
347 return CallNPN_InvokeProc(gNetscapeFuncs.invoke, npp, obj, methodName,
348 args, argCount, result);
352 bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args,
353 uint32_t argCount, NPVariant *result)
355 int minor = gNetscapeFuncs.version & 0xFF;
357 return CallNPN_InvokeDefaultProc(gNetscapeFuncs.invokeDefault, npp, obj,
358 args, argCount, result);
362 bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script,
365 int minor = gNetscapeFuncs.version & 0xFF;
367 return CallNPN_EvaluateProc(gNetscapeFuncs.evaluate, npp, obj,
372 bool NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
375 int minor = gNetscapeFuncs.version & 0xFF;
377 return CallNPN_GetPropertyProc(gNetscapeFuncs.getproperty, npp, obj,
378 propertyName, result);
382 bool NPN_SetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
383 const NPVariant *value)
385 int minor = gNetscapeFuncs.version & 0xFF;
387 return CallNPN_SetPropertyProc(gNetscapeFuncs.setproperty, npp, obj,
388 propertyName, value);
392 bool NPN_RemoveProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
394 int minor = gNetscapeFuncs.version & 0xFF;
396 return CallNPN_RemovePropertyProc(gNetscapeFuncs.removeproperty, npp, obj,
401 bool NPN_HasProperty(NPP npp, NPObject* obj, NPIdentifier propertyName)
403 int minor = gNetscapeFuncs.version & 0xFF;
405 return CallNPN_HasPropertyProc(gNetscapeFuncs.hasproperty, npp, obj,
410 bool NPN_HasMethod(NPP npp, NPObject* obj, NPIdentifier methodName)
412 int minor = gNetscapeFuncs.version & 0xFF;
414 return CallNPN_HasMethodProc(gNetscapeFuncs.hasmethod, npp,
419 void NPN_ReleaseVariantValue(NPVariant *variant)
421 int minor = gNetscapeFuncs.version & 0xFF;
423 CallNPN_ReleaseVariantValueProc(gNetscapeFuncs.releasevariantvalue, variant);
426 void NPN_SetException(NPObject* obj, const NPUTF8 *message)
428 int minor = gNetscapeFuncs.version & 0xFF;
430 CallNPN_SetExceptionProc(gNetscapeFuncs.setexception, obj, message);
433 /***********************************************************************
435 * Wrapper functions : Netscape Navigator -> plugin
437 * These functions let the plugin developer just create the APIs
438 * as documented and defined in npapi.h, without needing to
439 * install those functions in the function table or worry about
440 * setting up globals for 68K plugins.
442 ***********************************************************************/
444 /* Function prototypes */
445 NPError Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
446 int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
447 NPError Private_Destroy(NPP instance, NPSavedData** save);
448 NPError Private_SetWindow(NPP instance, NPWindow* window);
449 NPError Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
450 NPBool seekable, uint16_t* stype);
451 int32_t Private_WriteReady(NPP instance, NPStream* stream);
452 int32_t Private_Write(NPP instance, NPStream* stream, int32_t offset,
453 int32_t len, void* buffer);
454 void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
455 NPError Private_DestroyStream(NPP instance, NPStream* stream, NPError reason);
456 void Private_URLNotify(NPP instance, const char* url,
457 NPReason reason, void* notifyData);
458 void Private_Print(NPP instance, NPPrint* platformPrint);
459 NPError Private_GetValue(NPP instance, NPPVariable variable, void *r_value);
460 NPError Private_SetValue(NPP instance, NPPVariable variable, void *r_value);
462 JRIGlobalRef Private_GetJavaClass(void);
465 /* function implementations */
467 Private_New(NPMIMEType pluginType, NPP instance, uint16_t mode,
468 int16_t argc, char* argn[], char* argv[], NPSavedData* saved)
471 PLUGINDEBUGSTR("New");
472 ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
477 Private_Destroy(NPP instance, NPSavedData** save)
479 PLUGINDEBUGSTR("Destroy");
480 return NPP_Destroy(instance, save);
484 Private_SetWindow(NPP instance, NPWindow* window)
487 PLUGINDEBUGSTR("SetWindow");
488 err = NPP_SetWindow(instance, window);
493 Private_NewStream(NPP instance, NPMIMEType type, NPStream* stream,
494 NPBool seekable, uint16_t* stype)
497 PLUGINDEBUGSTR("NewStream");
498 err = NPP_NewStream(instance, type, stream, seekable, stype);
503 Private_WriteReady(NPP instance, NPStream* stream)
506 PLUGINDEBUGSTR("WriteReady");
507 result = NPP_WriteReady(instance, stream);
512 Private_Write(NPP instance, NPStream* stream, int32_t offset, int32_t len,
516 PLUGINDEBUGSTR("Write");
517 result = NPP_Write(instance, stream, offset, len, buffer);
522 Private_StreamAsFile(NPP instance, NPStream* stream, const char* fname)
524 PLUGINDEBUGSTR("StreamAsFile");
525 NPP_StreamAsFile(instance, stream, fname);
530 Private_DestroyStream(NPP instance, NPStream* stream, NPError reason)
533 PLUGINDEBUGSTR("DestroyStream");
534 err = NPP_DestroyStream(instance, stream, reason);
539 Private_URLNotify(NPP instance, const char* url,
540 NPReason reason, void* notifyData)
542 PLUGINDEBUGSTR("URLNotify");
543 NPP_URLNotify(instance, url, reason, notifyData);
547 Private_Print(NPP instance, NPPrint* platformPrint)
549 PLUGINDEBUGSTR("Print");
550 NPP_Print(instance, platformPrint);
554 Private_GetValue(NPP instance, NPPVariable variable, void *r_value)
556 PLUGINDEBUGSTR("GetValue");
557 return NPP_GetValue(instance, variable, r_value);
561 Private_SetValue(NPP instance, NPPVariable variable, void *r_value)
563 PLUGINDEBUGSTR("SetValue");
564 return NPP_SetValue(instance, variable, r_value);
569 Private_GetJavaClass(void)
571 jref clazz = NPP_GetJavaClass();
573 JRIEnv* env = NPN_GetJavaEnv();
574 return JRI_NewGlobalRef(env, clazz);
580 /***********************************************************************
582 * These functions are located automagically by netscape.
584 ***********************************************************************/
587 * NP_GetMIMEDescription
588 * - Netscape needs to know about this symbol
589 * - Netscape uses the return value to identify when an object instance
590 * of this plugin should be created.
593 NP_GetMIMEDescription(void)
595 return NPP_GetMIMEDescription();
599 * NP_GetValue [optional]
600 * - Netscape needs to know about this symbol.
601 * - Interfaces with plugin to get values for predefined variables
602 * that the navigator needs.
605 NP_GetValue(void* future, NPPVariable variable, void *value)
607 return NPP_GetValue(future, variable, value);
612 * - Netscape needs to know about this symbol.
613 * - It calls this function after looking up its symbol before it
614 * is about to create the first ever object of this kind.
617 * nsTable - The netscape function table. If developers just use these
618 * wrappers, they don't need to worry about all these function
622 * - This functions needs to fill the plugin function table
623 * pluginFuncs and return it. Netscape Navigator plugin
624 * library will use this function table to call the plugin.
628 NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
630 NPError err = NPERR_NO_ERROR;
632 PLUGINDEBUGSTR("NP_Initialize");
634 /* validate input parameters */
635 if ((nsTable == NULL) || (pluginFuncs == NULL))
636 err = NPERR_INVALID_FUNCTABLE_ERROR;
639 * Check the major version passed in Netscape's function table.
640 * We won't load if the major version is newer than what we expect.
641 * Also check that the function tables passed in are big enough for
642 * all the functions we need (they could be bigger, if Netscape added
643 * new APIs, but that's OK with us -- we'll just ignore them).
646 if (err == NPERR_NO_ERROR) {
647 if ((nsTable->version >> 8) > NP_VERSION_MAJOR)
648 err = NPERR_INCOMPATIBLE_VERSION_ERROR;
649 if (nsTable->size < ((char *)&nsTable->posturlnotify - (char *)nsTable))
650 err = NPERR_INVALID_FUNCTABLE_ERROR;
651 if (pluginFuncs->size < sizeof(NPPluginFuncs))
652 err = NPERR_INVALID_FUNCTABLE_ERROR;
655 if (err == NPERR_NO_ERROR)
658 * Copy all the fields of Netscape function table into our
659 * copy so we can call back into Netscape later. Note that
660 * we need to copy the fields one by one, rather than assigning
661 * the whole structure, because the Netscape function table
662 * could actually be bigger than what we expect.
664 int minor = nsTable->version & 0xFF;
666 gNetscapeFuncs.version = nsTable->version;
667 gNetscapeFuncs.size = nsTable->size;
668 gNetscapeFuncs.posturl = nsTable->posturl;
669 gNetscapeFuncs.geturl = nsTable->geturl;
670 gNetscapeFuncs.requestread = nsTable->requestread;
671 gNetscapeFuncs.newstream = nsTable->newstream;
672 gNetscapeFuncs.write = nsTable->write;
673 gNetscapeFuncs.destroystream = nsTable->destroystream;
674 gNetscapeFuncs.status = nsTable->status;
675 gNetscapeFuncs.uagent = nsTable->uagent;
676 gNetscapeFuncs.memalloc = nsTable->memalloc;
677 gNetscapeFuncs.memfree = nsTable->memfree;
678 gNetscapeFuncs.memflush = nsTable->memflush;
679 gNetscapeFuncs.reloadplugins = nsTable->reloadplugins;
681 if( minor >= NPVERS_HAS_LIVECONNECT )
683 gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv;
684 gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
687 gNetscapeFuncs.getvalue = nsTable->getvalue;
688 gNetscapeFuncs.setvalue = nsTable->setvalue;
690 if( minor >= NPVERS_HAS_NOTIFICATION )
692 gNetscapeFuncs.geturlnotify = nsTable->geturlnotify;
693 gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
696 if (nsTable->size >= ((char *)&nsTable->setexception - (char *)nsTable))
698 gNetscapeFuncs.invalidaterect = nsTable->invalidaterect;
699 gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
700 gNetscapeFuncs.forceredraw = nsTable->forceredraw;
701 /* npruntime support */
704 gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
705 gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
706 gNetscapeFuncs.getintidentifier = nsTable->getintidentifier;
707 gNetscapeFuncs.identifierisstring = nsTable->identifierisstring;
708 gNetscapeFuncs.utf8fromidentifier = nsTable->utf8fromidentifier;
709 gNetscapeFuncs.intfromidentifier = nsTable->intfromidentifier;
710 gNetscapeFuncs.createobject = nsTable->createobject;
711 gNetscapeFuncs.retainobject = nsTable->retainobject;
712 gNetscapeFuncs.releaseobject = nsTable->releaseobject;
713 gNetscapeFuncs.invoke = nsTable->invoke;
714 gNetscapeFuncs.invokeDefault = nsTable->invokeDefault;
715 gNetscapeFuncs.evaluate = nsTable->evaluate;
716 gNetscapeFuncs.getproperty = nsTable->getproperty;
717 gNetscapeFuncs.setproperty = nsTable->setproperty;
718 gNetscapeFuncs.removeproperty = nsTable->removeproperty;
719 gNetscapeFuncs.hasproperty = nsTable->hasproperty;
720 gNetscapeFuncs.hasmethod = nsTable->hasmethod;
721 gNetscapeFuncs.releasevariantvalue = nsTable->releasevariantvalue;
722 gNetscapeFuncs.setexception = nsTable->setexception;
727 gNetscapeFuncs.invalidaterect = NULL;
728 gNetscapeFuncs.invalidateregion = NULL;
729 gNetscapeFuncs.forceredraw = NULL;
730 gNetscapeFuncs.getstringidentifier = NULL;
731 gNetscapeFuncs.getstringidentifiers = NULL;
732 gNetscapeFuncs.getintidentifier = NULL;
733 gNetscapeFuncs.identifierisstring = NULL;
734 gNetscapeFuncs.utf8fromidentifier = NULL;
735 gNetscapeFuncs.intfromidentifier = NULL;
736 gNetscapeFuncs.createobject = NULL;
737 gNetscapeFuncs.retainobject = NULL;
738 gNetscapeFuncs.releaseobject = NULL;
739 gNetscapeFuncs.invoke = NULL;
740 gNetscapeFuncs.invokeDefault = NULL;
741 gNetscapeFuncs.evaluate = NULL;
742 gNetscapeFuncs.getproperty = NULL;
743 gNetscapeFuncs.setproperty = NULL;
744 gNetscapeFuncs.removeproperty = NULL;
745 gNetscapeFuncs.hasproperty = NULL;
746 gNetscapeFuncs.releasevariantvalue = NULL;
747 gNetscapeFuncs.setexception = NULL;
750 ((char *)&nsTable->poppopupsenabledstate - (char *)nsTable))
752 gNetscapeFuncs.pushpopupsenabledstate = nsTable->pushpopupsenabledstate;
753 gNetscapeFuncs.poppopupsenabledstate = nsTable->poppopupsenabledstate;
757 gNetscapeFuncs.pushpopupsenabledstate = NULL;
758 gNetscapeFuncs.poppopupsenabledstate = NULL;
762 * Set up the plugin function table that Netscape will use to
763 * call us. Netscape needs to know about our version and size
764 * and have a UniversalProcPointer for every function we
767 pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
768 pluginFuncs->size = sizeof(NPPluginFuncs);
769 pluginFuncs->newp = NewNPP_NewProc(Private_New);
770 pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
771 pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
772 pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);
773 pluginFuncs->destroystream = NewNPP_DestroyStreamProc(Private_DestroyStream);
774 pluginFuncs->asfile = NewNPP_StreamAsFileProc(Private_StreamAsFile);
775 pluginFuncs->writeready = NewNPP_WriteReadyProc(Private_WriteReady);
776 pluginFuncs->write = NewNPP_WriteProc(Private_Write);
777 pluginFuncs->print = NewNPP_PrintProc(Private_Print);
778 pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
779 pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
781 pluginFuncs->event = NULL;
782 if( minor >= NPVERS_HAS_NOTIFICATION )
784 pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
787 if( minor >= NPVERS_HAS_LIVECONNECT )
788 pluginFuncs->javaClass = Private_GetJavaClass();
790 pluginFuncs->javaClass = NULL;
792 pluginFuncs->javaClass = NULL;
795 err = NPP_Initialize();
802 * NP_Shutdown [optional]
803 * - Netscape needs to know about this symbol.
804 * - It calls this function after looking up its symbol after
805 * the last object of this kind has been destroyed.
811 PLUGINDEBUGSTR("NP_Shutdown");
813 return NPERR_NO_ERROR;