OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
PluginFsUtils.hpp File Reference
#include "PluginDescriptor.hpp"
#include <pybind11/pytypes.h>
#include <nlohmann/json.hpp>
#include <pybind11/pybind11.h>
#include <boost/filesystem/path.hpp>
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
#include <pybind11/cast.h>
Include dependency graph for PluginFsUtils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Slic3r::PluginPermissions
struct  Slic3r::PluginInstallState

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Macros

#define PLUGIN_SUBSCRIBED_DIR   "_subscribed"
#define PLUGIN_DATA_DIR   "plugin_data"

Functions

pybind11::object Slic3r::json_to_py (const nlohmann::json &j, int depth=0)
nlohmann::json Slic3r::py_to_json (const pybind11::handle &o, int depth=0)
std::string Slic3r::get_cloud_plugin_dir (const std::string &user_id)
std::string Slic3r::get_orca_plugins_dir ()
boost::filesystem::path Slic3r::resolve_plugin_root_from_descriptor (const PluginDescriptor &descriptor)
bool Slic3r::is_plugin_root_allowed (const boost::filesystem::path &candidate_root, const std::vector< std::string > &allowed_dirs)
bool Slic3r::resolve_allowed_plugin_root (const PluginDescriptor &descriptor, const std::vector< std::string > &allowed_dirs, const std::string &out_of_scope_error, boost::filesystem::path &resolved_root, std::string &error)
bool Slic3r::delete_plugin_root (const boost::filesystem::path &resolved_root, const std::string &plugin_id, std::string &error)
std::vector< std::string > Slic3r::get_plugin_directories (const std::string &cloud_user_id)
std::vector< PluginDescriptor > Slic3r::discover_plugin_packages (const std::vector< std::string > &dirs, std::string &error)
bool Slic3r::is_ignored_plugin_directory (const boost::filesystem::path &path)
bool Slic3r::is_safe_relative_path (const boost::filesystem::path &path)
bool Slic3r::is_valid_plugin_id (const std::string &id)
bool Slic3r::extract_zip_to_directory (const boost::filesystem::path &zip_path, const boost::filesystem::path &destination, std::string &error)
bool Slic3r::read_python_plugin_metadata (const boost::filesystem::path &py_path, PluginDescriptor &descriptor, std::string &error)
bool Slic3r::read_wheel_plugin_metadata (const boost::filesystem::path &whl_path, PluginDescriptor &descriptor, std::string &error)
boost::filesystem::path Slic3r::find_installed_plugin_entry (const boost::filesystem::path &plugin_dir, std::string &error)
std::vector< std::string > Slic3r::collect_resource_texture_files (const std::string &dir, const std::string &plugin_root, std::string &error)
bool Slic3r::write_install_state (const boost::filesystem::path &plugin_dir, const PluginInstallState &state)
bool Slic3r::write_install_state (const boost::filesystem::path &plugin_dir, const PluginDescriptor &entry, bool enabled, const std::vector< std::pair< std::string, bool > > &capabilities)
bool Slic3r::write_install_state (const boost::filesystem::path &plugin_dir, const PluginDescriptor &entry)
void Slic3r::seed_install_metadata (PluginInstallState &state, const PluginDescriptor &entry)
bool Slic3r::read_install_state (const boost::filesystem::path &plugin_dir, PluginDescriptor &entry)
bool Slic3r::read_install_state (const boost::filesystem::path &plugin_dir, PluginInstallState &out)

Variables

constexpr int Slic3r::kMaxJsonConversionDepth = 200

Class Documentation

◆ Slic3r::PluginPermissions

struct Slic3r::PluginPermissions
Collaboration diagram for Slic3r::PluginPermissions:
Class Members
vector< string > events
vector< string > fs_read
vector< string > fs_readwrite
vector< string > network_http
vector< string > network_socket
vector< string > process
vector< string > threading

◆ Slic3r::PluginInstallState

struct Slic3r::PluginInstallState
Collaboration diagram for Slic3r::PluginInstallState:
Class Members
vector< pair< string, bool > > capabilities
string cloud_uuid
bool enabled = true
string installed_from
string installed_version
PluginPermissions permissions
string plugin_name

Macro Definition Documentation

◆ PLUGIN_DATA_DIR

#define PLUGIN_DATA_DIR   "plugin_data"

◆ PLUGIN_SUBSCRIBED_DIR

#define PLUGIN_SUBSCRIBED_DIR   "_subscribed"