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

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

Inheritance diagram for Slic3r::BBLCloudServiceAgent:
Collaboration diagram for Slic3r::BBLCloudServiceAgent:

Public Member Functions

 BBLCloudServiceAgent ()
 ~BBLCloudServiceAgent () override
std::string get_id () const override
int init_log () override
int set_config_dir (std::string config_dir) override
int set_cert_file (std::string folder, std::string filename) override
int set_country_code (std::string country_code) override
int start () override
int change_user (std::string user_info) override
bool is_user_login () override
int user_logout (bool request=false) override
std::string get_user_id () override
std::string get_user_name () override
std::string get_user_avatar () override
std::string get_user_nickname () override
std::string build_login_cmd () override
std::string build_logout_cmd () override
std::string build_login_info () override
std::string get_access_token () const override
std::string get_refresh_token () const override
bool ensure_token_fresh (const std::string &reason) override
std::string get_cloud_service_host () override
std::string get_cloud_login_url (const std::string &language="") override
int connect_server () override
bool is_server_connected () override
int refresh_connection () override
int start_subscribe (std::string module) override
int stop_subscribe (std::string module) override
int add_subscribe (std::vector< std::string > dev_list) override
int del_subscribe (std::vector< std::string > dev_list) override
void enable_multi_machine (bool enable) override
int get_user_presets (std::map< std::string, std::map< std::string, std::string > > *user_presets) override
std::string request_setting_id (std::string name, std::map< std::string, std::string > *values_map, unsigned int *http_code) override
int put_setting (std::string setting_id, std::string name, std::map< std::string, std::string > *values_map, unsigned int *http_code, bool force=false) override
int get_setting_list (std::string bundle_version, ProgressFn pro_fn=nullptr, WasCancelledFn cancel_fn=nullptr) override
int get_setting_list2 (std::string bundle_version, CheckFn chk_fn, ProgressFn pro_fn=nullptr, WasCancelledFn cancel_fn=nullptr) override
int delete_setting (std::string setting_id) override
int get_my_message (int type, int after, int limit, unsigned int *http_code, std::string *http_body) override
int check_user_task_report (int *task_id, bool *printable) override
int get_user_print_info (unsigned int *http_code, std::string *http_body) override
int get_user_tasks (TaskQueryParams params, std::string *http_body) override
int get_printer_firmware (std::string dev_id, unsigned *http_code, std::string *http_body) override
int get_task_plate_index (std::string task_id, int *plate_index) override
int get_user_info (int *identifier) override
int get_subtask_info (std::string subtask_id, std::string *task_json, unsigned int *http_code, std::string *http_body) override
int get_slice_info (std::string project_id, std::string profile_id, int plate_index, std::string *slice_json) override
int query_bind_status (std::vector< std::string > query_list, unsigned int *http_code, std::string *http_body) override
int modify_printer_name (std::string dev_id, std::string dev_name) override
int get_camera_url (std::string dev_id, std::function< void(std::string)> callback) override
int get_design_staffpick (int offset, int limit, std::function< void(std::string)> callback) override
int start_publish (PublishParams params, OnUpdateStatusFn update_fn, WasCancelledFn cancel_fn, std::string *out) override
int get_model_publish_url (std::string *url) override
int get_subtask (BBLModelTask *task, OnGetSubTaskFn getsub_fn) override
int get_model_mall_home_url (std::string *url) override
int get_model_mall_detail_url (std::string *url, std::string id) override
int get_my_profile (std::string token, unsigned int *http_code, std::string *http_body) override
int get_my_token (std::string ticket, unsigned int *http_code, std::string *http_body) override
int track_enable (bool enable) override
int track_remove_files () override
int track_event (std::string evt_key, std::string content) override
int track_header (std::string header) override
int track_update_property (std::string name, std::string value, std::string type="string") override
int track_get_property (std::string name, std::string &value, std::string type="string") override
bool get_track_enable () override
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) override
int get_oss_config (std::string &config, std::string country_code, unsigned int &http_code, std::string &http_error) override
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) override
int get_model_mall_rating_result (int job_id, std::string &rating_result, unsigned int &http_code, std::string &http_error) override
int get_mw_user_preference (std::function< void(std::string)> callback) override
int get_mw_user_4ulist (int seed, int limit, std::function< void(std::string)> callback) override
std::string get_version () override
int set_on_server_connected_fn (AppOnServerConnectedFn fn) override
int set_on_http_error_fn (AppOnHttpErrorFn fn) override
int set_get_country_code_fn (GetCountryCodeFn fn) override
int set_queue_on_main_fn (QueueOnMainFn fn) override
virtual std::unique_ptr< ICameraSignalingChannel > create_camera_signaling_channel (const std::string &dev_id)

Private Member Functions

int set_extra_http_header ()

Static Private Member Functions

static std::map< std::string, std::string > get_extra_header ()

Private Attributes

bool m_enable_track {false}
AppOnServerConnectedFn m_app_on_server_connected_fn
AppOnHttpErrorFn m_app_on_http_error_fn

Detailed Description

BBLCloudServiceAgent - BBL DLL wrapper implementation of ICloudServiceAgent.

Delegates all cloud service and authentication operations to the proprietary BBL network DLL through function pointers obtained from BBLNetworkPlugin singleton. This class combines the functionality of the former BBLAuthAgent and BBLCloudServiceAgent.

Constructor & Destructor Documentation

◆ BBLCloudServiceAgent()

Slic3r::BBLCloudServiceAgent::BBLCloudServiceAgent ( )
default

◆ ~BBLCloudServiceAgent()

Slic3r::BBLCloudServiceAgent::~BBLCloudServiceAgent ( )
overridedefault

Member Function Documentation

◆ add_subscribe()

int Slic3r::BBLCloudServiceAgent::add_subscribe ( std::vector< std::string > dev_list)
overridevirtual

Subscribe to push streams for specific device identifiers.

Implements Slic3r::ICloudServiceAgent.

389{
390 auto& plugin = BBLNetworkPlugin::instance();
391 auto agent = plugin.get_agent();
392 auto func = plugin.get_add_subscribe();
393 if (func && agent) {
394 return func(agent, dev_list);
395 }
396 return -1;
397}
static BBLNetworkPlugin & instance()
Definition BBLNetworkPlugin.cpp:56

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ build_login_cmd()

