Initial release

This commit is contained in:
Jake
2026-05-11 19:29:55 +01:00
commit d4d1215874
16967 changed files with 4075897 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
#pragma once
#include <string>
#include <nlohmann/json.hpp>
namespace Slic3r::BambuBridge {
inline bool looks_like_change_user_data(const nlohmann::json& j)
{
if (!j.is_object())
return false;
return j.contains("token") ||
j.contains("access_token") ||
j.contains("refresh_token") ||
j.contains("code") ||
j.contains("user") ||
j.contains("user_id") ||
j.contains("uidStr");
}
inline nlohmann::json normalize_change_user_payload(const nlohmann::json& input)
{
if (!input.is_object())
return input;
const auto command = input.value("command", std::string());
if ((command == "user_login" || command == "login_token") && input.contains("data") && input["data"].is_object())
return input;
auto data_it = input.find("data");
if (data_it != input.end() && looks_like_change_user_data(*data_it))
return {
{"command", command.empty() ? "user_login" : command},
{"data", *data_it},
};
if (looks_like_change_user_data(input))
return {
{"command", "user_login"},
{"data", input},
};
return input;
}
inline std::string normalize_change_user_payload_string(const std::string& input)
{
try {
const auto parsed = nlohmann::json::parse(input);
return normalize_change_user_payload(parsed).dump();
} catch (...) {
return input;
}
}
}

View File

@@ -0,0 +1,9 @@
#pragma once
#include "../BambuBridge/Auth/BridgeAuthPayload.hpp"
namespace Slic3r::PJarczakLinuxBridge {
using Slic3r::BambuBridge::looks_like_change_user_data;
using Slic3r::BambuBridge::normalize_change_user_payload;
using Slic3r::BambuBridge::normalize_change_user_payload_string;
}

View File

@@ -0,0 +1,45 @@
#include "BridgeCoreCallbackQueue.hpp"
namespace PJarczak::LinuxPluginBridgeCore {
void CallbackQueue::push(BridgeEvent event)
{
std::lock_guard<std::mutex> lock(m_mutex);
m_queue.push_back(std::move(event));
}
bool CallbackQueue::try_pop(BridgeEvent& event)
{
std::lock_guard<std::mutex> lock(m_mutex);
if (m_queue.empty())
return false;
event = std::move(m_queue.front());
m_queue.pop_front();
return true;
}
std::vector<BridgeEvent> CallbackQueue::drain()
{
std::lock_guard<std::mutex> lock(m_mutex);
std::vector<BridgeEvent> out;
out.reserve(m_queue.size());
while (!m_queue.empty()) {
out.push_back(std::move(m_queue.front()));
m_queue.pop_front();
}
return out;
}
std::size_t CallbackQueue::size() const
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_queue.size();
}
void CallbackQueue::clear()
{
std::lock_guard<std::mutex> lock(m_mutex);
m_queue.clear();
}
}

View File

@@ -0,0 +1,22 @@
#pragma once
#include "BridgeCoreTypes.hpp"
#include <deque>
namespace PJarczak::LinuxPluginBridgeCore {
class CallbackQueue {
public:
void push(BridgeEvent event);
bool try_pop(BridgeEvent& event);
std::vector<BridgeEvent> drain();
std::size_t size() const;
void clear();
private:
mutable std::mutex m_mutex;
std::deque<BridgeEvent> m_queue;
};
}

View File

