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 "crypto/crypto.h"
5 #include "uptane/tuf.h"
6 
7 class UpdateAgent {
8  public:
9  using Ptr = std::shared_ptr<UpdateAgent>;
10 
11  public:
12  virtual bool isTargetSupported(const Uptane::Target& target) const = 0;
13  virtual bool getInstalledImageInfo(Uptane::InstalledImageInfo& installed_image_info) const = 0;
14  virtual data::InstallationResult install(const Uptane::Target& target) = 0;
15 
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:7
data::InstallationResult
Definition: types.h:277
Uptane::InstalledImageInfo
Definition: types.h:306
Uptane::Target
Definition: types.h:379