Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
aktualizr_secondary_file.h
1 #ifndef AKTUALIZR_SECONDARY_FILE_H
2 #define AKTUALIZR_SECONDARY_FILE_H
3 
4 #include <memory>
5 
6 #include "aktualizr_secondary.h"
7 
8 class FileUpdateAgent;
9 
11  public:
12  static const std::string FileUpdateDefaultFile;
13 
15  AktualizrSecondaryFile(const AktualizrSecondaryConfig& config, std::shared_ptr<INvStorage> storage,
16  std::shared_ptr<FileUpdateAgent> update_agent = nullptr);
17 
18  void initialize() override;
19  data::InstallationResult receiveData(const uint8_t* data, size_t size);
20 
21  protected:
22  bool getInstalledImageInfo(Uptane::InstalledImageInfo& installed_image_info) const override;
23  bool isTargetSupported(const Uptane::Target& target) const override;
24  data::InstallationResult installPendingTarget(const Uptane::Target& target) override;
25  data::InstallationResult applyPendingInstall(const Uptane::Target& target) override;
26  void completeInstall() override;
27 
28  ReturnCode uploadDataHdlr(Asn1Message& in_msg, Asn1Message& out_msg);
29 
30  private:
31  std::shared_ptr<FileUpdateAgent> update_agent_;
32 };
33 
34 #endif // AKTUALIZR_SECONDARY_FILE_H
General data structures.
Definition: types.h:215
Reference counted holder for the top-level ASN1 message structure.
Definition: asn1_message.h:34