#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/ElegooLink.hpp>
Public Types | |
| typedef Http::ProgressFn | ProgressFn |
| typedef std::function< void(wxString)> | ErrorFn |
| typedef std::function< void(wxString, wxString)> | InfoFn |
Public Member Functions | |
| ElegooLink (DynamicPrintConfig *config) | |
| ~ElegooLink () override=default | |
| const char * | get_name () const override |
| virtual bool | test (wxString &curl_msg) const override |
| wxString | get_test_ok_msg () const override |
| wxString | get_test_failed_msg (wxString &msg) const override |
| bool | upload (PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override |
| std::string | get_sn () const override |
| bool | has_auto_discovery () const override |
| bool | can_test () const override |
| PrintHostPostUploadActions | get_post_upload_actions () const override |
| bool | upload (PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override |
| std::string | get_host () const override |
| const std::string & | get_apikey () const |
| const std::string & | get_cafile () const |
| virtual bool | supports_multiple_printers () const |
| virtual bool | get_groups (wxArrayString &) const |
| virtual bool | get_printers (wxArrayString &) const |
| virtual bool | get_storage (wxArrayString &, wxArrayString &) const |
| virtual bool | is_cloud () const |
| virtual bool | is_logged_in () const |
| virtual void | log_out () const |
| virtual bool | get_login_url (wxString &auth_url) const |
Static Public Member Functions | |
| static std::string | get_print_host_webui (DynamicPrintConfig *config) |
| static PrintHost * | get_print_host (DynamicPrintConfig *config) |
| static int | get_err_code_from_body (const std::string &body) |
Protected Member Functions | |
| virtual bool | validate_version_text (const boost::optional< std::string > &version_text) const override |
| virtual bool | upload_inner_with_host (PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const override |
| virtual bool | upload_inner_with_host (PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const |
| virtual void | set_auth (Http &http) const |
| std::string | make_url (const std::string &path) const |
| virtual wxString | format_error (const std::string &body, const std::string &error, unsigned status) const |
Static Protected Member Functions | |
| static wxString | timed_out_message () |
Protected Attributes | |
| std::string | m_host |
| std::string | m_apikey |
| std::string | m_cafile |
| bool | m_ssl_revoke_best_effort |
Private Member Functions | |
| bool | elegoo_test (wxString &curl_msg) const |
| bool | elegoo_cc2_test (wxString &curl_msg) const |
| bool | print (WebSocketClient &client, std::string timeLapse, std::string heatedBedLeveling, std::string bedType, const std::string filename, ErrorFn error_fn) const |
| bool | checkResult (WebSocketClient &client, ErrorFn error_fn) const |
| bool | loopUpload (std::string url, PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const |
| bool | loopUploadCC2 (std::string url, const std::string &host_header, PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const |
| bool | uploadPart (Http &http, std::string md5, std::string uuid, std::string path, std::string filename, size_t filesize, size_t offset, size_t length, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const |
| bool | uploadPartCC2 (Http &http, const std::string &host_header, const std::string &token, const std::string &md5, const boost::filesystem::path &path, const std::string &filename, size_t filesize, size_t offset, size_t length, ProgressFn prorgess_fn, ErrorFn error_fn) const |
| std::string | cc2_token () const |
| std::string | make_cc2_info_url () const |
| std::string | make_cc2_upload_url () const |
Private Attributes | |
| std::string | m_printerModel |
|
inherited |
|
inherited |
|
inherited |
| Slic3r::ElegooLink::ElegooLink | ( | DynamicPrintConfig * | config | ) |
References Slic3r::OctoPrint::OctoPrint(), and m_printerModel.
|
overridedefault |
|
inlineoverridevirtual |
Implements Slic3r::PrintHost.
|
private |
References Slic3r::OctoPrint::m_apikey.
Referenced by elegoo_cc2_test(), loopUploadCC2(), and make_cc2_info_url().
|
private |
Referenced by loopUpload().
|
private |
References _u8L, cc2_token(), Slic3r::PrintHost::format_error(), Slic3r::GUI::from_u8(), Slic3r::Http::get(), Slic3r::Http::get_host_header_value(), get_name(), Slic3r::http, Slic3r::OctoPrint::m_host, Slic3r::OctoPrint::m_ssl_revoke_best_effort, and make_cc2_info_url().
Referenced by test(), and upload_inner_with_host().
|
private |
References _u8L, Slic3r::PrintHost::format_error(), Slic3r::GUI::from_u8(), Slic3r::Http::get(), get_name(), Slic3r::http, Slic3r::OctoPrint::m_ssl_revoke_best_effort, Slic3r::OctoPrint::make_url(), and Slic3r::OctoPrint::set_auth().
Referenced by test(), and upload_inner_with_host().
|
protectedvirtualinherited |
References _L, and timed_out_message().
Referenced by Slic3r::Duet::connect(), Slic3r::UltiMaker::connect(), Slic3r::SimplyPrint::do_chunk_upload(), Slic3r::SimplyPrint::do_temp_upload(), Slic3r::ElegooLink::elegoo_cc2_test(), Slic3r::ElegooLink::elegoo_test(), Slic3r::PrusaLink::post_inner(), Slic3r::PrusaLink::put_inner(), Slic3r::Flashforge::request_local_api_json(), Slic3r::Duet::start_print(), Slic3r::Moonraker::start_print(), Slic3r::UltiMaker::start_print(), Slic3r::AstroBox::test(), Slic3r::CrealityPrint::test(), Slic3r::ESP3D::test(), Slic3r::FlashAir::test(), Slic3r::Moonraker::test(), Slic3r::Obico::test(), Slic3r::OctoPrint::test(), Slic3r::PrusaLink::test(), Slic3r::Repetier::test(), Slic3r::UltiMaker::test(), Slic3r::PrusaLink::test_with_method_check(), Slic3r::AstroBox::upload(), Slic3r::C3DPrinterOS::upload(), Slic3r::CrealityPrint::upload(), Slic3r::Duet::upload(), Slic3r::ESP3D::upload(), Slic3r::FlashAir::upload(), Slic3r::MKS::upload(), Slic3r::Moonraker::upload(), Slic3r::Obico::upload(), Slic3r::Repetier::upload(), Slic3r::UltiMaker::upload(), Slic3r::OctoPrint::upload_inner_with_host(), Slic3r::Flashforge::upload_local_api(), Slic3r::ElegooLink::uploadPart(), and Slic3r::ElegooLink::uploadPartCC2().
|
inlineinherited |
References m_apikey.
Referenced by Slic3r::PrusaLink::set_auth().
|
inlineinherited |
References m_cafile.
Referenced by Slic3r::PrusaLink::set_auth().
|
staticinherited |
Referenced by Slic3r::Duet::connect(), Slic3r::UltiMaker::connect(), Slic3r::Duet::upload(), Slic3r::MKS::upload(), and Slic3r::UltiMaker::upload().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Repetier.
|
inlineoverridevirtualinherited |
|
inlinevirtualinherited |
Reimplemented in Slic3r::Obico.
Referenced by Slic3r::GUI::PrinterCloudAuthDialog::PrinterCloudAuthDialog().
|
overridevirtual |
Implements Slic3r::PrintHost.
Referenced by elegoo_cc2_test(), elegoo_test(), loopUpload(), loopUploadCC2(), uploadPart(), and uploadPartCC2().
|
overridevirtual |
Implements Slic3r::PrintHost.
References m_printerModel, Slic3r::None, and Slic3r::StartPrint.
|
staticinherited |
References Slic3r::ht3DPrinterOS, Slic3r::htAstroBox, Slic3r::htCrealityPrint, Slic3r::htDuet, Slic3r::htElegooLink, Slic3r::htESP3D, Slic3r::htFlashAir, Slic3r::htFlashforge, Slic3r::htMKS, Slic3r::htMoonraker, Slic3r::htObico, Slic3r::htOctoPrint, Slic3r::htPrusaConnect, Slic3r::htPrusaLink, Slic3r::htRepetier, Slic3r::htSimplyPrint, Slic3r::htUltiMaker, Slic3r::ConfigBase::option(), and Slic3r::ptFFF.
Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::anonymous_namespace{PrinterWebViewHandler.cpp}::ElegooPrinterWebViewHandler::handle_get_sn_request(), Slic3r::GUI::anonymous_namespace{PrinterWebViewHandler.cpp}::ElegooPrinterWebViewHandler::handle_upload_request(), Slic3r::GUI::PhysicalPrinterDialog::update_printers(), and Slic3r::GUI::PhysicalPrinterDialog::update_printhost_buttons().
|
static |
References Slic3r::GUI::file_url_from_path(), Slic3r::Http::get(), Slic3r::GUI::get_app_config(), Slic3r::Http::get_host_header_value(), Slic3r::http, Slic3r::GUI::into_u8(), Slic3r::DynamicConfig::opt_string(), and Slic3r::resources_dir().
Referenced by Slic3r::PrintHost::get_print_host_webui().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Obico, and Slic3r::Repetier.
|
overridevirtual |
Get the serial number for connecting to the printer. For Elegoo CC2, the device details connection to the printer requires the serial number. Other print hosts do not need to implement this interface, and it returns an empty string by default.
Reimplemented from Slic3r::PrintHost.
References Slic3r::OctoPrint::m_apikey, Slic3r::OctoPrint::m_host, and m_printerModel.
|
inlinevirtualinherited |
Reimplemented in Slic3r::Moonraker, Slic3r::PrusaConnect, and Slic3r::PrusaLink.
|
overridevirtual |
Implements Slic3r::PrintHost.
References _L, and Slic3r::GUI::format_wxstr().
|
overridevirtual |
Implements Slic3r::PrintHost.
References _L.
|
inlineoverridevirtual |
Implements Slic3r::PrintHost.
|
inlinevirtualinherited |
Reimplemented in Slic3r::C3DPrinterOS, Slic3r::Obico, and Slic3r::SimplyPrint.
|
inlinevirtualinherited |
Reimplemented in Slic3r::C3DPrinterOS, and Slic3r::SimplyPrint.
|
inlinevirtualinherited |
Reimplemented in Slic3r::C3DPrinterOS, and Slic3r::SimplyPrint.
|
private |
References _L, Slic3r::bbl_calc_md5(), Slic3r::Http::Progress::buffer, checkResult(), Slic3r::PrintHostUpload::extended_info, Slic3r::Http::get_host_from_url(), Slic3r::Http::get_host_header_value(), get_name(), Slic3r::http, Slic3r::length(), Slic3r::OctoPrint::m_host, MAX_UPLOAD_PACKAGE_LENGTH, Slic3r::offset(), Slic3r::Http::post(), Slic3r::PrintHostUpload::post_action, print(), Slic3r::OctoPrint::set_auth(), Slic3r::PrintHostUpload::source_path, Slic3r::StartPrint, Slic3r::to_string(), Slic3r::Http::Progress::ulnow, Slic3r::PrintHostUpload::upload_path, and uploadPart().
Referenced by upload_inner_with_host().
|
private |
References _L, Slic3r::bbl_calc_md5(), Slic3r::Http::Progress::buffer, cc2_token(), get_name(), Slic3r::http, Slic3r::length(), MAX_UPLOAD_PACKAGE_LENGTH, Slic3r::offset(), Slic3r::PrintHostUpload::post_action, Slic3r::Http::put2(), Slic3r::PrintHostUpload::source_path, Slic3r::StartPrint, Slic3r::Http::Progress::ulnow, Slic3r::PrintHostUpload::upload_path, Slic3r::Http::Progress::upload_spd, and uploadPartCC2().
Referenced by upload_inner_with_host().
|
private |
References cc2_token(), and Slic3r::OctoPrint::make_url().
Referenced by elegoo_cc2_test().
|
private |
References Slic3r::OctoPrint::make_url().
Referenced by upload_inner_with_host().
|
protectedinherited |
References m_host.
Referenced by Slic3r::ElegooLink::elegoo_test(), Slic3r::PrusaLink::get_storage(), Slic3r::ElegooLink::make_cc2_info_url(), Slic3r::ElegooLink::make_cc2_upload_url(), test(), Slic3r::PrusaLink::test(), Slic3r::PrusaLink::test_with_method_check(), Slic3r::ElegooLink::upload_inner_with_host(), upload_inner_with_host(), and Slic3r::PrusaLink::upload_inner_with_host().
|
private |
References _, _L, Slic3r::btPC, Slic3r::ELEGOO_START_PRINT, L, Slic3r::SDCP_PRINT_CTRL_ACK_BUSY, Slic3r::SDCP_PRINT_CTRL_ACK_FILEIO_FAILED, Slic3r::SDCP_PRINT_CTRL_ACK_INVALID_RESOLUTION, Slic3r::SDCP_PRINT_CTRL_ACK_MD5_FAILED, Slic3r::SDCP_PRINT_CTRL_ACK_NOT_FOUND, Slic3r::SDCP_PRINT_CTRL_ACK_OK, Slic3r::SDCP_PRINT_CTRL_ACK_UNKNOW_FORMAT, Slic3r::SDCP_PRINT_CTRL_ACK_UNKNOW_MODEL, and Slic3r::to_string().
Referenced by loopUpload().
|
protectedvirtualinherited |
Reimplemented in Slic3r::PrusaLink.
References Slic3r::http, m_apikey, and m_cafile.
Referenced by Slic3r::ElegooLink::elegoo_test(), Slic3r::ElegooLink::loopUpload(), test(), and upload_inner_with_host().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Repetier.
|
overridevirtual |
Reimplemented from Slic3r::OctoPrint.
References elegoo_cc2_test(), elegoo_test(), m_printerModel, and Slic3r::OctoPrint::test().
|
staticprotectedinherited |
References _L.
Referenced by format_error(), and Slic3r::CrealityPrint::start_print().
|
override |
References Slic3r::GUI::format_wxstr(), Slic3r::GUI::get_app_config(), Slic3r::Http::get_host_from_url(), Slic3r::OctoPrint::m_host, Slic3r::Bonjour::on_resolve(), Slic3r::Bonjour::set_hostname(), Slic3r::Bonjour::set_retries(), Slic3r::Bonjour::set_timeout(), and upload_inner_with_host().
|
overridevirtualinherited |
Implements Slic3r::PrintHost.
References Slic3r::GUI::format_wxstr(), Slic3r::GUI::get_app_config(), Slic3r::Http::get_host_from_url(), m_host, Slic3r::Bonjour::on_resolve(), Slic3r::Bonjour::set_hostname(), Slic3r::Bonjour::set_retries(), Slic3r::Bonjour::set_timeout(), and upload_inner_with_host().
|
overrideprotectedvirtual |
References elegoo_cc2_test(), elegoo_test(), Slic3r::GUI::get_app_config(), Slic3r::Http::get_host_header_value(), Slic3r::GUI::into_u8(), L, loopUpload(), loopUploadCC2(), Slic3r::OctoPrint::m_host, m_printerModel, make_cc2_upload_url(), Slic3r::OctoPrint::make_url(), and Slic3r::OctoPrint::upload_inner_with_host().
Referenced by upload().
|
protectedvirtualinherited |
References Slic3r::PrintHostUpload::extended(), Slic3r::PrintHost::format_error(), Slic3r::GUI::get_app_config(), Slic3r::Http::get_host_header_value(), get_name(), Slic3r::http, Slic3r::GUI::into_u8(), L, m_host, m_ssl_revoke_best_effort, make_url(), Slic3r::Http::post(), Slic3r::PrintHostUpload::post_action, set_auth(), Slic3r::PrintHostUpload::source_path, Slic3r::StartPrint, test(), and Slic3r::PrintHostUpload::upload_path.
Referenced by upload(), and Slic3r::ElegooLink::upload_inner_with_host().
|
private |
References _L, _u8L, Slic3r::PrintHost::format_error(), get_name(), Slic3r::http, Slic3r::length(), Slic3r::OctoPrint::m_ssl_revoke_best_effort, Slic3r::offset(), Slic3r::Http::Progress::ulnow, and Slic3r::Http::Progress::ultotal.
Referenced by loopUpload().
|
private |
References _L, _u8L, Slic3r::PrintHost::format_error(), get_name(), Slic3r::http, Slic3r::length(), Slic3r::OctoPrint::m_ssl_revoke_best_effort, Slic3r::offset(), Slic3r::range(), Slic3r::Http::Progress::ulnow, and Slic3r::Http::Progress::ultotal.
Referenced by loopUploadCC2().
|
overrideprotectedvirtual |
Reimplemented from Slic3r::OctoPrint.
|
protectedinherited |
Referenced by OctoPrint(), Slic3r::ElegooLink::cc2_token(), get_apikey(), Slic3r::ElegooLink::get_sn(), and set_auth().
|
protectedinherited |
Referenced by OctoPrint(), get_cafile(), and set_auth().
|
protectedinherited |
Referenced by OctoPrint(), Slic3r::ElegooLink::elegoo_cc2_test(), get_host(), Slic3r::ElegooLink::get_sn(), Slic3r::PrusaLink::get_storage(), Slic3r::ElegooLink::loopUpload(), make_url(), Slic3r::PrusaLink::post_inner(), Slic3r::PrusaLink::put_inner(), Slic3r::ElegooLink::upload(), upload(), Slic3r::ElegooLink::upload_inner_with_host(), upload_inner_with_host(), and Slic3r::PrusaLink::upload_inner_with_host().
|
private |
Referenced by ElegooLink(), get_post_upload_actions(), get_sn(), test(), and upload_inner_with_host().
|
protectedinherited |
Referenced by OctoPrint(), Slic3r::ElegooLink::elegoo_cc2_test(), Slic3r::ElegooLink::elegoo_test(), Slic3r::PrusaLink::get_storage(), Slic3r::PrusaLink::post_inner(), Slic3r::PrusaLink::put_inner(), test(), Slic3r::PrusaLink::test(), Slic3r::PrusaLink::test_with_method_check(), upload_inner_with_host(), Slic3r::ElegooLink::uploadPart(), and Slic3r::ElegooLink::uploadPartCC2().