OpenCPN Partial API docs
|
Public Member Functions | |
bool | isPluginWritable (std::string name) |
Check if given plugin can be installed/updated. More... | |
const std::vector< PluginMetadata > | getInstalled () |
Return list of all installed plugins. More... | |
const std::vector< PluginMetadata > | getAvailable () |
Return list of available, not installed plugins. More... | |
const std::map< std::string, int > | getCountByTarget () |
Map of available plugin targets -> number of occurences. More... | |
std::string | getMetadataPath () |
Return path to metadata XML file. More... | |
void | setMetadata (std::string path) |
Set path to metadata XML file. More... | |
bool | installPlugin (PluginMetadata plugin) |
Download and install a new, not installed plugin. More... | |
bool | installPlugin (PluginMetadata plugin, std::string path) |
Install a new, downloaded but not installed plugin tarball. More... | |
bool | installPlugin (std::string path) |
Install a new, downloaded but not installed plugin tarball. More... | |
bool | uninstall (const std::string plugin) |
Uninstall an installed plugin. More... | |
bool | installPluginFromCache (PluginMetadata plugin) |
Install plugin tarball from local cache. More... | |
std::string | getLastErrorMsg () |
CatalogData * | GetCatalogData () |
Static Public Member Functions | |
static PluginHandler * | getInstance () |
static void | cleanup (const std::string &filelist, const std::string &plugname) |
Cleanup failed installation attempt using filelist for plugin. More... | |
static void | cleanupFiles (const std::string &manifestFile, const std::string &plugname) |
static std::string | fileListPath (std::string name) |
Return path to installation manifest for given plugin. More... | |
static std::string | versionPath (std::string name) |
Return path to file containing version for given plugin. More... | |
static bool | isCompatible (const PluginMetadata &metadata, const char *os=PKG_TARGET, const char *os_version=PKG_TARGET_VERSION) |
Return true if given plugin is loadable on given os/version. More... | |
Public Attributes | |
EventVar | evt_download_ok |
EventVar | evt_download_failed |
Definition at line 87 of file plugin_handler.h.
|
protected |
Definition at line 284 of file plugin_handler.cpp.
|
static |
Cleanup failed installation attempt using filelist for plugin.
Definition at line 868 of file plugin_handler.cpp.
|
static |
Definition at line 858 of file plugin_handler.cpp.
|
static |
Return path to installation manifest for given plugin.
Definition at line 279 of file plugin_handler.cpp.
const std::vector< PluginMetadata > PluginHandler::getAvailable | ( | ) |
Return list of available, not installed plugins.
Definition at line 916 of file plugin_handler.cpp.
|
inline |
Definition at line 146 of file plugin_handler.h.
const std::map< std::string, int > PluginHandler::getCountByTarget | ( | ) |
Map of available plugin targets -> number of occurences.
Definition at line 839 of file plugin_handler.cpp.
const std::vector< PluginMetadata > PluginHandler::getInstalled | ( | ) |
Return list of all installed plugins.
Definition at line 946 of file plugin_handler.cpp.
|
static |
Definition at line 772 of file plugin_handler.cpp.
|
inline |
Definition at line 144 of file plugin_handler.h.
std::string PluginHandler::getMetadataPath | ( | ) |
Return path to metadata XML file.
Definition at line 815 of file plugin_handler.cpp.
bool PluginHandler::installPlugin | ( | PluginMetadata | plugin | ) |
Download and install a new, not installed plugin.
Definition at line 990 of file plugin_handler.cpp.
bool PluginHandler::installPlugin | ( | PluginMetadata | plugin, |
std::string | path | ||
) |
Install a new, downloaded but not installed plugin tarball.
Definition at line 973 of file plugin_handler.cpp.
bool PluginHandler::installPlugin | ( | std::string | path | ) |
Install a new, downloaded but not installed plugin tarball.
Definition at line 1009 of file plugin_handler.cpp.
bool PluginHandler::installPluginFromCache | ( | PluginMetadata | plugin | ) |
Install plugin tarball from local cache.
Definition at line 1102 of file plugin_handler.cpp.
|
static |
Return true if given plugin is loadable on given os/version.
Definition at line 286 of file plugin_handler.cpp.
bool PluginHandler::isPluginWritable | ( | std::string | name | ) |
Check if given plugin can be installed/updated.
Definition at line 780 of file plugin_handler.cpp.
|
inline |
Set path to metadata XML file.
Definition at line 127 of file plugin_handler.h.
bool PluginHandler::uninstall | ( | const std::string | plugin | ) |
Uninstall an installed plugin.
Definition at line 1038 of file plugin_handler.cpp.
|
static |
Return path to file containing version for given plugin.
Definition at line 316 of file plugin_handler.cpp.
EventVar PluginHandler::evt_download_failed |
Definition at line 91 of file plugin_handler.h.
EventVar PluginHandler::evt_download_ok |
Definition at line 90 of file plugin_handler.h.