Files
OrcaSlicer/src/slic3r/GUI/Jobs/BindJob.hpp
T
HanifKoh de6b0b9f2d Remove Header Usings and Aliases Nothing Depends On (#16224)
- ClipperUtils.hpp imported jtMiter, jtRound and jtSquare into the
  global namespace for every includer. No code names them there.
- BBLStatusBar.hpp, BBLStatusBarBind.hpp, BBLStatusBarPrint.hpp,
  BBLStatusBarSend.hpp and ProgressStatusBar.hpp re-exported their class
  into Slic3r::GUI. Nothing refers to the class through that namespace.
- Jobs/SendJob.hpp, Jobs/BindJob.hpp, Jobs/UpgradeNetworkJob.hpp and
  AuxiliaryDataViewModel.hpp declared "namespace fs = boost::filesystem;"
  at global scope without using it.
2026-10-07 14:23:00 +08:00

54 lines
1.5 KiB
C++

#ifndef __BindJob_HPP__
#define __BindJob_HPP__
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include <functional>
#include <string>
#include <exception>
#include <wx/event.h>
#include "Job.hpp"
class wxWindow;
namespace Slic3r {
namespace GUI {
class BindJob : public Job
{
wxWindow * m_event_handle{nullptr};
std::function<void()> m_success_fun{nullptr};
std::string m_dev_id;
std::string m_dev_ip;
std::string m_dev_model;
std::string m_sec_link;
std::string m_ssdp_version;
bool m_job_finished{ false };
bool m_improved{false};
public:
BindJob(std::string dev_id, std::string dev_ip, std::string dev_model, std::string sec_link, std::string ssdp_version);
int status_range() const
{
return 100;
}
bool is_finished() { return m_job_finished; }
void on_success(std::function<void()> success);
void update_status(Ctl &ctl, int st, const std::string &msg);
void process(Ctl &ctl) override;
void finalize(bool canceled, std::exception_ptr &eptr) override;
void set_event_handle(wxWindow* hanle);
void post_fail_event(int code, std::string info);
void set_improved(bool improved){m_improved = improved;};
};
wxDECLARE_EVENT(EVT_BIND_UPDATE_MESSAGE, wxCommandEvent);
wxDECLARE_EVENT(EVT_BIND_MACHINE_SUCCESS, wxCommandEvent);
wxDECLARE_EVENT(EVT_BIND_MACHINE_FAIL, wxCommandEvent);
}} // namespace Slic3r::GUI
#endif // ARRANGEJOB_HPP