diff options
author | Saad Mohammad <[email protected]> | 2012-12-05 12:29:24 -0500 |
---|---|---|
committer | Saad Mohammad <[email protected]> | 2012-12-05 12:29:24 -0500 |
commit | 32d774ac5311656b21576bc3259ad0abff0b7f56 (patch) | |
tree | f5a41e54abc90f9335e3d940a5556422566043b6 /plugin/icedteanp/IcedTeaPluginUtils.cc | |
parent | 7be1687bb1c3dc011805824509a1765518506590 (diff) |
PR1217: Add command line arguments for plugins
Diffstat (limited to 'plugin/icedteanp/IcedTeaPluginUtils.cc')
-rw-r--r-- | plugin/icedteanp/IcedTeaPluginUtils.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/icedteanp/IcedTeaPluginUtils.cc b/plugin/icedteanp/IcedTeaPluginUtils.cc index 5ed7fe6..150694c 100644 --- a/plugin/icedteanp/IcedTeaPluginUtils.cc +++ b/plugin/icedteanp/IcedTeaPluginUtils.cc @@ -1005,6 +1005,24 @@ IcedTeaPluginUtilities::postPluginThreadAsyncCall(NPP instance, void (*func) (vo } /** + * Returns a vector of gchar* pointing to the elements of the vector string passed in. + * @param stringVec The vector of strings reference. + */ +std::vector<gchar*> +IcedTeaPluginUtilities::vectorStringToVectorGchar(const std::vector<std::string>* stringVec) +{ + std::vector<gchar*> charVec; + + for (int i = 0; i < stringVec->size(); i++) + { + gchar* element = (gchar*) stringVec->at(i).c_str(); //cast from const char + charVec.push_back(element); + } + charVec.push_back(NULL); + return charVec; +} + +/** * Runs through the async call wait queue and executes all calls * * @param param Ignored -- required to conform to NPN_PluginThreadAsynCall API |