Public Member Functions

gnash::nsPluginInstance Class Reference

#include <plugin.h>

Collaboration diagram for gnash::nsPluginInstance:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsPluginInstance (nsPluginCreateData *)
 Constructor.
virtual ~nsPluginInstance ()
 Destructor.
NPBool init (NPWindow *aWindow)
 Initialize an instance of the plugin object.
NPBool isInitialized ()
void shut ()
 Shutdown an instantiated object.
NPError GetValue (NPPVariable variable, void *value)
NPError SetWindow (NPWindow *aWindow)
 Set the window to be used to render in.
NPError NewStream (NPMIMEType type, NPStream *stream, NPBool seekable, uint16_t *stype)
 Open a new stream. THis is called every time there is swf content.
NPError DestroyStream (NPStream *stream, NPError reason)
 Destroy the stream.
int32_t WriteReady (NPStream *stream)
 Can the stream be written to yet ?
int32_t Write (NPStream *stream, int32_t offset, int32_t len, void *buffer)
 Read the data stream from Mozilla/Firefox.
NPObject * getScriptableObject ()
const char * getEmbedURL () const
GnashPluginScriptObjectgetScriptObject ()

Constructor & Destructor Documentation

gnash::nsPluginInstance::nsPluginInstance ( nsPluginCreateData *  data  ) 
gnash::nsPluginInstance::~nsPluginInstance (  )  [virtual]

Destructor.

References gnash::cleanup_childpid().


Member Function Documentation

NPError gnash::nsPluginInstance::DestroyStream ( NPStream *  stream,
NPError  reason 
)

Destroy the stream.

Destroy the data stream we've been reading.

References ogl::close().

const char* gnash::nsPluginInstance::getEmbedURL (  )  const
NPObject* gnash::nsPluginInstance::getScriptableObject (  ) 
GnashPluginScriptObject* gnash::nsPluginInstance::getScriptObject (  )  [inline]
NPError gnash::nsPluginInstance::GetValue ( NPPVariable  variable,
void *  value 
)
NPBool gnash::nsPluginInstance::init ( NPWindow *  aWindow  ) 

Initialize an instance of the plugin object.

This methods initializes the plugin object, and is called for every movie that gets played. This is where the movie playing specific initialization goes.

References __PRETTY_FUNCTION__.

NPBool gnash::nsPluginInstance::isInitialized (  )  [inline]
NPError gnash::nsPluginInstance::NewStream ( NPMIMEType  type,
NPStream *  stream,
NPBool  seekable,
uint16_t *  stype 
)

Open a new stream. THis is called every time there is swf content.

Open a new data stream.

Opens a new incoming data stream, which is the flash movie we want to play. A URL can be pretty ugly, like in this example: http://www.shockwave.com/swf/navbar/navbar_sw.swf?atomfilms=http%3a//www.atomfilms.com/af/home/&shockwave=http%3a//www.shockwave.com&gameblast=http%3a//gameblast.shockwave.com/gb/gbHome.jsp&known=0 ../flash/gui.swf?ip_addr=foobar.com&ip_port=3660&show_cursor=true&path_prefix=../flash/&trapallkeys=true"

References NPN_PluginThreadAsyncCall().

NPError gnash::nsPluginInstance::SetWindow ( NPWindow *  aWindow  ) 

Set the window to be used to render in.

This sets up the window the plugin is supposed to render into. This calls passes in various information used by the plugin to setup the window. This may get called multiple times by each instantiated object, so it can't do much but window specific setup here.

References __FUNCTION__.

void gnash::nsPluginInstance::shut (  ) 

Shutdown an instantiated object.

This shuts down an object, and is called for every movie that gets played. This is where the movie playing specific shutdown code goes.

References ogl::close(), and gnash::GnashPluginScriptObject::closePipe().

int32_t gnash::nsPluginInstance::Write ( NPStream *  stream,
int32_t  offset,
int32_t  len,
void *  buffer 
)

Read the data stream from Mozilla/Firefox.

References gnash::amf::write().

int32_t gnash::nsPluginInstance::WriteReady ( NPStream *  stream  ) 

Can the stream be written to yet ?

Return how many bytes we can read into the buffer.


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