Aktualizr
C++ SOTA Client
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Functions
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
Variables
Enumerations
Files
File List
File Members
All
Functions
Enumerations
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Pages
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
bool
initRoot(
const
std::string &root_raw);
15
bool
verifyRoot(
const
std::string &root_raw);
16
int
rootVersion() {
return
root.version(); }
17
bool
rootExpired() {
return
root.isExpired(TimeStamp::Now()); }
18
virtual
bool
updateMeta(
INvStorage
&storage,
const
IMetadataFetcher
&fetcher) = 0;
19
Exception
getLastException()
const
{
return
last_exception; }
20
21
protected
:
22
void
resetRoot();
23
bool
updateRoot(
INvStorage
&storage,
const
IMetadataFetcher
&fetcher,
RepositoryType
repo_type);
24
25
static
const
int64_t kMaxRotations = 1000;
26
27
Root
root;
28
RepositoryType
type;
29
Exception
last_exception{
""
,
""
};
30
};
31
}
// namespace Uptane
32
33
#endif
Uptane::RepositoryCommon
Definition:
uptanerepository.h:10
Uptane::IMetadataFetcher
Definition:
fetcher.h:16
Uptane::RepositoryType
Definition:
tuf.h:20
Uptane::Exception
Definition:
exceptions.h:10
Uptane::Root
Definition:
tuf.h:385
Uptane
Base data types that are used in The Update Framework (TUF), part of Uptane.
Definition:
secondary_tcp_server.h:8
INvStorage
Definition:
invstorage.h:126
Generated by
1.8.16