Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
update_agent.h
1 #ifndef AKTUALIZR_SECONDARY_UPDATE_AGENT_H
2 #define AKTUALIZR_SECONDARY_UPDATE_AGENT_H
3 
4 #include "uptane/tuf.h"
5 
6 class UpdateAgent {
7  public:
8  using Ptr = std::shared_ptr<UpdateAgent>;
9 
10  public:
11  virtual bool isTargetSupported(const Uptane::Target& target) const = 0;
12  virtual bool getInstalledImageInfo(Uptane::InstalledImageInfo& installed_image_info) const = 0;
13 
14  virtual bool download(const Uptane::Target& target, const std::string& data) = 0;
15  virtual data::ResultCode::Numeric install(const Uptane::Target& target) = 0;
16  virtual void completeInstall() = 0;
17  virtual data::InstallationResult applyPendingInstall(const Uptane::Target& target) = 0;
18 
19  virtual ~UpdateAgent() = default;
20 
21  public:
22  UpdateAgent(const UpdateAgent&) = delete;
23  UpdateAgent& operator=(const UpdateAgent&) = delete;
24 
25  protected:
26  UpdateAgent() = default;
27 };
28 
29 #endif // AKTUALIZR_SECONDARY_UPDATE_AGENT_H
UpdateAgent
Definition: update_agent.h:6
data::InstallationResult
Definition: types.h:182
data
General data structures.
Definition: types.cc:55
Uptane::InstalledImageInfo
Definition: tuf.h:132
Uptane::Target
Definition: tuf.h:238
data::ResultCode::Numeric
Numeric
Definition: types.h:128