std::string Slic3r::BBLCloudServiceAgent::build_login_cmd ( )
overridevirtual

Build a JSON command for the WebView login flow. Contains backend URL, API key, and PKCE parameters.

Implements Slic3r::ICloudServiceAgent.

248{
249 auto& plugin = BBLNetworkPlugin::instance();
250 auto agent = plugin.get_agent();
251 auto func = plugin.get_build_login_cmd();
252 if (func && agent) {
253 return normalize_homepage_auth_command(func(agent));
254 }
255 return "";
256}
std::string normalize_homepage_auth_command(std::string payload)
Definition BBLCloudServiceAgent.cpp:32

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ build_login_info()

std::string Slic3r::BBLCloudServiceAgent::build_login_info ( )
overridevirtual

Return a JSON snapshot of the active session (user info, no tokens). Used by WebView to display current user state.

Implements Slic3r::ICloudServiceAgent.

270{
271 auto& plugin = BBLNetworkPlugin::instance();
272 auto agent = plugin.get_agent();
273 auto func = plugin.get_build_login_info();
274 if (func && agent) {
275 return normalize_homepage_auth_command(func(agent));
276 }
277 return "";
278}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ build_logout_cmd()

std::string Slic3r::BBLCloudServiceAgent::build_logout_cmd ( )
overridevirtual

Build a JSON command for WebView logout.

Implements Slic3r::ICloudServiceAgent.

259{
260 auto& plugin = BBLNetworkPlugin::instance();
261 auto agent = plugin.get_agent();
262 auto func = plugin.get_build_logout_cmd();
263 if (func && agent) {
264 return normalize_homepage_auth_command(func(agent));
265 }
266 return "";
267}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ change_user()

int Slic3r::BBLCloudServiceAgent::change_user ( std::string user_info)
overridevirtual

Authenticate the user with the provided JSON payload.

Supported formats:

  1. Traditional: {"username": "...", "password": "..."}
  2. WebView/OAuth: {"command": "user_login", "data": {...}}
  3. Token format: {"data": {"token": "...", "refresh_token": "...", "user": {...}}}

Implements Slic3r::ICloudServiceAgent.

167{
168 auto& plugin = BBLNetworkPlugin::instance();
169 auto agent = plugin.get_agent();
170 auto func = plugin.get_change_user();
171 if (func && agent) {
172 return func(agent, user_info);
173 }
174 return -1;
175}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ check_user_task_report()

int Slic3r::BBLCloudServiceAgent::check_user_task_report ( int * task_id,
bool * printable )
overridevirtual

Check for pending task reports.

Implements Slic3r::ICloudServiceAgent.

506{
507 auto& plugin = BBLNetworkPlugin::instance();
508 auto agent = plugin.get_agent();
509 auto func = plugin.get_check_user_task_report();
510 if (func && agent) {
511 return func(agent, task_id, printable);
512 }
513 return -1;
514}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ connect_server()

int Slic3r::BBLCloudServiceAgent::connect_server ( )
overridevirtual

Perform a health check against the configured backend. Updates is_server_connected() state and triggers OnServerConnectedFn.

Implements Slic3r::ICloudServiceAgent.

334{
335 auto& plugin = BBLNetworkPlugin::instance();
336 auto agent = plugin.get_agent();
337 auto func = plugin.get_connect_server();
338 if (func && agent) {
339 return func(agent);
340 }
341 return -1;
342}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ create_camera_signaling_channel()

virtual std::unique_ptr< ICameraSignalingChannel > Slic3r::ICloudServiceAgent::create_camera_signaling_channel ( const std::string & dev_id)
inlinevirtualinherited

Create a camera signaling channel object for P2P camera streaming over WebRTC.

340 {
341 (void) dev_id;
342 return nullptr;
343 }

◆ del_subscribe()

int Slic3r::BBLCloudServiceAgent::del_subscribe ( std::vector< std::string > dev_list)
overridevirtual

Remove device-level subscriptions.

Implements Slic3r::ICloudServiceAgent.

400{
401 auto& plugin = BBLNetworkPlugin::instance();
402 auto agent = plugin.get_agent();
403 auto func = plugin.get_del_subscribe();
404 if (func && agent) {
405 return func(agent, dev_list);
406 }
407 return -1;
408}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ delete_setting()

int Slic3r::BBLCloudServiceAgent::delete_setting ( std::string setting_id)
overridevirtual

Delete a remote preset.

Implements Slic3r::ICloudServiceAgent.

480{
481 auto& plugin = BBLNetworkPlugin::instance();
482 auto agent = plugin.get_agent();
483 auto func = plugin.get_delete_setting();
484 if (func && agent) {
485 return func(agent, setting_id);
486 }
487 return -1;
488}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ enable_multi_machine()

void Slic3r::BBLCloudServiceAgent::enable_multi_machine ( bool enable)
overridevirtual

Enable or disable multi-machine mode.

Implements Slic3r::ICloudServiceAgent.

411{
412 auto& plugin = BBLNetworkPlugin::instance();
413 auto agent = plugin.get_agent();
414 auto func = plugin.get_enable_multi_machine();
415 if (func && agent) {
416 func(agent, enable);
417 }
418}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ ensure_token_fresh()

bool Slic3r::BBLCloudServiceAgent::ensure_token_fresh ( const std::string & reason)
overridevirtual

Ensure the access token is fresh, refreshing if necessary. Call before making API requests to avoid 401 errors.

Parameters
reasonDescriptive string for logging (e.g., "connect_server")
Returns
true if the token is fresh or was successfully refreshed

Implements Slic3r::ICloudServiceAgent.

298{
299 // BBL DLL handles token refresh internally
300 // Always return true assuming the DLL manages this
301 (void)reason;
302 return true;
303}

◆ get_access_token()

std::string Slic3r::BBLCloudServiceAgent::get_access_token ( ) const
overridevirtual

Return the current access token for API calls. Cloud and printer agents use this for Authorization headers.

