Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::OctoPrint Class Reference

#include <src/slic3r/Utils/OctoPrint.hpp>

+ Inheritance diagram for Slic3r::OctoPrint:
+ Collaboration diagram for Slic3r::OctoPrint:

Public Types

typedef Http::ProgressFn ProgressFn
 
typedef std::function< void(wxString)> ErrorFn
 
typedef std::function< void(wxString, wxString)> InfoFn
 

Public Member Functions

 OctoPrint (DynamicPrintConfig *config)
 
 ~OctoPrint () 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
 
bool has_auto_discovery () const override
 
bool can_test () const override
 
PrintHostPostUploadActions get_post_upload_actions () 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
 

Static Public Member Functions

static PrintHostget_print_host (DynamicPrintConfig *config)
 

Protected Member Functions

virtual bool validate_version_text (const boost::optional< std::string > &version_text) const
 
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
 

Protected Attributes

std::string m_host
 
std::string m_apikey
 
std::string m_cafile
 
bool m_ssl_revoke_best_effort
 

Detailed Description

Member Typedef Documentation

◆ ErrorFn

typedef std::function<void(wxString )> Slic3r::PrintHost::ErrorFn
inherited

◆ InfoFn

typedef std::function<void(wxString , wxString )> Slic3r::PrintHost::InfoFn
inherited

◆ ProgressFn

Constructor & Destructor Documentation

◆ OctoPrint()

Slic3r::OctoPrint::OctoPrint ( DynamicPrintConfig config)
160 :
161 m_host(config->opt_string("print_host")),
162 m_apikey(config->opt_string("printhost_apikey")),
163 m_cafile(config->opt_string("printhost_cafile")),
164 m_ssl_revoke_best_effort(config->opt_bool("printhost_ssl_ignore_revoke"))
165{}
std::string m_cafile
Definition OctoPrint.hpp:46
bool m_ssl_revoke_best_effort
Definition OctoPrint.hpp:47
std::string m_apikey
Definition OctoPrint.hpp:45
std::string m_host
Definition OctoPrint.hpp:44

◆ ~OctoPrint()

Slic3r::OctoPrint::~OctoPrint ( )
overridedefault

Member Function Documentation

◆ can_test()

bool Slic3r::OctoPrint::can_test ( ) const
inlineoverridevirtual

Implements Slic3r::PrintHost.

31{ return true; }

◆ format_error()

wxString Slic3r::PrintHost::format_error ( const std::string &  body,
const std::string &  error,
unsigned  status 
) const
protectedvirtualinherited
67{
68 if (status != 0) {
69 auto wxbody = wxString::FromUTF8(body.data());
70 return wxString::Format("HTTP %u: %s", status, wxbody);
71 } else {
72 return wxString::FromUTF8(error.data());
73 }
74}
static char error[256]
Definition tga.cpp:50

References error.

Referenced by Slic3r::Duet::connect(), Slic3r::PrusaLink::post_inner(), Slic3r::PrusaLink::put_inner(), Slic3r::Duet::start_print(), Slic3r::AstroBox::test(), Slic3r::FlashAir::test(), Slic3r::Moonraker::test(), test(), Slic3r::PrusaLink::test(), Slic3r::Repetier::test(), Slic3r::PrusaLink::test_with_method_check(), Slic3r::AstroBox::upload(), Slic3r::Duet::upload(), Slic3r::FlashAir::upload(), Slic3r::MKS::upload(), Slic3r::Moonraker::upload(), Slic3r::Repetier::upload(), and upload_inner_with_host().

+ Here is the caller graph for this function:

◆ get_apikey()

const std::string & Slic3r::OctoPrint::get_apikey ( ) const
inline
34{ return m_apikey; }

References m_apikey.

Referenced by Slic3r::PrusaLink::set_auth().

+ Here is the caller graph for this function:

◆ get_cafile()

const std::string & Slic3r::OctoPrint::get_cafile ( ) const
inline
35{ return m_cafile; }

References m_cafile.

Referenced by Slic3r::PrusaLink::set_auth().

