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  bool download(const Uptane::Target& target, const std::string& data) override;
22  data::ResultCode::Numeric install(const Uptane::Target& target) override;
23  void completeInstall() override;
24  data::InstallationResult applyPendingInstall(const Uptane::Target& target) override;
25 
26  private:
27  const boost::filesystem::path& sysrootPath_;
28  std::shared_ptr<KeyManager> keyMngr_;
29  std::shared_ptr<OstreeManager> ostreePackMan_;
30  const ::std::string targetname_prefix_;
31 };
32 
33 #endif // AKTUALIZR_SECONDARY_UPDATE_AGENT_OSTREE_H
UpdateAgent
Definition: update_agent.h:6
KeyManager
Definition: keymanager.h:13
data::InstallationResult
Definition: types.h:182
data
General data structures.
Definition: types.cc:55
Uptane::InstalledImageInfo
Definition: tuf.h:135
OstreeManager
Definition: ostreemanager.h:40
Uptane::Target
Definition: tuf.h:210
OstreeUpdateAgent
Definition: update_agent_ostree.h:9
data::ResultCode::Numeric
Numeric
Definition: types.h:128