Gnash
0.8.11dev
|
#include <extension.h>
Public Member Functions | |
Extension () | |
Extension (const std::string &dir) | |
~Extension () | |
bool | scanDir () |
Scan a directory for Gnash modules. More... | |
bool | scanDir (const std::string &dir) |
Scan the given directory for modules. More... | |
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. More... | |
Protected Attributes | |
std::vector< std::string > | _modules |
A list of modules. More... | |
std::map< std::string, SharedLib * > | _plugins |
A map of loaded modules. More... | |
std::string | _pluginsdir |
The default directory to search for modules. More... | |
gnash::Extension::Extension | ( | ) |
References _pluginsdir, and gnash::log_debug().
gnash::Extension::Extension | ( | const std::string & | dir | ) |
References _pluginsdir.
|
inline |
void gnash::Extension::dumpModules | ( | ) |
References _modules.
|
protected |
Initialize the named module within Gnash.
symbol | The name of the module to find and initialize. |
obj | The object to attach the module to. |
References _, _plugins, _pluginsdir, gnash::SharedLib::getInitEntry(), gnash::log_error(), gnash::log_security(), 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 | ( | as_object & | where | ) |
Scan the plugins directory and attach any found modules to the given object.
where | The as_object to which the modules should be attached (usually the global object) |
References _, _modules, _pluginsdir, initModule(), gnash::log_security(), and scanDir().
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.
where | The as_object to which the modules should be attached (usually the global object) |
dir | A directory to scan. |
References _pluginsdir, and scanAndLoad().
bool gnash::Extension::scanDir | ( | ) |
bool gnash::Extension::scanDir | ( | const std::string & | dir | ) |
Scan the given directory for modules.
dir | The directory to scan. |
References _, _modules, dirent, gnash::key::e, gnash::key::i, gnash::log_debug(), gnash::log_error(), name, and gnash::key::t.
|
protected |
A list of modules.
Referenced by dumpModules(), scanAndLoad(), and scanDir().
|
protected |
A map of loaded modules.
Referenced by initModule(), and initModuleWithFunc().
|
protected |
The default directory to search for modules.
Referenced by Extension(), initModule(), scanAndLoad(), and scanDir().