+ Here is the caller graph for this function:

◆ get_groups()

virtual bool Slic3r::PrintHost::get_groups ( wxArrayString &  ) const
inlinevirtualinherited

Reimplemented in Slic3r::Repetier.

65{ return false; }

◆ get_host()

std::string Slic3r::OctoPrint::get_host ( ) const
inlineoverridevirtual

Implements Slic3r::PrintHost.

33{ return m_host; }

References m_host.

◆ get_name()

const char * Slic3r::OctoPrint::get_name ( ) const
overridevirtual

Implements Slic3r::PrintHost.

Reimplemented in Slic3r::PrusaLink, Slic3r::PrusaConnect, and Slic3r::SL1Host.

167{ return "OctoPrint"; }

Referenced by test(), and upload_inner_with_host().

+ Here is the caller graph for this function:

◆ get_post_upload_actions()

PrintHostPostUploadActions Slic3r::OctoPrint::get_post_upload_actions ( ) const
inlineoverridevirtual

◆ get_print_host()

PrintHost * Slic3r::PrintHost::get_print_host ( DynamicPrintConfig config)
staticinherited
35{
37
38 {
39 const auto opt = config->option<ConfigOptionEnum<PrinterTechnology>>("printer_technology");
40 if (opt != nullptr) {
41 tech = opt->value;
42 }
43 }
44
45 if (tech == ptFFF) {
46 const auto opt = config->option<ConfigOptionEnum<PrintHostType>>("host_type");
47 const auto host_type = opt != nullptr ? opt->value : htOctoPrint;
48
49 switch (host_type) {
50 case htOctoPrint: return new OctoPrint(config);
51 case htDuet: return new Duet(config);
52 case htFlashAir: return new FlashAir(config);
53 case htAstroBox: return new AstroBox(config);
54 case htRepetier: return new Repetier(config);
55 case htPrusaLink: return new PrusaLink(config);
56 case htPrusaConnect: return new PrusaConnect(config);
57 case htMKS: return new MKS(config);
58 case htMoonraker: return new Moonraker(config);
59 default: return nullptr;
60 }
61 } else {
62 return new SL1Host(config);
63 }
64}
PrinterTechnology
Definition Config.hpp:205
@ ptFFF
Definition Config.hpp:207
@ htMoonraker
Definition PrintConfig.hpp:47
@ htPrusaLink
Definition PrintConfig.hpp:47
@ htRepetier
Definition PrintConfig.hpp:47
@ htMKS
Definition PrintConfig.hpp:47
@ htPrusaConnect
Definition PrintConfig.hpp:47
@ htDuet
Definition PrintConfig.hpp:47
@ htOctoPrint
Definition PrintConfig.hpp:47
@ htFlashAir
Definition PrintConfig.hpp:47
@ htAstroBox
Definition PrintConfig.hpp:47
ConfigOptionEnum< PrinterTechnology >
Definition PrintConfig.hpp:1079

References Slic3r::htAstroBox, Slic3r::htDuet, Slic3r::htFlashAir, Slic3r::htMKS, Slic3r::htMoonraker, Slic3r::htOctoPrint, Slic3r::htPrusaConnect, Slic3r::htPrusaLink, Slic3r::htRepetier, Slic3r::ConfigBase::option(), Slic3r::ptFFF, and Slic3r::ConfigOptionSingle< T >::value.

Referenced by Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(), Slic3r::GUI::PhysicalPrinterDialog::update_printers(), and Slic3r::GUI::PhysicalPrinterDialog::update_printhost_buttons().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_printers()

virtual bool Slic3r::PrintHost::get_printers ( wxArrayString &  ) const
inlinevirtualinherited

Reimplemented in Slic3r::Repetier.

66{ return false; }

◆ get_storage()

virtual bool Slic3r::PrintHost::get_storage ( wxArrayString &  ,
wxArrayString &   
) const
inlinevirtualinherited

Reimplemented in Slic3r::PrusaLink, and Slic3r::PrusaConnect.

