mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-20 14:08:20 +00:00
* Remove Unused Project Includes and Forward-Declare Where a Type Is Only Referenced Generated with include-what-you-use and applied conservatively. Only OrcaSlicer's own headers, the ones under src/ and tests/, are removed or forward-declared; standard-library and third-party includes are left alone. An include is removed only when both the Release and the Debug configuration leave it unused, never from inside a conditional block, and never from a file with platform-specific blocks, which only gain includes. Files whose only use of a header sits behind a feature or debug macro (libvgcode's OpenGL ES and marker code, the ARACHNE/TESTS_EXPORT_SVGS debug output) keep their includes. clonable_ptr.hpp gains #pragma once; it had no include guard and was only safe while Config.hpp was its sole includer. * Remove Unused Project Includes From Files With Platform-Specific Code A Linux include-what-you-use run cannot see the code inside _WIN32, __APPLE__ or __linux__ blocks, so its verdict is only taken where nothing the removed header declares, directly or through what it includes, is named inside those blocks. Removals also have to hold in both the Release and Debug configuration and never touch a line inside a conditional block. * Restore the libslic3r Precompiled Header and Direct Includes Lost in the Platform Pass The platform-file pass treated pchheader.hpp as an ordinary header and emptied it, and left GUI_Preview.hpp and 14 other files relying on headers they no longer reached directly. * Restore MainFrame.hpp in ParamsDialog.cpp for the Windows-Only Reparent Call * Include Headers That Files Reached Through Ones the Cleanup Removed * Drop Includes Duplicated by the Cleanup or by Main's Own Additions * Leave PreciseSeam.cpp as Main Has It After the Precise Seam Rework
95 lines
3.6 KiB
C++
95 lines
3.6 KiB
C++
#ifndef __ORCA_PRINTER_AGENT_HPP__
|
|
#define __ORCA_PRINTER_AGENT_HPP__
|
|
|
|
#include "IPrinterAgent.hpp"
|
|
#include "bambu_networking.hpp"
|
|
#include <string>
|
|
#include <mutex>
|
|
#include <memory>
|
|
|
|
namespace Slic3r { class ICloudServiceAgent; }
|
|
|
|
namespace Slic3r {
|
|
|
|
/**
|
|
* OrcaPrinterAgent - Stub implementation for printer operations.
|
|
*
|
|
* All printer-related operations are currently stubs that return success.
|
|
* Actual printer connectivity requires the BBL SDK or future Orca implementation.
|
|
*/
|
|
class OrcaPrinterAgent : public IPrinterAgent {
|
|
public:
|
|
explicit OrcaPrinterAgent(std::string log_dir);
|
|
~OrcaPrinterAgent() override;
|
|
|
|
// ========================================================================
|
|
// IPrinterAgent Interface Implementation
|
|
// ========================================================================
|
|
|
|
void set_cloud_agent(std::shared_ptr<ICloudServiceAgent> cloud) override;
|
|
|
|
// Communication
|
|
int send_message(std::string dev_id, std::string json_str, int qos, int flag) override;
|
|
int connect_printer(const PrinterConnectionParams& params) override;
|
|
int disconnect_printer() override;
|
|
int send_message_to_printer(std::string dev_id, std::string json_str, int qos, int flag) override;
|
|
|
|
// Discovery
|
|
bool start_discovery(bool start, bool sending) override;
|
|
|
|
// Binding
|
|
int bind_detect(std::string dev_ip, std::string sec_link, detectResult& detect) override;
|
|
int set_server_callback(OnServerErrFn fn) override;
|
|
|
|
// Machine Selection
|
|
std::string get_user_selected_machine() override;
|
|
int set_user_selected_machine(std::string dev_id) override;
|
|
|
|
/**
|
|
* Get agent information.
|
|
*
|
|
* @return AgentInfo struct containing agent identification and descriptive information
|
|
*/
|
|
static AgentInfo get_agent_info_static();
|
|
AgentInfo get_agent_info() override { return get_agent_info_static(); }
|
|
|
|
// Print Job Operations
|
|
int start_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override;
|
|
int start_local_print_with_record(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override;
|
|
int start_send_gcode_to_sdcard(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn) override;
|
|
int start_local_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override;
|
|
int start_sdcard_print(PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn) override;
|
|
|
|
// Callbacks
|
|
int set_on_ssdp_msg_fn(OnMsgArrivedFn fn) override;
|
|
int set_on_printer_connected_fn(OnPrinterConnectedFn fn) override;
|
|
int set_on_subscribe_failure_fn(GetSubscribeFailureFn fn) override;
|
|
int set_on_message_fn(OnMessageFn fn) override;
|
|
int set_on_user_message_fn(OnMessageFn fn) override;
|
|
int set_on_local_connect_fn(OnLocalConnectedFn fn) override;
|
|
int set_on_local_message_fn(OnMessageFn fn) override;
|
|
int set_queue_on_main_fn(QueueOnMainFn fn) override;
|
|
|
|
private:
|
|
std::string log_dir;
|
|
std::string selected_machine;
|
|
std::shared_ptr<ICloudServiceAgent> m_cloud_agent;
|
|
|
|
// Callbacks
|
|
OnMsgArrivedFn on_ssdp_msg_fn;
|
|
OnPrinterConnectedFn on_printer_connected_fn;
|
|
GetSubscribeFailureFn on_subscribe_failure_fn;
|
|
OnMessageFn on_message_fn;
|
|
OnMessageFn on_user_message_fn;
|
|
OnLocalConnectedFn on_local_connect_fn;
|
|
OnMessageFn on_local_message_fn;
|
|
QueueOnMainFn queue_on_main_fn;
|
|
OnServerErrFn on_server_err_fn;
|
|
|
|
mutable std::mutex state_mutex;
|
|
};
|
|
|
|
} // namespace Slic3r
|
|
|
|
#endif // __ORCA_PRINTER_AGENT_HPP__
|