Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
update_agent_file.h
1 #ifndef AKTUALIZR_SECONDARY_UPDATE_AGENT_FILE_H
2 #define AKTUALIZR_SECONDARY_UPDATE_AGENT_FILE_H
3 
4 #include "update_agent.h"
5 
6 class FileUpdateAgent : public UpdateAgent {
7  public:
8  FileUpdateAgent(boost::filesystem::path target_filepath, std::string target_name)
9  : target_filepath_{std::move(target_filepath)}, current_target_name_{std::move(target_name)} {}
10 
11  public:
12  bool isTargetSupported(const Uptane::Target& target) const override;
13  bool getInstalledImageInfo(Uptane::InstalledImageInfo& installed_image_info) const override;
14  bool download(const Uptane::Target& target, const std::string& data) override;
15  data::ResultCode::Numeric install(const Uptane::Target& target) override;
16  void completeInstall() override;
17  data::InstallationResult applyPendingInstall(const Uptane::Target& target) override;
18 
19  private:
20  const boost::filesystem::path target_filepath_;
21  std::string current_target_name_;
22 };
23 
24 #endif // AKTUALIZR_SECONDARY_UPDATE_AGENT_FILE_H
General data structures.
Definition: types.cc:55