69{ return false; }

◆ get_test_failed_msg()

wxString Slic3r::OctoPrint::get_test_failed_msg ( wxString &  msg) const
overridevirtual

Implements Slic3r::PrintHost.

Reimplemented in Slic3r::PrusaLink, Slic3r::PrusaConnect, and Slic3r::SL1Host.

290{
291 return GUI::format_wxstr("%s: %s\n\n%s"
292 , _L("Could not connect to OctoPrint")
293 , msg
294 , _L("Note: OctoPrint version at least 1.1.0 is required."));
295}
wxString format_wxstr(const char *fmt, TArgs &&... args)
Definition format.hpp:42
#define _L(s)
Definition I18N.hpp:3

References _L, and Slic3r::GUI::format_wxstr().

+ Here is the call graph for this function:

◆ get_test_ok_msg()

wxString Slic3r::OctoPrint::get_test_ok_msg ( ) const
overridevirtual

Implements Slic3r::PrintHost.

Reimplemented in Slic3r::PrusaLink, Slic3r::PrusaConnect, and Slic3r::SL1Host.

285{
286 return _(L("Connection to OctoPrint works correctly."));
287}
#define _(msgid)
Definition getopt.c:87
#define L(s)
Definition I18N.hpp:18

References _, and L.

◆ has_auto_discovery()

bool Slic3r::OctoPrint::has_auto_discovery ( ) const
inlineoverridevirtual

Implements Slic3r::PrintHost.

30{ return true; }

◆ make_url()

std::string Slic3r::OctoPrint::make_url ( const std::string &  path) const
protected
528{
529 if (m_host.find("http://") == 0 || m_host.find("https://") == 0) {
530 if (m_host.back() == '/') {
531 return (boost::format("%1%%2%") % m_host % path).str();
532 } else {
533 return (boost::format("%1%/%2%") % m_host % path).str();
534 }
535 } else {
536 return (boost::format("http://%1%/%2%") % m_host % path).str();
537 }
538}

References m_host.

Referenced by Slic3r::PrusaLink::get_storage(), test(), Slic3r::PrusaLink::test(), Slic3r::PrusaLink::test_with_method_check(), upload_inner_with_host(), and Slic3r::PrusaLink::upload_inner_with_host().

+ Here is the caller graph for this function:

◆ set_auth()

void Slic3r::OctoPrint::set_auth ( Http http) const
protectedvirtual

Reimplemented in Slic3r::PrusaLink.

519{
520 http.header("X-Api-Key", m_apikey);
521
522 if (!m_cafile.empty()) {
523 http.ca_file(m_cafile);
524 }
525}

References Slic3r::Http::ca_file(), Slic3r::Http::header(), m_apikey, and m_cafile.

Referenced by test(), and upload_inner_with_host().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ supports_multiple_printers()

virtual bool Slic3r::PrintHost::supports_multiple_printers ( ) const
inlinevirtualinherited

Reimplemented in Slic3r::Repetier.

60{ return false; }

◆ test()

bool Slic3r::OctoPrint::test ( wxString &  curl_msg) const
overridevirtual

Implements Slic3r::PrintHost.

Reimplemented in Slic3r::PrusaLink.

