1 #ifndef AKTUALIZR_SECONDARY_H
2 #define AKTUALIZR_SECONDARY_H
4 #include "aktualizr_secondary_config.h"
5 #include "aktualizr_secondary_metadata.h"
7 #include "aktualizr_secondary_interface.h"
8 #include "msg_dispatcher.h"
10 #include "uptane/directorrepository.h"
11 #include "uptane/imagerepository.h"
19 using Ptr = std::shared_ptr<AktualizrSecondary>;
23 std::shared_ptr<KeyManager> key_mngr, std::shared_ptr<UpdateAgent> update_agent);
25 std::tuple<Uptane::EcuSerial, Uptane::HardwareIdentifier, PublicKey> getInfo()
const override;
28 bool sendFirmware(
const std::string& firmware)
override;
36 bool putMetadata(
const Metadata& metadata);
37 void completeInstall();
40 bool hasPendingUpdate() {
return storage_->hasPendingInstall(); }
41 bool doFullVerification(
const Metadata& metadata);
42 void uptaneInitialize();
43 void initPendingTargetIfAny();
52 std::shared_ptr<INvStorage> storage_;
53 std::shared_ptr<KeyManager> keys_;
54 Uptane::ManifestIssuer::Ptr manifest_issuer_;
59 std::shared_ptr<UpdateAgent> update_agent_;
64 #endif // AKTUALIZR_SECONDARY_H