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

#include <extension.h>

List of all members.

Public Member Functions

 Extension ()
 Extension (const std::string &dir)
 ~Extension ()
bool scanDir ()
 Scan a directory for Gnash modules.
bool scanDir (const std::string &dir)
 Scan the given directory for modules.
bool scanAndLoad (as_object &where)
bool scanAndLoad (const std::string &dir, as_object &where)
bool initModuleWithFunc (const std::string &module, const std::string &func, as_object &obj)
bool initNewObject (as_object &obj)
void dumpModules ()

Protected Member Functions

bool initModule (const std::string &module, as_object &obj)
 Initialize the named module within Gnash.

Protected Attributes

std::vector< std::string > _modules
 A list of modules.
std::map< std::string,
SharedLib * > 
_plugins
 A map of loaded modules.
std::string _pluginsdir
 The default directory to search for modules.

Constructor & Destructor Documentation

gnash::Extension::Extension ( )

References _pluginsdir.

gnash::Extension::Extension ( const std::string &  dir)

References _pluginsdir.

gnash::Extension::~Extension ( ) [inline]

Member Function Documentation

void gnash::Extension::dumpModules ( )

References GNASH_REPORT_FUNCTION, and _modules.

bool gnash::Extension::initModule ( const std::string &  module,
as_object obj 
) [protected]

Initialize the named module within Gnash.

Parameters:
symbolThe name of the module to find and initialize.
objThe object to attach the module to.

References _, _pluginsdir, _plugins, gnash::SharedLib::openLib(), and gnash::SharedLib::getInitEntry().

Referenced by scanAndLoad().

bool gnash::Extension::initModuleWithFunc ( const std::string &  module,
const std::string &  func,
as_object obj 
)
bool gnash::Extension::initNewObject ( as_object obj)
bool gnash::Extension::scanAndLoad ( as_object where)

Scan the plugins directory and attach any found modules to the given object.

Parameters:
whereThe as_object to which the modules should be attached (usually the global object)

References _modules, scanDir(), _pluginsdir, _, and initModule().

Referenced by scanAndLoad().

bool gnash::Extension::scanAndLoad ( const std::string &  dir,
as_object where 
)

Scan the given directory and attach any found modules to the given object.

Parameters:
whereThe as_object to which the modules should be attached (usually the global object)
dirA directory to scan.

References _pluginsdir, and scanAndLoad().

bool gnash::Extension::scanDir ( )

Scan a directory for Gnash modules.

References _pluginsdir.

Referenced by scanAndLoad().

bool gnash::Extension::scanDir ( const std::string &  dir)

Scan the given directory for modules.

Parameters:
dirThe directory to scan.

References GNASH_REPORT_FUNCTION, gnash::key::t, gnash::key::i, gnash::key::e, _, dirent, and _modules.


Member Data Documentation

std::vector<std::string> gnash::Extension::_modules [protected]

A list of modules.

Referenced by scanAndLoad(), scanDir(), and dumpModules().

std::map<std::string, SharedLib *> gnash::Extension::_plugins [protected]

A map of loaded modules.

Referenced by initModule(), and initModuleWithFunc().

std::string gnash::Extension::_pluginsdir [protected]

The default directory to search for modules.

Referenced by Extension(), scanAndLoad(), initModule(), and scanDir().


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