230{
231 // Since the request is performed synchronously here,
232 // it is ok to refer to `msg` from within the closure
233 const char *name = get_name();
234
235 bool res = true;
236 auto url = make_url("api/version");
237
238 BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Get version at: %2%") % name % url;
239 // Here we do not have to add custom "Host" header - the url contains host filled by user and libCurl will set the header by itself.
240 auto http = Http::get(std::move(url));
241 set_auth(http);
242 http.on_error([&](std::string body, std::string error, unsigned status) {
243 BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error getting version: %2%, HTTP %3%, body: `%4%`") % name % error % status % body;
244 res = false;
245 msg = format_error(body, error, status);
246 })
247 .on_complete([&, this](std::string body, unsigned) {
248 BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got version: %2%") % name % body;
249
250 try {
251 std::stringstream ss(body);
252 pt::ptree ptree;
253 pt::read_json(ss, ptree);
254
255 if (! ptree.get_optional<std::string>("api")) {
256 res = false;
257 return;
258 }
259
260 const auto text = ptree.get_optional<std::string>("text");
261 res = validate_version_text(text);
262 if (! res) {
263 msg = GUI::format_wxstr(_L("Mismatched type of print host: %s"), (text ? *text : name));
264 }
265 }
266 catch (const std::exception &) {
267 res = false;
268 msg = "Could not parse server response";
269 }
270 })
271#ifdef WIN32
272 .ssl_revoke_best_effort(m_ssl_revoke_best_effort)
273 .on_ip_resolve([&](std::string address) {
274 // Workaround for Windows 10/11 mDNS resolve issue, where two mDNS resolves in succession fail.
275 // Remember resolved address to be reused at successive REST API call.
276 msg = GUI::from_u8(address);
277 })
278#endif // WIN32
279 .perform_sync();
280
281 return res;
282}
static Http get(std::string url)
Definition Http.cpp:607
virtual bool validate_version_text(const boost::optional< std::string > &version_text) const
Definition OctoPrint.cpp:513
std::string make_url(const std::string &path) const
Definition OctoPrint.cpp:527
virtual void set_auth(Http &http) const
Definition OctoPrint.cpp:518
const char * get_name() const override
Definition OctoPrint.cpp:167
virtual wxString format_error(const std::string &body, const std::string &error, unsigned status) const
Definition PrintHost.cpp:66
wxString from_u8(const std::string &str)
Definition GUI.cpp:437

References _L, error, Slic3r::PrintHost::format_error(), Slic3r::GUI::format_wxstr(), Slic3r::GUI::from_u8(), Slic3r::Http::get(), get_name(), m_ssl_revoke_best_effort, make_url(), set_auth(), and validate_version_text().

Referenced by upload_inner_with_host().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ upload()

bool Slic3r::OctoPrint::upload ( PrintHostUpload  upload_data,
ProgressFn  prorgess_fn,
ErrorFn  error_fn,
InfoFn  info_fn 
) const
overridevirtual

Implements Slic3r::PrintHost.

