Gnash
0.8.10
|
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
#include <map>
#include <cassert>
#include "npapi.h"
#include "npruntime.h"
#include "npfunctions.h"
#include "plugin.h"
#include "pluginbase.h"
#include <regex.h>
#include "external.h"
#include "dsodefs.h"
#include <sys/param.h>
#include <ltdl.h>
Typedefs | |
typedef NPError | NP_InitializePtr (NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *aNPPFuncs) |
Functions | |
NPError | NS_PluginGetValue (NPPVariable aVariable, void *aValue) |
Retrieve values from the plugin for the Browser. | |
NPNetscapeFuncs * | populateNPFuncs (NPNetscapeFuncs *aNPNFuncs) |
int | main (int argc, char *argv[]) |
void * | NPN_MemAlloc (uint32_t size) |
void | NPN_MemFree (void *ptr) |
uint32_t | NPN_MemFlush (uint32_t size) |
NPUTF8 * | NPN_UTF8FromIdentifier (NPIdentifier identifier) |
int32_t | NPN_IntFromIdentifier (NPIdentifier identifier) |
NPIdentifier | NPN_GetStringIdentifier (const NPUTF8 *name) |
NPError | NPP_GetValue (NPP instance, NPPVariable aVariable, void *aValue) |
NPError | NPN_GetURLNotify (NPP instance, const char *url, const char *target, void *notifyData) |
NPError | NPN_PostURLNotify (NPP instance, const char *url, const char *target, uint32_t len, const char *buf, NPBool file, void *notifyData) |
bool | NPN_Invoke (NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result) |
bool | NPN_InvokeDefault (NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) |
bool | NPN_Evaluate (NPP npp, NPObject *npobj, NPString *script, NPVariant *result) |
bool | NPN_GetProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result) |
bool | NPN_HasProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName) |
bool | NPN_HasMethod (NPP npp, NPObject *npobj, NPIdentifier methodName) |
NPError | NPN_GetValue (NPP instance, NPNVariable aVariable, void *aValue) |
NPError | NPN_SetValue (NPP instance, NPPVariable aVariable, void *aValue) |
void | NPN_InvalidateRect (NPP instance, NPRect *invalidRect) |
void | NPN_InvalidateRegion (NPP instance, NPRegion invalidRegion) |
void | NPN_ReloadPlugins (NPBool reloadPages) |
NPError | NPN_GetURL (NPP instance, const char *url, const char *target) |
NPError NP_LOADDS | NPN_PostURL (NPP instance, const char *url, const char *target, uint32_t 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) |
void | NPN_Status (NPP instance, const char *message) |
const char * | NPN_UserAgent (NPP instance) |
int32_t | NPN_Write (NPP instance, NPStream *stream, int32_t len, void *buffer) |
NPError | NPN_DestroyStream (NPP instance, NPStream *stream, NPReason reason) |
void | NS_PluginShutdown () |
char * | NPP_GetMIMEDescription (void) |
void | NS_DestroyPluginInstance (nsPluginInstanceBase *aPlugin) |
bool | NPN_SetProperty (NPP npp, NPObject *obj, NPIdentifier name, const NPVariant *value) |
bool | NPN_GetProperty (NPP npp, NPObject *obj, NPIdentifier name, const NPVariant *value) |
bool | NPN_RemoveProperty (NPP npp, NPObject *npobj, NPIdentifier propertyName) |
bool | NPN_HasProperty (NPP npp, NPObject *obj, NPIdentifier name, const NPVariant *value) |
void | NPN_SetException (NPObject *npobj, const NPUTF8 *message) |
void | NPN_PluginThreadAsyncCall (NPP plugin, void(*func)(void *), void *userData) |
bool | NPN_Enumerate (NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count) |
bool | NPN_Construct (NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) |
void | NPN_ReleaseVariantValue (NPVariant *variant) |
NPObject * | NPN_CreateObject (NPP npp, NPClass *aClass) |
void | NPN_GetStringIdentifiers (const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers) |
NPIdentifier | NPN_GetIntIdentifier (int32_t intid) |
bool | NPN_IdentifierIsString (NPIdentifier identifier) |
NPObject * | NPN_RetainObject (NPObject *obj) |
void | NPN_ReleaseObject (NPObject *npobj) |
Variables | |
std::map< NPIdentifier, NPVariant * > | _properties |
std::map< NPIdentifier, NPInvokeFunctionPtr > | _methods |
typedef NPError NP_InitializePtr(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *aNPPFuncs) |
int main | ( | int argc | , |
char * | argv[] | ||
) |
References populateNPFuncs(), NPP_GetValue(), and NPN_GetValue().
bool NPN_Construct | ( | NPP | npp, |
NPObject * | npobj, | ||
const NPVariant * | args, | ||
uint32_t | argCount, | ||
NPVariant * | result | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPObject* NPN_CreateObject | ( | NPP | npp, |
NPClass * | aClass | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs(), and gnash::nsPluginInstance::nsPluginInstance().
NPError NPN_DestroyStream | ( | NPP | instance, |
NPStream * | stream, | ||
NPReason | reason | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_Enumerate | ( | NPP | npp, |
NPObject * | npobj, | ||
NPIdentifier ** | identifier, | ||
uint32_t * | count | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_Evaluate | ( | NPP | npp, |
NPObject * | npobj, | ||
NPString * | script, | ||
NPVariant * | result | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPIdentifier NPN_GetIntIdentifier | ( | int32_t | intid | ) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_GetProperty | ( | NPP | npp, |
NPObject * | npobj, | ||
NPIdentifier | propertyName, | ||
NPVariant * | result | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_GetProperty | ( | NPP | npp, |
NPObject * | obj, | ||
NPIdentifier | name, | ||
const NPVariant * | value | ||
) |
References _properties.
NPIdentifier NPN_GetStringIdentifier | ( | const NPUTF8 * | name | ) |
References __PRETTY_FUNCTION__.
Referenced by gnash::plugin::ExternalInterface::parseXML(), populateNPFuncs(), and gnash::GnashPluginScriptObject::AddProperty().
void NPN_GetStringIdentifiers | ( | const NPUTF8 ** | names, |
int32_t | nameCount, | ||
NPIdentifier * | identifiers | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPError NPN_GetURL | ( | NPP | instance, |
const char * | url, | ||
const char * | target | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPError NPN_GetURLNotify | ( | NPP | instance, |
const char * | url, | ||
const char * | target, | ||
void * | notifyData | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPError NPN_GetValue | ( | NPP | instance, |
NPNVariable | aVariable, | ||
void * | aValue | ||
) |
References NPPFuncs, and NPNFuncs.
Referenced by populateNPFuncs(), main(), and NS_PluginInitialize().
bool NPN_HasMethod | ( | NPP | npp, |
NPObject * | npobj, | ||
NPIdentifier | methodName | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_HasProperty | ( | NPP | npp, |
NPObject * | npobj, | ||
NPIdentifier | propertyName | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_HasProperty | ( | NPP | npp, |
NPObject * | obj, | ||
NPIdentifier | name, | ||
const NPVariant * | value | ||
) |
References _properties.
bool NPN_IdentifierIsString | ( | NPIdentifier | identifier | ) |
References __PRETTY_FUNCTION__.
Referenced by gnash::remoteCallback(), populateNPFuncs(), gnash::GnashPluginScriptObject::marshalHasMethod(), gnash::GnashPluginScriptObject::HasProperty(), gnash::GnashPluginScriptObject::GetProperty(), gnash::GnashPluginScriptObject::HasMethod(), gnash::GnashPluginScriptObject::Invoke(), gnash::GnashPluginScriptObject::InvokeDefault(), and gnash::GnashPluginScriptObject::AddMethod().
int32_t NPN_IntFromIdentifier | ( | NPIdentifier | identifier | ) |
References __PRETTY_FUNCTION__.
Referenced by gnash::remoteCallback(), populateNPFuncs(), gnash::GnashPluginScriptObject::marshalHasMethod(), gnash::GnashPluginScriptObject::HasProperty(), gnash::GnashPluginScriptObject::GetProperty(), gnash::GnashPluginScriptObject::HasMethod(), gnash::GnashPluginScriptObject::Invoke(), gnash::GnashPluginScriptObject::InvokeDefault(), and gnash::GnashPluginScriptObject::AddMethod().
void NPN_InvalidateRect | ( | NPP | instance, |
NPRect * | invalidRect | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
void NPN_InvalidateRegion | ( | NPP | instance, |
NPRegion | invalidRegion | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_Invoke | ( | NPP | npp, |
NPObject * | npobj, | ||
NPIdentifier | methodName, | ||
const NPVariant * | args, | ||
uint32_t | argCount, | ||
NPVariant * | result | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_InvokeDefault | ( | NPP | npp, |
NPObject * | npobj, | ||
const NPVariant * | args, | ||
uint32_t | argCount, | ||
NPVariant * | result | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
void* NPN_MemAlloc | ( | uint32_t | size | ) |
References malloc().
Referenced by gnash::plugin::ExternalInterface::parseXML(), gnash::CopyVariantValue(), populateNPFuncs(), and main().
uint32_t NPN_MemFlush | ( | uint32_t | size | ) |
Referenced by populateNPFuncs().
void NPN_MemFree | ( | void * | ptr | ) |
References assert, and free().
Referenced by populateNPFuncs(), NPN_ReleaseVariantValue(), NPN_ReleaseObject(), and main().
NPError NPN_NewStream | ( | NPP | instance, |
NPMIMEType | type, | ||
const char * | target, | ||
NPStream ** | stream | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
void NPN_PluginThreadAsyncCall | ( | NPP | plugin, |
void(*)(void *) | func, | ||
void * | userData | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPError NP_LOADDS NPN_PostURL | ( | NPP | instance, |
const char * | url, | ||
const char * | target, | ||
uint32_t | len, | ||
const char * | buf, | ||
NPBool | file | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPError NPN_PostURLNotify | ( | NPP | instance, |
const char * | url, | ||
const char * | target, | ||
uint32_t | len, | ||
const char * | buf, | ||
NPBool | file, | ||
void * | notifyData | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
void NPN_ReleaseObject | ( | NPObject * | npobj | ) |
References assert, and NPN_MemFree().
Referenced by populateNPFuncs(), NPN_ReleaseVariantValue(), and gnash::nsPluginInstance::~nsPluginInstance().
void NPN_ReleaseVariantValue | ( | NPVariant * | variant | ) |
References NPN_MemFree(), and NPN_ReleaseObject().
Referenced by gnash::plugin::ExternalInterface::parseXML(), gnash::GnashNPVariant::operator=(), gnash::GnashNPVariant::~GnashNPVariant(), and populateNPFuncs().
void NPN_ReloadPlugins | ( | NPBool | reloadPages | ) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_RemoveProperty | ( | NPP | npp, |
NPObject * | npobj, | ||
NPIdentifier | propertyName | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPError NPN_RequestRead | ( | NPStream * | stream, |
NPByteRange * | rangeList | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
NPObject* NPN_RetainObject | ( | NPObject * | obj | ) |
References assert.
Referenced by gnash::CopyVariantValue(), populateNPFuncs(), and gnash::nsPluginInstance::GetValue().
void NPN_SetException | ( | NPObject * | npobj, |
const NPUTF8 * | message | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
bool NPN_SetProperty | ( | NPP | npp, |
NPObject * | obj, | ||
NPIdentifier | name, | ||
const NPVariant * | value | ||
) |
References _properties.
Referenced by gnash::plugin::ExternalInterface::parseXML(), and populateNPFuncs().
NPError NPN_SetValue | ( | NPP | instance, |
NPPVariable | aVariable, | ||
void * | aValue | ||
) |
References NPPFuncs, and NPNFuncs.
Referenced by populateNPFuncs().
void NPN_Status | ( | NPP | instance, |
const char * | message | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
const char* NPN_UserAgent | ( | NPP | instance | ) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs(), and nsPluginInstance::getVersion().
NPUTF8* NPN_UTF8FromIdentifier | ( | NPIdentifier | identifier | ) |
References __PRETTY_FUNCTION__.
Referenced by gnash::remoteCallback(), populateNPFuncs(), gnash::GnashPluginScriptObject::marshalHasMethod(), gnash::GnashPluginScriptObject::HasProperty(), gnash::GnashPluginScriptObject::GetProperty(), gnash::GnashPluginScriptObject::HasMethod(), gnash::GnashPluginScriptObject::Invoke(), gnash::GnashPluginScriptObject::InvokeDefault(), and gnash::GnashPluginScriptObject::AddMethod().
int32_t NPN_Write | ( | NPP | instance, |
NPStream * | stream, | ||
int32_t | len, | ||
void * | buffer | ||
) |
References __PRETTY_FUNCTION__.
Referenced by populateNPFuncs().
char* NPP_GetMIMEDescription | ( | void | ) |
References x.
NPError NPP_GetValue | ( | NPP | instance, |
NPPVariable | aVariable, | ||
void * | aValue | ||
) |
void NS_DestroyPluginInstance | ( | nsPluginInstanceBase * | aPlugin | ) |
References __PRETTY_FUNCTION__.
NPError NS_PluginGetValue | ( | NPPVariable | aVariable, |
void * | aValue | ||
) |
Retrieve values from the plugin for the Browser.
This C++ function is called by the browser to get certain information is needs from the plugin. This information is the plugin name, a description, etc...
References PLUGIN_NAME.
Referenced by gnash::nsPluginInstance::GetValue().
void NS_PluginShutdown | ( | void | ) |
References __PRETTY_FUNCTION__.
NPNetscapeFuncs* populateNPFuncs | ( | NPNetscapeFuncs * | aNPNFuncs | ) |
References NPN_GetURL(), NPN_PostURL(), NPN_RequestRead(), NPN_NewStream(), NPN_Write(), NPN_DestroyStream(), NPN_Status(), NPN_UserAgent(), NPN_MemAlloc(), NPN_MemFree(), NPN_MemFlush(), NPN_ReloadPlugins(), NPN_GetURLNotify(), NPN_PostURLNotify(), NPN_GetValue(), NPN_SetValue(), NPN_InvalidateRect(), NPN_InvalidateRegion(), NPN_GetStringIdentifier(), NPN_GetStringIdentifiers(), NPN_GetIntIdentifier(), NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), NPN_IntFromIdentifier(), NPN_CreateObject(), NPN_RetainObject(), NPN_ReleaseObject(), NPN_Invoke(), NPN_InvokeDefault(), NPN_Evaluate(), NPN_GetProperty(), NPN_SetProperty(), NPN_RemoveProperty(), NPN_HasProperty(), NPN_HasMethod(), NPN_ReleaseVariantValue(), NPN_SetException(), NPN_Enumerate(), NPN_PluginThreadAsyncCall(), and NPN_Construct().
Referenced by main().
std::map<NPIdentifier, NPInvokeFunctionPtr> _methods |
std::map<NPIdentifier, NPVariant *> _properties |
Referenced by NPN_SetProperty(), NPN_GetProperty(), and NPN_HasProperty().