Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GNASH_EXTENSION_H
00020 #define GNASH_EXTENSION_H
00021
00022 #include <map>
00023 #include <vector>
00024 #include <string>
00025 #include <boost/tokenizer.hpp>
00026 #include "sharedlib.h"
00027 #include "dsodefs.h"
00028
00029
00030 namespace gnash
00031 {
00032
00033 class DSOEXPORT Extension
00034 {
00035 typedef boost::char_separator<char> Sep;
00036 typedef boost::tokenizer< Sep > Tok;
00037
00038 public:
00039
00040 Extension();
00041
00042 Extension(const std::string& dir);
00043
00044 ~Extension();
00045
00047 bool scanDir();
00048
00050
00052 bool scanDir(const std::string& dir);
00053
00056
00059 bool scanAndLoad(as_object &where);
00060
00063
00067 bool scanAndLoad(const std::string& dir, as_object &where);
00068
00069
00070 bool initModuleWithFunc(const std::string& module, const std::string& func, as_object &obj);
00071 bool initNewObject(as_object &obj);
00072 void dumpModules();
00073 protected:
00074
00076
00080 bool initModule(const std::string& module, as_object &obj);
00081
00083 std::vector<std::string> _modules;
00084
00086 std::map<std::string, SharedLib *> _plugins;
00087
00089 std::string _pluginsdir;
00090 };
00091
00092 }
00093
00094
00095 #endif
00096
00097
00098
00099
00100