Implements Slic3r::ICloudServiceAgent.

285{
286 // BBL DLL manages tokens internally, not exposed via function pointer
287 // Return empty string - BBL agents inject tokens automatically
288 return "";
289}

◆ get_camera_url()

int Slic3r::BBLCloudServiceAgent::get_camera_url ( std::string dev_id,
std::function< void(std::string)> callback )
overridevirtual

Request live camera streaming URL.

Implements Slic3r::ICloudServiceAgent.

620{
621 auto& plugin = BBLNetworkPlugin::instance();
622 auto agent = plugin.get_agent();
623 auto func = plugin.get_get_camera_url();
624 if (func && agent) {
625 return func(agent, dev_id, callback);
626 }
627 return -1;
628}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_cloud_login_url()

std::string Slic3r::BBLCloudServiceAgent::get_cloud_login_url ( const std::string & language = "")
overridevirtual

Return the login URL for the cloud service.

Parameters
languageOptional language code (e.g., "en-US", "zh-CN") for localized login page. If empty, returns the default (non-localized) login URL.
Returns
The full URL to the login page, or a local file:// URL for native implementations.

Implements Slic3r::ICloudServiceAgent.

321{
322 std::string host_url = get_cloud_service_host();
323 if (host_url.empty()) {
324 return "";
325 }
326
327 if (language.empty()) {
328 return host_url + "/sign-in";
329 }
330 return host_url + "/" + language + "/sign-in";
331}
std::string get_cloud_service_host() override
Definition BBLCloudServiceAgent.cpp:309

References get_cloud_service_host().

Here is the call graph for this function:

◆ get_cloud_service_host()

std::string Slic3r::BBLCloudServiceAgent::get_cloud_service_host ( )
overridevirtual

Return the base hostname for cloud API calls (varies by region). Helpful for diagnostics and when building browser URLs.

Implements Slic3r::ICloudServiceAgent.

310{
311 auto& plugin = BBLNetworkPlugin::instance();
312 auto agent = plugin.get_agent();
313 auto func = plugin.get_get_bambulab_host();
314 if (func && agent) {
315 return func(agent);
316 }
317 return "";
318}

References Slic3r::BBLNetworkPlugin::instance().

Referenced by get_cloud_login_url().

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

◆ get_design_staffpick()

int Slic3r::BBLCloudServiceAgent::get_design_staffpick ( int offset,
int limit,
std::function< void(std::string)> callback )
overridevirtual

Fetch staff-picked designs from model mall.

Implements Slic3r::ICloudServiceAgent.

