mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-08 00:01:09 +00:00
Merge branch 'main' into feat/plugin-lifecycle-evts
This commit is contained in:
@@ -143,6 +143,10 @@ public:
|
||||
bool try_get_plugin_descriptor_for_capability(const std::string& capability_name,
|
||||
PluginCapabilityType type,
|
||||
PluginDescriptor& out) const;
|
||||
// Per-plugin storage directory under orca_plugins/plugin_data, created if missing. Throws
|
||||
// std::runtime_error if the plugin is unregistered, the key is invalid, or (cloud plugins)
|
||||
// no user is logged in yet.
|
||||
std::string get_storage_dir(const std::string& plugin_key) const;
|
||||
|
||||
std::vector<std::shared_ptr<PluginCapabilityInterface>> get_plugin_capabilities(
|
||||
const std::string& plugin_key = "", // "" => all plugins
|
||||
@@ -155,6 +159,8 @@ public:
|
||||
PluginCapabilityType type = PluginCapabilityType::Unknown,
|
||||
bool only_enabled = true) const;
|
||||
|
||||
bool get_install_state(const std::string& plugin_key, PluginInstallState& install_state);
|
||||
|
||||
void load_plugin(const std::string& plugin_key, bool skip_deps = false, std::vector<std::string> capabilities_to_enable = {});
|
||||
bool unload_plugin(const std::string& plugin_key);
|
||||
void unload_all_plugins();
|
||||
@@ -253,6 +259,9 @@ private:
|
||||
|
||||
// Writes the sidecar for a loaded plugin (enabled=true plus the current per-capability flags).
|
||||
void write_loaded_plugin_install_state(const std::string& plugin_key);
|
||||
void mark_plugin_install_state_disabled(const std::string& plugin_key);
|
||||
// Revoke permissions after a package replacement so the new package must request them again.
|
||||
void revoke_plugin_permissions(const std::string& plugin_key);
|
||||
|
||||
bool finalize_cloud_plugin_removal(const PluginDescriptor& plugin, bool keep_local, std::string& error);
|
||||
bool delete_installed_plugin_package(const PluginDescriptor& plugin, std::string& error);
|
||||
|
||||
Reference in New Issue
Block a user