7 #include <gtest/gtest.h> 8 #include <boost/signals2.hpp> 10 #include "config/config.h" 11 #include "sotauptaneclient.h" 12 #include "storage/invstorage.h" 13 #include "uptane/secondaryinterface.h" 92 std::unique_ptr<StorageTargetRHandle>
GetStoredTarget(
const std::string& filename);
126 void AddSecondary(
const std::shared_ptr<Uptane::SecondaryInterface>& secondary);
133 boost::signals2::connection
SetSignalHandler(std::function<
void(std::shared_ptr<event::BaseEvent>)>& handler);
138 FRIEND_TEST(
Aktualizr, FullMultipleSecondaries);
139 FRIEND_TEST(
Aktualizr, CheckWithUpdates);
140 FRIEND_TEST(
Aktualizr, DownloadWithUpdates);
141 FRIEND_TEST(
Aktualizr, InstallWithUpdates);
143 FRIEND_TEST(
Aktualizr, FullNoCorrelationId);
144 Aktualizr(
Config& config, std::shared_ptr<INvStorage> storage_in, std::shared_ptr<SotaUptaneClient> uptane_client_in,
145 std::shared_ptr<event::Channel> sig_in);
149 std::shared_ptr<INvStorage> storage_;
150 std::shared_ptr<SotaUptaneClient> uptane_client_;
151 std::shared_ptr<event::Channel> sig_;
152 std::atomic<bool> shutdown_ = {
false};
155 #endif // AKTUALIZR_H_ void CampaignAccept(const std::string &campaign_id)
Accept a campaign for the current device.
void AddSecondary(const std::shared_ptr< Uptane::SecondaryInterface > &secondary)
Add new secondary to aktualizr.
PauseResult
Result of an attempt to pause or resume a download.
boost::signals2::connection SetSignalHandler(std::function< void(std::shared_ptr< event::BaseEvent >)> &handler)
Provide a function to receive event notifications.
void SendDeviceData()
Send local device data to the server.
PauseResult Resume()
Resume a paused download.
void UptaneCycle()
Synchronously run an uptane cycle.
Container for information about downloading an update.
Configuration object for an aktualizr instance running on a primary ECU.
void Shutdown()
Asynchronously shut aktualizr down if it is running indefinitely with the Full RunningMode.
Container for information about available campaigns.
InstallResult Install(const std::vector< Uptane::Target > &updates)
Install targets.
int RunForever()
Run aktualizr indefinitely until Shutdown is called.
UpdateCheckResult CheckUpdates()
Fetch Uptane metadata and check for updates.
Container for information about available updates.
Aktualizr(Config &config)
Aktualizr requires a configuration object.
PauseResult Pause()
Pause a download current in progress.
DownloadResult Download(const std::vector< Uptane::Target > &updates)
Download targets.
This class provides the main APIs necessary for launching and controlling libaktualizr.
CampaignCheckResult CampaignCheck()
Check for campaigns.
Container for information about installing an update.
std::unique_ptr< StorageTargetRHandle > GetStoredTarget(const std::string &filename)
Get target downloaded in Download call.