631{
632 auto& plugin = BBLNetworkPlugin::instance();
633 auto agent = plugin.get_agent();
634 auto func = plugin.get_get_design_staffpick();
635 if (func && agent) {
636 return func(agent, offset, limit, callback);
637 }
638 return -1;
639}
Slic3r::Polygons offset(const Slic3r::Polygon &polygon, const float delta, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:582

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

Here is the call graph for this function:

◆ get_extra_header()

std::map< std::string, std::string > Slic3r::BBLCloudServiceAgent::get_extra_header ( )
staticprivate
60{
61 std::map<std::string, std::string> extra_headers;
62 extra_headers.emplace("X-BBL-Client-Type", "slicer");
63
64 // Unable to get camera live view when the printer is connected to cloud for H2D
65 extra_headers.emplace("X-BBL-Client-Name", "BambuStudio");
66
67 extra_headers.emplace("X-BBL-Client-Version", GUI::wxGetApp().get_bbl_client_version());
68#if defined(__WINDOWS__)
69#ifdef _M_X64
70 extra_headers.emplace("X-BBL-OS-Type", "windows");
71#else
72 extra_headers.emplace("X-BBL-OS-Type", "windows_arm");
73#endif
74#elif defined(__APPLE__)
75 extra_headers.emplace("X-BBL-OS-Type", "macos");
76#elif defined(__LINUX__)
77 extra_headers.emplace("X-BBL-OS-Type", "linux");
78#endif
79
80 int major = 0, minor = 0, micro = 0;
81 wxGetOsVersion(&major, &minor, &micro);
82
83 std::ostringstream os_version;
84 os_version << major << "." << minor << "." << micro;
85 extra_headers.emplace("X-BBL-OS-Version", os_version.str());
86
87 auto& app = GUI::wxGetApp();
88 if (app.app_config) {
89 extra_headers.emplace("X-BBL-Device-ID", app.app_config->get("slicer_uuid"));
90 }
91
92 extra_headers.emplace("X-BBL-Language",
93 convert_studio_language_to_api(app.current_language_code_safe().ToStdString()));
94 return extra_headers;
95}
std::string convert_studio_language_to_api(std::string lang_code)
Definition BBLCloudServiceAgent.cpp:26
std::map< std::string, std::string > extra_headers
Definition Http.cpp:106

References Slic3r::extra_headers.

Referenced by set_extra_http_header().

Here is the caller graph for this function:

◆ get_id()

std::string Slic3r::BBLCloudServiceAgent::get_id ( ) const
inlineoverridevirtual

Implements Slic3r::ICloudServiceAgent.

27{ return BBL_CLOUD_PROVIDER; }
static const std::string BBL_CLOUD_PROVIDER("bbl")

References Slic3r::BBL_CLOUD_PROVIDER().

Here is the call graph for this function:

◆ get_model_mall_detail_url()

int Slic3r::BBLCloudServiceAgent::get_model_mall_detail_url ( std::string * url,
std::string id )
overridevirtual

Build model detail page URL.

Implements Slic3r::ICloudServiceAgent.

686{
687 auto& plugin = BBLNetworkPlugin::instance();
688 auto agent = plugin.get_agent();
689 auto func = plugin.get_get_model_mall_detail_url();
690 if (func && agent) {
691 return func(agent, url, id);
692 }
693 return -1;
694}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_model_mall_home_url()

int Slic3r::BBLCloudServiceAgent::get_model_mall_home_url ( std::string * url)
overridevirtual

Get model mall home URL.

Implements Slic3r::ICloudServiceAgent.

675{
676 auto& plugin = BBLNetworkPlugin::instance();
677 auto agent = plugin.get_agent();
678 auto func = plugin.get_get_model_mall_home_url();
679 if (func && agent) {
680 return func(agent, url);
681 }
682 return -1;
683}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_model_mall_rating_result()

int Slic3r::BBLCloudServiceAgent::get_model_mall_rating_result ( int job_id,
std::string & rating_result,
unsigned int & http_code,
std::string & http_error )
overridevirtual

Poll for rating result.

Implements Slic3r::ICloudServiceAgent.

832{
833 auto& plugin = BBLNetworkPlugin::instance();
834 auto agent = plugin.get_agent();
835 auto func = plugin.get_get_model_mall_rating_result();
836 if (func && agent) {
837 return func(agent, job_id, rating_result, http_code, http_error);
838 }
839 return -1;
840}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_model_publish_url()

int Slic3r::BBLCloudServiceAgent::get_model_publish_url ( std::string * url)
overridevirtual

Get model publish URL.

Implements Slic3r::ICloudServiceAgent.

653{
654 auto& plugin = BBLNetworkPlugin::instance();
655 auto agent = plugin.get_agent();
656 auto func = plugin.get_get_model_publish_url();
657 if (func && agent) {
658 return func(agent, url);
659 }
660 return -1;
661}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_mw_user_4ulist()

int Slic3r::BBLCloudServiceAgent::get_mw_user_4ulist ( int seed,
int limit,
std::function< void(std::string)> callback )
overridevirtual

Retrieve MakerWorld "For You" list.

Implements Slic3r::ICloudServiceAgent.

874{
875 auto& plugin = BBLNetworkPlugin::instance();
876 auto agent = plugin.get_agent();
877 auto func = plugin.get_get_mw_user_4ulist();
878 if (func && agent) {
879 return func(agent, seed, limit, callback);
880 }
881 return -1;
882}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_mw_user_preference()

int Slic3r::BBLCloudServiceAgent::get_mw_user_preference ( std::function< void(std::string)> callback)
overridevirtual

Fetch MakerWorld user preferences.

Implements Slic3r::ICloudServiceAgent.

863{
864 auto& plugin = BBLNetworkPlugin::instance();
865 auto agent = plugin.get_agent();
866 auto func = plugin.get_get_mw_user_preference();
867 if (func && agent) {
868 return func(agent, callback);
869 }
870 return -1;
871}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_my_message()

int Slic3r::BBLCloudServiceAgent::get_my_message ( int type,
int after,
int limit,
unsigned int * http_code,
std::string * http_body )
overridevirtual

Retrieve inbox/notification messages.

Implements Slic3r::ICloudServiceAgent.

495{
496 auto& plugin = BBLNetworkPlugin::instance();
497 auto agent = plugin.get_agent();
498 auto func = plugin.get_get_my_message();
499 if (func && agent) {
500 return func(agent, type, after, limit, http_code, http_body);
501 }
502 return -1;
503}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_my_profile()

int Slic3r::BBLCloudServiceAgent::get_my_profile ( std::string token,
unsigned int * http_code,
std::string * http_body )
overridevirtual

Retrieve user's model mall profile.

Implements Slic3r::ICloudServiceAgent.

697{
698 auto& plugin = BBLNetworkPlugin::instance();
699 auto agent = plugin.get_agent();
700 auto func = plugin.get_get_my_profile();
701 if (func && agent) {
702 return func(agent, token, http_code, http_body);
703 }
704 return -1;
705}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_my_token()

int Slic3r::BBLCloudServiceAgent::get_my_token ( std::string ticket,
unsigned int * http_code,
std::string * http_body )
overridevirtual

Exchange a one-time login ticket (from a third-party OAuth callback) for token + profile JSON. Used by the localhost callback handler when the auth server redirects with ?ticket=...&redirect_url=... instead of passing tokens directly in the URL.

Implements Slic3r::ICloudServiceAgent.

708{
709 auto& plugin = BBLNetworkPlugin::instance();
710 auto agent = plugin.get_agent();
711 auto func = plugin.get_get_my_token();
712 if (func && agent) {
713 return func(agent, ticket, http_code, http_body);
714 }
715 return -1;
716}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_oss_config()

int Slic3r::BBLCloudServiceAgent::get_oss_config ( std::string & config,
std::string country_code,
unsigned int & http_code,
std::string & http_error )
overridevirtual

Get OSS configuration for image uploads.

Implements Slic3r::ICloudServiceAgent.

810{
811 auto& plugin = BBLNetworkPlugin::instance();
812 auto agent = plugin.get_agent();
813 auto func = plugin.get_get_oss_config();
814 if (func && agent) {
815 return func(agent, config, country_code, http_code, http_error);
816 }
817 return -1;
818}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_printer_firmware()

int Slic3r::BBLCloudServiceAgent::get_printer_firmware ( std::string dev_id,
unsigned * http_code,
std::string * http_body )
overridevirtual

Fetch firmware information for a printer.

Implements Slic3r::ICloudServiceAgent.

539{
540 auto& plugin = BBLNetworkPlugin::instance();
541 auto agent = plugin.get_agent();
542 auto func = plugin.get_get_printer_firmware();
543 if (func && agent) {
544 return func(agent, dev_id, http_code, http_body);
545 }
546 return -1;
547}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_refresh_token()

std::string Slic3r::BBLCloudServiceAgent::get_refresh_token ( ) const
overridevirtual

Return the current refresh token (if available).

Implements Slic3r::ICloudServiceAgent.

292{
293 // BBL DLL manages tokens internally, not exposed via function pointer
294 return "";
295}

◆ get_setting_list()

int Slic3r::BBLCloudServiceAgent::get_setting_list ( std::string bundle_version,
ProgressFn pro_fn = nullptr,
WasCancelledFn cancel_fn = nullptr )
overridevirtual

Trigger bulk download of user presets.

Implements Slic3r::ICloudServiceAgent.

458{
459 auto& plugin = BBLNetworkPlugin::instance();
460 auto agent = plugin.get_agent();
461 auto func = plugin.get_get_setting_list();
462 if (func && agent) {
463 return func(agent, bundle_version, pro_fn, cancel_fn);
464 }
465 return -1;
466}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_setting_list2()

int Slic3r::BBLCloudServiceAgent::get_setting_list2 ( std::string bundle_version,
CheckFn chk_fn,
ProgressFn pro_fn = nullptr,
WasCancelledFn cancel_fn = nullptr )
overridevirtual

Enhanced preset sync with per-item validation.

Implements Slic3r::ICloudServiceAgent.

469{
470 auto& plugin = BBLNetworkPlugin::instance();
471 auto agent = plugin.get_agent();
472 auto func = plugin.get_get_setting_list2();
473 if (func && agent) {
474 return func(agent, bundle_version, chk_fn, pro_fn, cancel_fn);
475 }
476 return -1;
477}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_slice_info()

int Slic3r::BBLCloudServiceAgent::get_slice_info ( std::string project_id,
std::string profile_id,
int plate_index,
std::string * slice_json )
overridevirtual

Retrieve slicing job info.

Implements Slic3r::ICloudServiceAgent.

583{
584 auto& plugin = BBLNetworkPlugin::instance();
585 auto agent = plugin.get_agent();
586 auto func = plugin.get_get_slice_info();
587 if (func && agent) {
588 return func(agent, project_id, profile_id, plate_index, slice_json);
589 }
590 return -1;
591}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_subtask()

int Slic3r::BBLCloudServiceAgent::get_subtask ( BBLModelTask * task,
OnGetSubTaskFn getsub_fn )
overridevirtual

Fetch publishing subtask information.

Implements Slic3r::ICloudServiceAgent.

664{
665 auto& plugin = BBLNetworkPlugin::instance();
666 auto agent = plugin.get_agent();
667 auto func = plugin.get_get_subtask();
668 if (func && agent) {
669 return func(agent, task, getsub_fn);
670 }
671 return -1;
672}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_subtask_info()

int Slic3r::BBLCloudServiceAgent::get_subtask_info ( std::string subtask_id,
std::string * task_json,
unsigned int * http_code,
std::string * http_body )
overridevirtual

Fetch subtask information.

Implements Slic3r::ICloudServiceAgent.

572{
573 auto& plugin = BBLNetworkPlugin::instance();
574 auto agent = plugin.get_agent();
575 auto func = plugin.get_get_subtask_info();
576 if (func && agent) {
577 return func(agent, subtask_id, task_json, http_code, http_body);
578 }
579 return -1;
580}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_task_plate_index()

int Slic3r::BBLCloudServiceAgent::get_task_plate_index ( std::string task_id,
int * plate_index )
overridevirtual

Get plate index for a cloud task.

Implements Slic3r::ICloudServiceAgent.

550{
551 auto& plugin = BBLNetworkPlugin::instance();
552 auto agent = plugin.get_agent();
553 auto func = plugin.get_get_task_plate_index();
554 if (func && agent) {
555 return func(agent, task_id, plate_index);
556 }
557 return -1;
558}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_track_enable()

bool Slic3r::BBLCloudServiceAgent::get_track_enable ( )
overridevirtual

Check if tracking is enabled.

Implements Slic3r::ICloudServiceAgent.

790{
791 return m_enable_track;
792}
bool m_enable_track
Definition BBLCloudServiceAgent.hpp:136

References m_enable_track.

◆ get_user_avatar()

std::string Slic3r::BBLCloudServiceAgent::get_user_avatar ( )
overridevirtual

Return the avatar URL/path for the current user.

Implements Slic3r::ICloudServiceAgent.

222{
223 auto& plugin = BBLNetworkPlugin::instance();
224 auto agent = plugin.get_agent();
225 auto func = plugin.get_get_user_avatar();
226 if (func && agent) {
227 return func(agent);
228 }
229 return "";
230}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_id()

std::string Slic3r::BBLCloudServiceAgent::get_user_id ( )
overridevirtual

Return the backend-generated user ID for the current session.

Implements Slic3r::ICloudServiceAgent.

200{
201 auto& plugin = BBLNetworkPlugin::instance();
202 auto agent = plugin.get_agent();
203 auto func = plugin.get_get_user_id();
204 if (func && agent) {
205 return func(agent);
206 }
207 return "";
208}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_info()

int Slic3r::BBLCloudServiceAgent::get_user_info ( int * identifier)
overridevirtual

Retrieve extended user profile info.

Implements Slic3r::ICloudServiceAgent.

561{
562 auto& plugin = BBLNetworkPlugin::instance();
563 auto agent = plugin.get_agent();
564 auto func = plugin.get_get_user_info();
565 if (func && agent) {
566 return func(agent, identifier);
567 }
568 return -1;
569}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_name()

std::string Slic3r::BBLCloudServiceAgent::get_user_name ( )
overridevirtual

Return the display name for the current user.

Implements Slic3r::ICloudServiceAgent.

211{
212 auto& plugin = BBLNetworkPlugin::instance();
213 auto agent = plugin.get_agent();
214 auto func = plugin.get_get_user_name();
215 if (func && agent) {
216 return func(agent);
217 }
218 return "";
219}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_nickname()

std::string Slic3r::BBLCloudServiceAgent::get_user_nickname ( )
overridevirtual

Return the nickname for the current user.

Implements Slic3r::ICloudServiceAgent.

233{
234 auto& plugin = BBLNetworkPlugin::instance();
235 auto agent = plugin.get_agent();
236 auto func = plugin.get_get_user_nickanme();
237 if (func && agent) {
238 return func(agent);
239 }
240 return "";
241}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_presets()

int Slic3r::BBLCloudServiceAgent::get_user_presets ( std::map< std::string, std::map< std::string, std::string > > * user_presets)
overridevirtual

Fetch all presets owned by the logged-in user.

Parameters
user_presetsMap populated with [type][setting_id] = json

Implements Slic3r::ICloudServiceAgent.

425{
426 auto& plugin = BBLNetworkPlugin::instance();
427 auto agent = plugin.get_agent();
428 auto func = plugin.get_get_user_presets();
429 if (func && agent) {
430 return func(agent, user_presets);
431 }
432 return -1;
433}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_print_info()

int Slic3r::BBLCloudServiceAgent::get_user_print_info ( unsigned int * http_code,
std::string * http_body )
overridevirtual

Fetch aggregated print statistics.

Implements Slic3r::ICloudServiceAgent.

517{
518 auto& plugin = BBLNetworkPlugin::instance();
519 auto agent = plugin.get_agent();
520 auto func = plugin.get_get_user_print_info();
521 if (func && agent) {
522 return func(agent, http_code, http_body);
523 }
524 return -1;
525}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_user_tasks()

int Slic3r::BBLCloudServiceAgent::get_user_tasks ( TaskQueryParams params,
std::string * http_body )
overridevirtual

Query user's tasks/prints.

Implements Slic3r::ICloudServiceAgent.

528{
529 auto& plugin = BBLNetworkPlugin::instance();
530 auto agent = plugin.get_agent();
531 auto func = plugin.get_get_user_tasks();
532 if (func && agent) {
533 return func(agent, params, http_body);
534 }
535 return -1;
536}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ get_version()

std::string Slic3r::BBLCloudServiceAgent::get_version ( )
overridevirtual

Return the version of the cloud service implementation.

Implements Slic3r::ICloudServiceAgent.

885{
886 auto& plugin = BBLNetworkPlugin::instance();
887 auto func = plugin.get_get_version();
888 if (func) {
889 return func();
890 }
891 return "";
892}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ init_log()

int Slic3r::BBLCloudServiceAgent::init_log ( )
overridevirtual

Initialize the logging backend for the agent. Call after set_config_dir() so logs have a destination.

Implements Slic3r::ICloudServiceAgent.

106{
107 auto& plugin = BBLNetworkPlugin::instance();
108 auto agent = plugin.get_agent();
109 auto func = plugin.get_init_log();
110 if (func && agent) {
111 return func(agent);
112 }
113 return -1;
114}

References 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:

◆ is_server_connected()

bool Slic3r::BBLCloudServiceAgent::is_server_connected ( )
overridevirtual

Return whether the server is currently reachable.

Implements Slic3r::ICloudServiceAgent.

345{
346 auto& plugin = BBLNetworkPlugin::instance();
347 auto agent = plugin.get_agent();
348 auto func = plugin.get_is_server_connected();
349 if (func && agent) {
350 return func(agent);
351 }
352 return false;
353}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ is_user_login()

bool Slic3r::BBLCloudServiceAgent::is_user_login ( )
overridevirtual

Check whether a valid authenticated session exists.

Implements Slic3r::ICloudServiceAgent.

178{
179 auto& plugin = BBLNetworkPlugin::instance();
180 auto agent = plugin.get_agent();
181 auto func = plugin.get_is_user_login();
182 if (func && agent) {
183 return func(agent);
184 }
185 return false;
186}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ modify_printer_name()

int Slic3r::BBLCloudServiceAgent::modify_printer_name ( std::string dev_id,
std::string dev_name )
overridevirtual

Update printer name in cloud profile.

Implements Slic3r::ICloudServiceAgent.

605{
606 auto& plugin = BBLNetworkPlugin::instance();
607 auto agent = plugin.get_agent();
608 auto func = plugin.get_modify_printer_name();
609 if (func && agent) {
610 return func(agent, dev_id, dev_name);
611 }
612 return -1;
613}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ put_model_mall_rating()

int Slic3r::BBLCloudServiceAgent::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 )
overridevirtual

