Gnash
0.8.10
|
#include <extension.h>
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. |
gnash::Extension::Extension | ( | ) |
References _pluginsdir.
gnash::Extension::Extension | ( | const std::string & | dir | ) |
References _pluginsdir.
gnash::Extension::~Extension | ( | ) | [inline] |
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.
symbol | The name of the module to find and initialize. |
obj | The 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 | ||
) |
References GNASH_REPORT_FUNCTION, _, _plugins, gnash::SharedLib::openLib(), and gnash::SharedLib::getInitEntry().
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, 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.
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 GNASH_REPORT_FUNCTION, gnash::key::t, gnash::key::i, gnash::key::e, _, dirent, and _modules.
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().