298{
299#ifndef WIN32
300 return upload_inner_with_host(std::move(upload_data), prorgess_fn, error_fn, info_fn);
301#else
302 std::string host = get_host_from_url(m_host);
303
304 // decide what to do based on m_host - resolve hostname or upload to ip
305 std::vector<boost::asio::ip::address> resolved_addr;
306 boost::system::error_code ec;
307 boost::asio::ip::address host_ip = boost::asio::ip::make_address(host, ec);
308 if (!ec) {
309 resolved_addr.push_back(host_ip);
310 } else if ( GUI::get_app_config()->get_bool("allow_ip_resolve") && boost::algorithm::ends_with(host, ".local")){
311 Bonjour("octoprint")
312 .set_hostname(host)
313 .set_retries(5) // number of rounds of queries send
314 .set_timeout(1) // after each timeout, if there is any answer, the resolving will stop
315 .on_resolve([&ra = resolved_addr](const std::vector<BonjourReply>& replies) {
316 for (const auto & rpl : replies) {
317 boost::asio::ip::address ip(rpl.ip);
318 ra.emplace_back(ip);
319 BOOST_LOG_TRIVIAL(info) << "Resolved IP address: " << rpl.ip;
320 }
321 })
322 .resolve_sync();
323 }
324 if (resolved_addr.empty()) {
325 // no resolved addresses - try system resolving
326 BOOST_LOG_TRIVIAL(error) << "PrusaSlicer failed to resolve hostname " << m_host << " into the IP address. Starting upload with system resolving.";
327 return upload_inner_with_host(std::move(upload_data), prorgess_fn, error_fn, info_fn);
328 } else if (resolved_addr.size() == 1) {
329 // one address resolved - upload there
330 return upload_inner_with_resolved_ip(std::move(upload_data), prorgess_fn, error_fn, info_fn, resolved_addr.front());
331 } else if (resolved_addr.size() == 2 && resolved_addr[0].is_v4() != resolved_addr[1].is_v4()) {
332 // there are just 2 addresses and 1 is ip_v4 and other is ip_v6
333 // try sending to both. (Then if both fail, show both error msg after second try)
334 wxString error_message;
335 if (!upload_inner_with_resolved_ip(std::move(upload_data), prorgess_fn
336 , [&msg = error_message, resolved_addr](wxString error) { msg = GUI::format_wxstr("%1%: %2%", resolved_addr.front(), error); }
337 , info_fn, resolved_addr.front())
338 &&
339 !upload_inner_with_resolved_ip(std::move(upload_data), prorgess_fn
340 , [&msg = error_message, resolved_addr](wxString error) { msg += GUI::format_wxstr("\n%1%: %2%", resolved_addr.back(), error); }
341 , info_fn, resolved_addr.back())
342 ) {
343
344 error_fn(error_message);
345 return false;
346 }
347 return true;
348 } else {
349 // There are multiple addresses - user needs to choose which to use.
350 size_t selected_index = resolved_addr.size();
351 IPListDialog dialog(nullptr, boost::nowide::widen(m_host), resolved_addr, selected_index);
352 if (dialog.ShowModal() == wxID_OK && selected_index < resolved_addr.size()) {
353 return upload_inner_with_resolved_ip(std::move(upload_data), prorgess_fn, error_fn, info_fn, resolved_addr[selected_index]);
354 }
355 }
356 return false;
357#endif // WIN32
358}
virtual bool upload_inner_with_host(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn, InfoFn info_fn) const
Definition OctoPrint.cpp:425
AppConfig * get_app_config()
Definition GUI.cpp:432
wchar_t * widen(wchar_t *output, size_t output_size, char const *source)
Convert NULL terminated UTF source string to NULL terminated output string of size at most output_siz...
Definition convert.hpp:95

References error, Slic3r::GUI::format_wxstr(), Slic3r::GUI::get_app_config(), m_host, Slic3r::Bonjour::on_resolve(), Slic3r::Bonjour::set_hostname(), Slic3r::Bonjour::set_retries(), Slic3r::Bonjour::set_timeout(), upload_inner_with_host(), and boost::nowide::widen().

+ Here is the call graph for this function:

◆ upload_inner_with_host()

bool Slic3r::OctoPrint::upload_inner_with_host ( PrintHostUpload  upload_data,
ProgressFn  prorgess_fn,
ErrorFn  error_fn,
InfoFn  info_fn 
) const
protectedvirtual

Reimplemented in Slic3r::PrusaLink.

