Public Member Functions | Protected Member Functions | Protected Attributes

gnash::Extension Class Reference

#include <extension.h>

Inheritance diagram for gnash::Extension:
Inheritance graph
[legend]

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 (  ) 
gnash::Extension::Extension ( const std::string &  dir  ) 
gnash::Extension::~Extension (  ) 

Member Function Documentation

void gnash::Extension::dumpModules (  ) 

References _modules.

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

Initialize the named module within Gnash.

Parameters:
symbol The name of the module to find and initialize.
obj The object to attach the module to.

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

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 ( const std::string &  dir,
as_object where 
)

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

Parameters:
where The as_object to which the modules should be attached (usually the global object)
dir A directory to scan.

References _pluginsdir, lt_dlsetsearchpath(), and scanAndLoad().

bool gnash::Extension::scanAndLoad ( as_object where  ) 

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

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

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

Referenced by 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:
dir The directory to scan.

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


Member Data Documentation

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

A list of modules.

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

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

A map of loaded modules.

Referenced by cygnal::Handler::initModule(), initModule(), and initModuleWithFunc().

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

The default directory to search for modules.

Referenced by Extension(), cygnal::Handler::initModule(), initModule(), scanAndLoad(), and scanDir().


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