badge support

This commit is contained in:
SoftFever
2026-01-31 01:04:21 +08:00
parent 7059789578
commit 8d22fad30b
14 changed files with 134 additions and 208 deletions

View File

@@ -12,8 +12,6 @@
#include <string>
#include <functional>
#include <vector>
#include <map>
#include <mutex>
namespace Slic3r {
@@ -99,11 +97,6 @@ public:
*/
static bool is_printer_agent_registered(const std::string& id);
/**
* Get info about a registered agent
*/
static const PrinterAgentInfo* get_printer_agent_info(const std::string& id);
/**
* Get all registered printer agents (for UI population)
*/
@@ -121,16 +114,6 @@ public:
std::shared_ptr<ICloudServiceAgent> cloud_agent,
const std::string& log_dir);
/**
* Get default printer agent ID
*/
static std::string get_default_printer_agent_id();
/**
* Set a specific agent as the default
*/
static void set_default_printer_agent_id(const std::string& id);
// ========================================================================
// Cloud Agent Factory
// ========================================================================
@@ -164,23 +147,6 @@ public:
}
}
// ========================================================================
// NetworkAgent Facade Creation
// ========================================================================
/**
* Create a NetworkAgent from pre-created sub-agents
*
* @param cloud_agent Cloud service agent (required, includes auth)
* @param printer_agent Printer agent (optional, can be nullptr)
* @return Unique pointer to NetworkAgent facade
*/
static std::unique_ptr<NetworkAgent> create_from_agents(std::shared_ptr<ICloudServiceAgent> cloud_agent,
std::shared_ptr<IPrinterAgent> printer_agent)
{
return std::make_unique<NetworkAgent>(std::move(cloud_agent), std::move(printer_agent));
}
private:
// Factory is not instantiable
NetworkAgentFactory() = delete;