Namespaces | Defines | Functions | Variables

plugin.cpp File Reference

#include <cstdlib>
#include <stdlib.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
#include <boost/format.hpp>
#include "plugin.h"
#include "GnashSystemIOHeaders.h"
#include "StringPredicates.h"
#include "external.h"
#include "callbacks.h"
#include "npapi.h"
#include "npruntime.h"
#include "npfunctions.h"
#include "GnashNPVariant.h"
#include <boost/tokenizer.hpp>
#include <boost/algorithm/string/join.hpp>
#include <sys/param.h>
#include <csignal>
#include <cstdio>
#include <cstddef>
#include <cstring>
#include <sys/stat.h>
#include <sys/wait.h>
#include <fcntl.h>
#include <cerrno>
#include <climits>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <sstream>
#include "pluginScriptObject.h"
Include dependency graph for plugin.cpp:

Namespaces

namespace  gnash
 

Anonymous namespace for callbacks, local functions, event handlers etc.


Defines

#define MIME_TYPES_HANDLED   "application/x-shockwave-flash"
#define PLUGIN_NAME   "Shockwave Flash"
#define MIME_TYPES_DESCRIPTION   MIME_TYPES_HANDLED":swf:"PLUGIN_NAME
#define FLASH_VERSION
#define PLUGIN_DESCRIPTION   "Shockwave Flash "FLASH_VERSION"<br>Gnash "VERSION", the GNU SWF Player. \ Copyright (C) 2006, 2007, 2008, 2009, 2010 \ <a href=\"http://www.fsf.org\">Free \ Software Foundation</a>, Inc. <br> \ Gnash comes with NO WARRANTY, to the extent permitted by law. \ You may redistribute copies of Gnash under the terms of the \ <a href=\"http://www.gnu.org/licenses/gpl.html\">GNU General Public \ License</a>. For more information about Gnash, see <a \ href=\"http://www.gnu.org/software/gnash/\"> \ http://www.gnu.org/software/gnash</a>. \ <br>\ Compatible Shockwave Flash "FLASH_VERSION
#define PATH_MAX   1024

Functions

char * NPP_GetMIMEDescription (void)
 Return the MIME Type description for this plugin.
NPError NS_PluginInitialize ()
 Initialize the plugin.
void NS_PluginShutdown ()
 Shutdown the plugin.
NPError NS_PluginGetValue (NPPVariable aVariable, void *aValue)
 Retrieve values from the plugin for the Browser.
nsPluginInstanceBase * NS_NewPluginInstance (nsPluginCreateData *aCreateDataStruct)
 construct our plugin instance object
void NS_DestroyPluginInstance (nsPluginInstanceBase *aPlugin)
 destroy our plugin instance object
gboolean gnash::cleanup_childpid (gpointer data)
std::string gnash::getGnashExecutable ()
void gnash::create_standalone_launcher (const std::string &page_url, const std::string &swf_url, const std::map< std::string, std::string > &params)
template<std::size_t N>
void gnash::close_fds (const int(&except)[N])
void gnash::wait_for_gdb ()
void gnash::processLog_error (const boost::format &fmt)
void gnash::processLog_debug (const boost::format &fmt)
void gnash::processLog_trace (const boost::format &fmt)

Variables

NPNetscapeFuncs NPNFuncs
NPPluginFuncs NPPFuncs
NPBool gnash::plugInitialized = FALSE

Define Documentation

#define FLASH_VERSION
Value:
DEFAULT_FLASH_MAJOR_VERSION"."\
    DEFAULT_FLASH_MINOR_VERSION" r"DEFAULT_FLASH_REV_NUMBER"."
#define MIME_TYPES_DESCRIPTION   MIME_TYPES_HANDLED":swf:"PLUGIN_NAME
#define MIME_TYPES_HANDLED   "application/x-shockwave-flash"
#define PATH_MAX   1024

Referenced by NS_PluginInitialize().

#define PLUGIN_DESCRIPTION   "Shockwave Flash "FLASH_VERSION"<br>Gnash "VERSION", the GNU SWF Player. \ Copyright (C) 2006, 2007, 2008, 2009, 2010 \ <a href=\"http://www.fsf.org\">Free \ Software Foundation</a>, Inc. <br> \ Gnash comes with NO WARRANTY, to the extent permitted by law. \ You may redistribute copies of Gnash under the terms of the \ <a href=\"http://www.gnu.org/licenses/gpl.html\">GNU General Public \ License</a>. For more information about Gnash, see <a \ href=\"http://www.gnu.org/software/gnash/\"> \ http://www.gnu.org/software/gnash</a>. \ <br>\ Compatible Shockwave Flash "FLASH_VERSION
#define PLUGIN_NAME   "Shockwave Flash"

Referenced by NS_PluginGetValue().


Function Documentation

char* NPP_GetMIMEDescription ( void   ) 

Return the MIME Type description for this plugin.

void NS_DestroyPluginInstance ( nsPluginInstanceBase *  aPlugin  ) 

destroy our plugin instance object

This destroys our instantiated object via a C++ function used by the browser.

nsPluginInstanceBase* NS_NewPluginInstance ( nsPluginCreateData *  aCreateDataStruct  ) 

construct our plugin instance object

This instantiates a new object via a C++ function used by the browser.

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 FALSE, PLUGIN_NAME, and TRUE.

NPError NS_PluginInitialize (  ) 

Initialize the plugin.

This C++ function gets called once when the plugin is loaded, regardless of how many instantiations there is actually playing movies. So this is where all the one time only initialization stuff goes.

References NPN_GetValue(), PATH_MAX, and gnash::plugInitialized.

void NS_PluginShutdown (  ) 

Shutdown the plugin.

This C++ function gets called once when the plugin is being shutdown, regardless of how many instantiations actually are playing movies. So this is where all the one time only shutdown stuff goes.

References gnash::plugInitialized.


Variable Documentation

NPNetscapeFuncs NPNFuncs
NPPluginFuncs NPPFuncs