Files
OrcaSlicer/src/slic3r/GUI/Jobs/SendJob.hpp
T
HanifKoh 1a5f91d727 Add Missing Includes Across src/slic3r/GUI (#16048)
* Add Missing Includes Across src/slic3r/GUI

Every GUI source and header now directly includes the headers declaring what it uses, rather than relying on the precompiled header or transitive includes. Generated with clang-tidy misc-include-cleaner, plus one hand edit making CalibrationPanel.hpp self-contained.

* Drop the OS-Specific Includes Added Outside Their Platform Guards

GLib, GTK, D-Bus and POSIX headers are only used inside platform #if blocks, which already include them. Added unconditionally at the top of the file they broke the Windows build.

* Add the clang-tidy Configuration That Generated These Includes

Only misc-include-cleaner's missing-include check, with the headers it must never suggest: per-platform, internal and OS-specific ones that would break other platforms or are not meant to be included directly.

* Match Windows Paths in the clang-tidy Ignore List

Header paths use backslashes on Windows, so every / in a pattern is now [/\\]. The Windows SDK headers are ignored alongside the other OS-specific ones, and the list is one pattern per line. Suggested by @raistlin7447 from a Windows clang-cl run.
2026-10-02 14:56:56 +08:00

80 lines
2.3 KiB
C++

#ifndef SendJOB_HPP
#define SendJOB_HPP
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include <functional>
#include <string>
#include <wx/string.h>
#include <exception>
#include "slic3r/GUI/DeviceCore/DevStorage.h"
#include "Job.hpp"
#include "PrintJob.hpp"
namespace fs = boost::filesystem;
namespace Slic3r {
namespace GUI {
class Plater;
typedef std::function<void(int status, int code, std::string msg)> OnUpdateStatusFn;
typedef std::function<bool()> WasCancelledFn;
class SendJob : public Job
{
PrintPrepareData job_data;
std::string m_dev_id;
bool m_job_finished{ false };
bool m_lifecycle_started{ false };
bool m_lifecycle_finished{ false };
int m_print_job_completed_id = 0;
bool m_is_check_mode{false};
bool m_check_and_continue{false};
std::function<void()> m_success_fun{nullptr};
std::function<void(int)> m_enter_ip_address_fun_fail{nullptr};
std::function<void()> m_enter_ip_address_fun_success{nullptr};
Plater *m_plater;
public:
void prepare();
SendJob(std::string dev_id = "");
std::string m_project_name;
std::string m_dev_ip;
std::string m_access_code;
std::string task_bed_type;
std::string task_ams_mapping;
std::string connection_type;
bool m_local_use_ssl_for_ftp{true};
bool m_local_use_ssl{true};
bool cloud_print_only { false };
bool has_sdcard { false };
bool task_use_ams { true };
DevStorage::SdcardState sdcard_state = DevStorage::SdcardState::NO_SDCARD;
wxWindow* m_parent{nullptr};
int status_range() const
{
return 100;
}
wxString get_http_error_msg(unsigned int status, std::string body);
void set_check_mode() {m_is_check_mode = true;};
void check_and_continue() {m_check_and_continue = true;};
bool is_finished() { return m_job_finished; }
void process(Ctl &ctl) override;
void on_success(std::function<void()> success);
void on_check_ip_address_fail(std::function<void(int)> func);
void on_check_ip_address_success(std::function<void()> func);
void finalize(bool canceled, std::exception_ptr &) override;
void set_project_name(std::string name);
};
}}
#endif