Class UpdateManager
Defined in File update_manager.hpp
Nested Relationships
Nested Types
Class Documentation
-
class UpdateManager
Manages software update lifecycle with pluggable UpdateProvider backend.
Handles async operations (prepare/execute) in background threads, tracks status automatically, and delegates to UpdateProvider for actual work. Without a backend, all operations return errors.
Public Functions
-
UpdateManager()
Construct without a backend. Use set_backend() to wire one in.
-
~UpdateManager()
-
UpdateManager(const UpdateManager&) = delete
-
UpdateManager &operator=(const UpdateManager&) = delete
-
void set_backend(UpdateProvider *backend)
Set the backend provider (non-owning pointer, caller manages lifetime). Must be called before any update operations; operations return NoBackend error until set.
-
void set_notifier(ResourceChangeNotifier *notifier)
Set optional notifier for broadcasting update status changes to trigger subsystem.
-
bool has_backend() const
Check if a backend is loaded.
-
tl::expected<std::vector<std::string>, UpdateError> list_updates(const UpdateFilter &filter)
-
tl::expected<nlohmann::json, UpdateError> get_update(const std::string &id)
-
tl::expected<void, UpdateError> register_update(const nlohmann::json &metadata)
-
tl::expected<void, UpdateError> delete_update(const std::string &id)
-
tl::expected<void, UpdateError> start_prepare(const std::string &id)
-
tl::expected<void, UpdateError> start_execute(const std::string &id)
-
tl::expected<void, UpdateError> start_automated(const std::string &id)
-
tl::expected<UpdateStatusInfo, UpdateError> get_status(const std::string &id)
-
UpdateManager()