Submit a review for a marketplace design.

Implements Slic3r::ICloudServiceAgent.

799{
800 auto& plugin = BBLNetworkPlugin::instance();
801 auto agent = plugin.get_agent();
802 auto func = plugin.get_put_model_mall_rating();
803 if (func && agent) {
804 return func(agent, design_id, score, content, images, http_code, http_error);
805 }
806 return -1;
807}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ put_rating_picture_oss()

int Slic3r::BBLCloudServiceAgent::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 )
overridevirtual

Upload rating images to OSS.

Implements Slic3r::ICloudServiceAgent.

821{
822 auto& plugin = BBLNetworkPlugin::instance();
823 auto agent = plugin.get_agent();
824 auto func = plugin.get_put_rating_picture_oss();
825 if (func && agent) {
826 return func(agent, config, pic_oss_path, model_id, profile_id, http_code, http_error);
827 }
828 return -1;
829}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ put_setting()

int Slic3r::BBLCloudServiceAgent::put_setting ( std::string setting_id,
std::string name,
std::map< std::string, std::string > * values_map,
unsigned int * http_code,
bool force = false )
overridevirtual

Update or create a preset with a known setting_id.

Implements Slic3r::ICloudServiceAgent.

447{
448 auto& plugin = BBLNetworkPlugin::instance();
449 auto agent = plugin.get_agent();
450 auto func = plugin.get_put_setting();
451 if (func && agent) {
452 return func(agent, setting_id, name, values_map, http_code);
453 }
454 return -1;
455}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ query_bind_status()

