27#ifndef _PLUGIN_LOADER_H_
28#define _PLUGIN_LOADER_H_
32#include <wx/dynarray.h>
37#include "catalog_parser.h"
38#include "observable_evtvar.h"
39#include "ocpn_plugin.h"
40#include "plugin_blacklist.h"
41#include "semantic_vers.h"
57enum class PluginStatus {
63 LegacyUpdateAvailable,
64 ManagedInstallAvailable,
65 ManagedInstalledUpdateAvailable,
66 ManagedInstalledCurrentVersion,
67 ManagedInstalledDowngradeAvailable,
87 wxString m_plugin_file;
88 wxString m_plugin_filename;
89 wxDateTime m_plugin_modification;
90 destroy_t* m_destroy_fn;
91 wxDynamicLibrary m_library;
92 wxString m_common_name;
93 wxString m_short_description;
94 wxString m_long_description;
98 PluginStatus m_pluginStatus;
107 wxString m_version_str;
109 std::string m_InstalledManagedVersion;
155 EventVar evt_plugin_loadall_finalize;
156 EventVar evt_version_incompatible_plugin;
162 bool LoadAllPlugIns(
bool enabled_plugins);
164 void SetPluginDefaultIcon(
const wxBitmap* bitmap);
165 const wxBitmap* GetPluginDefaultIcon();
169 bool UnLoadAllPlugIns();
170 bool DeactivateAllPlugIns();
172 bool UpdatePlugIns();
173 void UpdateManagedPlugins();
177 ArrayOfPlugIns* GetPlugInArray() {
return &plugin_array; }
178 bool IsPlugInAvailable(wxString commonName);
179 bool CheckPluginCompatibility(wxString plugin_file);
183 bool LoadPlugInDirectory(
const wxString &plugin_dir,
bool load_enabled);
184 bool LoadPluginCandidate(wxString file_name,
bool load_enabled);
185 std::unique_ptr<AbstractBlacklist> m_blacklist;
186 ArrayOfPlugIns plugin_array;
187 wxString m_last_error_string;
188 wxString m_plugin_location;
189 const wxBitmap* m_default_plugin_icon;
Generic event handling between between two parties like MVC Model and Controller using a shared Event...
SemanticVersion GetVersion()
Return version from plugin API.
PluginLoader is a backend module without any direct GUI functionality.
bool UnLoadPlugIn(size_t ix)
Unload, delete and remove item ix in GetPlugInArray().
EventVar evt_deactivate_plugin
Receives a malloc'ed copy of a PlugInContainer owned by listener.
Versions uses a modified semantic versioning scheme: major.minor.revision.post-tag+build.