1 #ifndef UPTANE_FETCHER_H_
2 #define UPTANE_FETCHER_H_
4 #include "http/httpinterface.h"
5 #include "libaktualizr/config.h"
6 #include "storage/invstorage.h"
10 constexpr int64_t kMaxRootSize = 64 * 1024;
11 constexpr int64_t kMaxDirectorTargetsSize = 64 * 1024;
12 constexpr int64_t kMaxTimestampSize = 64 * 1024;
13 constexpr int64_t kMaxSnapshotSize = 64 * 1024;
14 constexpr int64_t kMaxImageTargetsSize = 8 * 1024 * 1024;
35 Fetcher(
const Config& config_in, std::shared_ptr<HttpInterface> http_in)
36 :
Fetcher(config_in.uptane.repo_server, config_in.uptane.director_server, std::move(http_in)) {}
37 Fetcher(std::string repo_server_in, std::string director_server_in, std::shared_ptr<HttpInterface> http_in)
38 : http(std::move(http_in)),
39 repo_server(std::move(repo_server_in)),
40 director_server(std::move(director_server_in)) {}
42 Version version)
const override;
48 std::string getRepoServer()
const {
return repo_server; }
51 std::shared_ptr<HttpInterface> http;
52 std::string repo_server;
53 std::string director_server;