Aktualizr
C++ SOTA Client
src
libaktualizr
uptane
uptanerepository.h
1
#ifndef UPTANE_REPOSITORY_H_
2
#define UPTANE_REPOSITORY_H_
3
4
#include "fetcher.h"
5
6
class
INvStorage
;
7
8
namespace
Uptane
{
9
10
class
RepositoryCommon
{
11
public
:
12
RepositoryCommon
(
RepositoryType
type_in) : type{type_in} {}
13
virtual
~
RepositoryCommon
() =
default
;
14
void
initRoot(
RepositoryType
repo_type,
const
std::string &root_raw);
15
void
verifyRoot(
const
std::string &root_raw);
16
int
rootVersion() {
return
root.version(); }
17
bool
rootExpired() {
return
root.isExpired(TimeStamp::Now()); }
18
virtual
void
updateMeta(
INvStorage
&storage,
const
IMetadataFetcher
&fetcher) = 0;
19
20
protected
:
21
void
resetRoot();
22
void
updateRoot(
INvStorage
&storage,
const
IMetadataFetcher
&fetcher,
RepositoryType
repo_type);
23
24
static
const
int64_t kMaxRotations = 1000;
25
26
Root
root;
27
RepositoryType
type;
28
};
29
}
// namespace Uptane
30
31
#endif
Uptane::RepositoryCommon
Definition:
uptanerepository.h:10
Uptane::IMetadataFetcher
Definition:
fetcher.h:16
Uptane::RepositoryType
Definition:
tuf.h:21
Uptane::Root
Definition:
tuf.h:216
Uptane
Base data types that are used in The Update Framework (TUF), part of Uptane.
Definition:
packagemanagerinterface.h:18
INvStorage
Definition:
invstorage.h:43
Generated by
1.8.17