Files
OrcaSlicer/src/slic3r/plugin/CloudPluginService.hpp
T
SoftFever a62fb17e03 Remove cloud deletion of owned plugins from the plugin dialog (#14946)
Owned ("Mine") cloud plugins now offer the same local-only Delete as local
plugins: it removes the installed package and leaves the plugin in the cloud,
still reinstallable. Deleting a plugin from the cloud belongs on the plugin hub
and is no longer reachable from OrcaSlicer, so the whole cloud-delete chain is
removed down to the REST binding.

The deleted row is restored locally instead of via a blocking cloud refetch, so
it survives being offline, and it comes back without the deleted package's error
state.
2026-07-25 22:31:40 +08:00

46 lines
1.6 KiB
C++

#pragma once
#include "PluginDescriptor.hpp"
#include <boost/filesystem/path.hpp>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
namespace Slic3r {
class OrcaCloudServiceAgent;
struct CloudPluginDownload
{
boost::filesystem::path package_path;
};
class CloudPluginService
{
public:
void set_cloud_agent(std::shared_ptr<OrcaCloudServiceAgent> agent);
std::shared_ptr<OrcaCloudServiceAgent> get_cloud_agent() const;
bool can_fetch_cloud_plugins() const;
bool fetch_manifests_into_descriptors(std::vector<PluginDescriptor>& descriptors,
std::vector<std::string>& not_found,
std::vector<std::string>& unauthorized) const;
bool request_cloud_subscribe(const std::string& plugin_uuid, std::string& error) const;
bool request_cloud_unsubscribe(const PluginDescriptor& plugin, std::string& error) const;
bool download_cloud_plugin(PluginDescriptor& entry,
const std::string& requested_version,
CloudPluginDownload& download,
std::string& error) const;
bool fetch_plugin_changelog(const PluginDescriptor& descriptor, std::vector<PluginChangelog>& changelog, std::string& error) const;
bool fetch_plugin_changelog(const std::vector<PluginDescriptor>& descriptors,
std::unordered_map<std::string, std::vector<PluginChangelog>>& changelog,
std::string& error) const;
private:
std::shared_ptr<OrcaCloudServiceAgent> m_orca_agent = nullptr;
};
} // namespace Slic3r