int Slic3r::BBLCloudServiceAgent::query_bind_status ( std::vector< std::string > query_list,
unsigned int * http_code,
std::string * http_body )
overridevirtual

Query binding status for multiple devices.

Implements Slic3r::ICloudServiceAgent.

594{
595 auto& plugin = BBLNetworkPlugin::instance();
596 auto agent = plugin.get_agent();
597 auto func = plugin.get_query_bind_status();
598 if (func && agent) {
599 return func(agent, query_list, http_code, http_body);
600 }
601 return -1;
602}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ refresh_connection()

int Slic3r::BBLCloudServiceAgent::refresh_connection ( )
overridevirtual

Force a server state recheck, clearing any cached state. The result arrives through is_server_connected() and OnServerConnectedFn. Implementations may return before the check finishes, fold the call into a check already in flight, and ignore calls while the agent is shutting down.

Implements Slic3r::ICloudServiceAgent.

356{
357 auto& plugin = BBLNetworkPlugin::instance();
358 auto agent = plugin.get_agent();
359 auto func = plugin.get_refresh_connection();
360 if (func && agent) {
361 return func(agent);
362 }
363 return -1;
364}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ request_setting_id()

std::string Slic3r::BBLCloudServiceAgent::request_setting_id ( std::string name,
std::map< std::string, std::string > * values_map,
unsigned int * http_code )
overridevirtual

