Aktualizr
C++ SOTA Client
directorrepository.h
1 #ifndef DIRECTOR_REPOSITORY_H_
2 #define DIRECTOR_REPOSITORY_H_
3 
4 #include "uptanerepository.h"
5 
6 namespace Uptane {
7 
8 /* Director repository incapsulates state of metadata verification process. Subsequent verificaton steps rely on
9  * previous ones.
10 */
12  public:
13  DirectorRepository() : RepositoryCommon(RepositoryType::Director) {}
14  void resetMeta();
15 
16  bool verifyTargets(const std::string& targets_raw);
17  std::vector<Target>& getTargets() { return targets.targets; }
18  bool targetsExpired() { return targets.isExpired(TimeStamp::Now()); }
19 
20  Exception getLastException() const { return last_exception; }
21 
22  private:
23  Uptane::Targets targets;
24  Exception last_exception{"", ""};
25 };
26 
27 } // namespace Uptane
28 
29 #endif // DIRECTOR_REPOSITORY_H
Base data types that are used in The Update Framework (TUF), part of UPTANE.