Gnash  0.8.10
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions
gnash::GnashPluginScriptObject Class Reference

#include <pluginScriptObject.h>

List of all members.

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)

Constructor & Destructor Documentation

gnash::GnashPluginScriptObject::GnashPluginScriptObject ( )

Referenced by marshalAllocate().

gnash::GnashPluginScriptObject::GnashPluginScriptObject ( NPP  npp)
gnash::GnashPluginScriptObject::~GnashPluginScriptObject ( )

Member Function Documentation

bool gnash::GnashPluginScriptObject::AddMethod ( NPIdentifier  name,
NPInvokeFunctionPtr  func 
)
void gnash::GnashPluginScriptObject::AddProperty ( const std::string &  name,
const std::string &  str 
)
void gnash::GnashPluginScriptObject::AddProperty ( const std::string &  name,
double  num 
)
void gnash::GnashPluginScriptObject::AddProperty ( const std::string &  name,
int  num 
)
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]
int gnash::GnashPluginScriptObject::getReadFD ( ) [inline]
GnashNPVariant gnash::GnashPluginScriptObject::GetVariable ( const std::string &  name)

Get the value of a variable from the standalone player

Parameters:
namethe name of the variable to set
Returns:
the value as returned by the standalone player

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]
bool gnash::GnashPluginScriptObject::HasProperty ( NPIdentifier  name) [protected]
void gnash::GnashPluginScriptObject::Invalidate ( ) [protected]
bool gnash::GnashPluginScriptObject::Invoke ( NPObject *  npobj,
NPIdentifier  name,
const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
)
bool gnash::GnashPluginScriptObject::InvokeDefault ( const NPVariant *  args,
uint32_t  argCount,
NPVariant *  result 
) [protected]
NPObject * gnash::GnashPluginScriptObject::marshalAllocate ( NPP  npp,
NPClass *  aClass 
) [static]
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]
bool gnash::GnashPluginScriptObject::marshalGetProperty ( NPObject *  npobj,
NPIdentifier  name,
NPVariant *  result 
) [static]

References GetProperty().

bool gnash::GnashPluginScriptObject::marshalHasMethod ( NPObject *  npobj,
NPIdentifier  name 
) [static]
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 ( )
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

Parameters:
namethe name of the variable to set
valuethe value to set the variable to
Returns:
true or false based on the status of the invoke call

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().


Member Data Documentation


The documentation for this class was generated from the following files: