1 #ifndef AKTUALIZR_SECONDARY_H
2 #define AKTUALIZR_SECONDARY_H
4 #include "aktualizr_secondary_config.h"
5 #include "aktualizr_secondary_metadata.h"
6 #include "uptane/secondaryinterface.h"
8 #include "uptane/directorrepository.h"
9 #include "uptane/imagesrepository.h"
10 #include "uptane/manifest.h"
18 using Ptr = std::shared_ptr<AktualizrSecondary>;
22 std::shared_ptr<KeyManager> key_mngr, std::shared_ptr<UpdateAgent> update_agent);
30 int32_t getRootVersion(
bool director)
const override;
31 bool putRoot(
const std::string& root,
bool director)
override;
32 bool sendFirmware(
const std::string& firmware)
override;
35 bool putMetadata(
const Metadata& metadata);
38 bool hasPendingUpdate() {
return storage_->hasPendingInstall(); }
39 bool doFullVerification(
const Metadata& metadata);
40 void uptaneInitialize();
41 void initPendingTargetIfAny();
50 std::shared_ptr<INvStorage> storage_;
51 std::shared_ptr<KeyManager> keys_;
52 Uptane::ManifestIssuer::Ptr manifest_issuer_;
57 std::shared_ptr<UpdateAgent> update_agent_;
60 #endif // AKTUALIZR_SECONDARY_H