* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
- *
+ *
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
- *
+ *
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
- * Contributor(s):
+ * Contributor(s):
* Stephen Mak <smak@sun.com>
*/
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_GetStringIdentifierProc( gNetscapeFuncs.getstringidentifier, name);
}
return NULL;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
CallNPN_GetStringIdentifiersProc( gNetscapeFuncs.getstringidentifiers, names, nameCount, identifiers);
}
}
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_GetIntIdentifierProc( gNetscapeFuncs.getintidentifier, intid);
}
return NULL;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_IdentifierIsStringProc( gNetscapeFuncs.identifierisstring, identifier);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_UTF8FromIdentifierProc( gNetscapeFuncs.utf8fromidentifier, identifier);
}
return NULL;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_IntFromIdentifierProc( gNetscapeFuncs.intfromidentifier, identifier);
}
return 0;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_CreateObjectProc( gNetscapeFuncs.createobject, instance, aClass);
}
return NULL;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_RetainObjectProc( gNetscapeFuncs.retainobject, npobj);
}
return NULL;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
CallNPN_ReleaseObjectProc( gNetscapeFuncs.releaseobject, npobj);
}
}
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_InvokeProc( gNetscapeFuncs.invoke, instance, npobj, methodName, args, argCount, result);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_InvokeDefaultProc( gNetscapeFuncs.invokeDefault, instance, npobj, args, argCount, result);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_EvaluateProc( gNetscapeFuncs.evaluate, instance, npobj, script, result);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_GetPropertyProc( gNetscapeFuncs.getproperty, instance, npobj, propertyName, result);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_SetPropertyProc( gNetscapeFuncs.setproperty, instance, npobj, propertyName, value);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_RemovePropertyProc( gNetscapeFuncs.removeproperty, instance, npobj, propertyName);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_HasPropertyProc( gNetscapeFuncs.hasproperty, instance, npobj, propertyName);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
return CallNPN_HasMethodProc( gNetscapeFuncs.hasmethod, instance, npobj, methodName);
}
return false;
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
CallNPN_ReleaseVariantValueProc( gNetscapeFuncs.releasevariantvalue, variant);
}
}
{
int navMinorVers = gNetscapeFuncs.version & 0xFF;
if( navMinorVers >= 14 )
- {
+ {
CallNPN_SetExceptionProc( gNetscapeFuncs.setexception, npobj, message);
}
}
* Wrapper functions : Netscape Navigator -> plugin
*
* These functions let the plugin developer just create the APIs
- * as documented and defined in npapi.h, without needing to
+ * as documented and defined in npapi.h, without needing to
* install those functions in the function table or worry about
* setting up globals for 68K plugins.
*
NPError ret;
PLUGINDEBUGSTR("New");
ret = NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
- return ret;
+ return ret;
}
NPError
void
Private_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData)
-
+
{
PLUGINDEBUGSTR("URLNotify");
NPP_URLNotify(instance, url, reason, notifyData);
return NULL;
}
-/***********************************************************************
+/***********************************************************************
*
* These functions are located automagically by netscape.
*
NPError err = NPERR_NO_ERROR;
PLUGINDEBUGSTR("NP_Initialize");
-
+
/* validate input parameters */
if ((nsTable == NULL) || (pluginFuncs == NULL))
err = NPERR_INVALID_FUNCTABLE_ERROR;
-
+
/*
* Check the major version passed in Netscape's function table.
* We won't load if the major version is newer than what we expect.
err = NPERR_INCOMPATIBLE_VERSION_ERROR;
if (nsTable->size < sizeof(NPNetscapeFuncs))
err = NPERR_INVALID_FUNCTABLE_ERROR;
- if (pluginFuncs->size < sizeof(NPPluginFuncs))
+ if (pluginFuncs->size < sizeof(NPPluginFuncs))
err = NPERR_INVALID_FUNCTABLE_ERROR;
}
-
+
if (err == NPERR_NO_ERROR) {
/*
* Copy all the fields of Netscape function table into our
gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
}
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
- {
+ {
gNetscapeFuncs.geturlnotify = nsTable->geturlnotify;
gNetscapeFuncs.posturlnotify = nsTable->posturlnotify;
}
gNetscapeFuncs.invalidateregion = nsTable->invalidateregion;
gNetscapeFuncs.forceredraw = nsTable->forceredraw;
if( navMinorVers >= 14 )
- {
- // NPRuntime support
+ {
+ // NPRuntime support
gNetscapeFuncs.getstringidentifier = nsTable->getstringidentifier;
gNetscapeFuncs.getstringidentifiers = nsTable->getstringidentifiers;
gNetscapeFuncs.getintidentifier = nsTable->getintidentifier;
pluginFuncs->getvalue = NewNPP_GetValueProc(Private_GetValue);
pluginFuncs->setvalue = NewNPP_SetValueProc(Private_SetValue);
if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
- {
- pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
+ {
+ pluginFuncs->urlnotify = NewNPP_URLNotifyProc(Private_URLNotify);
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
#else
pluginFuncs->javaClass = NULL;
#endif
-
+
err = NPP_Initialize();
}
-
+
return err;
}