Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
update_agent_ostree.h
1 #ifndef AKTUALIZR_SECONDARY_UPDATE_AGENT_OSTREE_H
2 #define AKTUALIZR_SECONDARY_UPDATE_AGENT_OSTREE_H
3 
4 #include "update_agent.h"
5 
6 class OstreeManager;
7 class KeyManager;
8 
9 class OstreeUpdateAgent : public UpdateAgent {
10  public:
11  OstreeUpdateAgent(const boost::filesystem::path& sysroot_path, std::shared_ptr<KeyManager>& key_mngr,
12  std::shared_ptr<OstreeManager>& ostree_pack_man, std::string targetname_prefix)
13  : sysrootPath_(sysroot_path),
14  keyMngr_(key_mngr),
15  ostreePackMan_(ostree_pack_man),
16  targetname_prefix_(std::move(targetname_prefix)) {}
17 
18  public:
19  bool isTargetSupported(const Uptane::Target& target) const override;
20  bool getInstalledImageInfo(Uptane::InstalledImageInfo& installed_image_info) const override;
21 
22  data::InstallationResult downloadTargetRev(const Uptane::Target& target, const std::string& treehub_tls_creds);
23 
24  data::InstallationResult install(const Uptane::Target& target) override;
25 
26  void completeInstall() override;
27 
28  data::InstallationResult applyPendingInstall(const Uptane::Target& target) override;
29 
30  private:
31  boost::filesystem::path sysrootPath_;
32  std::shared_ptr<KeyManager> keyMngr_;
33  std::shared_ptr<OstreeManager> ostreePackMan_;
34  const ::std::string targetname_prefix_;
35 };
36 
37 #endif // AKTUALIZR_SECONDARY_UPDATE_AGENT_OSTREE_H
UpdateAgent
Definition: update_agent.h:7
KeyManager
Definition: keymanager.h:13
data::InstallationResult
Definition: types.h:277
Uptane::InstalledImageInfo
Definition: types.h:306
OstreeManager
Definition: ostreemanager.h:41
Uptane::Target
Definition: types.h:379
OstreeUpdateAgent
Definition: update_agent_ostree.h:9