mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-18 00:12:09 +00:00
Bind the 02.08.01.52 plugin's new ABI symbols
Add the 11 functions the newer plugin exports (HMS snapshot, GoLive camera URL, consent report, cloud filament-spool CRUD, AMS-filament sync, login-state and studio-info hooks) plus their four parameter structs. Everything resolves to null on older plugins and no caller invokes them yet, so this is inert ABI surface for later features.
This commit is contained in:
@@ -639,6 +639,19 @@ void BBLNetworkPlugin::load_all_function_pointers()
|
||||
m_get_model_mall_rating_result = reinterpret_cast<func_get_model_mall_rating_result>(get_function("bambu_network_get_model_mall_rating"));
|
||||
m_get_mw_user_preference = reinterpret_cast<func_get_mw_user_preference>(get_function("bambu_network_get_mw_user_preference"));
|
||||
m_get_mw_user_4ulist = reinterpret_cast<func_get_mw_user_4ulist>(get_function("bambu_network_get_mw_user_4ulist"));
|
||||
|
||||
// Added by the 02.08.01.52 plugin ABI; resolve to null on older plugins so callers no-op.
|
||||
m_set_on_user_login_fn = reinterpret_cast<func_set_on_user_login_fn>(get_function("bambu_network_set_on_user_login_fn"));
|
||||
m_get_studio_info_url = reinterpret_cast<func_get_studio_info_url>(get_function("bambu_network_get_studio_info_url"));
|
||||
m_report_consent = reinterpret_cast<func_report_consent>(get_function("bambu_network_report_consent"));
|
||||
m_get_camera_url_for_golive = reinterpret_cast<func_get_camera_url_for_golive>(get_function("bambu_network_get_camera_url_for_golive"));
|
||||
m_get_hms_snapshot = reinterpret_cast<func_get_hms_snapshot>(get_function("bambu_network_get_hms_snapshot"));
|
||||
m_get_filament_spools = reinterpret_cast<func_get_filament_spools>(get_function("bambu_network_get_filament_spools"));
|
||||
m_create_filament_spool = reinterpret_cast<func_create_filament_spool>(get_function("bambu_network_create_filament_spool"));
|
||||
m_update_filament_spool = reinterpret_cast<func_update_filament_spool>(get_function("bambu_network_update_filament_spool"));
|
||||
m_delete_filament_spools = reinterpret_cast<func_delete_filament_spools>(get_function("bambu_network_delete_filament_spools"));
|
||||
m_get_filament_config = reinterpret_cast<func_get_filament_config>(get_function("bambu_network_get_filament_config"));
|
||||
m_sync_ams_filaments = reinterpret_cast<func_sync_ams_filaments>(get_function("bambu_network_sync_ams_filaments"));
|
||||
}
|
||||
|
||||
void BBLNetworkPlugin::clear_all_function_pointers()
|
||||
@@ -741,6 +754,18 @@ void BBLNetworkPlugin::clear_all_function_pointers()
|
||||
m_get_model_mall_rating_result = nullptr;
|
||||
m_get_mw_user_preference = nullptr;
|
||||
m_get_mw_user_4ulist = nullptr;
|
||||
|
||||
m_set_on_user_login_fn = nullptr;
|
||||
m_get_studio_info_url = nullptr;
|
||||
m_report_consent = nullptr;
|
||||
m_get_camera_url_for_golive = nullptr;
|
||||
m_get_hms_snapshot = nullptr;
|
||||
m_get_filament_spools = nullptr;
|
||||
m_create_filament_spool = nullptr;
|
||||
m_update_filament_spool = nullptr;
|
||||
m_delete_filament_spools = nullptr;
|
||||
m_get_filament_config = nullptr;
|
||||
m_sync_ams_filaments = nullptr;
|
||||
}
|
||||
|
||||
std::vector<NetworkLibraryVersionInfo> get_all_available_versions()
|
||||
|
||||
@@ -128,6 +128,19 @@ typedef int (*func_start_sdcard_print_legacy)(void* agent, PrintParams_Legacy pa
|
||||
typedef int (*func_send_message_legacy)(void* agent, std::string dev_id, std::string json_str, int qos);
|
||||
typedef int (*func_send_message_to_printer_legacy)(void* agent, std::string dev_id, std::string json_str, int qos);
|
||||
|
||||
// Added by the 02.08.01.52 plugin ABI (null on older plugins).
|
||||
typedef int (*func_set_on_user_login_fn)(void *agent, OnUserLoginFn fn);
|
||||
typedef std::string (*func_get_studio_info_url)(void *agent);
|
||||
typedef int (*func_report_consent)(void *agent, std::string expand);
|
||||
typedef int (*func_get_camera_url_for_golive)(void *agent, std::string dev_id, std::string sdev_id, std::function<void(std::string)> callback);
|
||||
typedef int (*func_get_hms_snapshot)(void *agent, std::string& dev_id, std::string& file_name, std::function<void(std::string, int)> callback);
|
||||
typedef int (*func_get_filament_spools)(void *agent, FilamentQueryParams params, std::string* http_body);
|
||||
typedef int (*func_create_filament_spool)(void *agent, std::string request_body, std::string* http_body);
|
||||
typedef int (*func_update_filament_spool)(void *agent, std::string spool_id, std::string request_body, std::string* http_body);
|
||||
typedef int (*func_delete_filament_spools)(void *agent, FilamentDeleteParams params, std::string* http_body);
|
||||
typedef int (*func_get_filament_config)(void *agent, std::string* http_body);
|
||||
typedef int (*func_sync_ams_filaments)(void *agent, AmsSyncParams params, std::string* http_body);
|
||||
|
||||
/**
|
||||
* BBLNetworkPlugin - Singleton managing the Bambu Lab network DLL.
|
||||
*
|
||||
@@ -372,6 +385,17 @@ public:
|
||||
func_get_model_mall_rating_result get_get_model_mall_rating_result() const { return m_get_model_mall_rating_result; }
|
||||
func_get_mw_user_preference get_get_mw_user_preference() const { return m_get_mw_user_preference; }
|
||||
func_get_mw_user_4ulist get_get_mw_user_4ulist() const { return m_get_mw_user_4ulist; }
|
||||
func_set_on_user_login_fn get_set_on_user_login_fn() const { return m_set_on_user_login_fn; }
|
||||
func_get_studio_info_url get_get_studio_info_url() const { return m_get_studio_info_url; }
|
||||
func_report_consent get_report_consent() const { return m_report_consent; }
|
||||
func_get_camera_url_for_golive get_get_camera_url_for_golive() const { return m_get_camera_url_for_golive; }
|
||||
func_get_hms_snapshot get_get_hms_snapshot() const { return m_get_hms_snapshot; }
|
||||
func_get_filament_spools get_get_filament_spools() const { return m_get_filament_spools; }
|
||||
func_create_filament_spool get_create_filament_spool() const { return m_create_filament_spool; }
|
||||
func_update_filament_spool get_update_filament_spool() const { return m_update_filament_spool; }
|
||||
func_delete_filament_spools get_delete_filament_spools() const { return m_delete_filament_spools; }
|
||||
func_get_filament_config get_get_filament_config() const { return m_get_filament_config; }
|
||||
func_sync_ams_filaments get_sync_ams_filaments() const { return m_sync_ams_filaments; }
|
||||
|
||||
// ========================================================================
|
||||
// Legacy Helper
|
||||
@@ -506,6 +530,17 @@ private:
|
||||
func_get_model_mall_rating_result m_get_model_mall_rating_result{nullptr};
|
||||
func_get_mw_user_preference m_get_mw_user_preference{nullptr};
|
||||
func_get_mw_user_4ulist m_get_mw_user_4ulist{nullptr};
|
||||
func_set_on_user_login_fn m_set_on_user_login_fn{nullptr};
|
||||
func_get_studio_info_url m_get_studio_info_url{nullptr};
|
||||
func_report_consent m_report_consent{nullptr};
|
||||
func_get_camera_url_for_golive m_get_camera_url_for_golive{nullptr};
|
||||
func_get_hms_snapshot m_get_hms_snapshot{nullptr};
|
||||
func_get_filament_spools m_get_filament_spools{nullptr};
|
||||
func_create_filament_spool m_create_filament_spool{nullptr};
|
||||
func_update_filament_spool m_update_filament_spool{nullptr};
|
||||
func_delete_filament_spools m_delete_filament_spools{nullptr};
|
||||
func_get_filament_config m_get_filament_config{nullptr};
|
||||
func_sync_ams_filaments m_sync_ams_filaments{nullptr};
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
@@ -128,6 +128,7 @@ typedef std::function<void(std::string topic)> GetSubscribeFailureFn;
|
||||
typedef std::function<void(int status, int code, std::string msg)> OnUpdateStatusFn;
|
||||
typedef std::function<bool()> WasCancelledFn;
|
||||
typedef std::function<bool(int status, std::string job_info)> OnWaitFn;
|
||||
typedef std::function<void(int online_login, bool login)> OnUserLoginFn;
|
||||
// local callbacks
|
||||
typedef std::function<void(std::string dev_info_json_str)> OnMsgArrivedFn;
|
||||
// queue call to main thread
|
||||
@@ -291,6 +292,48 @@ struct TaskQueryParams
|
||||
int limit = 20;
|
||||
};
|
||||
|
||||
struct FilamentQueryParams
|
||||
{
|
||||
std::string category;
|
||||
std::string status;
|
||||
std::string spool_id;
|
||||
std::string rfid;
|
||||
int offset = 0;
|
||||
int limit = 20;
|
||||
};
|
||||
|
||||
struct FilamentDeleteParams
|
||||
{
|
||||
std::vector<std::string> ids;
|
||||
std::vector<std::string> rfids;
|
||||
};
|
||||
|
||||
struct AmsSyncItem {
|
||||
std::string RFID;
|
||||
std::string filamentVendor;
|
||||
std::string filamentType;
|
||||
std::string filamentName;
|
||||
std::string filamentId;
|
||||
bool isSupport = false;
|
||||
std::string color;
|
||||
int colorType = 0;
|
||||
std::vector<std::string> colors;
|
||||
int netWeight = 0;
|
||||
int totalNetWeight = 0;
|
||||
std::string trayIdName;
|
||||
std::string note;
|
||||
std::string amsSn;
|
||||
std::string slotId;
|
||||
int amsId = 0;
|
||||
int amsType = 0;
|
||||
bool createNew = false;
|
||||
};
|
||||
|
||||
struct AmsSyncParams {
|
||||
std::string devId;
|
||||
std::vector<AmsSyncItem> items;
|
||||
};
|
||||
|
||||
struct PublishParams {
|
||||
std::string project_name;
|
||||
std::string project_3mf_file;
|
||||
|
||||
Reference in New Issue
Block a user