#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/HMS.hpp>
Public Member Functions | |
| HMSQuery () | |
| ~HMSQuery () | |
| void | clear_hms_info () |
| wxString | query_hms_msg (const MachineObject *obj, const std::string &long_error_code) |
| wxString | query_hms_msg (const std::string &dev_id, const std::string &long_error_code) |
| bool | is_internal_error (const MachineObject *obj, int print_error) |
| wxString | query_print_error_msg (const MachineObject *obj, int print_error) |
| wxString | query_print_error_msg (const std::string &dev_id, int print_error) |
| wxString | query_print_image_action (const MachineObject *obj, int print_error, std::vector< int > &button_action) |
| wxImage | query_image_from_local (const wxString &image_name) |
Static Public Member Functions | |
| static std::string | hms_language_code () |
| static std::string | build_query_params (std::string &lang) |
Protected Attributes | |
| std::unordered_map< std::string, nlohmann::json > | m_hms_info_jsons |
| std::unordered_map< std::string, nlohmann::json > | m_hms_action_jsons |
| std::unordered_map< wxString, wxImage > | m_hms_local_images |
| std::mutex | m_hms_mutex |
| std::unordered_map< std::string, std::time_t > | m_cloud_hms_last_update_time |
Private Member Functions | |
| void | init_hms_info (const std::string &dev_type_id) |
| void | copy_from_data_dir_to_local () |
| int | download_hms_related (const std::string &hms_type, const std::string &dev_id_type, nlohmann::json *receive_json) |
| int | load_from_local (const std::string &hms_type, const std::string &dev_id_type, nlohmann::json *receive_json, std::string &version_info) |
| int | save_to_local (std::string lang, std::string hms_type, std::string dev_id_type, nlohmann::json save_json) |
| std::string | get_hms_file (std::string hms_type, std::string lang=std::string("en"), std::string dev_id_type="") |
| std::string | get_dev_id_type (const MachineObject *obj) const |
| wxString | _query_hms_msg (const std::string &dev_id_type, const std::string &long_error_code, const std::string &lang_code=std::string("en")) |
| bool | _is_internal_error (const std::string &dev_id_type, const std::string &long_error_code, const std::string &lang_code=std::string("en")) |
| wxString | _query_error_msg (const std::string &dev_id_type, const std::string &long_error_code, const std::string &lang_code=std::string("en")) |
| wxString | _query_error_image_action (const std::string &dev_id_type, const std::string &long_error_code, std::vector< int > &button_action) |
|
inline |
|
inline |
|
private |
References Slic3r::Geometry::contains(), Slic3r::empty(), init_hms_info(), and m_hms_info_jsons.
Referenced by is_internal_error().
|
private |
References init_hms_info(), and m_hms_action_jsons.
Referenced by query_print_image_action().
|
private |
References Slic3r::Geometry::contains(), Slic3r::empty(), init_hms_info(), and m_hms_info_jsons.
Referenced by query_print_error_msg(), and query_print_error_msg().
|
private |
References init_hms_info(), and m_hms_info_jsons.
Referenced by query_hms_msg(), and query_hms_msg().
|
static |
References hms_language_code().
Referenced by download_hms_related(), and Slic3r::GUI::get_hms_info_version().
| void Slic3r::GUI::HMSQuery::clear_hms_info | ( | ) |
References m_cloud_hms_last_update_time, m_hms_action_jsons, m_hms_info_jsons, and m_hms_mutex.
Referenced by ~HMSQuery().
|
private |
References Slic3r::GUI::_copy_dir(), Slic3r::data_dir(), HMS_PATH, and Slic3r::resources_dir().
Referenced by init_hms_info().
|
private |
References build_query_params(), Slic3r::Http::get(), Slic3r::AppConfig::get_hms_host(), Slic3r::DevJsonValParser::get_longlong_val(), Slic3r::http, load_from_local(), QUERY_HMS_ACTION, QUERY_HMS_INFO, save_to_local(), and should_disable_hms().
Referenced by init_hms_info().
|
private |
References Slic3r::MachineObject::get_dev_id().
Referenced by is_internal_error(), query_hms_msg(), query_print_error_msg(), and query_print_image_action().
|
private |
References QUERY_HMS_ACTION.
Referenced by load_from_local(), and save_to_local().
|
static |
References Slic3r::AppConfig::get_language_code().
Referenced by build_query_params(), Slic3r::GUI::get_hms_wiki_url(), is_internal_error(), load_from_local(), query_hms_msg(), query_hms_msg(), query_print_error_msg(), and query_print_error_msg().
|
private |
References copy_from_data_dir_to_local(), download_hms_related(), Slic3r::empty(), load_from_local(), m_cloud_hms_last_update_time, m_hms_action_jsons, m_hms_info_jsons, m_hms_mutex, package_dev_id_types, QUERY_HMS_ACTION, and QUERY_HMS_INFO.
Referenced by _is_internal_error(), _query_error_image_action(), _query_error_msg(), and _query_hms_msg().
| bool Slic3r::GUI::HMSQuery::is_internal_error | ( | const MachineObject * | obj, |
| int | print_error ) |
References _is_internal_error(), get_dev_id_type(), and hms_language_code().
|
private |
References Slic3r::data_dir(), Slic3r::empty(), Slic3r::encode_path(), get_hms_file(), Slic3r::DevJsonValParser::get_longlong_val(), hms_language_code(), QUERY_HMS_ACTION, and QUERY_HMS_INFO.
Referenced by download_hms_related(), and init_hms_info().
| wxString Slic3r::GUI::HMSQuery::query_hms_msg | ( | const MachineObject * | obj, |
| const std::string & | long_error_code ) |
References _query_hms_msg(), get_dev_id_type(), and hms_language_code().
| wxString Slic3r::GUI::HMSQuery::query_hms_msg | ( | const std::string & | dev_id, |
| const std::string & | long_error_code ) |
References _query_hms_msg(), and hms_language_code().
| wxImage Slic3r::GUI::HMSQuery::query_image_from_local | ( | const wxString & | image_name | ) |
References Slic3r::data_dir(), Slic3r::GUI::from_path(), HMS_LOCAL_IMG_PATH, and m_hms_local_images.
| wxString Slic3r::GUI::HMSQuery::query_print_error_msg | ( | const MachineObject * | obj, |
| int | print_error ) |
References _query_error_msg(), get_dev_id_type(), and hms_language_code().
| wxString Slic3r::GUI::HMSQuery::query_print_error_msg | ( | const std::string & | dev_id, |
| int | print_error ) |
References _query_error_msg(), and hms_language_code().
| wxString Slic3r::GUI::HMSQuery::query_print_image_action | ( | const MachineObject * | obj, |
| int | print_error, | ||
| std::vector< int > & | button_action ) |
References _query_error_image_action(), get_dev_id_type(), and should_disable_hms().
|
private |
References Slic3r::data_dir(), Slic3r::empty(), Slic3r::encode_path(), and get_hms_file().
Referenced by download_hms_related().
|
protected |
Referenced by clear_hms_info(), and init_hms_info().
|
protected |
Referenced by _query_error_image_action(), clear_hms_info(), and init_hms_info().
|
protected |
Referenced by _is_internal_error(), _query_error_msg(), _query_hms_msg(), clear_hms_info(), and init_hms_info().
|
protected |
Referenced by query_image_from_local().
|
mutableprotected |
Referenced by clear_hms_info(), and init_hms_info().