@@ -0,0 +1,60 @@
#include "BridgeCoreFrame.hpp"
namespace PJarczak::LinuxPluginBridgeCore {
static std::string encode_common(std::uint64_t id, const std::string& method, const nlohmann::json& payload, bool is_event)
{
nlohmann::json root;
root["id"] = id;
root["method"] = method;
root["payload"] = payload;
root["kind"] = is_event ? "event" : "rpc";
return root.dump() + "\n";
}
static bool decode_common(const std::string& line, std::uint64_t& id, std::string& method, nlohmann::json& payload, std::string& error)
{
try {
const auto root = nlohmann::json::parse(line);
if (!root.is_object()) {
error = "frame root is not object";
return false;
}
id = root.value("id", 0ULL);
method = root.value("method", std::string());
payload = root.value("payload", nlohmann::json::object());
return true;
} catch (const std::exception& e) {
error = e.what();
return false;
}
}
std::string encode_rpc_frame(const RpcFrame& frame)
{
return encode_common(frame.id, frame.method, frame.payload, false);
}
bool decode_rpc_frame(const std::string& line, RpcFrame& frame, std::string& error)
{
return decode_common(line, frame.id, frame.method, frame.payload, error);
}
std::string encode_bridge_event(const BridgeEvent& event)
{
nlohmann::json payload = event.payload;
payload["agent_handle"] = event.agent_handle;
payload["event_kind"] = static_cast<int>(event.kind);
return encode_common(event.id, event.name, payload, true);
}
bool decode_bridge_event(const std::string& line, BridgeEvent& event, std::string& error)
{
if (!decode_common(line, event.id, event.name, event.payload, error))
return false;
event.agent_handle = event.payload.value("agent_handle", 0LL);
event.kind = static_cast<EventKind>(event.payload.value("event_kind", 0));
return true;
}
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include "BridgeCoreTypes.hpp"
namespace PJarczak::LinuxPluginBridgeCore {
std::string encode_rpc_frame(const RpcFrame& frame);
bool decode_rpc_frame(const std::string& line, RpcFrame& frame, std::string& error);
std::string encode_bridge_event(const BridgeEvent& event);
bool decode_bridge_event(const std::string& line, BridgeEvent& event, std::string& error);
}

View File

@@ -0,0 +1,128 @@
#pragma once
#include <nlohmann/json.hpp>
#include "../../src/slic3r/Utils/bambu_networking.hpp"
namespace Slic3r::PJarczakLinuxBridge::JsonBridge {
inline nlohmann::json to_json(const BBL::PrintParams& p)
{
return {
{"dev_id", p.dev_id},
{"task_name", p.task_name},
{"project_name", p.project_name},
{"preset_name", p.preset_name},
{"filename", p.filename},
{"config_filename", p.config_filename},
{"plate_index", p.plate_index},
{"ftp_folder", p.ftp_folder},
{"ftp_file", p.ftp_file},
{"ftp_file_md5", p.ftp_file_md5},
{"nozzle_mapping", p.nozzle_mapping},
{"ams_mapping", p.ams_mapping},
{"ams_mapping2", p.ams_mapping2},
{"ams_mapping_info", p.ams_mapping_info},
{"nozzles_info", p.nozzles_info},
{"connection_type", p.connection_type},
{"comments", p.comments},
{"origin_profile_id", p.origin_profile_id},
{"stl_design_id", p.stl_design_id},
{"origin_model_id", p.origin_model_id},
{"print_type", p.print_type},
{"dst_file", p.dst_file},
{"dev_name", p.dev_name},
{"dev_ip", p.dev_ip},
{"use_ssl_for_ftp", p.use_ssl_for_ftp},
{"use_ssl_for_mqtt", p.use_ssl_for_mqtt},
{"username", p.username},
{"password", p.password},
{"task_bed_leveling", p.task_bed_leveling},
{"task_flow_cali", p.task_flow_cali},
{"task_vibration_cali", p.task_vibration_cali},
{"task_layer_inspect", p.task_layer_inspect},
{"task_record_timelapse", p.task_record_timelapse},
{"task_use_ams", p.task_use_ams},
{"task_bed_type", p.task_bed_type},
{"extra_options", p.extra_options},
{"auto_bed_leveling", p.auto_bed_leveling},
{"auto_flow_cali", p.auto_flow_cali},
{"auto_offset_cali", p.auto_offset_cali},
{"extruder_cali_manual_mode", p.extruder_cali_manual_mode},
{"task_ext_change_assist", p.task_ext_change_assist},
{"try_emmc_print", p.try_emmc_print}
};
}
inline BBL::PrintParams print_params_from_json(const nlohmann::json& j)
{
BBL::PrintParams p{};
p.dev_id = j.value("dev_id", std::string());
p.task_name = j.value("task_name", std::string());
p.project_name = j.value("project_name", std::string());
p.preset_name = j.value("preset_name", std::string());
p.filename = j.value("filename", std::string());
p.config_filename = j.value("config_filename", std::string());
p.plate_index = j.value("plate_index", 0);
p.ftp_folder = j.value("ftp_folder", std::string());
p.ftp_file = j.value("ftp_file", std::string());
p.ftp_file_md5 = j.value("ftp_file_md5", std::string());
p.nozzle_mapping = j.value("nozzle_mapping", std::string());
p.ams_mapping = j.value("ams_mapping", std::string());
p.ams_mapping2 = j.value("ams_mapping2", std::string());
p.ams_mapping_info = j.value("ams_mapping_info", std::string());
p.nozzles_info = j.value("nozzles_info", std::string());
p.connection_type = j.value("connection_type", std::string());
p.comments = j.value("comments", std::string());
p.origin_profile_id = j.value("origin_profile_id", 0);
p.stl_design_id = j.value("stl_design_id", 0);
p.origin_model_id = j.value("origin_model_id", std::string());
p.print_type = j.value("print_type", std::string());
p.dst_file = j.value("dst_file", std::string());
p.dev_name = j.value("dev_name", std::string());
p.dev_ip = j.value("dev_ip", std::string());
p.use_ssl_for_ftp = j.value("use_ssl_for_ftp", false);
p.use_ssl_for_mqtt = j.value("use_ssl_for_mqtt", false);
p.username = j.value("username", std::string());
p.password = j.value("password", std::string());
p.task_bed_leveling = j.value("task_bed_leveling", false);
p.task_flow_cali = j.value("task_flow_cali", false);
p.task_vibration_cali = j.value("task_vibration_cali", false);
p.task_layer_inspect = j.value("task_layer_inspect", false);
p.task_record_timelapse = j.value("task_record_timelapse", false);
p.task_use_ams = j.value("task_use_ams", false);
p.task_bed_type = j.value("task_bed_type", std::string());
p.extra_options = j.value("extra_options", std::string());
p.auto_bed_leveling = j.value("auto_bed_leveling", 0);
p.auto_flow_cali = j.value("auto_flow_cali", 0);
p.auto_offset_cali = j.value("auto_offset_cali", 0);
p.extruder_cali_manual_mode = j.value("extruder_cali_manual_mode", -1);
p.task_ext_change_assist = j.value("task_ext_change_assist", false);
p.try_emmc_print = j.value("try_emmc_print", false);
return p;
}
inline nlohmann::json to_json(const BBL::PublishParams& p)
{
return {
{"project_name", p.project_name},
{"project_3mf_file", p.project_3mf_file},
{"preset_name", p.preset_name},
{"project_model_id", p.project_model_id},
{"design_id", p.design_id},
{"config_filename", p.config_filename}
};
}
inline BBL::PublishParams publish_params_from_json(const nlohmann::json& j)
{
BBL::PublishParams p{};
p.project_name = j.value("project_name", std::string());
p.project_3mf_file = j.value("project_3mf_file", std::string());
p.preset_name = j.value("preset_name", std::string());
p.project_model_id = j.value("project_model_id", std::string());
p.design_id = j.value("design_id", std::string());
p.config_filename = j.value("config_filename", std::string());
return p;
}
}

View File

@@ -0,0 +1,158 @@
#include "BridgeCoreMethodManifest.hpp"
namespace PJarczak::LinuxPluginBridgeCore {
const std::vector<MethodManifestEntry>& method_manifest()
{
static const std::vector<MethodManifestEntry> entries = {
MethodManifestEntry{"bambu_network_check_debug_consistent", "bambu_network_check_debug_consistent", "network", "implemented", "stable", "local bridge always reports debug consistency"},
MethodManifestEntry{"bambu_network_get_version", "bambu_network_get_version", "network", "implemented", "stable", "returns bridge version"},
MethodManifestEntry{"bambu_network_create_agent", "bambu_network_create_agent", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_destroy_agent", "bambu_network_destroy_agent", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_init_log", "bambu_network_init_log", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_set_config_dir", "bambu_network_set_config_dir", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_set_cert_file", "bambu_network_set_cert_file", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_set_country_code", "bambu_network_set_country_code", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_start", "bambu_network_start", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_set_on_ssdp_msg_fn", "bambu_network_set_on_ssdp_msg_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_user_login_fn", "bambu_network_set_on_user_login_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_printer_connected_fn", "bambu_network_set_on_printer_connected_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_server_connected_fn", "bambu_network_set_on_server_connected_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_http_error_fn", "bambu_network_set_on_http_error_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_get_country_code_fn", "bambu_network_set_get_country_code_fn", "callbacks", "implemented", "bridge-wired", "callback bridged through request/reply RPC to local getter"},
MethodManifestEntry{"bambu_network_set_on_subscribe_failure_fn", "bambu_network_set_on_subscribe_failure_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_message_fn", "bambu_network_set_on_message_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_user_message_fn", "bambu_network_set_on_user_message_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_local_connect_fn", "bambu_network_set_on_local_connect_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_on_local_message_fn", "bambu_network_set_on_local_message_fn", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_set_queue_on_main_fn", "bambu_network_set_queue_on_main_fn", "callbacks", "implemented", "bridge-wired", "client-side queue_on_main dispatch retained and host callback path registered"},
MethodManifestEntry{"bambu_network_connect_server", "bambu_network_connect_server", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_is_server_connected", "bambu_network_is_server_connected", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_refresh_connection", "bambu_network_refresh_connection", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_start_subscribe", "bambu_network_start_subscribe", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_stop_subscribe", "bambu_network_stop_subscribe", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_add_subscribe", "bambu_network_add_subscribe", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_del_subscribe", "bambu_network_del_subscribe", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_enable_multi_machine", "bambu_network_enable_multi_machine", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_send_message", "bambu_network_send_message", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_connect_printer", "bambu_network_connect_printer", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_disconnect_printer", "bambu_network_disconnect_printer", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_send_message_to_printer", "bambu_network_send_message_to_printer", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_update_cert", "bambu_network_update_cert", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_install_device_cert", "bambu_network_install_device_cert", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_start_discovery", "bambu_network_start_discovery", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_change_user", "bambu_network_change_user", "network", "implemented", "stable", "rpc passthrough plus cache refresh"},
MethodManifestEntry{"bambu_network_is_user_login", "bambu_network_is_user_login", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_user_logout", "bambu_network_user_logout", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_user_id", "bambu_network_get_user_id", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_user_name", "bambu_network_get_user_name", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_user_avatar", "bambu_network_get_user_avatar", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_user_nickanme", "bambu_network_get_user_nickanme", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_build_login_cmd", "bambu_network_build_login_cmd", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_build_logout_cmd", "bambu_network_build_logout_cmd", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_build_login_info", "bambu_network_build_login_info", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_ping_bind", "bambu_network_ping_bind", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_bind_detect", "bambu_network_bind_detect", "jobs", "implemented", "experimental", "detectResult struct mapping not done"},
MethodManifestEntry{"bambu_network_report_consent", "bambu_network_report_consent", "jobs", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_set_server_callback", "bambu_network_set_server_callback", "callbacks", "implemented", "bridge-wired", "host callback fanout wired through event queue and local dispatch"},
MethodManifestEntry{"bambu_network_bind", "bambu_network_bind", "jobs", "implemented", "experimental", "phase5: bridged through host job runtime with callback and cancel plumbing"},
MethodManifestEntry{"bambu_network_unbind", "bambu_network_unbind", "jobs", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_bambulab_host", "bambu_network_get_bambulab_host", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_user_selected_machine", "bambu_network_get_user_selected_machine", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_set_user_selected_machine", "bambu_network_set_user_selected_machine", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_start_print", "bambu_network_start_print", "jobs", "implemented", "experimental", "phase5: bridged through host job runtime with callback and cancel plumbing"},
MethodManifestEntry{"bambu_network_start_local_print_with_record", "bambu_network_start_local_print_with_record", "jobs", "implemented", "experimental", "phase5: bridged through host job runtime with callback and cancel plumbing"},
MethodManifestEntry{"bambu_network_start_send_gcode_to_sdcard", "bambu_network_start_send_gcode_to_sdcard", "jobs", "implemented", "experimental", "phase5: bridged through host job runtime with callback and cancel plumbing"},
MethodManifestEntry{"bambu_network_start_local_print", "bambu_network_start_local_print", "jobs", "implemented", "experimental", "phase5: bridged through host job runtime with callback and cancel plumbing"},
MethodManifestEntry{"bambu_network_start_sdcard_print", "bambu_network_start_sdcard_print", "jobs", "implemented", "experimental", "phase5: bridged through host job runtime with callback and cancel plumbing"},
MethodManifestEntry{"bambu_network_get_user_presets", "bambu_network_get_user_presets", "network", "implemented", "stable", "nested map marshaled via json"},
MethodManifestEntry{"bambu_network_request_setting_id", "bambu_network_request_setting_id", "network", "implemented", "stable", "map and http code bridged via rpc"},
MethodManifestEntry{"bambu_network_put_setting", "bambu_network_put_setting", "network", "implemented", "stable", "map and http code bridged via rpc"},
MethodManifestEntry{"bambu_network_get_setting_list", "bambu_network_get_setting_list", "jobs", "implemented", "experimental", "progress callback not bridged"},
MethodManifestEntry{"bambu_network_get_setting_list2", "bambu_network_get_setting_list2", "jobs", "implemented", "experimental", "check, progress and cancel callbacks not bridged"},
MethodManifestEntry{"bambu_network_delete_setting", "bambu_network_delete_setting", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_studio_info_url", "bambu_network_get_studio_info_url", "network", "implemented", "stable", "string return bridged"},
MethodManifestEntry{"bambu_network_set_extra_http_header", "bambu_network_set_extra_http_header", "network", "implemented", "stable", "map marshaling bridged"},
MethodManifestEntry{"bambu_network_get_my_message", "bambu_network_get_my_message", "network", "implemented", "stable", "http code/body out params bridged"},
MethodManifestEntry{"bambu_network_check_user_task_report", "bambu_network_check_user_task_report", "network", "implemented", "stable", "task_id and printable out params bridged"},
MethodManifestEntry{"bambu_network_get_user_print_info", "bambu_network_get_user_print_info", "network", "implemented", "stable", "http code/body out params bridged"},
MethodManifestEntry{"bambu_network_get_user_tasks", "bambu_network_get_user_tasks", "network", "implemented", "stable", "TaskQueryParams and body bridged"},
MethodManifestEntry{"bambu_network_get_printer_firmware", "bambu_network_get_printer_firmware", "network", "implemented", "stable", "http code/body out params bridged"},
MethodManifestEntry{"bambu_network_get_task_plate_index", "bambu_network_get_task_plate_index", "network", "implemented", "stable", "plate index out param bridged"},
MethodManifestEntry{"bambu_network_get_user_info", "bambu_network_get_user_info", "network", "implemented", "stable", "identifier out param bridged"},
MethodManifestEntry{"bambu_network_request_bind_ticket", "bambu_network_request_bind_ticket", "network", "implemented", "stable", "ticket out param bridged"},
MethodManifestEntry{"bambu_network_get_subtask_info", "bambu_network_get_subtask_info", "network", "implemented", "stable", "task_json/http outputs bridged"},
MethodManifestEntry{"bambu_network_get_slice_info", "bambu_network_get_slice_info", "network", "implemented", "stable", "slice_json out param bridged"},
MethodManifestEntry{"bambu_network_query_bind_status", "bambu_network_query_bind_status", "network", "implemented", "stable", "vector and http outputs bridged"},
MethodManifestEntry{"bambu_network_modify_printer_name", "bambu_network_modify_printer_name", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_get_camera_url", "bambu_network_get_camera_url", "callbacks", "implemented", "stable", "one-shot callback bridged with wait"},
MethodManifestEntry{"bambu_network_get_camera_url_for_golive", "bambu_network_get_camera_url_for_golive", "callbacks", "implemented", "stable", "one-shot callback bridged with wait"},
MethodManifestEntry{"bambu_network_get_design_staffpick", "bambu_network_get_design_staffpick", "callbacks", "implemented", "stable", "one-shot callback bridged with wait"},
MethodManifestEntry{"bambu_network_start_publish", "bambu_network_start_publish", "jobs", "implemented", "stable", "job callback bridge with cancel support"},
MethodManifestEntry{"bambu_network_get_model_publish_url", "bambu_network_get_model_publish_url", "network", "implemented", "stable", "url out param bridged"},
MethodManifestEntry{"bambu_network_get_model_mall_home_url", "bambu_network_get_model_mall_home_url", "network", "implemented", "stable", "url out param bridged"},
MethodManifestEntry{"bambu_network_get_model_mall_detail_url", "bambu_network_get_model_mall_detail_url", "network", "implemented", "stable", "url out param bridged"},
MethodManifestEntry{"bambu_network_get_subtask", "bambu_network_get_subtask", "callbacks", "implemented", "experimental", "custom task object callback not bridged"},
MethodManifestEntry{"bambu_network_get_my_profile", "bambu_network_get_my_profile", "network", "implemented", "stable", "http code/body out params bridged"},
MethodManifestEntry{"bambu_network_get_my_token", "bambu_network_get_my_token", "network", "implemented", "stable", "http code/body out params bridged"},
MethodManifestEntry{"bambu_network_track_enable", "bambu_network_track_enable", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_track_remove_files", "bambu_network_track_remove_files", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_track_event", "bambu_network_track_event", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_track_header", "bambu_network_track_header", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_track_update_property", "bambu_network_track_update_property", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_track_get_property", "bambu_network_track_get_property", "network", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"bambu_network_put_model_mall_rating", "bambu_network_put_model_mall_rating", "network", "implemented", "stable", "vector and out params bridged via rpc"},
MethodManifestEntry{"bambu_network_get_oss_config", "bambu_network_get_oss_config", "network", "implemented", "stable", "out params bridged via rpc"},
MethodManifestEntry{"bambu_network_put_rating_picture_oss", "bambu_network_put_rating_picture_oss", "network", "implemented", "stable", "in-out strings and out params bridged via rpc"},
MethodManifestEntry{"bambu_network_get_model_mall_rating", "bambu_network_get_model_mall_rating", "network", "implemented", "stable", "out params bridged via rpc"},
MethodManifestEntry{"bambu_network_get_mw_user_preference", "bambu_network_get_mw_user_preference", "callbacks", "implemented", "stable", "one-shot callback bridged with wait"},
MethodManifestEntry{"bambu_network_get_mw_user_4ulist", "bambu_network_get_mw_user_4ulist", "callbacks", "implemented", "stable", "one-shot callback bridged with wait"},
MethodManifestEntry{"bambu_network_get_hms_snapshot", "bambu_network_get_hms_snapshot", "callbacks", "implemented", "stable", "one-shot callback bridged with wait"},
MethodManifestEntry{"Bambu_Create", "Bambu_Create", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_SetLogger", "Bambu_SetLogger", "source", "implemented", "stable", "logger messages copied in host and forwarded through tunnel events"},
MethodManifestEntry{"Bambu_Open", "Bambu_Open", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_StartStream", "Bambu_StartStream", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_StartStreamEx", "Bambu_StartStreamEx", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_GetStreamCount", "Bambu_GetStreamCount", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_GetStreamInfo", "Bambu_GetStreamInfo", "source", "implemented", "stable", "format_buffer marshaled and cached"},
MethodManifestEntry{"Bambu_GetDuration", "Bambu_GetDuration", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_Seek", "Bambu_Seek", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_ReadSample", "Bambu_ReadSample", "source", "implemented", "stable", "buffer marshaled as byte array"},
MethodManifestEntry{"Bambu_SendMessage", "Bambu_SendMessage", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_RecvMessage", "Bambu_RecvMessage", "source", "implemented", "stable", "ctrl/data marshaled via rpc"},
MethodManifestEntry{"Bambu_Close", "Bambu_Close", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_Destroy", "Bambu_Destroy", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_Init", "Bambu_Init", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_Deinit", "Bambu_Deinit", "source", "implemented", "stable", "rpc passthrough"},
MethodManifestEntry{"Bambu_GetLastErrorMsg", "Bambu_GetLastErrorMsg", "source", "implemented", "stable", "message copied via rpc and cached locally"},
MethodManifestEntry{"Bambu_FreeLogMsg", "Bambu_FreeLogMsg", "source", "implemented", "stable", "no-op in forwarder; host frees vendor log messages after copying"}
};
return entries;
}
std::optional<MethodManifestEntry> find_method_manifest_entry(const std::string& exported_name)
{
for (const auto& entry : method_manifest()) {
if (entry.exported_name == exported_name)
return entry;
}
return std::nullopt;
}
nlohmann::json method_manifest_as_json()
{
nlohmann::json out = nlohmann::json::array();
for (const auto& entry : method_manifest()) {
out.push_back({
{"symbol", entry.symbol},
{"exported_name", entry.exported_name},
{"area", entry.area},
{"status", entry.status},
{"stability", entry.stability},
{"notes", entry.notes}
});
}
return out;
}
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include "BridgeCoreTypes.hpp"
namespace PJarczak::LinuxPluginBridgeCore {
const std::vector<MethodManifestEntry>& method_manifest();
std::optional<MethodManifestEntry> find_method_manifest_entry(const std::string& exported_name);
nlohmann::json method_manifest_as_json();
}

View File

@@ -0,0 +1,101 @@
#include "BridgeCoreSubprocess.hpp"
#include "BridgeCoreFrame.hpp"
#include <boost/process.hpp>
namespace bp = boost::process;
namespace PJarczak::LinuxPluginBridgeCore {
struct BridgeSubprocess::Impl {
bp::opstream in;
bp::ipstream out;
std::unique_ptr<bp::child> child;
};
BridgeSubprocess::BridgeSubprocess() : m_impl(std::make_unique<Impl>()) {}
BridgeSubprocess::~BridgeSubprocess() { stop(); }
bool BridgeSubprocess::start(const LaunchSpec& spec)
{
std::lock_guard<std::mutex> lock(m_mutex);
try {
stop();
if (spec.argv.empty()) {
m_last_error = "empty argv";
return false;
}
bp::environment env = boost::this_process::environment();
for (const auto& kv : spec.env)
env[kv.first] = kv.second;
std::vector<std::string> args;
for (std::size_t i = 1; i < spec.argv.size(); ++i)
args.push_back(spec.argv[i]);
m_impl->child = std::make_unique<bp::child>(
bp::search_path(spec.argv[0]),
bp::args(args),
bp::std_in < m_impl->in,
bp::std_out > m_impl->out,
env
);
m_last_error.clear();
return true;
} catch (const std::exception& e) {
m_last_error = e.what();
return false;
}
}
bool BridgeSubprocess::running() const
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_impl && m_impl->child && m_impl->child->running();
}
void BridgeSubprocess::stop()
{
if (!m_impl || !m_impl->child)
return;
if (m_impl->child->running())
m_impl->child->terminate();
m_impl->child.reset();
}
nlohmann::json BridgeSubprocess::request(const std::string& method, const nlohmann::json& payload)
{
std::lock_guard<std::mutex> lock(m_mutex);
if (!m_impl || !m_impl->child || !m_impl->child->running())
return {{"ok", false}, {"error", "host not running"}};
RpcFrame req;
req.id = m_next_id++;
req.method = method;
req.payload = payload;
m_impl->in << encode_rpc_frame(req);
m_impl->in.flush();
std::string line;
if (!std::getline(m_impl->out, line)) {
m_last_error = "host closed stdout";
return {{"ok", false}, {"error", m_last_error}};
}
RpcFrame reply;
std::string error;
if (!decode_rpc_frame(line, reply, error)) {
m_last_error = error;
return {{"ok", false}, {"error", error}};
}
return reply.payload;
}
std::string BridgeSubprocess::last_error() const
{
std::lock_guard<std::mutex> lock(m_mutex);
return m_last_error;
}
}

View File

@@ -0,0 +1,31 @@
#pragma once
#include "BridgeCoreTypes.hpp"
#include <memory>
#include <mutex>
#include <string>
namespace PJarczak::LinuxPluginBridgeCore {
class BridgeSubprocess {
public:
BridgeSubprocess();
~BridgeSubprocess();
bool start(const LaunchSpec& spec);
bool running() const;
void stop();
nlohmann::json request(const std::string& method, const nlohmann::json& payload);
std::string last_error() const;
private:
struct Impl;
std::unique_ptr<Impl> m_impl;
mutable std::mutex m_mutex;
std::string m_last_error;
std::uint64_t m_next_id{1};
};
}

View File

@@ -0,0 +1,67 @@
#pragma once
#include <cstdint>
#include <functional>
#include <map>
#include <mutex>
#include <optional>
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
namespace PJarczak::LinuxPluginBridgeCore {
enum class TransportKind : std::uint8_t {
StdioJsonLine = 0,
NamedPipeJsonLine = 1,
UnixSocketJsonLine = 2
};
enum class EventKind : std::uint16_t {
Unknown = 0,
UserLogin = 1,
PrinterConnected = 2,
ServerConnected = 3,
HttpError = 4,
SubscribeFailure = 5,
Message = 6,
UserMessage = 7,
LocalConnect = 8,
LocalMessage = 9,
ServerError = 10,
JobProgress = 11,
JobWait = 12,
Log = 13
};
struct LaunchSpec {
std::vector<std::string> argv;
std::map<std::string, std::string> env;
TransportKind transport{TransportKind::StdioJsonLine};
};
struct RpcFrame {
std::uint64_t id{0};
std::string method;
nlohmann::json payload;
};
struct BridgeEvent {
std::uint64_t id{0};
std::int64_t agent_handle{0};
EventKind kind{EventKind::Unknown};
std::string name;
nlohmann::json payload;
};
struct MethodManifestEntry {
std::string symbol;
std::string exported_name;
std::string area;
std::string status;
std::string stability;
std::string notes;
};
}

View File

@@ -0,0 +1,9 @@
add_library(pjarczak_linux_plugin_bridge_core STATIC
BridgeCoreFrame.cpp
BridgeCoreCallbackQueue.cpp
BridgeCoreMethodManifest.cpp
BridgeCoreSubprocess.cpp
)
target_include_directories(pjarczak_linux_plugin_bridge_core PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(pjarczak_linux_plugin_bridge_core PUBLIC nlohmann_json::nlohmann_json)

View File

@@ -0,0 +1,970 @@
[
{
"symbol": "bambu_network_check_debug_consistent",
"exported_name": "bambu_network_check_debug_consistent",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "local bridge always reports debug consistency"
},
{
"symbol": "bambu_network_get_version",
"exported_name": "bambu_network_get_version",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "returns bridge version"
},
{
"symbol": "bambu_network_create_agent",
"exported_name": "bambu_network_create_agent",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_destroy_agent",
"exported_name": "bambu_network_destroy_agent",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_init_log",
"exported_name": "bambu_network_init_log",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_set_config_dir",
"exported_name": "bambu_network_set_config_dir",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_set_cert_file",
"exported_name": "bambu_network_set_cert_file",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_set_country_code",
"exported_name": "bambu_network_set_country_code",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_start",
"exported_name": "bambu_network_start",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_set_on_ssdp_msg_fn",
"exported_name": "bambu_network_set_on_ssdp_msg_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_user_login_fn",
"exported_name": "bambu_network_set_on_user_login_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_printer_connected_fn",
"exported_name": "bambu_network_set_on_printer_connected_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_server_connected_fn",
"exported_name": "bambu_network_set_on_server_connected_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_http_error_fn",
"exported_name": "bambu_network_set_on_http_error_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_get_country_code_fn",
"exported_name": "bambu_network_set_get_country_code_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "callback bridged through request/reply RPC to local getter"
},
{
"symbol": "bambu_network_set_on_subscribe_failure_fn",
"exported_name": "bambu_network_set_on_subscribe_failure_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_message_fn",
"exported_name": "bambu_network_set_on_message_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_user_message_fn",
"exported_name": "bambu_network_set_on_user_message_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_local_connect_fn",
"exported_name": "bambu_network_set_on_local_connect_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_on_local_message_fn",
"exported_name": "bambu_network_set_on_local_message_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_set_queue_on_main_fn",
"exported_name": "bambu_network_set_queue_on_main_fn",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "client-side queue_on_main dispatch retained and host callback path registered"
},
{
"symbol": "bambu_network_connect_server",
"exported_name": "bambu_network_connect_server",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_is_server_connected",
"exported_name": "bambu_network_is_server_connected",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_refresh_connection",
"exported_name": "bambu_network_refresh_connection",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_start_subscribe",
"exported_name": "bambu_network_start_subscribe",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_stop_subscribe",
"exported_name": "bambu_network_stop_subscribe",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_add_subscribe",
"exported_name": "bambu_network_add_subscribe",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_del_subscribe",
"exported_name": "bambu_network_del_subscribe",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_enable_multi_machine",
"exported_name": "bambu_network_enable_multi_machine",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_send_message",
"exported_name": "bambu_network_send_message",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_connect_printer",
"exported_name": "bambu_network_connect_printer",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_disconnect_printer",
"exported_name": "bambu_network_disconnect_printer",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_send_message_to_printer",
"exported_name": "bambu_network_send_message_to_printer",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_update_cert",
"exported_name": "bambu_network_update_cert",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_install_device_cert",
"exported_name": "bambu_network_install_device_cert",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_start_discovery",
"exported_name": "bambu_network_start_discovery",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_change_user",
"exported_name": "bambu_network_change_user",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough plus cache refresh"
},
{
"symbol": "bambu_network_is_user_login",
"exported_name": "bambu_network_is_user_login",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_user_logout",
"exported_name": "bambu_network_user_logout",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_user_id",
"exported_name": "bambu_network_get_user_id",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_user_name",
"exported_name": "bambu_network_get_user_name",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_user_avatar",
"exported_name": "bambu_network_get_user_avatar",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_user_nickanme",
"exported_name": "bambu_network_get_user_nickanme",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_build_login_cmd",
"exported_name": "bambu_network_build_login_cmd",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_build_logout_cmd",
"exported_name": "bambu_network_build_logout_cmd",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_build_login_info",
"exported_name": "bambu_network_build_login_info",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_ping_bind",
"exported_name": "bambu_network_ping_bind",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_bind_detect",
"exported_name": "bambu_network_bind_detect",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "detectResult struct mapping not done"
},
{
"symbol": "bambu_network_report_consent",
"exported_name": "bambu_network_report_consent",
"area": "jobs",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_set_server_callback",
"exported_name": "bambu_network_set_server_callback",
"area": "callbacks",
"status": "implemented",
"stability": "bridge-wired",
"notes": "host callback fanout wired through event queue and local dispatch"
},
{
"symbol": "bambu_network_bind",
"exported_name": "bambu_network_bind",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "phase5: bridged through host job runtime with callback and cancel plumbing"
},
{
"symbol": "bambu_network_unbind",
"exported_name": "bambu_network_unbind",
"area": "jobs",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_bambulab_host",
"exported_name": "bambu_network_get_bambulab_host",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_user_selected_machine",
"exported_name": "bambu_network_get_user_selected_machine",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_set_user_selected_machine",
"exported_name": "bambu_network_set_user_selected_machine",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_start_print",
"exported_name": "bambu_network_start_print",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "phase5: bridged through host job runtime with callback and cancel plumbing"
},
{
"symbol": "bambu_network_start_local_print_with_record",
"exported_name": "bambu_network_start_local_print_with_record",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "phase5: bridged through host job runtime with callback and cancel plumbing"
},
{
"symbol": "bambu_network_start_send_gcode_to_sdcard",
"exported_name": "bambu_network_start_send_gcode_to_sdcard",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "phase5: bridged through host job runtime with callback and cancel plumbing"
},
{
"symbol": "bambu_network_start_local_print",
"exported_name": "bambu_network_start_local_print",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "phase5: bridged through host job runtime with callback and cancel plumbing"
},
{
"symbol": "bambu_network_start_sdcard_print",
"exported_name": "bambu_network_start_sdcard_print",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "phase5: bridged through host job runtime with callback and cancel plumbing"
},
{
"symbol": "bambu_network_get_user_presets",
"exported_name": "bambu_network_get_user_presets",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "nested map marshaled via json"
},
{
"symbol": "bambu_network_request_setting_id",
"exported_name": "bambu_network_request_setting_id",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "map and http code bridged via rpc"
},
{
"symbol": "bambu_network_put_setting",
"exported_name": "bambu_network_put_setting",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "map and http code bridged via rpc"
},
{
"symbol": "bambu_network_get_setting_list",
"exported_name": "bambu_network_get_setting_list",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "progress callback not bridged"
},
{
"symbol": "bambu_network_get_setting_list2",
"exported_name": "bambu_network_get_setting_list2",
"area": "jobs",
"status": "implemented",
"stability": "experimental",
"notes": "check, progress and cancel callbacks not bridged"
},
{
"symbol": "bambu_network_delete_setting",
"exported_name": "bambu_network_delete_setting",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_studio_info_url",
"exported_name": "bambu_network_get_studio_info_url",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "string return bridged"
},
{
"symbol": "bambu_network_set_extra_http_header",
"exported_name": "bambu_network_set_extra_http_header",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "map marshaling bridged"
},
{
"symbol": "bambu_network_get_my_message",
"exported_name": "bambu_network_get_my_message",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "http code/body out params bridged"
},
{
"symbol": "bambu_network_check_user_task_report",
"exported_name": "bambu_network_check_user_task_report",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "task_id and printable out params bridged"
},
{
"symbol": "bambu_network_get_user_print_info",
"exported_name": "bambu_network_get_user_print_info",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "http code/body out params bridged"
},
{
"symbol": "bambu_network_get_user_tasks",
"exported_name": "bambu_network_get_user_tasks",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "TaskQueryParams and body bridged"
},
{
"symbol": "bambu_network_get_printer_firmware",
"exported_name": "bambu_network_get_printer_firmware",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "http code/body out params bridged"
},
{
"symbol": "bambu_network_get_task_plate_index",
"exported_name": "bambu_network_get_task_plate_index",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "plate index out param bridged"
},
{
"symbol": "bambu_network_get_user_info",
"exported_name": "bambu_network_get_user_info",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "identifier out param bridged"
},
{
"symbol": "bambu_network_request_bind_ticket",
"exported_name": "bambu_network_request_bind_ticket",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "ticket out param bridged"
},
{
"symbol": "bambu_network_get_subtask_info",
"exported_name": "bambu_network_get_subtask_info",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "task_json/http outputs bridged"
},
{
"symbol": "bambu_network_get_slice_info",
"exported_name": "bambu_network_get_slice_info",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "slice_json out param bridged"
},
{
"symbol": "bambu_network_query_bind_status",
"exported_name": "bambu_network_query_bind_status",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "vector and http outputs bridged"
},
{
"symbol": "bambu_network_modify_printer_name",
"exported_name": "bambu_network_modify_printer_name",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_get_camera_url",
"exported_name": "bambu_network_get_camera_url",
"area": "callbacks",
"status": "implemented",
"stability": "stable",
"notes": "one-shot callback bridged with wait"
},
{
"symbol": "bambu_network_get_camera_url_for_golive",
"exported_name": "bambu_network_get_camera_url_for_golive",
"area": "callbacks",
"status": "implemented",
"stability": "stable",
"notes": "one-shot callback bridged with wait"
},
{
"symbol": "bambu_network_get_design_staffpick",
"exported_name": "bambu_network_get_design_staffpick",
"area": "callbacks",
"status": "implemented",
"stability": "stable",
"notes": "one-shot callback bridged with wait"
},
{
"symbol": "bambu_network_start_publish",
"exported_name": "bambu_network_start_publish",
"area": "jobs",
"status": "implemented",
"stability": "stable",
"notes": "job callback bridge with cancel support"
},
{
"symbol": "bambu_network_get_model_publish_url",
"exported_name": "bambu_network_get_model_publish_url",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "url out param bridged"
},
{
"symbol": "bambu_network_get_model_mall_home_url",
"exported_name": "bambu_network_get_model_mall_home_url",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "url out param bridged"
},
{
"symbol": "bambu_network_get_model_mall_detail_url",
"exported_name": "bambu_network_get_model_mall_detail_url",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "url out param bridged"
},
{
"symbol": "bambu_network_get_subtask",
"exported_name": "bambu_network_get_subtask",
"area": "callbacks",
"status": "implemented",
"stability": "experimental",
"notes": "custom task object callback not bridged"
},
{
"symbol": "bambu_network_get_my_profile",
"exported_name": "bambu_network_get_my_profile",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "http code/body out params bridged"
},
{
"symbol": "bambu_network_get_my_token",
"exported_name": "bambu_network_get_my_token",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "http code/body out params bridged"
},
{
"symbol": "bambu_network_track_enable",
"exported_name": "bambu_network_track_enable",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_track_remove_files",
"exported_name": "bambu_network_track_remove_files",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_track_event",
"exported_name": "bambu_network_track_event",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_track_header",
"exported_name": "bambu_network_track_header",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_track_update_property",
"exported_name": "bambu_network_track_update_property",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_track_get_property",
"exported_name": "bambu_network_track_get_property",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "bambu_network_put_model_mall_rating",
"exported_name": "bambu_network_put_model_mall_rating",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "vector and out params bridged via rpc"
},
{
"symbol": "bambu_network_get_oss_config",
"exported_name": "bambu_network_get_oss_config",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "out params bridged via rpc"
},
{
"symbol": "bambu_network_put_rating_picture_oss",
"exported_name": "bambu_network_put_rating_picture_oss",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "in-out strings and out params bridged via rpc"
},
{
"symbol": "bambu_network_get_model_mall_rating",
"exported_name": "bambu_network_get_model_mall_rating",
"area": "network",
"status": "implemented",
"stability": "stable",
"notes": "out params bridged via rpc"
},
{
"symbol": "bambu_network_get_mw_user_preference",
"exported_name": "bambu_network_get_mw_user_preference",
"area": "callbacks",
"status": "implemented",
"stability": "stable",
"notes": "one-shot callback bridged with wait"
},
{
"symbol": "bambu_network_get_mw_user_4ulist",
"exported_name": "bambu_network_get_mw_user_4ulist",
"area": "callbacks",
"status": "implemented",
"stability": "stable",
"notes": "one-shot callback bridged with wait"
},
{
"symbol": "bambu_network_get_hms_snapshot",
"exported_name": "bambu_network_get_hms_snapshot",
"area": "callbacks",
"status": "implemented",
"stability": "stable",
"notes": "one-shot callback bridged with wait"
},
{
"symbol": "Bambu_Create",
"exported_name": "Bambu_Create",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_SetLogger",
"exported_name": "Bambu_SetLogger",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "logger messages copied in host and forwarded through tunnel events"
},
{
"symbol": "Bambu_Open",
"exported_name": "Bambu_Open",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_StartStream",
"exported_name": "Bambu_StartStream",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_StartStreamEx",
"exported_name": "Bambu_StartStreamEx",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_GetStreamCount",
"exported_name": "Bambu_GetStreamCount",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_GetStreamInfo",
"exported_name": "Bambu_GetStreamInfo",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "format_buffer marshaled and cached"
},
{
"symbol": "Bambu_GetDuration",
"exported_name": "Bambu_GetDuration",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_Seek",
"exported_name": "Bambu_Seek",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_ReadSample",
"exported_name": "Bambu_ReadSample",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "buffer marshaled as byte array"
},
{
"symbol": "Bambu_SendMessage",
"exported_name": "Bambu_SendMessage",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_RecvMessage",
"exported_name": "Bambu_RecvMessage",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "ctrl/data marshaled via rpc"
},
{
"symbol": "Bambu_Close",
"exported_name": "Bambu_Close",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_Destroy",
"exported_name": "Bambu_Destroy",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_Init",
"exported_name": "Bambu_Init",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_Deinit",
"exported_name": "Bambu_Deinit",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "rpc passthrough"
},
{
"symbol": "Bambu_GetLastErrorMsg",
"exported_name": "Bambu_GetLastErrorMsg",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "message copied via rpc and cached locally"
},
{
"symbol": "Bambu_FreeLogMsg",
"exported_name": "Bambu_FreeLogMsg",
"area": "source",
"status": "implemented",
"stability": "stable",
"notes": "no-op in forwarder; host frees vendor log messages after copying"
}
]