426{
427 const char* name = get_name();
428
429 const auto upload_filename = upload_data.upload_path.filename();
430 const auto upload_parent_path = upload_data.upload_path.parent_path();
431
432 // If test fails, test_msg_or_host_ip contains the error message.
433 // Otherwise on Windows it contains the resolved IP address of the host.
434 wxString test_msg_or_host_ip;
435 if (!test(test_msg_or_host_ip)) {
436 error_fn(std::move(test_msg_or_host_ip));
437 return false;
438 }
439
440 std::string url;
441 bool res = true;
442
443#ifdef WIN32
444 // Workaround for Windows 10/11 mDNS resolve issue, where two mDNS resolves in succession fail.
445 if (m_host.find("https://") == 0 || test_msg_or_host_ip.empty() || !GUI::get_app_config()->get_bool("allow_ip_resolve"))
446#endif // _WIN32
447 {
448 // If https is entered we assume signed ceritificate is being used
449 // IP resolving will not happen - it could resolve into address not being specified in cert
450 url = make_url("api/files/local");
451 }
452#ifdef WIN32
453 else {
454 // Workaround for Windows 10/11 mDNS resolve issue, where two mDNS resolves in succession fail.
455 // Curl uses easy_getinfo to get ip address of last successful transaction.
456 // If it got the address use it instead of the stored in "host" variable.
457 // This new address returns in "test_msg_or_host_ip" variable.
458 // Solves troubles of uploades failing with name address.
459 // in original address (m_host) replace host for resolved ip
460 info_fn(L"resolve", test_msg_or_host_ip);
461 url = substitute_host(make_url("api/files/local"), GUI::into_u8(test_msg_or_host_ip));
462 BOOST_LOG_TRIVIAL(info) << "Upload address after ip resolve: " << url;
463 }
464#endif // _WIN32
465
466 BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Uploading file %2% at %3%, filename: %4%, path: %5%, print: %6%")
467 % name
468 % upload_data.source_path
469 % url
470 % upload_filename.string()
471 % upload_parent_path.string()
472 % (upload_data.post_action == PrintHostPostUploadAction::StartPrint ? "true" : "false");
473
474 auto http = Http::post(std::move(url));
475#ifdef WIN32
476 // "Host" header is necessary here. In the workaround above (two mDNS..) we have got IP address from test connection and subsituted it into "url" variable.
477 // And when creating Http object above, libcurl automatically includes "Host" header from address it got.
478 // Thus "Host" is set to the resolved IP instead of host filled by user. We need to change it back.
479 // Not changing the host would work on the most cases (where there is 1 service on 1 hostname) but would break when f.e. reverse proxy is used (issue #9734).
480 // Also when allow_ip_resolve = 0, this is not needed, but it should not break anything if it stays.
481 // https://www.rfc-editor.org/rfc/rfc7230#section-5.4
482 std::string host = get_host_from_url(m_host);
483 http.header("Host", host);
484#endif // _WIN32
485 set_auth(http);
486 http.form_add("print", upload_data.post_action == PrintHostPostUploadAction::StartPrint ? "true" : "false")
487 .form_add("path", upload_parent_path.string()) // XXX: slashes on windows ???
488 .form_add_file("file", upload_data.source_path.string(), upload_filename.string())
489 .on_complete([&](std::string body, unsigned status) {
490 BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: File uploaded: HTTP %2%: %3%") % name % status % body;
491 })
492 .on_error([&](std::string body, std::string error, unsigned status) {
493 BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error uploading file: %2%, HTTP %3%, body: `%4%`") % name % error % status % body;
494 error_fn(format_error(body, error, status));
495 res = false;
496 })
497 .on_progress([&](Http::Progress progress, bool& cancel) {
498 prorgess_fn(std::move(progress), cancel);
499 if (cancel) {
500 // Upload was canceled
501 BOOST_LOG_TRIVIAL(info) << name << ": Upload canceled";
502 res = false;
503 }
504 })
505#ifdef WIN32
506 .ssl_revoke_best_effort(m_ssl_revoke_best_effort)
507#endif
508 .perform_sync();
509
510 return res;
511}
bool get_bool(const std::string &section, const std::string &key) const
Definition AppConfig.hpp:61
static Http post(std::string url)
Definition Http.cpp:612
virtual bool test(wxString &curl_msg) const override
Definition OctoPrint.cpp:229
TOKEN * string(char *text)
Definition config.c:233
std::string into_u8(const wxString &str)
Definition GUI.cpp:442
STL namespace.

References error, Slic3r::PrintHost::format_error(), Slic3r::GUI::get_app_config(), Slic3r::AppConfig::get_bool(), get_name(), 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate_version_text()

bool Slic3r::OctoPrint::validate_version_text ( const boost::optional< std::string > &  version_text) const
protectedvirtual

Reimplemented in Slic3r::PrusaLink, and Slic3r::SL1Host.

514{
515 return version_text ? boost::starts_with(*version_text, "OctoPrint") : true;
516}

Referenced by test().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_apikey

std::string Slic3r::OctoPrint::m_apikey
protected

Referenced by get_apikey(), and set_auth().

◆ m_cafile

std::string Slic3r::OctoPrint::m_cafile
protected

Referenced by get_cafile(), and set_auth().

◆ m_host

◆ m_ssl_revoke_best_effort


The documentation for this class was generated from the following files: