Gnash
0.8.10
|
#include <pluginScriptObject.h>
Public Member Functions | |
GnashPluginScriptObject () | |
GnashPluginScriptObject (NPP npp) | |
~GnashPluginScriptObject () | |
void | setControlFD (int x) |
int | getControlFD () |
void | setHostFD (int x) |
int | getHostFD () |
bool | SetVariable (const std::string &name, const NPVariant &value) |
GnashNPVariant | GetVariable (const std::string &name) |
int | getReadFD () |
int | getWriteFD () |
int | writePlayer (const std::string &data) |
int | writePlayer (int fd, const std::string &data) |
std::string | readPlayer () |
std::string | readPlayer (int fd) |
bool | Invoke (NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) |
bool | AddMethod (NPIdentifier name, NPInvokeFunctionPtr func) |
void | AddProperty (const std::string &name, const std::string &str) |
void | AddProperty (const std::string &name, double num) |
void | AddProperty (const std::string &name, int num) |
Static Public Member Functions | |
static NPClass * | marshalGetNPClass () |
static NPObject * | marshalAllocate (NPP npp, NPClass *aClass) |
static void | marshalDeallocate (NPObject *npobj) |
static void | marshalInvalidate (NPObject *npobj) |
static bool | marshalHasMethod (NPObject *npobj, NPIdentifier name) |
static bool | marshalInvoke (NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) |
static bool | marshalInvokeDefault (NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) |
static bool | marshalHasProperty (NPObject *npobj, NPIdentifier name) |
static bool | marshalGetProperty (NPObject *npobj, NPIdentifier name, NPVariant *result) |
static bool | marshalSetProperty (NPObject *npobj, NPIdentifier name, const NPVariant *value) |
static bool | marshalRemoveProperty (NPObject *npobj, NPIdentifier name) |
static bool | marshalEnumerate (NPObject *npobj, void ***identifier, uint32_t *count) |
static bool | marshalConstruct (NPObject *npobj, const NPVariant *data, uint32_t count, NPVariant *result) |
Static Public Attributes | |
static NPClass | _npclass |
Protected Member Functions | |
void | Deallocate () |
void | Invalidate () |
bool | HasMethod (NPIdentifier name) |
bool | InvokeDefault (const NPVariant *args, uint32_t argCount, NPVariant *result) |
bool | HasProperty (NPIdentifier name) |
bool | GetProperty (NPIdentifier name, NPVariant *result) |
bool | SetProperty (NPIdentifier name, const NPVariant &value) |
bool | RemoveProperty (NPIdentifier name) |
bool | Enumerate (NPIdentifier **identifier, uint32_t *count) |
bool | Construct (const NPVariant *data, uint32_t argCount, NPVariant *result) |
gnash::GnashPluginScriptObject::GnashPluginScriptObject | ( | ) |
Referenced by marshalAllocate().
gnash::GnashPluginScriptObject::GnashPluginScriptObject | ( | NPP | npp | ) |
gnash::GnashPluginScriptObject::~GnashPluginScriptObject | ( | ) |
bool gnash::GnashPluginScriptObject::AddMethod | ( | NPIdentifier | name, |
NPInvokeFunctionPtr | func | ||
) |
References NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), and NPN_IntFromIdentifier().
void gnash::GnashPluginScriptObject::AddProperty | ( | const std::string & | name, |
const std::string & | str | ||
) |
References NPN_GetStringIdentifier(), and SetProperty().
void gnash::GnashPluginScriptObject::AddProperty | ( | const std::string & | name, |
double | num | ||
) |
References NPN_GetStringIdentifier(), and SetProperty().
void gnash::GnashPluginScriptObject::AddProperty | ( | const std::string & | name, |
int | num | ||
) |
References NPN_GetStringIdentifier(), and SetProperty().
bool gnash::GnashPluginScriptObject::Construct | ( | const NPVariant * | data, |
uint32_t | argCount, | ||
NPVariant * | result | ||
) | [protected] |
References __PRETTY_FUNCTION__.
Referenced by marshalConstruct().
void gnash::GnashPluginScriptObject::Deallocate | ( | ) | [protected] |
bool gnash::GnashPluginScriptObject::Enumerate | ( | NPIdentifier ** | identifier, |
uint32_t * | count | ||
) | [protected] |
References __PRETTY_FUNCTION__.
Referenced by marshalEnumerate().
int gnash::GnashPluginScriptObject::getControlFD | ( | ) |
int gnash::GnashPluginScriptObject::getHostFD | ( | ) |
bool gnash::GnashPluginScriptObject::GetProperty | ( | NPIdentifier | name, |
NPVariant * | result | ||
) | [protected] |
References NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), NPN_IntFromIdentifier(), and gnash::GnashNPVariant::copy().
Referenced by marshalGetProperty().
int gnash::GnashPluginScriptObject::getReadFD | ( | ) | [inline] |
GnashNPVariant gnash::GnashPluginScriptObject::GetVariable | ( | const std::string & | name | ) |
Get the value of a variable from the standalone player
name | the name of the variable to set |
References gnash::plugin::ExternalInterface::makeString(), gnash::plugin::ExternalInterface::makeInvoke(), writePlayer(), data, readPlayer(), gnash::plugin::ExternalInterface::parseXML(), gnash::printNPVariant(), and gnash::GnashNPVariant::get().
Referenced by gnash::GetVariableCallback().
int gnash::GnashPluginScriptObject::getWriteFD | ( | ) | [inline] |
bool gnash::GnashPluginScriptObject::HasMethod | ( | NPIdentifier | name | ) | [protected] |
References NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), and NPN_IntFromIdentifier().
Referenced by marshalHasMethod().
bool gnash::GnashPluginScriptObject::HasProperty | ( | NPIdentifier | name | ) | [protected] |
References NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), and NPN_IntFromIdentifier().
Referenced by marshalHasProperty().
void gnash::GnashPluginScriptObject::Invalidate | ( | ) | [protected] |
bool gnash::GnashPluginScriptObject::Invoke | ( | NPObject * | npobj, |
NPIdentifier | name, | ||
const NPVariant * | args, | ||
uint32_t | argCount, | ||
NPVariant * | result | ||
) |
References NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), and NPN_IntFromIdentifier().
Referenced by marshalInvoke().
bool gnash::GnashPluginScriptObject::InvokeDefault | ( | const NPVariant * | args, |
uint32_t | argCount, | ||
NPVariant * | result | ||
) | [protected] |
References __PRETTY_FUNCTION__, NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), and NPN_IntFromIdentifier().
Referenced by marshalInvokeDefault().
NPObject * gnash::GnashPluginScriptObject::marshalAllocate | ( | NPP | npp, |
NPClass * | aClass | ||
) | [static] |
References GnashPluginScriptObject().
bool gnash::GnashPluginScriptObject::marshalConstruct | ( | NPObject * | npobj, |
const NPVariant * | data, | ||
uint32_t | count, | ||
NPVariant * | result | ||
) | [static] |
References __PRETTY_FUNCTION__, and Construct().
void gnash::GnashPluginScriptObject::marshalDeallocate | ( | NPObject * | npobj | ) | [static] |
bool gnash::GnashPluginScriptObject::marshalEnumerate | ( | NPObject * | npobj, |
void *** | identifier, | ||
uint32_t * | count | ||
) | [static] |
References __PRETTY_FUNCTION__, and Enumerate().
NPClass * gnash::GnashPluginScriptObject::marshalGetNPClass | ( | ) | [static] |
Referenced by gnash::nsPluginInstance::nsPluginInstance().
bool gnash::GnashPluginScriptObject::marshalGetProperty | ( | NPObject * | npobj, |
NPIdentifier | name, | ||
NPVariant * | result | ||
) | [static] |
References GetProperty().
bool gnash::GnashPluginScriptObject::marshalHasMethod | ( | NPObject * | npobj, |
NPIdentifier | name | ||
) | [static] |
References NPN_IdentifierIsString(), NPN_UTF8FromIdentifier(), NPN_IntFromIdentifier(), and HasMethod().
bool gnash::GnashPluginScriptObject::marshalHasProperty | ( | NPObject * | npobj, |
NPIdentifier | name | ||
) | [static] |
References HasProperty().
void gnash::GnashPluginScriptObject::marshalInvalidate | ( | NPObject * | npobj | ) | [static] |
bool gnash::GnashPluginScriptObject::marshalInvoke | ( | NPObject * | npobj, |
NPIdentifier | name, | ||
const NPVariant * | args, | ||
uint32_t | argCount, | ||
NPVariant * | result | ||
) | [static] |
References Invoke().
bool gnash::GnashPluginScriptObject::marshalInvokeDefault | ( | NPObject * | npobj, |
const NPVariant * | args, | ||
uint32_t | argCount, | ||
NPVariant * | result | ||
) | [static] |
References InvokeDefault().
bool gnash::GnashPluginScriptObject::marshalRemoveProperty | ( | NPObject * | npobj, |
NPIdentifier | name | ||
) | [static] |
References RemoveProperty().
bool gnash::GnashPluginScriptObject::marshalSetProperty | ( | NPObject * | npobj, |
NPIdentifier | name, | ||
const NPVariant * | value | ||
) | [static] |
References SetProperty().
std::string gnash::GnashPluginScriptObject::readPlayer | ( | ) |
Referenced by gnash::IsPlaying(), gnash::PercentLoaded(), gnash::TotalFrames(), gnash::remoteCallback(), and GetVariable().
std::string gnash::GnashPluginScriptObject::readPlayer | ( | int | fd | ) |
bool gnash::GnashPluginScriptObject::RemoveProperty | ( | NPIdentifier | name | ) | [protected] |
Referenced by marshalRemoveProperty().
void gnash::GnashPluginScriptObject::setControlFD | ( | int | x | ) |
Scripting API support. This is where all the protocol support lives. The ControlFD is the file descriptor for the socket connection to the standalone player. This is used when writing to the standalone player from this plugin.
References x.
void gnash::GnashPluginScriptObject::setHostFD | ( | int | x | ) |
The HostFD is the file descriptor for the socket connection to the standalone player. This is used by this plugin when reading messages from the standalone player.
References x.
bool gnash::GnashPluginScriptObject::SetProperty | ( | NPIdentifier | name, |
const NPVariant & | value | ||
) | [protected] |
Referenced by AddProperty(), and marshalSetProperty().
bool gnash::GnashPluginScriptObject::SetVariable | ( | const std::string & | name, |
const NPVariant & | value | ||
) |
Set a variable in the standalone player
name | the name of the variable to set |
value | the value to set the variable to |
References gnash::plugin::ExternalInterface::makeString(), gnash::plugin::ExternalInterface::convertNPVariant(), gnash::plugin::ExternalInterface::makeInvoke(), and writePlayer().
Referenced by gnash::SetVariableCallback().
int gnash::GnashPluginScriptObject::writePlayer | ( | const std::string & | data | ) |
int gnash::GnashPluginScriptObject::writePlayer | ( | int | fd, |
const std::string & | data | ||
) |
References gnash::amf::write().
NPClass gnash::GnashPluginScriptObject::_npclass [static] |