#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/3DPrinterOS.hpp>
Public Types | |
| typedef Http::ProgressFn | ProgressFn |
| typedef std::function< void(wxString)> | ErrorFn |
| typedef std::function< void(wxString, wxString)> | InfoFn |
Public Member Functions | |
| C3DPrinterOS (DynamicPrintConfig *config) | |
| ~C3DPrinterOS () override=default | |
| const char * | get_name () const override |
| bool | test (wxString &curl_msg) const override |
| bool | login (wxString &msg) const |
| 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 |
| bool | has_auto_discovery () const override |
| bool | can_test () const override |
| bool | is_cloud () const override |
| void | log_out () const override |
| bool | is_logged_in () const override |
| PrintHostPostUploadActions | get_post_upload_actions () const override |
| std::string | get_host () const override |
| virtual bool | supports_multiple_printers () const |
| virtual std::string | get_sn () const |
| virtual bool | get_groups (wxArrayString &) const |
| virtual bool | get_printers (wxArrayString &) const |
| virtual bool | get_storage (wxArrayString &, wxArrayString &) const |
| virtual bool | get_login_url (wxString &auth_url) const |
Static Public Member Functions | |
| static std::string | default_host () |
| static PrintHost * | get_print_host (DynamicPrintConfig *config) |
| static std::string | get_print_host_webui (DynamicPrintConfig *config) |
| static int | get_err_code_from_body (const std::string &body) |
Protected Member Functions | |
| bool | validate_version_text (const boost::optional< std::string > &version_text) 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 () |
Private Member Functions | |
| void | load_api_session () |
| bool | save_api_session (const std::string &session, const std::string &email) const |
| std::string | parse_printer_model (const std::string &input) const |
| std::string | make_url (const std::string &path) const |
| std::string | get_api_auth_token (wxString &err) const |
| void | login_with_token (boost::property_tree::ptree &resp, const std::string &token) const |
| bool | check_session (wxString &msg) const |
| void | send_form (const std::string &endpoint, const std::string &postBody, boost::property_tree::ptree &responseTree) const |
| void | get_cloud_projects_list (boost::property_tree::ptree &response) const |
| void | get_cloud_printer_types (boost::property_tree::ptree &response, const std::string &querry) const |
| void | update_file (boost::property_tree::ptree &response, const std::string &file_id, const std::string &ptype, const std::string >ype) const |
Private Attributes | |
| std::string | m_host |
| std::string | m_apikey |
| std::string | m_cafile |
| std::string | m_username |
| std::string | m_host_type |
| std::string | m_preset_name |
| std::string | m_api_session_file_path |
|
inherited |
|
inherited |
|
inherited |
| Slic3r::C3DPrinterOS::C3DPrinterOS | ( | DynamicPrintConfig * | config | ) |
References Slic3r::API_CREDENTIALS_PATH, Slic3r::data_dir(), load_api_session(), m_api_session_file_path, m_apikey, m_host, and m_preset_name.
|
overridedefault |
|
inlineoverridevirtual |
Implements Slic3r::PrintHost.
|
private |
References _L, m_apikey, and send_form().
Referenced by test(), and upload().
|
inlinestatic |
Referenced by Slic3r::GUI::PhysicalPrinterDialog::update().
|
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().
|
private |
References _L, send_form(), and Slic3r::Http::url_encode().
Referenced by login().
|
private |
References m_apikey, send_form(), and Slic3r::Http::url_encode().
Referenced by upload().
|
private |
References m_apikey, and send_form().
Referenced by upload().
|
staticinherited |
Referenced by Slic3r::Duet::connect(), Slic3r::UltiMaker::connect(), Slic3r::Duet::upload(), Slic3r::MKS::upload(), and Slic3r::UltiMaker::upload().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Repetier.
|
inlineoverridevirtual |
|
inlinevirtualinherited |
Reimplemented in Slic3r::Obico.
Referenced by Slic3r::GUI::PrinterCloudAuthDialog::PrinterCloudAuthDialog().
|
overridevirtual |
Implements Slic3r::PrintHost.
Referenced by upload().
|
inlineoverridevirtual |
|
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().
|
staticinherited |
References Slic3r::ElegooLink::get_print_host_webui(), Slic3r::htElegooLink, Slic3r::htOctoPrint, Slic3r::DynamicConfig::opt_string(), Slic3r::ConfigBase::option(), and Slic3r::ConfigOptionSingle< T >::value.
Referenced by Slic3r::GUI::MainFrame::load_printer_url(), Slic3r::GUI::Plater::priv::on_tab_selection_changing(), and Slic3r::GUI::Sidebar::update_all_preset_comboboxes().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Obico, and Slic3r::Repetier.
|
inlinevirtualinherited |
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 in Slic3r::ElegooLink.
|
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, Slic3r::GUI::format_wxstr(), and m_username.
|
inlineoverridevirtual |
Implements Slic3r::PrintHost.
|
inlineoverridevirtual |
Reimplemented from Slic3r::PrintHost.
|
inlineoverridevirtual |
|
private |
References m_api_session_file_path, m_apikey, and m_username.
Referenced by C3DPrinterOS().
|
overridevirtual |
Reimplemented from Slic3r::PrintHost.
References m_api_session_file_path.
| bool Slic3r::C3DPrinterOS::login | ( | wxString & | msg | ) | const |
References _L, get_api_auth_token(), login_with_token(), make_url(), and save_api_session().
|
private |
References m_cafile, and make_url().
Referenced by login().
|
private |
References m_host.
Referenced by login(), login_with_token(), send_form(), and upload().
|
private |
|
private |
References m_api_session_file_path, and Slic3r::write_file_atomically().
Referenced by login().
|
private |
References _u8L, Slic3r::http, m_cafile, make_url(), and Slic3r::Http::post().
Referenced by check_session(), get_api_auth_token(), get_cloud_printer_types(), get_cloud_projects_list(), and update_file().
|
inlinevirtualinherited |
Reimplemented in Slic3r::Repetier.
|
overridevirtual |
Implements Slic3r::PrintHost.
References check_session().
|
staticprotectedinherited |
References _L.
Referenced by format_error(), and Slic3r::CrealityPrint::start_print().
|
private |
References m_apikey, send_form(), and Slic3r::Http::url_encode().
Referenced by upload().
|
overridevirtual |
Implements Slic3r::PrintHost.
References _L, _u8L, check_session(), Slic3r::PrintHost::format_error(), get_cloud_printer_types(), get_cloud_projects_list(), get_name(), Slic3r::http, m_apikey, m_cafile, m_preset_name, make_url(), Slic3r::Http::post(), Slic3r::PrintHostUpload::post_action, Slic3r::PrintHostUpload::source_path, Slic3r::StartPrint, update_file(), Slic3r::PrintHostUpload::upload_path, and Slic3r::PrintHostUpload::use_3mf.
|
protected |
|
private |
Referenced by C3DPrinterOS(), load_api_session(), log_out(), and save_api_session().
|
private |
Referenced by C3DPrinterOS(), check_session(), get_cloud_printer_types(), get_cloud_projects_list(), is_logged_in(), load_api_session(), update_file(), and upload().
|
private |
Referenced by login_with_token(), send_form(), and upload().
|
private |
Referenced by C3DPrinterOS(), get_host(), and make_url().
|
private |
|
private |
Referenced by C3DPrinterOS(), and upload().
|
private |
Referenced by get_test_ok_msg(), and load_api_session().