Printhost: Polish error handling, bugfixes

This commit is contained in:
Vojtech Kral 2018-12-19 18:43:03 +01:00
parent c40b8aba24
commit 3b2c28fa89
8 changed files with 52 additions and 34 deletions

View file

@ -3,6 +3,7 @@
#include <memory>
#include <string>
#include <functional>
#include <boost/filesystem/path.hpp>
#include <wx/string.h>
@ -28,10 +29,13 @@ class PrintHost
public:
virtual ~PrintHost();
typedef Http::ProgressFn ProgressFn;
typedef std::function<void(wxString /* error */)> ErrorFn;
virtual bool test(wxString &curl_msg) const = 0;
virtual wxString get_test_ok_msg () const = 0;
virtual wxString get_test_failed_msg (wxString &msg) const = 0;
virtual bool upload(PrintHostUpload upload_data, Http::ProgressFn prorgess_fn, Http::ErrorFn error_fn) const = 0;
virtual bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const = 0;
virtual bool has_auto_discovery() const = 0;
virtual bool can_test() const = 0;
virtual std::string get_host() const = 0;