mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-21 07:52:32 +00:00
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.
46 lines
1.6 KiB
C++
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
|