Request a new preset identifier from the server.

Implements Slic3r::ICloudServiceAgent.

436{
437 auto& plugin = BBLNetworkPlugin::instance();
438 auto agent = plugin.get_agent();
439 auto func = plugin.get_request_setting_id();
440 if (func && agent) {
441 return func(agent, name, values_map, http_code);
442 }
443 return "";
444}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ set_cert_file()

int Slic3r::BBLCloudServiceAgent::set_cert_file ( std::string folder,
std::string filename )
overridevirtual

Register the client certificate file for TLS authentication. May be unused by some implementations (e.g., OrcaCloudServiceAgent).

Implements Slic3r::ICloudServiceAgent.

128{
129 auto& plugin = BBLNetworkPlugin::instance();
130 auto agent = plugin.get_agent();
131 auto func = plugin.get_set_cert_file();
132 if (func && agent) {
133 return func(agent, folder, filename);
134 }
135 return -1;
136}

References 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:

◆ set_config_dir()

int Slic3r::BBLCloudServiceAgent::set_config_dir ( std::string config_dir)
overridevirtual

Provide the writable configuration directory for storing auth state. Must be called before start().

Implements Slic3r::ICloudServiceAgent.

117{
118 auto& plugin = BBLNetworkPlugin::instance();
119 auto agent = plugin.get_agent();
120 auto func = plugin.get_set_config_dir();
121 if (func && agent) {
122 return func(agent, config_dir);
123 }
124 return -1;
125}

References 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:

◆ set_country_code()

int Slic3r::BBLCloudServiceAgent::set_country_code ( std::string country_code)
overridevirtual

Set the country code for region-specific backend selection.

Implements Slic3r::ICloudServiceAgent.

139{
140 auto& plugin = BBLNetworkPlugin::instance();
141 auto agent = plugin.get_agent();
142 auto func = plugin.get_set_country_code();
143 if (func && agent) {
144 return func(agent, country_code);
145 }
146 return -1;
147}

References 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:

◆ set_extra_http_header()

int Slic3r::BBLCloudServiceAgent::set_extra_http_header ( )
private
847{
848 // Orca: not sure if this required to login into bbl cloud
849 // Slic3r::Http::set_extra_headers(extra_headers);
850
851 auto& plugin = BBLNetworkPlugin::instance();
852 auto agent = plugin.get_agent();
853
854 auto func = plugin.get_set_extra_http_header();
855 if (func && agent) {
857 return func(agent, extra_headers);
858 }
859 return -1;
860}
static std::map< std::string, std::string > get_extra_header()
Definition BBLCloudServiceAgent.cpp:59

References Slic3r::extra_headers, get_extra_header(), and Slic3r::BBLNetworkPlugin::instance().

Referenced by start().

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

◆ set_get_country_code_fn()

int Slic3r::BBLCloudServiceAgent::set_get_country_code_fn ( GetCountryCodeFn fn)
overridevirtual

Provide country code getter callback.

Implements Slic3r::ICloudServiceAgent.

933{
934 auto& plugin = BBLNetworkPlugin::instance();
935 auto agent = plugin.get_agent();
936 auto func = plugin.get_set_get_country_code_fn();
937 if (func && agent) {
938 return func(agent, fn);
939 }
940 return -1;
941}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ set_on_http_error_fn()

int Slic3r::BBLCloudServiceAgent::set_on_http_error_fn ( AppOnHttpErrorFn fn)
overridevirtual

Register HTTP error callback.

Implements Slic3r::ICloudServiceAgent.

916{
918 auto& plugin = BBLNetworkPlugin::instance();
919 auto agent = plugin.get_agent();
920 auto func = plugin.get_set_on_http_error_fn();
921 if (func && agent) {
922 // Register raw callback with DLL, wrap to inject CloudEvent
923 return func(agent, [this](unsigned http_code, std::string http_body) {
925 m_app_on_http_error_fn(CloudEvent{BBL_CLOUD_PROVIDER}, http_code, http_body);
926 }
927 });
928 }
929 return -1;
930}
AppOnHttpErrorFn m_app_on_http_error_fn
Definition BBLCloudServiceAgent.hpp:138

References Slic3r::BBL_CLOUD_PROVIDER(), Slic3r::BBLNetworkPlugin::instance(), and m_app_on_http_error_fn.

Here is the call graph for this function:

◆ set_on_server_connected_fn()

int Slic3r::BBLCloudServiceAgent::set_on_server_connected_fn ( AppOnServerConnectedFn fn)
overridevirtual

Register server connection status callback.

Implements Slic3r::ICloudServiceAgent.

899{
901 auto& plugin = BBLNetworkPlugin::instance();
902 auto agent = plugin.get_agent();
903 auto func = plugin.get_set_on_server_connected_fn();
904 if (func && agent) {
905 // Register raw callback with DLL, wrap to inject CloudEvent
906 return func(agent, [this](int return_code, int reason_code) {
908 m_app_on_server_connected_fn(CloudEvent{BBL_CLOUD_PROVIDER}, return_code, reason_code);
909 }
910 });
911 }
912 return -1;
913}
AppOnServerConnectedFn m_app_on_server_connected_fn
Definition BBLCloudServiceAgent.hpp:137

References Slic3r::BBL_CLOUD_PROVIDER(), Slic3r::BBLNetworkPlugin::instance(), and m_app_on_server_connected_fn.

Here is the call graph for this function:

◆ set_queue_on_main_fn()

int Slic3r::BBLCloudServiceAgent::set_queue_on_main_fn ( QueueOnMainFn fn)
overridevirtual

Provide main thread queue callback.

Implements Slic3r::ICloudServiceAgent.

944{
945 auto& plugin = BBLNetworkPlugin::instance();
946 auto agent = plugin.get_agent();
947 auto func = plugin.get_set_queue_on_main_fn();
948 if (func && agent) {
949 return func(agent, fn);
950 }
951 return -1;
952}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ start()

int Slic3r::BBLCloudServiceAgent::start ( )
overridevirtual

Start the agent, performing any expensive initialization. Typically regenerates PKCE bundles and attempts silent sign-in.

