#pragma once #include "PluginDescriptor.hpp" #include #include #include #include #include namespace Slic3r { class OrcaCloudServiceAgent; struct CloudPluginDownload { boost::filesystem::path package_path; }; class CloudPluginService { public: void set_cloud_agent(std::shared_ptr agent); std::shared_ptr get_cloud_agent() const; bool can_fetch_cloud_plugins() const; bool fetch_manifests_into_descriptors(std::vector& descriptors, std::vector& not_found, std::vector& 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& changelog, std::string& error) const; bool fetch_plugin_changelog(const std::vector& descriptors, std::unordered_map>& changelog, std::string& error) const; private: std::shared_ptr m_orca_agent = nullptr; }; } // namespace Slic3r