Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
aktualizr_secondary_ostree.h
1 #ifndef AKTUALIZR_SECONDARY_OSTREE_H
2 #define AKTUALIZR_SECONDARY_OSTREE_H
3 
4 #include "aktualizr_secondary.h"
5 
7 
9  public:
11  AktualizrSecondaryOstree(const AktualizrSecondaryConfig& config, const std::shared_ptr<INvStorage>& storage);
12 
13  void initialize() override;
14  data::InstallationResult downloadOstreeUpdate(const std::string& packed_tls_creds);
15 
16  protected:
17  bool getInstalledImageInfo(Uptane::InstalledImageInfo& installed_image_info) const override;
18  bool isTargetSupported(const Uptane::Target& target) const override;
19  data::InstallationResult installPendingTarget(const Uptane::Target& target) override;
20  data::InstallationResult applyPendingInstall(const Uptane::Target& target) override;
21  void completeInstall() override;
22 
23  private:
24  bool hasPendingUpdate() { return storage().hasPendingInstall(); }
25 
26  ReturnCode downloadOstreeRev(Asn1Message& in_msg, Asn1Message& out_msg);
27 
28  std::shared_ptr<OstreeUpdateAgent> update_agent_;
29 };
30 
31 #endif // AKTUALIZR_SECONDARY_OSTREE_H
data::InstallationResult
Definition: types.h:277
AktualizrSecondaryConfig
Definition: aktualizr_secondary_config.h:35
Uptane::InstalledImageInfo
Definition: types.h:306
AktualizrSecondary
Definition: aktualizr_secondary.h:16
AktualizrSecondaryOstree
Definition: aktualizr_secondary_ostree.h:8
Asn1Message
Reference counted holder for the top-level ASN1 message structure.
Definition: asn1_message.h:34
Uptane::Target
Definition: types.h:379
OstreeUpdateAgent
Definition: update_agent_ostree.h:9