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  data::InstallationResult applyPendingInstall(const Uptane::Target& target) override;
24 
25  private:
26  const boost::filesystem::path& _sysrootPath;
27  std::shared_ptr<KeyManager> _keyMngr;
28  std::shared_ptr<OstreeManager> _ostreePackMan;
29  const ::std::string _targetname_prefix;
30 };
31 
32 #endif // AKTUALIZR_SECONDARY_UPDATE_AGENT_OSTREE_H
UpdateAgent
Definition: update_agent.h:6
KeyManager
Definition: keymanager.h:13
data::InstallationResult
Definition: types.h:179
data
General data structures.
Definition: types.cc:44
Uptane::InstalledImageInfo
Definition: tuf.h:132
OstreeManager
Definition: ostreemanager.h:40
Uptane::Target
Definition: tuf.h:238
OstreeUpdateAgent
Definition: update_agent_ostree.h:9
data::ResultCode::Numeric
Numeric
Definition: types.h:125