Aktualizr
C++ SOTA Client
All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
helpers.h
1 #ifndef AKTUALIZR_LITE_HELPERS
2 #define AKTUALIZR_LITE_HELPERS
3 
4 #include <string>
5 
6 #include <string.h>
7 
8 #include "primary/sotauptaneclient.h"
9 
10 struct Version {
11  std::string raw_ver;
12  Version(std::string version) : raw_ver(std::move(version)) {}
13 
14  bool operator<(const Version& other) { return strverscmp(raw_ver.c_str(), other.raw_ver.c_str()) < 0; }
15 };
16 
17 struct LiteClient {
18  LiteClient(Config& config_in);
19 
20  Config config;
21  std::shared_ptr<INvStorage> storage;
22  std::shared_ptr<SotaUptaneClient> primary;
23  std::pair<Uptane::EcuSerial, Uptane::HardwareIdentifier> primary_ecu;
24 };
25 
26 #endif // AKTUALIZR_LITE_HELPERS
LiteClient
Definition: helpers.h:17
Version
Definition: helpers.h:10
Config
Configuration object for an aktualizr instance running on a primary ECU.
Definition: config.h:74