Aktualizr
C++ SOTA Client
ipuptanesecondary.h
1 #ifndef UPTANE_IPUPTANESECONDARY_H_
2 #define UPTANE_IPUPTANESECONDARY_H_
3 
4 #include <chrono>
5 #include <future>
6 
7 #include "uptane/secondaryinterface.h"
8 
9 namespace Uptane {
11  public:
13 
14  // SecondaryInterface implementation
15  PublicKey getPublicKey() override;
16  bool putMetadata(const RawMetaPack& meta_pack) override;
17  int32_t getRootVersion(bool /* director */) override { return 0; }
18  bool putRoot(const std::string& /* root */, bool /* director */) override { return true; }
19  bool sendFirmwareAsync(const std::shared_ptr<std::string>& data) override;
20  Json::Value getManifest() override;
21 
22  sockaddr_storage getAddr() { return sconfig.ip_addr; }
23 
24  private:
25  bool sendFirmware(const std::shared_ptr<std::string>& data);
26  std::future<bool> install_future;
27 };
28 
29 } // namespace Uptane
30 
31 #endif // UPTANE_IPUPTANESECONDARY_H_
General data structures.
Definition: types.cc:6
Config conf("tests/config/basic.toml")
Base data types that are used in The Update Framework (TUF), part of UPTANE.