OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::NetworkAgent Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/NetworkAgent.hpp>

Collaboration diagram for Slic3r::NetworkAgent:

Classes

struct  PrinterCallbacks

Public Member Functions

 NetworkAgent (std::shared_ptr< ICloudServiceAgent > cloud_agent, std::shared_ptr< IPrinterAgent > printer_agent)
 ~NetworkAgent ()
std::shared_ptr< ICloudServiceAgent > get_cloud_agent (const std::string &provider=ORCA_CLOUD_PROVIDER) const
std::shared_ptr< IPrinterAgent > get_printer_agent () const
std::uint64_t get_user_machine_list_generation () const
void add_cloud_agent (const std::string &provider, std::shared_ptr< ICloudServiceAgent > agent)
void set_printer_agent (std::shared_ptr< IPrinterAgent > printer_agent)
int set_queue_on_main_fn (QueueOnMainFn fn, const std::string &provider=ORCA_CLOUD_PROVIDER)
void * get_network_agent ()
int init_log ()
int set_config_dir (std::string config_dir)
int set_cert_file (std::string folder, std::string filename)
int set_country_code (std::string country_code)
int start ()
int set_on_server_connected_fn (AppOnServerConnectedFn fn)
int set_on_http_error_fn (AppOnHttpErrorFn fn)
int set_get_country_code_fn (GetCountryCodeFn fn)
int connect_server ()
int refresh_connection (const std::string &provider="")
int change_user (std::string user_info, const std::string &provider=ORCA_CLOUD_PROVIDER)
bool is_user_login (const std::string &provider=ORCA_CLOUD_PROVIDER)
int user_logout (bool request=false, const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string get_user_id (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string get_user_name (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string get_user_avatar (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string get_user_nickname (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string build_login_cmd (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string build_logout_cmd (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string build_login_info (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string get_cloud_service_host (const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string get_cloud_login_url (const std::string &language="", const std::string &provider=ORCA_CLOUD_PROVIDER)
bool is_server_connected (const std::string &provider=ORCA_CLOUD_PROVIDER)
void enable_multi_machine (bool enable, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_user_presets (std::map< std::string, std::map< std::string, std::string > > *user_presets, const std::string &provider=ORCA_CLOUD_PROVIDER)
std::string request_setting_id (std::string name, std::map< std::string, std::string > *values_map, unsigned int *http_code, const std::string &provider=ORCA_CLOUD_PROVIDER)
int put_setting (std::string setting_id, std::string name, std::map< std::string, std::string > *values_map, unsigned int *http_code, const std::string &provider=ORCA_CLOUD_PROVIDER, bool force=false)
int get_setting_list (std::string bundle_version, ProgressFn pro_fn=nullptr, WasCancelledFn cancel_fn=nullptr, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_setting_list2 (std::string bundle_version, CheckFn chk_fn, ProgressFn pro_fn=nullptr, WasCancelledFn cancel_fn=nullptr, const std::string &provider=ORCA_CLOUD_PROVIDER)
int delete_setting (std::string setting_id, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_my_message (int type, int after, int limit, unsigned int *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int check_user_task_report (int *task_id, bool *printable, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_user_print_info (unsigned int *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_user_tasks (TaskQueryParams params, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_printer_firmware (std::string dev_id, unsigned *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_task_plate_index (std::string task_id, int *plate_index, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_user_info (int *identifier, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_subtask_info (std::string subtask_id, std::string *task_json, unsigned int *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_slice_info (std::string project_id, std::string profile_id, int plate_index, std::string *slice_json, const std::string &provider=ORCA_CLOUD_PROVIDER)
int query_bind_status (std::vector< std::string > query_list, unsigned int *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int modify_printer_name (std::string dev_id, std::string dev_name, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_camera_url (std::string dev_id, std::function< void(std::string)> callback, const std::string &provider=ORCA_CLOUD_PROVIDER)
std::unique_ptr< ICameraSignalingChannel > create_camera_signaling_channel (const std::string &dev_id, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_design_staffpick (int offset, int limit, std::function< void(std::string)> callback, const std::string &provider=ORCA_CLOUD_PROVIDER)
int start_publish (PublishParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, std::string *out, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_model_publish_url (std::string *url, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_subtask (BBLModelTask *task, OnGetSubTaskFn getsub_fn, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_model_mall_home_url (std::string *url, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_model_mall_detail_url (std::string *url, std::string id, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_my_profile (std::string token, unsigned int *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_my_token (std::string ticket, unsigned int *http_code, std::string *http_body, const std::string &provider=ORCA_CLOUD_PROVIDER)
int track_enable (bool enable)
int track_remove_files ()
int track_event (std::string evt_key, std::string content, const std::string &provider=ORCA_CLOUD_PROVIDER)
int track_header (std::string header, const std::string &provider=ORCA_CLOUD_PROVIDER)
int track_update_property (std::string name, std::string value, std::string type="string", const std::string &provider=ORCA_CLOUD_PROVIDER)
int track_get_property (std::string name, std::string &value, std::string type="string", const std::string &provider=ORCA_CLOUD_PROVIDER)
int put_model_mall_rating (int design_id, int score, std::string content, std::vector< std::string > images, unsigned int &http_code, std::string &http_error, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_oss_config (std::string &config, std::string country_code, unsigned int &http_code, std::string &http_error, const std::string &provider=ORCA_CLOUD_PROVIDER)
int put_rating_picture_oss (std::string &config, std::string &pic_oss_path, std::string model_id, int profile_id, unsigned int &http_code, std::string &http_error, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_model_mall_rating_result (int job_id, std::string &rating_result, unsigned int &http_code, std::string &http_error, const std::string &provider=ORCA_CLOUD_PROVIDER)
bool get_track_enable ()
int get_mw_user_preference (std::function< void(std::string)> callback, const std::string &provider=ORCA_CLOUD_PROVIDER)
int get_mw_user_4ulist (int seed, int limit, std::function< void(std::string)> callback, const std::string &provider=ORCA_CLOUD_PROVIDER)
int set_on_ssdp_msg_fn (OnMsgArrivedFn fn)
int set_on_printer_connected_fn (OnPrinterConnectedFn fn)
int set_on_subscribe_failure_fn (GetSubscribeFailureFn fn)
int set_on_message_fn (OnMessageFn fn)
int set_on_user_message_fn (OnMessageFn fn)
int set_on_local_connect_fn (OnLocalConnectedFn fn)
int set_on_local_message_fn (OnMessageFn fn)
int set_server_callback (OnServerErrFn fn)
int send_message (std::string dev_id, std::string json_str, int qos, int flag)
int command_ams_refresh_rfid (std::string dev_id, int ams_id, int slot_id, int sequence_id, bool lan_mode)
int command_ams_calibrate (std::string dev_id, int ams_id, int sequence_id, bool lan_mode)
int command_ams_select_tray (std::string dev_id, std::string tray_id, int sequence_id, bool lan_mode)
int command_start_camera (std::string dev_id)
int command_xyz_abs (std::string dev_id, int sequence_id, bool lan_mode)
int command_auto_leveling (std::string dev_id, int sequence_id, bool lan_mode)
int command_go_home (std::string dev_id, bool is_printing, bool supports_mqtt_homing, int sequence_id, bool lan_mode)
int command_set_bed (std::string dev_id, int temp, bool supports_mqtt_bed_ctrl, int sequence_id, bool lan_mode)
int command_set_nozzle (std::string dev_id, int temp, int sequence_id, bool lan_mode)
int command_axis_control (std::string dev_id, std::string axis, double unit, double input_val, int speed, bool is_core_xy, bool supports_mqtt_axis_control, int sequence_id, bool lan_mode)
int connect_printer (const PrinterConnectionParams &params)
int disconnect_printer ()
int send_message_to_printer (std::string dev_id, std::string json_str, int qos, int flag)
std::string default_lan_username () const
int check_cert ()
void install_device_cert (std::string dev_id, bool lan_only)
bool start_discovery (bool start, bool sending)
int ping_bind (std::string ping_code)
int bind_detect (std::string dev_ip, std::string sec_link, detectResult &detect)
int bind (std::string dev_ip, std::string dev_id, std::string dev_model, std::string sec_link, std::string timezone, bool improved, OnUpdateStatusFn update_fn)
int unbind (std::string dev_id)
std::string get_user_selected_machine ()
int set_user_selected_machine (std::string dev_id)
int start_subscribe (std::string module)
int stop_subscribe (std::string module)
int add_subscribe (std::vector< std::string > dev_list)
int del_subscribe (std::vector< std::string > dev_list)
int start_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn)
int start_local_print_with_record (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn)
int start_send_gcode_to_sdcard (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, OnWaitFn wait_fn)
int start_local_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn)
int start_sdcard_print (PrintParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn)
FilamentSyncMode get_filament_sync_mode () const
bool fetch_filament_info (std::string dev_id, FilamentSyncMode sync_mode=FilamentSyncMode::pull)
CameraStreamMode get_camera_stream_mode () const
std::string get_local_camera_stream_url () const
std::string to_orca_filament_id (const std::string &printer_filament_id) const
std::string from_orca_filament_id (const std::string &orca_filament_id) const
int request_bind_ticket (std::string *ticket)
int get_hms_snapshot (std::string dev_id, std::string file_name, std::function< void(std::string, int)> callback)

Static Public Member Functions

static std::string get_libpath_in_current_directory (std::string library_name)
static std::string get_versioned_library_path (const std::string &version)
static bool versioned_library_exists (const std::string &version)
static bool legacy_library_exists ()
static void remove_legacy_library ()
static std::vector< std::string > scan_plugin_versions ()
static int initialize_network_module (bool using_backup=false, const std::string &version="")
static int unload_network_module ()
static bool is_network_module_loaded ()
static void * get_bambu_source_entry ()
static std::string get_version ()
static void * get_network_function (const char *name)
static NetworkLibraryLoadError get_load_error ()
static void clear_load_error ()
static void set_load_error (const std::string &message, const std::string &technical_details, const std::string &attempted_path)

Private Member Functions

void apply_printer_callbacks (const std::shared_ptr< IPrinterAgent > &printer_agent, const PrinterCallbacks &callbacks)
int apply_discovery_callback (const std::shared_ptr< IPrinterAgent > &printer_agent, const PrinterCallbacks &callbacks)

Private Attributes

std::shared_ptr< int > m_discovery_session = std::make_shared<int>(0)
PrinterCallbacks m_printer_callbacks
bool enable_track = false
std::map< std::string, std::shared_ptr< ICloudServiceAgent > > m_cloud_agents
std::shared_ptr< IPrinterAgent > m_printer_agent
std::string m_printer_agent_id
std::atomic< std::uint64_t > m_user_machine_list_generation {0}

Detailed Description


Class Documentation

◆ Slic3r::NetworkAgent::PrinterCallbacks

struct Slic3r::NetworkAgent::PrinterCallbacks
Class Members
OnLocalConnectedFn on_local_connect_fn = nullptr
OnMessageFn on_local_message_fn = nullptr
OnMessageFn on_message_fn = nullptr
OnPrinterConnectedFn on_printer_connected_fn = nullptr
OnServerErrFn on_server_err_fn = nullptr
OnMsgArrivedFn on_ssdp_msg_fn = nullptr
GetSubscribeFailureFn on_subscribe_failure_fn = nullptr
OnMessageFn on_user_message_fn = nullptr
QueueOnMainFn queue_on_main_fn = nullptr

Constructor & Destructor Documentation

◆ NetworkAgent()

Slic3r::NetworkAgent::NetworkAgent ( std::shared_ptr< ICloudServiceAgent > cloud_agent,
std::shared_ptr< IPrinterAgent > printer_agent )
102 : m_printer_agent(std::move(printer_agent))
103{
104 if (!cloud_agent) {
105 BOOST_LOG_TRIVIAL(warning) << "Null cloud agent provided, skipping agent initialization";
106 return;
107 }
108 if (cloud_agent->get_id().empty()) {
109 BOOST_LOG_TRIVIAL(warning) << "Invalid cloud agent with empty ID provided, skipping agent initialization";
110 return;
111 }
112 m_cloud_agents.emplace(cloud_agent->get_id(), std::move(cloud_agent));
113}
std::map< std::string, std::shared_ptr< ICloudServiceAgent > > m_cloud_agents
Definition NetworkAgent.hpp:224
std::shared_ptr< IPrinterAgent > m_printer_agent
Definition NetworkAgent.hpp:225

References m_cloud_agents, and m_printer_agent.

◆ ~NetworkAgent()

Slic3r::NetworkAgent::~NetworkAgent ( )
116{
117 // Note: We don't destroy the agent here anymore since it's managed by BBLNetworkPlugin singleton
118 // The singleton manages the agent lifecycle
119}

Member Function Documentation

◆ add_cloud_agent()

void Slic3r::NetworkAgent::add_cloud_agent ( const std::string & provider,
std::shared_ptr< ICloudServiceAgent > agent )
122{
123 if (agent) {
124 m_cloud_agents[provider] = std::move(agent);
125 }
126}

References m_cloud_agents.

◆ add_subscribe()

int Slic3r::NetworkAgent::add_subscribe ( std::vector< std::string > dev_list)
1015{
1016 BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::add_subscribe: count=" << dev_list.size()
1017 << " printer_agent=" << (m_printer_agent ? m_printer_agent->get_agent_info().id : "<null>");
1018 if (m_printer_agent) {
1019 const int result = m_printer_agent->add_subscribe(std::move(dev_list));
1020 BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::add_subscribe: result=" << result;
1021 return result;
1022 }
1023 BOOST_LOG_TRIVIAL(warning) << "NetworkAgent::add_subscribe: no printer agent";
1024 return -1;
1025}
void trace(unsigned int level, const char *message)
Definition utils.cpp:247

References add_subscribe(), m_printer_agent, and Slic3r::trace().

Referenced by add_subscribe().

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

◆ apply_discovery_callback()

int Slic3r::NetworkAgent::apply_discovery_callback ( const std::shared_ptr< IPrinterAgent > & printer_agent,
const PrinterCallbacks & callbacks )
private
171{
172 if (!callbacks.on_ssdp_msg_fn)
173 return printer_agent->set_on_ssdp_msg_fn(nullptr);
174
175 const std::weak_ptr<int> session = m_discovery_session;
176 return printer_agent->set_on_ssdp_msg_fn(
177 [session, fn = callbacks.on_ssdp_msg_fn, queue = callbacks.queue_on_main_fn](std::string payload) {
178 // Without a UI queue this would run on the agent's thread, so drop it.
179 if (session.expired() || !queue)
180 return;
181 queue([session, fn, payload = std::move(payload)] {
182 // The agent may have changed while this event waited on the UI queue.
183 if (!session.expired())
184 fn(payload);
185 });
186 });
187}
std::shared_ptr< int > m_discovery_session
Definition NetworkAgent.hpp:216

References m_discovery_session, Slic3r::NetworkAgent::PrinterCallbacks::on_ssdp_msg_fn, and Slic3r::NetworkAgent::PrinterCallbacks::queue_on_main_fn.

Referenced by apply_printer_callbacks(), set_on_ssdp_msg_fn(), and set_queue_on_main_fn().

Here is the caller graph for this function:

◆ apply_printer_callbacks()

void Slic3r::NetworkAgent::apply_printer_callbacks ( const std::shared_ptr< IPrinterAgent > & printer_agent,
const PrinterCallbacks & callbacks )
private
153{
154 if (!printer_agent) {
155 return;
156 }
157
158 apply_discovery_callback(printer_agent, callbacks);
159 printer_agent->set_on_printer_connected_fn(callbacks.on_printer_connected_fn);
160 printer_agent->set_on_subscribe_failure_fn(callbacks.on_subscribe_failure_fn);
161 printer_agent->set_on_message_fn(callbacks.on_message_fn);
162 printer_agent->set_on_user_message_fn(callbacks.on_user_message_fn);
163 printer_agent->set_on_local_connect_fn(callbacks.on_local_connect_fn);
164 printer_agent->set_on_local_message_fn(callbacks.on_local_message_fn);
165 printer_agent->set_queue_on_main_fn(callbacks.queue_on_main_fn);
166 printer_agent->set_server_callback(callbacks.on_server_err_fn);
167}
int apply_discovery_callback(const std::shared_ptr< IPrinterAgent > &printer_agent, const PrinterCallbacks &callbacks)
Definition NetworkAgent.cpp:169

References apply_discovery_callback(), Slic3r::NetworkAgent::PrinterCallbacks::on_local_connect_fn, Slic3r::NetworkAgent::PrinterCallbacks::on_local_message_fn, Slic3r::NetworkAgent::PrinterCallbacks::on_message_fn, Slic3r::NetworkAgent::PrinterCallbacks::on_printer_connected_fn, Slic3r::NetworkAgent::PrinterCallbacks::on_server_err_fn, Slic3r::NetworkAgent::PrinterCallbacks::on_subscribe_failure_fn, Slic3r::NetworkAgent::PrinterCallbacks::on_user_message_fn, and Slic3r::NetworkAgent::PrinterCallbacks::queue_on_main_fn.

Referenced by set_printer_agent().

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

◆ bind()

int Slic3r::NetworkAgent::bind ( std::string dev_ip,
std::string dev_id,
std::string dev_model,
std::string sec_link,
std::string timezone,
bool improved,
OnUpdateStatusFn update_fn )
967{
968 if (m_printer_agent)
969 return m_printer_agent->bind(dev_ip, dev_id, dev_model, sec_link, timezone, improved, update_fn);
970 return -1;
971}

References bind(), and m_printer_agent.

Referenced by bind(), and Slic3r::GUI::BindJob::process().

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

◆ bind_detect()

int Slic3r::NetworkAgent::bind_detect ( std::string dev_ip,
std::string sec_link,
detectResult & detect )
959{
960 if (m_printer_agent)
961 return m_printer_agent->bind_detect(dev_ip, sec_link, detect);
962 return -1;
963}

References bind_detect(), and m_printer_agent.

Referenced by bind_detect().

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

◆ build_login_cmd()

std::string Slic3r::NetworkAgent::build_login_cmd ( const std::string & provider = ORCA_CLOUD_PROVIDER)
324{
325 const auto cloud_agent = get_cloud_agent(provider);
326 if (cloud_agent)
327 return cloud_agent->build_login_cmd();
328 return "";
329}
std::shared_ptr< ICloudServiceAgent > get_cloud_agent(const std::string &provider=ORCA_CLOUD_PROVIDER) const
Definition NetworkAgent.cpp:189

References build_login_cmd(), and get_cloud_agent().

Referenced by build_login_cmd().

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

◆ build_login_info()

std::string Slic3r::NetworkAgent::build_login_info ( const std::string & provider = ORCA_CLOUD_PROVIDER)
340{
341 const auto cloud_agent = get_cloud_agent(provider);
342 if (cloud_agent)
343 return cloud_agent->build_login_info();
344 return "";
345}

References build_login_info(), and get_cloud_agent().

Referenced by build_login_info().

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

◆ build_logout_cmd()

std::string Slic3r::NetworkAgent::build_logout_cmd ( const std::string & provider = ORCA_CLOUD_PROVIDER)
332{
333 const auto cloud_agent = get_cloud_agent(provider);
334 if (cloud_agent)
335 return cloud_agent->build_logout_cmd();
336 return "";
337}

References build_logout_cmd(), and get_cloud_agent().

Referenced by build_logout_cmd().

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

◆ change_user()

int Slic3r::NetworkAgent::change_user ( std::string user_info,
const std::string & provider = ORCA_CLOUD_PROVIDER )
268{
269 const auto cloud_agent = get_cloud_agent(provider);
270 if (cloud_agent)
271 return cloud_agent->change_user(std::move(user_info));
272 return -1;
273}

References change_user(), and get_cloud_agent().

Referenced by Slic3r::GUI::HttpServer::auth_handle_request(), and change_user().

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

◆ check_cert()

int Slic3r::NetworkAgent::check_cert ( )
932{
933 if (m_printer_agent)
934 return m_printer_agent->check_cert();
935 return -1;
936}

References check_cert(), and m_printer_agent.

Referenced by check_cert().

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

◆ check_user_task_report()

int Slic3r::NetworkAgent::check_user_task_report ( int * task_id,
bool * printable,
const std::string & provider = ORCA_CLOUD_PROVIDER )
462{
463 const auto cloud_agent = get_cloud_agent(provider);
464 if (cloud_agent)
465 return cloud_agent->check_user_task_report(task_id, printable);
466 return -1;
467}

References check_user_task_report(), and get_cloud_agent().

Referenced by check_user_task_report().

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

◆ clear_load_error()

void Slic3r::NetworkAgent::clear_load_error ( )
static
static BBLNetworkPlugin & instance()
Definition BBLNetworkPlugin.cpp:56
void clear_load_error()
Definition BBLNetworkPlugin.cpp:539

References Slic3r::BBLNetworkPlugin::clear_load_error(), and Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ command_ams_calibrate()

int Slic3r::NetworkAgent::command_ams_calibrate ( std::string dev_id,
int ams_id,
int sequence_id,
bool lan_mode )
840{
841 if (m_printer_agent)
842 return m_printer_agent->command_ams_calibrate(dev_id, ams_id, sequence_id, lan_mode);
843 return -1;
844}

References command_ams_calibrate(), and m_printer_agent.

Referenced by command_ams_calibrate().

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

◆ command_ams_refresh_rfid()

int Slic3r::NetworkAgent::command_ams_refresh_rfid ( std::string dev_id,
int ams_id,
int slot_id,
int sequence_id,
bool lan_mode )
833{
834 if (m_printer_agent)
835 return m_printer_agent->command_ams_refresh_rfid(dev_id, ams_id, slot_id, sequence_id, lan_mode);
836 return -1;
837}

References command_ams_refresh_rfid(), and m_printer_agent.

Referenced by command_ams_refresh_rfid().

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

◆ command_ams_select_tray()

int Slic3r::NetworkAgent::command_ams_select_tray ( std::string dev_id,
std::string tray_id,
int sequence_id,
bool lan_mode )
847{
848 if (m_printer_agent)
849 return m_printer_agent->command_ams_select_tray(dev_id, tray_id, sequence_id, lan_mode);
850 return -1;
851}

References command_ams_select_tray(), and m_printer_agent.

Referenced by command_ams_select_tray().

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

◆ command_auto_leveling()

int Slic3r::NetworkAgent::command_auto_leveling ( std::string dev_id,
int sequence_id,
bool lan_mode )
868{
869 if (m_printer_agent)
870 return m_printer_agent->command_auto_leveling(dev_id, sequence_id, lan_mode);
871 return -1;
872}

References command_auto_leveling(), and m_printer_agent.

Referenced by command_auto_leveling().

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

◆ command_axis_control()

int Slic3r::NetworkAgent::command_axis_control ( std::string dev_id,
std::string axis,
double unit,
double input_val,
int speed,
bool is_core_xy,
bool supports_mqtt_axis_control,
int sequence_id,
bool lan_mode )
897{
898 if (m_printer_agent)
899 return m_printer_agent->command_axis_control(dev_id, axis, unit, input_val, speed, is_core_xy, supports_mqtt_axis_control, sequence_id, lan_mode);
900 return -1;
901}

References command_axis_control(), and m_printer_agent.

Referenced by command_axis_control().

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

◆ command_go_home()

int Slic3r::NetworkAgent::command_go_home ( std::string dev_id,
bool is_printing,
bool supports_mqtt_homing,
int sequence_id,
bool lan_mode )
875{
876 if (m_printer_agent)
877 return m_printer_agent->command_go_home(dev_id, is_printing, supports_mqtt_homing, sequence_id, lan_mode);
878 return -1;
879}

References command_go_home(), and m_printer_agent.

Referenced by command_go_home().

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

◆ command_set_bed()

int Slic3r::NetworkAgent::command_set_bed ( std::string dev_id,
int temp,
bool supports_mqtt_bed_ctrl,
int sequence_id,
bool lan_mode )
882{
883 if (m_printer_agent)
884 return m_printer_agent->command_set_bed(dev_id, temp, supports_mqtt_bed_ctrl, sequence_id, lan_mode);
885 return -1;
886}

References command_set_bed(), and m_printer_agent.

Referenced by command_set_bed().

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

◆ command_set_nozzle()

int Slic3r::NetworkAgent::command_set_nozzle ( std::string dev_id,
int temp,
int sequence_id,
bool lan_mode )
889{
890 if (m_printer_agent)
891 return m_printer_agent->command_set_nozzle(dev_id, temp, sequence_id, lan_mode);
892 return -1;
893}

References command_set_nozzle(), and m_printer_agent.

Referenced by command_set_nozzle().

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

◆ command_start_camera()

int Slic3r::NetworkAgent::command_start_camera ( std::string dev_id)
854{
855 if (m_printer_agent)
856 return m_printer_agent->command_start_camera(dev_id);
857 return -1;
858}

References command_start_camera(), and m_printer_agent.

Referenced by command_start_camera().

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

◆ command_xyz_abs()

int Slic3r::NetworkAgent::command_xyz_abs ( std::string dev_id,
int sequence_id,
bool lan_mode )
861{
862 if (m_printer_agent)
863 return m_printer_agent->command_xyz_abs(dev_id, sequence_id, lan_mode);
864 return -1;
865}

References command_xyz_abs(), and m_printer_agent.

Referenced by command_xyz_abs().

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

◆ connect_printer()

int Slic3r::NetworkAgent::connect_printer ( const PrinterConnectionParams & params)
904{
905 if (m_printer_agent)
906 return m_printer_agent->connect_printer(params);
907 return -1;
908}

References connect_printer(), and m_printer_agent.

Referenced by connect_printer().

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

◆ connect_server()

int Slic3r::NetworkAgent::connect_server ( )
364{
365 return invoke_on_all_cloud_agents(m_cloud_agents, [](ICloudServiceAgent& cloud_agent) { return cloud_agent.connect_server(); });
366}
int invoke_on_all_cloud_agents(const std::map< std::string, std::shared_ptr< ICloudServiceAgent > > &cloud_agents, Fn &&fn)
Definition NetworkAgent.cpp:28

References Slic3r::ICloudServiceAgent::connect_server(), connect_server(), and m_cloud_agents.

Referenced by connect_server().

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

◆ create_camera_signaling_channel()

std::unique_ptr< ICameraSignalingChannel > Slic3r::NetworkAgent::create_camera_signaling_channel ( const std::string & dev_id,
const std::string & provider = ORCA_CLOUD_PROVIDER )
572{
573 const auto cloud_agent = get_cloud_agent(provider);
574 if (cloud_agent)
575 return cloud_agent->create_camera_signaling_channel(dev_id);
576 return nullptr;
577}

References create_camera_signaling_channel(), and get_cloud_agent().

Referenced by create_camera_signaling_channel().

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

◆ default_lan_username()

std::string Slic3r::NetworkAgent::default_lan_username ( ) const
925{
926 if (m_printer_agent)
927 return m_printer_agent->default_lan_username();
928 return {};
929}

References default_lan_username(), and m_printer_agent.

Referenced by default_lan_username(), Slic3r::GUI::PrintJob::process(), and Slic3r::GUI::SendJob::process().

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

◆ del_subscribe()

int Slic3r::NetworkAgent::del_subscribe ( std::vector< std::string > dev_list)
1028{
1029 BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::del_subscribe: count=" << dev_list.size()
1030 << " printer_agent=" << (m_printer_agent ? m_printer_agent->get_agent_info().id : "<null>");
1031 if (m_printer_agent) {
1032 const int result = m_printer_agent->del_subscribe(std::move(dev_list));
1033 BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::del_subscribe: result=" << result;
1034 return result;
1035 }
1036 BOOST_LOG_TRIVIAL(warning) << "NetworkAgent::del_subscribe: no printer agent";
1037 return -1;
1038}

References del_subscribe(), m_printer_agent, and Slic3r::trace().

Referenced by del_subscribe().

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

◆ delete_setting()

int Slic3r::NetworkAgent::delete_setting ( std::string setting_id,
const std::string & provider = ORCA_CLOUD_PROVIDER )
446{
447 const auto cloud_agent = get_cloud_agent(provider);
448 if (cloud_agent)
449 return cloud_agent->delete_setting(std::move(setting_id));
450 return -1;
451}

References delete_setting(), and get_cloud_agent().

Referenced by delete_setting().

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

◆ disconnect_printer()

int Slic3r::NetworkAgent::disconnect_printer ( )
911{
912 if (m_printer_agent)
913 return m_printer_agent->disconnect_printer();
914 return -1;
915}

References disconnect_printer(), and m_printer_agent.

Referenced by disconnect_printer().

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

◆ enable_multi_machine()

void Slic3r::NetworkAgent::enable_multi_machine ( bool enable,
const std::string & provider = ORCA_CLOUD_PROVIDER )
390{
391 const auto cloud_agent = get_cloud_agent(provider);
392 if (cloud_agent)
393 cloud_agent->enable_multi_machine(enable);
394}

References enable_multi_machine(), and get_cloud_agent().

Referenced by enable_multi_machine().

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

◆ fetch_filament_info()

bool Slic3r::NetworkAgent::fetch_filament_info ( std::string dev_id,
FilamentSyncMode sync_mode = FilamentSyncMode::pull )
1083{
1084 if (m_printer_agent) {
1085 return m_printer_agent->fetch_filament_info(dev_id, sync_mode);
1086 }
1087 return false;
1088}

References fetch_filament_info(), and m_printer_agent.

Referenced by fetch_filament_info().

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

◆ from_orca_filament_id()

std::string Slic3r::NetworkAgent::from_orca_filament_id ( const std::string & orca_filament_id) const
1098{
1099 if (m_printer_agent)
1100 return m_printer_agent->from_orca_filament_id(orca_filament_id);
1101 return orca_filament_id;
1102}

References from_orca_filament_id(), and m_printer_agent.

Referenced by from_orca_filament_id(), and Slic3r::GUI::SelectMachineDialog::update_show_status().

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

◆ get_bambu_source_entry()

void * Slic3r::NetworkAgent::get_bambu_source_entry ( )
static
void * get_bambu_source_entry()
Definition BBLNetworkPlugin.hpp:270

References Slic3r::BBLNetworkPlugin::get_bambu_source_entry(), and Slic3r::BBLNetworkPlugin::instance().

Referenced by Slic3r::GUI::GUI_App::on_init_network().

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

◆ get_camera_stream_mode()

CameraStreamMode Slic3r::NetworkAgent::get_camera_stream_mode ( ) const
1105{
1106 if (m_printer_agent)
1107 return m_printer_agent->get_camera_stream_mode();
1109}
@ none
Definition IPrinterAgent.hpp:63

References get_camera_stream_mode(), m_printer_agent, and Slic3r::none.

Referenced by get_camera_stream_mode().

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

◆ get_camera_url()

int Slic3r::NetworkAgent::get_camera_url ( std::string dev_id,
std::function< void(std::string)> callback,
const std::string & provider = ORCA_CLOUD_PROVIDER )
563{
564 const auto cloud_agent = get_cloud_agent(provider);
565 if (cloud_agent)
566 return cloud_agent->get_camera_url(std::move(dev_id), std::move(callback));
567 return -1;
568}

References get_camera_url(), and get_cloud_agent().

Referenced by Slic3r::GUI::MediaFilePanel::fetchUrl(), Slic3r::GUI::PartSkipDialog::fetchUrl(), get_camera_url(), Slic3r::GUI::SendToPrinterDialog::GetConnection(), and Slic3r::GUI::MediaPlayCtrl::ToggleStream().

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

◆ get_cloud_agent()

std::shared_ptr< ICloudServiceAgent > Slic3r::NetworkAgent::get_cloud_agent ( const std::string & provider = ORCA_CLOUD_PROVIDER) const
190{
191 const auto& key = (provider.empty() || provider == ORCA_CLOUD_PROVIDER) ? ORCA_CLOUD_PROVIDER : provider;
192 auto it = m_cloud_agents.find(key);
193 return it != m_cloud_agents.end() ? it->second : nullptr;
194}
static const std::string ORCA_CLOUD_PROVIDER("orca")

References get_cloud_agent(), m_cloud_agents, and Slic3r::ORCA_CLOUD_PROVIDER().

Referenced by build_login_cmd(), build_login_info(), build_logout_cmd(), change_user(), check_user_task_report(), create_camera_signaling_channel(), delete_setting(), enable_multi_machine(), get_camera_url(), get_cloud_agent(), get_cloud_login_url(), get_cloud_service_host(), get_design_staffpick(), get_model_mall_detail_url(), get_model_mall_home_url(), get_model_mall_rating_result(), get_model_publish_url(), get_mw_user_4ulist(), get_mw_user_preference(), get_my_message(), get_my_profile(), get_my_token(), Slic3r::GUI::get_orca_cloud_agent(), get_oss_config(), get_printer_firmware(), get_setting_list(), get_setting_list2(), get_slice_info(), get_subtask(), get_subtask_info(), get_task_plate_index(), get_user_avatar(), get_user_id(), get_user_info(), get_user_name(), get_user_nickname(), get_user_presets(), get_user_print_info(), get_user_tasks(), is_server_connected(), is_user_login(), modify_printer_name(), put_model_mall_rating(), put_rating_picture_oss(), put_setting(), query_bind_status(), refresh_connection(), request_setting_id(), set_queue_on_main_fn(), start_publish(), Slic3r::GUI::anonymous_namespace{GUI_App.cpp}::stop_orca_health_check(), track_enable(), track_event(), track_get_property(), track_header(), track_remove_files(), track_update_property(), and user_logout().

Here is the call graph for this function:

◆ get_cloud_login_url()

std::string Slic3r::NetworkAgent::get_cloud_login_url ( const std::string & language = "",
const std::string & provider = ORCA_CLOUD_PROVIDER )
356{
357 const auto cloud_agent = get_cloud_agent(provider);
358 if (cloud_agent)
359 return cloud_agent->get_cloud_login_url(language);
360 return "";
361}

References get_cloud_agent(), and get_cloud_login_url().

Referenced by get_cloud_login_url().

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

◆ get_cloud_service_host()

std::string Slic3r::NetworkAgent::get_cloud_service_host ( const std::string & provider = ORCA_CLOUD_PROVIDER)
348{
349 const auto cloud_agent = get_cloud_agent(provider);
350 if (cloud_agent)
351 return cloud_agent->get_cloud_service_host();
352 return "";
353}

References get_cloud_agent(), and get_cloud_service_host().

Referenced by get_cloud_service_host().

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

◆ get_design_staffpick()

int Slic3r::NetworkAgent::get_design_staffpick ( int offset,
int limit,
std::function< void(std::string)> callback,
const std::string & provider = ORCA_CLOUD_PROVIDER )
580{
581 const auto cloud_agent = get_cloud_agent(provider);
582 if (cloud_agent)
583 return cloud_agent->get_design_staffpick(offset, limit, std::move(callback));
584 return -1;
585}
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582

References get_cloud_agent(), get_design_staffpick(), and Slic3r::offset().

Referenced by get_design_staffpick().

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

◆ get_filament_sync_mode()

FilamentSyncMode Slic3r::NetworkAgent::get_filament_sync_mode ( ) const
1076{
1077 if (m_printer_agent)
1078 return m_printer_agent->get_filament_sync_mode();
1080}
@ none
Filament synchronization not supported.
Definition IPrinterAgent.hpp:57

References get_filament_sync_mode(), m_printer_agent, and Slic3r::none.

Referenced by get_filament_sync_mode().

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

◆ get_hms_snapshot()

int Slic3r::NetworkAgent::get_hms_snapshot ( std::string dev_id,
std::string file_name,
std::function< void(std::string, int)> callback )
1126{
1127 if (m_printer_agent)
1128 return m_printer_agent->get_hms_snapshot(dev_id, file_name, callback);
1129 return -1;
1130}

References get_hms_snapshot(), and m_printer_agent.

Referenced by Slic3r::GUI::DeviceErrorDialog::get_fail_snapshot_from_cloud(), and get_hms_snapshot().

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

◆ get_libpath_in_current_directory()

std::string Slic3r::NetworkAgent::get_libpath_in_current_directory ( std::string library_name)
static
52{
54}
static std::string get_libpath_in_current_directory(const std::string &library_name)
Definition BBLNetworkPlugin.cpp:379

References Slic3r::BBLNetworkPlugin::get_libpath_in_current_directory().

Here is the call graph for this function:

◆ get_load_error()

NetworkLibraryLoadError Slic3r::NetworkAgent::get_load_error ( )
static
NetworkLibraryLoadError get_load_error() const
Definition BBLNetworkPlugin.hpp:291

References Slic3r::BBLNetworkPlugin::get_load_error(), and Slic3r::BBLNetworkPlugin::instance().

Referenced by Slic3r::anonymous_namespace{PluginHostApp.cpp}::app_info(), and Slic3r::GUI::GUI_App::show_network_plugin_download_dialog().

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

◆ get_local_camera_stream_url()

std::string Slic3r::NetworkAgent::get_local_camera_stream_url ( ) const
1112{
1113 if (m_printer_agent)
1114 return m_printer_agent->get_camera_url();
1115 return {};
1116}

References get_local_camera_stream_url(), and m_printer_agent.

Referenced by get_local_camera_stream_url().

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

◆ get_model_mall_detail_url()

int Slic3r::NetworkAgent::get_model_mall_detail_url ( std::string * url,
std::string id,
const std::string & provider = ORCA_CLOUD_PROVIDER )
621{
622 const auto cloud_agent = get_cloud_agent(provider);
623 if (cloud_agent)
624 return cloud_agent->get_model_mall_detail_url(url, std::move(id));
625 return -1;
626}

References get_cloud_agent(), and get_model_mall_detail_url().

Referenced by get_model_mall_detail_url(), and Slic3r::GUI::WebViewPanel::OpenModelDetail().

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

◆ get_model_mall_home_url()

int Slic3r::NetworkAgent::get_model_mall_home_url ( std::string * url,
const std::string & provider = ORCA_CLOUD_PROVIDER )
613{
614 const auto cloud_agent = get_cloud_agent(provider);
615 if (cloud_agent)
616 return cloud_agent->get_model_mall_home_url(url);
617 return -1;
618}

References get_cloud_agent(), and get_model_mall_home_url().

Referenced by get_model_mall_home_url().

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

◆ get_model_mall_rating_result()

int Slic3r::NetworkAgent::get_model_mall_rating_result ( int job_id,
std::string & rating_result,
unsigned int & http_code,
std::string & http_error,
const std::string & provider = ORCA_CLOUD_PROVIDER )
733{
734 const auto cloud_agent = get_cloud_agent(provider);
735 if (cloud_agent)
736 return cloud_agent->get_model_mall_rating_result(job_id, rating_result, http_code, http_error);
737 return -1;
738}

References get_cloud_agent(), and get_model_mall_rating_result().

Referenced by get_model_mall_rating_result().

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

◆ get_model_publish_url()

int Slic3r::NetworkAgent::get_model_publish_url ( std::string * url,
const std::string & provider = ORCA_CLOUD_PROVIDER )
597{
598 const auto cloud_agent = get_cloud_agent(provider);
599 if (cloud_agent)
600 return cloud_agent->get_model_publish_url(url);
601 return -1;
602}

References get_cloud_agent(), and get_model_publish_url().

Referenced by get_model_publish_url().

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

◆ get_mw_user_4ulist()

int Slic3r::NetworkAgent::get_mw_user_4ulist ( int seed,
int limit,
std::function< void(std::string)> callback,
const std::string & provider = ORCA_CLOUD_PROVIDER )
749{
750 const auto cloud_agent = get_cloud_agent(provider);
751 if (cloud_agent)
752 return cloud_agent->get_mw_user_4ulist(seed, limit, std::move(callback));
753 return -1;
754}

References get_cloud_agent(), and get_mw_user_4ulist().

Referenced by get_mw_user_4ulist().

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

◆ get_mw_user_preference()

int Slic3r::NetworkAgent::get_mw_user_preference ( std::function< void(std::string)> callback,
const std::string & provider = ORCA_CLOUD_PROVIDER )
741{
742 const auto cloud_agent = get_cloud_agent(provider);
743 if (cloud_agent)
744 return cloud_agent->get_mw_user_preference(std::move(callback));
745 return -1;
746}

References get_cloud_agent(), and get_mw_user_preference().

Referenced by get_mw_user_preference().

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

◆ get_my_message()

int Slic3r::NetworkAgent::get_my_message ( int type,
int after,
int limit,
unsigned int * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
454{
455 const auto cloud_agent = get_cloud_agent(provider);
456 if (cloud_agent)
457 return cloud_agent->get_my_message(type, after, limit, http_code, http_body);
458 return -1;
459}

References get_cloud_agent(), and get_my_message().

Referenced by get_my_message().

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

◆ get_my_profile()

int Slic3r::NetworkAgent::get_my_profile ( std::string token,
unsigned int * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
629{
630 const auto cloud_agent = get_cloud_agent(provider);
631 if (cloud_agent)
632 return cloud_agent->get_my_profile(std::move(token), http_code, http_body);
633 return -1;
634}

References get_cloud_agent(), and get_my_profile().

Referenced by Slic3r::GUI::HttpServer::auth_handle_request(), and get_my_profile().

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

◆ get_my_token()

int Slic3r::NetworkAgent::get_my_token ( std::string ticket,
unsigned int * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
637{
638 const auto cloud_agent = get_cloud_agent(provider);
639 if (cloud_agent)
640 return cloud_agent->get_my_token(std::move(ticket), http_code, http_body);
641 return -1;
642}

References get_cloud_agent(), and get_my_token().

Referenced by Slic3r::GUI::HttpServer::auth_handle_request(), and get_my_token().

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

◆ get_network_agent()

void * Slic3r::NetworkAgent::get_network_agent ( )
void * get_agent() const
Definition BBLNetworkPlugin.hpp:244

References Slic3r::BBLNetworkPlugin::get_agent(), and Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_network_function()

void * Slic3r::NetworkAgent::get_network_function ( const char * name)
static
void * get_network_function(const char *name)
Definition BBLNetworkPlugin.hpp:266

References Slic3r::BBLNetworkPlugin::get_network_function(), and Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_oss_config()

int Slic3r::NetworkAgent::get_oss_config ( std::string & config,
std::string country_code,
unsigned int & http_code,
std::string & http_error,
const std::string & provider = ORCA_CLOUD_PROVIDER )
710{
711 const auto cloud_agent = get_cloud_agent(provider);
712 if (cloud_agent)
713 return cloud_agent->get_oss_config(config, std::move(country_code), http_code, http_error);
714 return -1;
715}

References get_cloud_agent(), and get_oss_config().

Referenced by get_oss_config().

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

◆ get_printer_agent()

std::shared_ptr< IPrinterAgent > Slic3r::NetworkAgent::get_printer_agent ( ) const
inline
61{ return m_printer_agent; }

References m_printer_agent.

Referenced by Slic3r::NetworkAgentFactory::deregister_python_printer_agent().

Here is the caller graph for this function:

◆ get_printer_firmware()

int Slic3r::NetworkAgent::get_printer_firmware ( std::string dev_id,
unsigned * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
502{
503 const auto cloud_agent = get_cloud_agent(provider);
504 if (cloud_agent)
505 return cloud_agent->get_printer_firmware(std::move(dev_id), http_code, http_body);
506 return -1;
507}

References get_cloud_agent(), and get_printer_firmware().

Referenced by get_printer_firmware().

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

◆ get_setting_list()

int Slic3r::NetworkAgent::get_setting_list ( std::string bundle_version,
ProgressFn pro_fn = nullptr,
WasCancelledFn cancel_fn = nullptr,
const std::string & provider = ORCA_CLOUD_PROVIDER )
429{
430 const auto cloud_agent = get_cloud_agent(provider);
431 if (cloud_agent)
432 return cloud_agent->get_setting_list(std::move(bundle_version), pro_fn, cancel_fn);
433 return -1;
434}

References get_cloud_agent(), and get_setting_list().

Referenced by get_setting_list().

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

◆ get_setting_list2()

int Slic3r::NetworkAgent::get_setting_list2 ( std::string bundle_version,
CheckFn chk_fn,
ProgressFn pro_fn = nullptr,
WasCancelledFn cancel_fn = nullptr,
const std::string & provider = ORCA_CLOUD_PROVIDER )
438{
439 const auto cloud_agent = get_cloud_agent(provider);
440 if (cloud_agent)
441 return cloud_agent->get_setting_list2(std::move(bundle_version), chk_fn, pro_fn, cancel_fn);
442 return -1;
443}

References get_cloud_agent(), and get_setting_list2().

Referenced by get_setting_list2().

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

◆ get_slice_info()

int Slic3r::NetworkAgent::get_slice_info ( std::string project_id,
std::string profile_id,
int plate_index,
std::string * slice_json,
const std::string & provider = ORCA_CLOUD_PROVIDER )
536{
537 const auto cloud_agent = get_cloud_agent(provider);
538 if (cloud_agent)
539 return cloud_agent->get_slice_info(std::move(project_id), std::move(profile_id), plate_index, slice_json);
540 return -1;
541}

References get_cloud_agent(), and get_slice_info().

Referenced by get_slice_info().

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

◆ get_subtask()

int Slic3r::NetworkAgent::get_subtask ( BBLModelTask * task,
OnGetSubTaskFn getsub_fn,
const std::string & provider = ORCA_CLOUD_PROVIDER )
605{
606 const auto cloud_agent = get_cloud_agent(provider);
607 if (cloud_agent)
608 return cloud_agent->get_subtask(task, getsub_fn);
609 return -1;
610}

References get_cloud_agent(), and get_subtask().

Referenced by get_subtask().

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

◆ get_subtask_info()

int Slic3r::NetworkAgent::get_subtask_info ( std::string subtask_id,
std::string * task_json,
unsigned int * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
527{
528 const auto cloud_agent = get_cloud_agent(provider);
529 if (cloud_agent)
530 return cloud_agent->get_subtask_info(std::move(subtask_id), task_json, http_code, http_body);
531 return -1;
532}

References get_cloud_agent(), and get_subtask_info().

Referenced by get_subtask_info().

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

◆ get_task_plate_index()

int Slic3r::NetworkAgent::get_task_plate_index ( std::string task_id,
int * plate_index,
const std::string & provider = ORCA_CLOUD_PROVIDER )
510{
511 const auto cloud_agent = get_cloud_agent(provider);
512 if (cloud_agent)
513 return cloud_agent->get_task_plate_index(std::move(task_id), plate_index);
514 return -1;
515}

References get_cloud_agent(), and get_task_plate_index().

Referenced by get_task_plate_index().

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

◆ get_track_enable()

bool Slic3r::NetworkAgent::get_track_enable ( )
inline
142{ return enable_track; }
bool enable_track
Definition NetworkAgent.hpp:218

References enable_track.

◆ get_user_avatar()

std::string Slic3r::NetworkAgent::get_user_avatar ( const std::string & provider = ORCA_CLOUD_PROVIDER)
308{
309 const auto cloud_agent = get_cloud_agent(provider);
310 if (cloud_agent)
311 return cloud_agent->get_user_avatar();
312 return "";
313}

References get_cloud_agent(), and get_user_avatar().

Referenced by get_user_avatar().

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

◆ get_user_id()

std::string Slic3r::NetworkAgent::get_user_id ( const std::string & provider = ORCA_CLOUD_PROVIDER)
292{
293 const auto cloud_agent = get_cloud_agent(provider);
294 if (cloud_agent)
295 return cloud_agent->get_user_id();
296 return "";
297}

References get_cloud_agent(), and get_user_id().

Referenced by Slic3r::GUI::ExportConfigsDialog::archive_filament_bundle_to_file(), Slic3r::GUI::ExportConfigsDialog::archive_preset_bundle_to_file(), get_user_id(), Slic3r::GUI::MainFrame::load_config_file(), and Slic3r::GUI::ExportPresetBundleDialog::OnExportData().

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

◆ get_user_info()

int Slic3r::NetworkAgent::get_user_info ( int * identifier,
const std::string & provider = ORCA_CLOUD_PROVIDER )
518{
519 const auto cloud_agent = get_cloud_agent(provider);
520 if (cloud_agent)
521 return cloud_agent->get_user_info(identifier);
522 return -1;
523}

References get_cloud_agent(), and get_user_info().

Referenced by get_user_info().

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

◆ get_user_machine_list_generation()

std::uint64_t Slic3r::NetworkAgent::get_user_machine_list_generation ( ) const
inline
62{ return m_user_machine_list_generation.load(); }
std::atomic< std::uint64_t > m_user_machine_list_generation
Definition NetworkAgent.hpp:227

References m_user_machine_list_generation.

◆ get_user_name()

std::string Slic3r::NetworkAgent::get_user_name ( const std::string & provider = ORCA_CLOUD_PROVIDER)
300{
301 const auto cloud_agent = get_cloud_agent(provider);
302 if (cloud_agent)
303 return cloud_agent->get_user_name();
304 return "";
305}

References get_cloud_agent(), and get_user_name().

Referenced by get_user_name().

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

◆ get_user_nickname()

std::string Slic3r::NetworkAgent::get_user_nickname ( const std::string & provider = ORCA_CLOUD_PROVIDER)
316{
317 const auto cloud_agent = get_cloud_agent(provider);
318 if (cloud_agent)
319 return cloud_agent->get_user_nickname();
320 return "";
321}

References get_cloud_agent(), and get_user_nickname().

Referenced by get_user_nickname().

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

◆ get_user_presets()

int Slic3r::NetworkAgent::get_user_presets ( std::map< std::string, std::map< std::string, std::string > > * user_presets,
const std::string & provider = ORCA_CLOUD_PROVIDER )
397{
398 const auto cloud_agent = get_cloud_agent(provider);
399 if (cloud_agent)
400 return cloud_agent->get_user_presets(user_presets);
401 return -1;
402}

References get_cloud_agent(), and get_user_presets().

Referenced by get_user_presets().

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

◆ get_user_print_info()

int Slic3r::NetworkAgent::get_user_print_info ( unsigned int * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
470{
471 const std::string request_agent_id = m_printer_agent_id;
472 const std::uint64_t request_generation = m_user_machine_list_generation.fetch_add(1) + 1;
473 const auto cloud_agent = get_cloud_agent(provider);
474 if (!cloud_agent)
475 return -1;
476
477 const int result = cloud_agent->get_user_print_info(http_code, http_body);
478 if (result == 0 && http_body) {
479 try {
480 nlohmann::json response = nlohmann::json::parse(*http_body);
481 response["provider"] = provider;
482 response["agent_id"] = request_agent_id;
483 response["generation"] = request_generation;
484 *http_body = response.dump();
485 }
486 catch (const std::exception& e) {
487 BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << " metadata injection exception=" << e.what();
488 }
489 }
490 return result;
491}
std::string m_printer_agent_id
Definition NetworkAgent.hpp:226

References get_cloud_agent(), get_user_print_info(), m_printer_agent_id, and m_user_machine_list_generation.

Referenced by get_user_print_info(), Slic3r::GUI::SelectMachinePopup::Popup(), Slic3r::GUI::SelectMObjectPopup::Popup(), Slic3r::GUI::SelectMachineDialog::update_user_machine_list(), Slic3r::GUI::SendToPrinterDialog::update_user_machine_list(), and Slic3r::GUI::SyncAmsInfoDialog::update_user_machine_list().

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

◆ get_user_selected_machine()

std::string Slic3r::NetworkAgent::get_user_selected_machine ( )
981{
982 if (m_printer_agent)
983 return m_printer_agent->get_user_selected_machine();
984 return "";
985}

References get_user_selected_machine(), and m_printer_agent.

Referenced by get_user_selected_machine().

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

◆ get_user_tasks()

int Slic3r::NetworkAgent::get_user_tasks ( TaskQueryParams params,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
494{
495 const auto cloud_agent = get_cloud_agent(provider);
496 if (cloud_agent)
497 return cloud_agent->get_user_tasks(params, http_body);
498 return -1;
499}

References get_cloud_agent(), and get_user_tasks().

Referenced by Slic3r::TaskManager::get_task_list(), and get_user_tasks().

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

◆ get_version()

std::string Slic3r::NetworkAgent::get_version ( )
static

◆ get_versioned_library_path()

std::string Slic3r::NetworkAgent::get_versioned_library_path ( const std::string & version)
static
57{
59}
static std::string get_versioned_library_path(const std::string &version)
Definition BBLNetworkPlugin.cpp:403

References Slic3r::BBLNetworkPlugin::get_versioned_library_path().

Here is the call graph for this function:

◆ init_log()

int Slic3r::NetworkAgent::init_log ( )
220{
221 return invoke_on_all_cloud_agents(m_cloud_agents, [](ICloudServiceAgent& cloud_agent) { return cloud_agent.init_log(); });
222}

References Slic3r::ICloudServiceAgent::init_log(), init_log(), and m_cloud_agents.

Referenced by init_log().

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

◆ initialize_network_module()

int Slic3r::NetworkAgent::initialize_network_module ( bool using_backup = false,
const std::string & version = "" )
static
70{
71 return BBLNetworkPlugin::instance().initialize(using_backup, version);
72}
int initialize(bool using_backup=false, const std::string &version="")
Definition BBLNetworkPlugin.cpp:85

References Slic3r::BBLNetworkPlugin::initialize(), and Slic3r::BBLNetworkPlugin::instance().

Referenced by Slic3r::GUI::GUI_App::on_init_network().

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

◆ install_device_cert()

void Slic3r::NetworkAgent::install_device_cert ( std::string dev_id,
bool lan_only )
939{
940 if (m_printer_agent)
941 m_printer_agent->install_device_cert(dev_id, lan_only);
942}

References install_device_cert(), and m_printer_agent.

Referenced by install_device_cert(), and Slic3r::DeviceManagerRefresher::on_timer().

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

◆ is_network_module_loaded()

bool Slic3r::NetworkAgent::is_network_module_loaded ( )
static
bool is_loaded() const
Definition BBLNetworkPlugin.cpp:257

References Slic3r::BBLNetworkPlugin::instance(), and Slic3r::BBLNetworkPlugin::is_loaded().

Referenced by Slic3r::anonymous_namespace{PluginHostApp.cpp}::app_info(), Slic3r::GUI::GUI_App::hot_reload_network_plugin(), and Slic3r::GUI::Plater::priv::on_tab_selection_changing().

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

◆ is_server_connected()

bool Slic3r::NetworkAgent::is_server_connected ( const std::string & provider = ORCA_CLOUD_PROVIDER)
369{
370 const auto cloud_agent = get_cloud_agent(provider);
371 if (cloud_agent)
372 return cloud_agent->is_server_connected();
373 return false;
374}

References get_cloud_agent(), and is_server_connected().

Referenced by is_server_connected(), Slic3r::GUI::CalibrationPanel::update_all(), Slic3r::GUI::MonitorPanel::update_all(), Slic3r::GUI::CalibrationPresetPage::update_show_status(), Slic3r::GUI::SelectMachineDialog::update_show_status(), Slic3r::GUI::SendToPrinterDialog::update_show_status(), and Slic3r::GUI::SyncAmsInfoDialog::update_show_status().

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

◆ is_user_login()

bool Slic3r::NetworkAgent::is_user_login ( const std::string & provider = ORCA_CLOUD_PROVIDER)
276{
277 const auto cloud_agent = get_cloud_agent(provider);
278 if (cloud_agent)
279 return cloud_agent->is_user_login();
280 return false;
281}

References get_cloud_agent(), and is_user_login().

Referenced by Slic3r::GUI::HttpServer::auth_handle_request(), is_user_login(), Slic3r::GUI::PingCodeBindDialog::on_bind_printer(), Slic3r::GUI::SelectMachineDialog::set_default(), Slic3r::GUI::SendToPrinterDialog::set_default(), Slic3r::GUI::SyncAmsInfoDialog::set_default(), Slic3r::GUI::CalibrationPresetPage::update_show_status(), Slic3r::GUI::SendToPrinterDialog::update_show_status(), Slic3r::GUI::SyncAmsInfoDialog::update_show_status(), Slic3r::GUI::SelectMachineDialog::update_user_machine_list(), Slic3r::GUI::SendToPrinterDialog::update_user_machine_list(), and Slic3r::GUI::SyncAmsInfoDialog::update_user_machine_list().

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

◆ legacy_library_exists()

bool Slic3r::NetworkAgent::legacy_library_exists ( )
static
static bool legacy_library_exists()
Definition BBLNetworkPlugin.cpp:453

References Slic3r::BBLNetworkPlugin::legacy_library_exists().

Here is the call graph for this function:

◆ modify_printer_name()

int Slic3r::NetworkAgent::modify_printer_name ( std::string dev_id,
std::string dev_name,
const std::string & provider = ORCA_CLOUD_PROVIDER )
555{
556 const auto cloud_agent = get_cloud_agent(provider);
557 if (cloud_agent)
558 return cloud_agent->modify_printer_name(std::move(dev_id), std::move(dev_name));
559 return -1;
560}

References get_cloud_agent(), and modify_printer_name().

Referenced by modify_printer_name().

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

◆ ping_bind()

int Slic3r::NetworkAgent::ping_bind ( std::string ping_code)
952{
953 if (m_printer_agent)
954 return m_printer_agent->ping_bind(ping_code);
955 return -1;
956}

References m_printer_agent, and ping_bind().

Referenced by Slic3r::GUI::PingCodeBindDialog::on_bind_printer(), and ping_bind().

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

◆ put_model_mall_rating()

int Slic3r::NetworkAgent::put_model_mall_rating ( int design_id,
int score,
std::string content,
std::vector< std::string > images,
unsigned int & http_code,
std::string & http_error,
const std::string & provider = ORCA_CLOUD_PROVIDER )
701{
702 const auto cloud_agent = get_cloud_agent(provider);
703 if (cloud_agent)
704 return cloud_agent->put_model_mall_rating(design_id, score, std::move(content), std::move(images), http_code, http_error);
705 return -1;
706}

References get_cloud_agent(), and put_model_mall_rating().

Referenced by put_model_mall_rating().

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

◆ put_rating_picture_oss()

int Slic3r::NetworkAgent::put_rating_picture_oss ( std::string & config,
std::string & pic_oss_path,
std::string model_id,
int profile_id,
unsigned int & http_code,
std::string & http_error,
const std::string & provider = ORCA_CLOUD_PROVIDER )
724{
725 const auto cloud_agent = get_cloud_agent(provider);
726 if (cloud_agent)
727 return cloud_agent->put_rating_picture_oss(config, pic_oss_path, std::move(model_id), profile_id, http_code, http_error);
728 return -1;
729}

References get_cloud_agent(), and put_rating_picture_oss().

Referenced by put_rating_picture_oss().

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

◆ put_setting()

int Slic3r::NetworkAgent::put_setting ( std::string setting_id,
std::string name,
std::map< std::string, std::string > * values_map,
unsigned int * http_code,
const std::string & provider = ORCA_CLOUD_PROVIDER,
bool force = false )
421{
422 const auto cloud_agent = get_cloud_agent(provider);
423 if (cloud_agent)
424 return cloud_agent->put_setting(std::move(setting_id), std::move(name), values_map, http_code, force);
425 return -1;
426}

References get_cloud_agent(), and put_setting().

Referenced by put_setting().

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

◆ query_bind_status()

int Slic3r::NetworkAgent::query_bind_status ( std::vector< std::string > query_list,
unsigned int * http_code,
std::string * http_body,
const std::string & provider = ORCA_CLOUD_PROVIDER )
547{
548 const auto cloud_agent = get_cloud_agent(provider);
549 if (cloud_agent)
550 return cloud_agent->query_bind_status(std::move(query_list), http_code, http_body);
551 return -1;
552}

References get_cloud_agent(), and query_bind_status().

Referenced by query_bind_status().

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

◆ refresh_connection()

int Slic3r::NetworkAgent::refresh_connection ( const std::string & provider = "")
377{
378 if(provider.empty())
379 return invoke_on_all_cloud_agents(m_cloud_agents, [](ICloudServiceAgent& cloud_agent) { return cloud_agent.refresh_connection(); });
380 else {
381 const auto cloud_agent = get_cloud_agent(provider);
382 if (cloud_agent)
383 return cloud_agent->refresh_connection();
384 return -1;
385 }
386
387}

References get_cloud_agent(), m_cloud_agents, Slic3r::ICloudServiceAgent::refresh_connection(), and refresh_connection().

Referenced by Slic3r::DeviceManagerRefresher::on_timer(), and refresh_connection().

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

◆ remove_legacy_library()

void Slic3r::NetworkAgent::remove_legacy_library ( )
static
static void remove_legacy_library()
Definition BBLNetworkPlugin.cpp:469

References Slic3r::BBLNetworkPlugin::remove_legacy_library().

Here is the call graph for this function:

◆ request_bind_ticket()

int Slic3r::NetworkAgent::request_bind_ticket ( std::string * ticket)
1119{
1120 if (m_printer_agent)
1121 return m_printer_agent->request_bind_ticket(ticket);
1122 return -1;
1123}

References m_printer_agent, and request_bind_ticket().

Referenced by request_bind_ticket().

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

◆ request_setting_id()

std::string Slic3r::NetworkAgent::request_setting_id ( std::string name,
std::map< std::string, std::string > * values_map,
unsigned int * http_code,
const std::string & provider = ORCA_CLOUD_PROVIDER )
408{
409 const auto cloud_agent = get_cloud_agent(provider);
410 if (cloud_agent)
411 return cloud_agent->request_setting_id(std::move(name), values_map, http_code);
412 return "";
413}

References get_cloud_agent(), and request_setting_id().

Referenced by request_setting_id().

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

◆ scan_plugin_versions()

std::vector< std::string > Slic3r::NetworkAgent::scan_plugin_versions ( )
static
static std::vector< std::string > scan_plugin_versions()
Definition BBLNetworkPlugin.cpp:489

References Slic3r::BBLNetworkPlugin::scan_plugin_versions().

Here is the call graph for this function:

◆ send_message()

int Slic3r::NetworkAgent::send_message ( std::string dev_id,
std::string json_str,
int qos,
int flag )
826{
827 if (m_printer_agent)
828 return m_printer_agent->send_message(dev_id, json_str, qos, flag);
829 return -1;
830}

References m_printer_agent, and send_message().

Referenced by send_message().

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

◆ send_message_to_printer()

int Slic3r::NetworkAgent::send_message_to_printer ( std::string dev_id,
std::string json_str,
int qos,
int flag )
918{
919 if (m_printer_agent)
920 return m_printer_agent->send_message_to_printer(dev_id, json_str, qos, flag);
921 return -1;
922}

References m_printer_agent, and send_message_to_printer().

Referenced by send_message_to_printer().

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

◆ set_cert_file()

int Slic3r::NetworkAgent::set_cert_file ( std::string folder,
std::string filename )
231{
232 return invoke_on_all_cloud_agents(m_cloud_agents, [&folder, &filename](ICloudServiceAgent& cloud_agent) {
233 return cloud_agent.set_cert_file(folder, filename);
234 });
235}

References m_cloud_agents, Slic3r::ICloudServiceAgent::set_cert_file(), and set_cert_file().

Referenced by set_cert_file().

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

◆ set_config_dir()

int Slic3r::NetworkAgent::set_config_dir ( std::string config_dir)
225{
227 [&config_dir](ICloudServiceAgent& cloud_agent) { return cloud_agent.set_config_dir(config_dir); });
228}

References m_cloud_agents, Slic3r::ICloudServiceAgent::set_config_dir(), and set_config_dir().

Referenced by set_config_dir().

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

◆ set_country_code()

int Slic3r::NetworkAgent::set_country_code ( std::string country_code)
238{
239 return invoke_on_all_cloud_agents(m_cloud_agents, [&country_code](ICloudServiceAgent& cloud_agent) {
240 return cloud_agent.set_country_code(country_code);
241 });
242}

References m_cloud_agents, Slic3r::ICloudServiceAgent::set_country_code(), and set_country_code().

Referenced by Slic3r::GUI::PreferencesDialog::create_debug_page(), Slic3r::GUI::PreferencesDialog::create_item_region_combobox(), Slic3r::GUI::GuideFrame::OnScriptMessage(), and set_country_code().

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

◆ set_get_country_code_fn()

int Slic3r::NetworkAgent::set_get_country_code_fn ( GetCountryCodeFn fn)
262{
264 [fn](ICloudServiceAgent& cloud_agent) { return cloud_agent.set_get_country_code_fn(fn); });
265}

References m_cloud_agents, Slic3r::ICloudServiceAgent::set_get_country_code_fn(), and set_get_country_code_fn().

Referenced by set_get_country_code_fn().

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

◆ set_load_error()

void Slic3r::NetworkAgent::set_load_error ( const std::string & message,
const std::string & technical_details,
const std::string & attempted_path )
static
93{
94 BBLNetworkPlugin::instance().set_load_error(message, technical_details, attempted_path);
95}
void set_load_error(const std::string &message, const std::string &technical_details, const std::string &attempted_path)
Definition BBLNetworkPlugin.cpp:544

References Slic3r::BBLNetworkPlugin::instance(), and Slic3r::BBLNetworkPlugin::set_load_error().

Here is the call graph for this function:

◆ set_on_http_error_fn()

int Slic3r::NetworkAgent::set_on_http_error_fn ( AppOnHttpErrorFn fn)
256{
258 [fn](ICloudServiceAgent& cloud_agent) { return cloud_agent.set_on_http_error_fn(fn); });
259}

References m_cloud_agents, Slic3r::ICloudServiceAgent::set_on_http_error_fn(), and set_on_http_error_fn().

Referenced by set_on_http_error_fn().

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

◆ set_on_local_connect_fn()

int Slic3r::NetworkAgent::set_on_local_connect_fn ( OnLocalConnectedFn fn)
802{
803 m_printer_callbacks.on_local_connect_fn = fn;
804 if (m_printer_agent)
805 return m_printer_agent->set_on_local_connect_fn(fn);
806 return -1;
807}
PrinterCallbacks m_printer_callbacks
Definition NetworkAgent.hpp:217

References m_printer_agent, m_printer_callbacks, and set_on_local_connect_fn().

Referenced by set_on_local_connect_fn().

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

◆ set_on_local_message_fn()

int Slic3r::NetworkAgent::set_on_local_message_fn ( OnMessageFn fn)
810{
811 m_printer_callbacks.on_local_message_fn = fn;
812 if (m_printer_agent)
813 return m_printer_agent->set_on_local_message_fn(fn);
814 return -1;
815}

References m_printer_agent, m_printer_callbacks, and set_on_local_message_fn().

Referenced by set_on_local_message_fn().

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

◆ set_on_message_fn()

int Slic3r::NetworkAgent::set_on_message_fn ( OnMessageFn fn)
786{
787 m_printer_callbacks.on_message_fn = fn;
788 if (m_printer_agent)
789 return m_printer_agent->set_on_message_fn(fn);
790 return -1;
791}

References m_printer_agent, m_printer_callbacks, and set_on_message_fn().

Referenced by set_on_message_fn().

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

◆ set_on_printer_connected_fn()

int Slic3r::NetworkAgent::set_on_printer_connected_fn ( OnPrinterConnectedFn fn)
770{
771 m_printer_callbacks.on_printer_connected_fn = fn;
772 if (m_printer_agent)
773 return m_printer_agent->set_on_printer_connected_fn(fn);
774 return -1;
775}

References m_printer_agent, m_printer_callbacks, and set_on_printer_connected_fn().

Referenced by set_on_printer_connected_fn().

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

◆ set_on_server_connected_fn()

int Slic3r::NetworkAgent::set_on_server_connected_fn ( AppOnServerConnectedFn fn)
250{
252 [fn](ICloudServiceAgent& cloud_agent) { return cloud_agent.set_on_server_connected_fn(fn); });
253}

References m_cloud_agents, Slic3r::ICloudServiceAgent::set_on_server_connected_fn(), and set_on_server_connected_fn().

Referenced by set_on_server_connected_fn().

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

◆ set_on_ssdp_msg_fn()

int Slic3r::NetworkAgent::set_on_ssdp_msg_fn ( OnMsgArrivedFn fn)
761{
762 m_discovery_session = std::make_shared<int>(0);
763 m_printer_callbacks.on_ssdp_msg_fn = fn;
764 if (m_printer_agent)
766 return -1;
767}

References apply_discovery_callback(), m_discovery_session, m_printer_agent, m_printer_callbacks, and set_on_ssdp_msg_fn().

Referenced by set_on_ssdp_msg_fn().

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

◆ set_on_subscribe_failure_fn()

int Slic3r::NetworkAgent::set_on_subscribe_failure_fn ( GetSubscribeFailureFn fn)
778{
779 m_printer_callbacks.on_subscribe_failure_fn = fn;
780 if (m_printer_agent)
781 return m_printer_agent->set_on_subscribe_failure_fn(fn);
782 return -1;
783}

References m_printer_agent, m_printer_callbacks, and set_on_subscribe_failure_fn().

Referenced by set_on_subscribe_failure_fn().

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

◆ set_on_user_message_fn()

int Slic3r::NetworkAgent::set_on_user_message_fn ( OnMessageFn fn)
794{
795 m_printer_callbacks.on_user_message_fn = fn;
796 if (m_printer_agent)
797 return m_printer_agent->set_on_user_message_fn(fn);
798 return -1;
799}

References m_printer_agent, m_printer_callbacks, and set_on_user_message_fn().

Referenced by set_on_user_message_fn().

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

◆ set_printer_agent()

void Slic3r::NetworkAgent::set_printer_agent ( std::shared_ptr< IPrinterAgent > printer_agent)
129{
131 // Invalidate queued discovery even when a cached agent instance is reused.
132 m_discovery_session = std::make_shared<int>(0);
133 auto old_printer_agent = m_printer_agent;
134
135 m_printer_agent = std::move(printer_agent);
136 m_printer_agent_id = m_printer_agent ? m_printer_agent->get_agent_info().id : "";
137
138 // Disconnect the old agent's connections/threads.
139 if (old_printer_agent && old_printer_agent != m_printer_agent) {
140 old_printer_agent->disconnect_printer();
141 apply_printer_callbacks(old_printer_agent, {});
142 }
143
144 if (!m_printer_agent)
145 return;
146
148}
void apply_printer_callbacks(const std::shared_ptr< IPrinterAgent > &printer_agent, const PrinterCallbacks &callbacks)
Definition NetworkAgent.cpp:152

References apply_printer_callbacks(), m_discovery_session, m_printer_agent, m_printer_agent_id, m_printer_callbacks, and m_user_machine_list_generation.

Referenced by Slic3r::NetworkAgentFactory::deregister_python_printer_agent().

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

◆ set_queue_on_main_fn()

int Slic3r::NetworkAgent::set_queue_on_main_fn ( QueueOnMainFn fn,
const std::string & provider = ORCA_CLOUD_PROVIDER )
201{
202 const auto cloud_agent = get_cloud_agent(provider);
203 m_printer_callbacks.queue_on_main_fn = fn;
204
205 int ret = -1;
206 if (cloud_agent)
207 ret = cloud_agent->set_queue_on_main_fn(fn);
208 if (m_printer_agent) {
209 m_printer_agent->set_queue_on_main_fn(fn);
211 }
212 return ret;
213}

References apply_discovery_callback(), get_cloud_agent(), m_printer_agent, m_printer_callbacks, and set_queue_on_main_fn().

Referenced by set_queue_on_main_fn().

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

◆ set_server_callback()

int Slic3r::NetworkAgent::set_server_callback ( OnServerErrFn fn)
818{
819 m_printer_callbacks.on_server_err_fn = fn;
820 if (m_printer_agent)
821 return m_printer_agent->set_server_callback(fn);
822 return -1;
823}

References m_printer_agent, m_printer_callbacks, and set_server_callback().

Referenced by set_server_callback().

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

◆ set_user_selected_machine()

int Slic3r::NetworkAgent::set_user_selected_machine ( std::string dev_id)
988{
989 BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::set_user_selected_machine: dev_id=" << dev_id
990 << " printer_agent=" << (m_printer_agent ? m_printer_agent->get_agent_info().id : "<null>");
991 if (m_printer_agent) {
992 const int result = m_printer_agent->set_user_selected_machine(dev_id);
993 BOOST_LOG_TRIVIAL(trace) << "NetworkAgent::set_user_selected_machine: result=" << result;
994 return result;
995 }
996 BOOST_LOG_TRIVIAL(warning) << "NetworkAgent::set_user_selected_machine: no printer agent";
997 return -1;
998}

References m_printer_agent, set_user_selected_machine(), and Slic3r::trace().

Referenced by Slic3r::DeviceManagerRefresher::on_timer(), set_user_selected_machine(), and Slic3r::GUI::CalibrationPanel::update_all().

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

◆ start()

int Slic3r::NetworkAgent::start ( )
245{
246 return invoke_on_all_cloud_agents(m_cloud_agents, [](ICloudServiceAgent& cloud_agent) { return cloud_agent.start(); });
247}

References m_cloud_agents, Slic3r::ICloudServiceAgent::start(), and start().

Referenced by start(), and start_discovery().

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

◆ start_discovery()

bool Slic3r::NetworkAgent::start_discovery ( bool start,
bool sending )
945{
946 if (m_printer_agent)
947 return m_printer_agent->start_discovery(start, sending);
948 return false;
949}
int start()
Definition NetworkAgent.cpp:244

References m_printer_agent, start(), and start_discovery().

Referenced by start_discovery().

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

◆ start_local_print()

int Slic3r::NetworkAgent::start_local_print ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn )
1062{
1063 if (m_printer_agent)
1064 return m_printer_agent->start_local_print(params, update_fn, cancel_fn);
1065 return -1;
1066}

References m_printer_agent, and start_local_print().

Referenced by Slic3r::GUI::PrintJob::process(), and start_local_print().

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

◆ start_local_print_with_record()

int Slic3r::NetworkAgent::start_local_print_with_record ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
OnWaitFn wait_fn )
1048{
1049 if (m_printer_agent)
1050 return m_printer_agent->start_local_print_with_record(params, update_fn, cancel_fn, wait_fn);
1051 return -1;
1052}

References m_printer_agent, and start_local_print_with_record().

Referenced by Slic3r::GUI::PrintJob::process(), and start_local_print_with_record().

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

◆ start_print()

int Slic3r::NetworkAgent::start_print ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
OnWaitFn wait_fn )
1041{
1042 if (m_printer_agent)
1043 return m_printer_agent->start_print(params, update_fn, cancel_fn, wait_fn);
1044 return -1;
1045}

References m_printer_agent, and start_print().

Referenced by Slic3r::GUI::PrintJob::process(), Slic3r::TaskManager::schedule(), and start_print().

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

◆ start_publish()

int Slic3r::NetworkAgent::start_publish ( PublishParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
std::string * out,
const std::string & provider = ORCA_CLOUD_PROVIDER )
589{
590 const auto cloud_agent = get_cloud_agent(provider);
591 if (cloud_agent)
592 return cloud_agent->start_publish(params, update_fn, cancel_fn, out);
593 return -1;
594}

References get_cloud_agent(), and start_publish().

Referenced by start_publish().

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

◆ start_sdcard_print()

int Slic3r::NetworkAgent::start_sdcard_print ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn )
1069{
1070 if (m_printer_agent)
1071 return m_printer_agent->start_sdcard_print(params, update_fn, cancel_fn);
1072 return -1;
1073}

References m_printer_agent, and start_sdcard_print().

Referenced by Slic3r::GUI::PrintJob::process(), and start_sdcard_print().

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

◆ start_send_gcode_to_sdcard()

int Slic3r::NetworkAgent::start_send_gcode_to_sdcard ( PrintParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
OnWaitFn wait_fn )
1055{
1056 if (m_printer_agent)
1057 return m_printer_agent->start_send_gcode_to_sdcard(params, update_fn, cancel_fn, wait_fn);
1058 return -1;
1059}

References m_printer_agent, and start_send_gcode_to_sdcard().

Referenced by Slic3r::GUI::PrintJob::process(), Slic3r::GUI::SendJob::process(), and start_send_gcode_to_sdcard().

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

◆ start_subscribe()

int Slic3r::NetworkAgent::start_subscribe ( std::string module)
1001{
1002 if (m_printer_agent)
1003 return m_printer_agent->start_subscribe(std::move(module));
1004 return -1;
1005}
FileTransferModule & module()
Definition FileTransferUtils.hpp:248

References m_printer_agent, Slic3r::module(), and start_subscribe().

Referenced by start_subscribe().

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

◆ stop_subscribe()

int Slic3r::NetworkAgent::stop_subscribe ( std::string module)
1008{
1009 if (m_printer_agent)
1010 return m_printer_agent->stop_subscribe(std::move(module));
1011 return -1;
1012}

References m_printer_agent, Slic3r::module(), and stop_subscribe().

Referenced by stop_subscribe().

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

◆ to_orca_filament_id()

std::string Slic3r::NetworkAgent::to_orca_filament_id ( const std::string & printer_filament_id) const
1091{
1092 if (m_printer_agent)
1093 return m_printer_agent->to_orca_filament_id(printer_filament_id);
1094 return printer_filament_id;
1095}

References m_printer_agent, and to_orca_filament_id().

Referenced by to_orca_filament_id().

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

◆ track_enable()

int Slic3r::NetworkAgent::track_enable ( bool enable)
645{
646 // Orca cloud has no telemetry; the only cloud agent that tracks events is BBL.
647 this->enable_track = enable;
648 const auto cloud_agent = get_cloud_agent(BBL_CLOUD_PROVIDER);
649 if (cloud_agent)
650 return cloud_agent->track_enable(enable);
651 return 0;
652}
static const std::string BBL_CLOUD_PROVIDER("bbl")

References Slic3r::BBL_CLOUD_PROVIDER(), enable_track, get_cloud_agent(), and track_enable().

Referenced by Slic3r::GUI::MainFrame::shutdown(), and track_enable().

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

◆ track_event()

int Slic3r::NetworkAgent::track_event ( std::string evt_key,
std::string content,
const std::string & provider = ORCA_CLOUD_PROVIDER )
663{
664 const auto cloud_agent = get_cloud_agent(provider);
665 if (cloud_agent)
666 return cloud_agent->track_event(std::move(evt_key), std::move(content));
667 return -1;
668}

References get_cloud_agent(), and track_event().

Referenced by Slic3r::GUI::CalibUtils::calib_generic_auto_pa_cali(), and track_event().

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

◆ track_get_property()

int Slic3r::NetworkAgent::track_get_property ( std::string name,
std::string & value,
std::string type = "string",
const std::string & provider = ORCA_CLOUD_PROVIDER )
687{
688 const auto cloud_agent = get_cloud_agent(provider);
689 if (cloud_agent)
690 return cloud_agent->track_get_property(std::move(name), value, std::move(type));
691 return -1;
692}

References get_cloud_agent(), and track_get_property().

Referenced by track_get_property().

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

◆ track_header()

int Slic3r::NetworkAgent::track_header ( std::string header,
const std::string & provider = ORCA_CLOUD_PROVIDER )
671{
672 const auto cloud_agent = get_cloud_agent(provider);
673 if (cloud_agent)
674 return cloud_agent->track_header(std::move(header));
675 return -1;
676}

References get_cloud_agent(), and track_header().

Referenced by track_header().

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

◆ track_remove_files()

int Slic3r::NetworkAgent::track_remove_files ( )
655{
656 const auto cloud_agent = get_cloud_agent(BBL_CLOUD_PROVIDER);
657 if (cloud_agent)
658 return cloud_agent->track_remove_files();
659 return 0;
660}

References Slic3r::BBL_CLOUD_PROVIDER(), get_cloud_agent(), and track_remove_files().

Referenced by track_remove_files().

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

◆ track_update_property()

int Slic3r::NetworkAgent::track_update_property ( std::string name,
std::string value,
std::string type = "string",
const std::string & provider = ORCA_CLOUD_PROVIDER )
679{
680 const auto cloud_agent = get_cloud_agent(provider);
681 if (cloud_agent)
682 return cloud_agent->track_update_property(std::move(name), std::move(value), std::move(type));
683 return -1;
684}

References get_cloud_agent(), and track_update_property().

Referenced by Slic3r::GUI::GLCanvas3D::_init_main_toolbar(), Slic3r::GUI::BindMachineDialog::on_bind_printer(), Slic3r::GUI::SelectMachineDialog::on_send_print(), Slic3r::MachineObject::parse_json(), Slic3r::GUI::BindJob::process(), and track_update_property().

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

◆ unbind()

int Slic3r::NetworkAgent::unbind ( std::string dev_id)
974{
975 if (m_printer_agent)
976 return m_printer_agent->unbind(dev_id);
977 return -1;
978}

References m_printer_agent, and unbind().

Referenced by unbind().

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

◆ unload_network_module()

int Slic3r::NetworkAgent::unload_network_module ( )
static
int unload()
Definition BBLNetworkPlugin.cpp:218

References Slic3r::BBLNetworkPlugin::instance(), and Slic3r::BBLNetworkPlugin::unload().

Referenced by Slic3r::GUI::GUI_App::hot_reload_network_plugin(), Slic3r::GUI::GUI_App::on_init_inner(), and Slic3r::GUI::GUI_App::on_init_network().

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

◆ user_logout()

int Slic3r::NetworkAgent::user_logout ( bool request = false,
const std::string & provider = ORCA_CLOUD_PROVIDER )
284{
285 const auto cloud_agent = get_cloud_agent(provider);
286 if (cloud_agent)
287 return cloud_agent->user_logout(request);
288 return -1;
289}

References get_cloud_agent(), and user_logout().

Referenced by user_logout().

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

◆ versioned_library_exists()

bool Slic3r::NetworkAgent::versioned_library_exists ( const std::string & version)
static
static bool versioned_library_exists(const std::string &version)
Definition BBLNetworkPlugin.cpp:440

References Slic3r::BBLNetworkPlugin::versioned_library_exists().

Referenced by Slic3r::GUI::PreferencesDialog::create_item_network_plugin_version().

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

Member Data Documentation

◆ enable_track

bool Slic3r::NetworkAgent::enable_track = false
private

Referenced by get_track_enable(), and track_enable().

◆ m_cloud_agents

◆ m_discovery_session

std::shared_ptr<int> Slic3r::NetworkAgent::m_discovery_session = std::make_shared<int>(0)
private

◆ m_printer_agent

◆ m_printer_agent_id

std::string Slic3r::NetworkAgent::m_printer_agent_id
private

◆ m_printer_callbacks

◆ m_user_machine_list_generation

std::atomic<std::uint64_t> Slic3r::NetworkAgent::m_user_machine_list_generation {0}
private

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