fix: remove heavy includes from IPrinterAgent

This commit is contained in:
Ian Chua
2026-08-25 13:54:40 +08:00
parent a1505e9bed
commit f16071f083
5 changed files with 81 additions and 87 deletions

View File

@@ -18,6 +18,7 @@
#include "boost/bimap/bimap.hpp"
#include "libslic3r/calib.hpp"
#include "libslic3r/Utils.hpp"
#include "slic3r/Utils/PrinterNetworkTypes.hpp"
#include "DeviceCore/DevDefs.h"
#include "DeviceCore/DevConfigUtil.h"
@@ -100,33 +101,6 @@ struct DevPrintTaskRatingInfo;
// given nozzle diameter (mm), bucketed per nozzle size to mirror the printer firmware.
bool is_stringing_prone_filament(const std::string& filament_id, float nozzle_diameter);
enum LiveviewLocal {
LVL_None,
LVL_Disable,
LVL_Local,
LVL_Rtsps,
LVL_Rtsp
};
enum LiveviewRemote {
LVR_None,
LVR_Tutk,
LVR_Agora,
LVR_TutkAgora
};
enum FileLocal {
FL_None,
FL_Local
};
enum FileRemote {
FR_None,
FR_Tutk,
FR_Agora,
FR_TutkAgora
};
class MachineObject
{
private:

View File

@@ -2,7 +2,6 @@
#define __I_PRINTER_AGENT_HPP__
#include "bambu_networking.hpp"
#include <slic3r/GUI/DeviceManager.hpp>
// why: these extend the BAMBU_NETWORK_* return space rather than opening a new one - the value
// flows through the same int domain callers already compare against BAMBU_NETWORK_SUCCESS.
// They live here and not in bambu_networking.hpp because that file is a vendor header replaced
@@ -16,7 +15,7 @@
#include <functional>
#include <cstdint>
#include "NetworkAgent.hpp"
#include "PrinterNetworkTypes.hpp"
namespace Slic3r {

View File

@@ -5,7 +5,7 @@
#include "libslic3r/ProjectTask.hpp"
#include "ICloudServiceAgent.hpp"
#include "slic3r/GUI/DeviceManager.hpp"
#include "PrinterNetworkTypes.hpp"
#include <map>
#include <memory>
@@ -17,50 +17,6 @@ namespace Slic3r {
class IPrinterAgent;
enum class FilamentSyncMode;
enum URL_STATE {
URL_TCP,
URL_TUTK,
};
struct CameraURLParams {
std::string ip_address;
std::string user;
std::string password;
LiveviewLocal protocol;
std::string device;
std::string network_version;
std::string device_version;
std::string refresh_url;
std::string client_id;
std::string client_version;
bool apply_meta{false};
};
struct FileTransferURLParams {
URL_STATE url_state{URL_TCP};
std::string ip_address;
std::string username;
std::string password;
std::string device_id;
std::string network_version;
std::string device_version;
std::string refresh_url;
std::string client_id;
std::string client_version;
};
struct FileTransferURLResult {
bool is_success{false};
std::string url;
int error_code{-1};
};
struct CameraURLResult {
bool is_success{false};
std::string url;
int error_code{-1};
};
// Forward declaration
class BBLNetworkPlugin;

View File

@@ -0,0 +1,78 @@
#pragma once
#include <string>
namespace Slic3r {
enum LiveviewLocal {
LVL_None,
LVL_Disable,
LVL_Local,
LVL_Rtsps,
LVL_Rtsp
};
enum LiveviewRemote {
LVR_None,
LVR_Tutk,
LVR_Agora,
LVR_TutkAgora
};
enum FileLocal {
FL_None,
FL_Local
};
enum FileRemote {
FR_None,
FR_Tutk,
FR_Agora,
FR_TutkAgora
};
enum URL_STATE {
URL_TCP,
URL_TUTK,
};
struct CameraURLParams {
std::string ip_address;
std::string user;
std::string password;
LiveviewLocal protocol;
std::string device;
std::string network_version;
std::string device_version;
std::string refresh_url;
std::string client_id;
std::string client_version;
bool apply_meta{false};
};
struct CameraURLResult {
bool is_success{false};
std::string url;
int error_code{-1};
};
struct FileTransferURLParams {
URL_STATE url_state{URL_TCP};
std::string ip_address;
std::string username;
std::string password;
std::string device_id;
std::string network_version;
std::string device_version;
std::string refresh_url;
std::string client_id;
std::string client_version;
};
struct FileTransferURLResult {
bool is_success{false};
std::string url;
int error_code{-1};
};
} // namespace Slic3r

View File

@@ -1,15 +1,3 @@
#ifdef ORCA_PYTHON_STUBGEN_MODULE
#ifdef _WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <Windows.h>
#endif
#endif
#include "PythonPluginBridge.hpp"
#include <boost/log/trivial.hpp>
@@ -25,7 +13,6 @@
#include <pybind11/stl.h>
#include "PythonInterpreter.hpp"
#include "PluginFsUtils.hpp"
#include "PluginConfig.hpp"
#include "host/PluginHost.hpp"
#include "PyPluginPackage.hpp"