Implements Slic3r::ICloudServiceAgent.

150{
152
153 auto& plugin = BBLNetworkPlugin::instance();
154 auto agent = plugin.get_agent();
155 auto func = plugin.get_start();
156 if (func && agent) {
157 return func(agent);
158 }
159 return -1;
160}
int set_extra_http_header()
Definition BBLCloudServiceAgent.cpp:846

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

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:

◆ start_publish()

int Slic3r::BBLCloudServiceAgent::start_publish ( PublishParams params,
OnUpdateStatusFn update_fn,
WasCancelledFn cancel_fn,
std::string * out )
overridevirtual

Run multi-stage publishing workflow.

Implements Slic3r::ICloudServiceAgent.

642{
643 auto& plugin = BBLNetworkPlugin::instance();
644 auto agent = plugin.get_agent();
645 auto func = plugin.get_start_publish();
646 if (func && agent) {
647 return func(agent, params, update_fn, cancel_fn, out);
648 }
649 return -1;
650}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ start_subscribe()

int Slic3r::BBLCloudServiceAgent::start_subscribe ( std::string module)
overridevirtual

Subscribe to a logical module (e.g., "printer", "user").

Implements Slic3r::ICloudServiceAgent.

367{
368 auto& plugin = BBLNetworkPlugin::instance();
369 auto agent = plugin.get_agent();
370 auto func = plugin.get_start_subscribe();
371 if (func && agent) {
372 return func(agent, module);
373 }
374 return -1;
375}
FileTransferModule & module()
Definition FileTransferUtils.hpp:248

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

Here is the call graph for this function:

◆ stop_subscribe()

int Slic3r::BBLCloudServiceAgent::stop_subscribe ( std::string module)
overridevirtual

Stop listening to a formerly subscribed module.

Implements Slic3r::ICloudServiceAgent.

378{
379 auto& plugin = BBLNetworkPlugin::instance();
380 auto agent = plugin.get_agent();
381 auto func = plugin.get_stop_subscribe();
382 if (func && agent) {
383 return func(agent, module);
384 }
385 return -1;
386}

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

Here is the call graph for this function:

◆ track_enable()

int Slic3r::BBLCloudServiceAgent::track_enable ( bool enable)
overridevirtual

Enable/disable telemetry.

Implements Slic3r::ICloudServiceAgent.

723{
724 m_enable_track = enable;
725 auto& plugin = BBLNetworkPlugin::instance();
726 auto agent = plugin.get_agent();
727 auto func = plugin.get_track_enable();
728 if (func && agent) {
729 return func(agent, enable);
730 }
731 return -1;
732}

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

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:

◆ track_event()

int Slic3r::BBLCloudServiceAgent::track_event ( std::string evt_key,
std::string content )
overridevirtual

Report a custom analytics event.

Implements Slic3r::ICloudServiceAgent.

746{
747 auto& plugin = BBLNetworkPlugin::instance();
748 auto agent = plugin.get_agent();
749 auto func = plugin.get_track_event();
750 if (func && agent) {
751 return func(agent, evt_key, content);
752 }
753 return -1;
754}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ track_get_property()

int Slic3r::BBLCloudServiceAgent::track_get_property ( std::string name,
std::string & value,
std::string type = "string" )
overridevirtual

Read a tracked user property.

Implements Slic3r::ICloudServiceAgent.

779{
780 auto& plugin = BBLNetworkPlugin::instance();
781 auto agent = plugin.get_agent();
782 auto func = plugin.get_track_get_property();
783 if (func && agent) {
784 return func(agent, name, value, type);
785 }
786 return -1;
787}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ track_header()

int Slic3r::BBLCloudServiceAgent::track_header ( std::string header)
overridevirtual

Set telemetry headers.

Implements Slic3r::ICloudServiceAgent.

757{
758 auto& plugin = BBLNetworkPlugin::instance();
759 auto agent = plugin.get_agent();
760 auto func = plugin.get_track_header();
761 if (func && agent) {
762 return func(agent, header);
763 }
764 return -1;
765}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ track_remove_files()

int Slic3r::BBLCloudServiceAgent::track_remove_files ( )
overridevirtual

Delete telemetry files.

Implements Slic3r::ICloudServiceAgent.

735{
736 auto& plugin = BBLNetworkPlugin::instance();
737 auto agent = plugin.get_agent();
738 auto func = plugin.get_track_remove_files();
739 if (func && agent) {
740 return func(agent);
741 }
742 return -1;
743}

References 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:

◆ track_update_property()

int Slic3r::BBLCloudServiceAgent::track_update_property ( std::string name,
std::string value,
std::string type = "string" )
overridevirtual

Update a tracked user property.

Implements Slic3r::ICloudServiceAgent.

768{
769 auto& plugin = BBLNetworkPlugin::instance();
770 auto agent = plugin.get_agent();
771 auto func = plugin.get_track_update_property();
772 if (func && agent) {
773 return func(agent, name, value, type);
774 }
775 return -1;
776}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

◆ user_logout()

int Slic3r::BBLCloudServiceAgent::user_logout ( bool request = false)
overridevirtual

Terminate the current session.

Parameters
requestIf true, also notify the backend to invalidate the session.

Implements Slic3r::ICloudServiceAgent.

189{
190 auto& plugin = BBLNetworkPlugin::instance();
191 auto agent = plugin.get_agent();
192 auto func = plugin.get_user_logout();
193 if (func && agent) {
194 return func(agent, request);
195 }
196 return -1;
197}

References Slic3r::BBLNetworkPlugin::instance().

Here is the call graph for this function:

Member Data Documentation

◆ m_app_on_http_error_fn

AppOnHttpErrorFn Slic3r::BBLCloudServiceAgent::m_app_on_http_error_fn
private

Referenced by set_on_http_error_fn().

◆ m_app_on_server_connected_fn

AppOnServerConnectedFn Slic3r::BBLCloudServiceAgent::m_app_on_server_connected_fn
private

◆ m_enable_track

bool Slic3r::BBLCloudServiceAgent::m_enable_track {false}
private
136{false};

Referenced by get_track_enable(), and track_enable().


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