|
Aktualizr
C++ SOTA Client
|
This class provides the main APIs necessary for launching and controlling libaktualizr. More...
#include <aktualizr.h>
Public Member Functions | |
| Aktualizr (Config &config) | |
| Aktualizr requires a configuration object. More... | |
| Aktualizr (const Aktualizr &)=delete | |
| Aktualizr & | operator= (const Aktualizr &)=delete |
| int | Run () |
| Launch aktualizr. More... | |
| void | Shutdown () |
| Asynchronously shutdown Aktualizr. | |
| void | CampaignCheck () |
| Asynchronously perform a check for campaigns. More... | |
| void | CampaignAccept (const std::string &campaign_id) |
| Asynchronously accept a campaign for the current device Campaigns are a concept outside of Uptane, and allow for user approval of updates before the contents of the update are known. | |
| void | SendDeviceData () |
| Asynchronously send local device data to the server. More... | |
| void | FetchMetadata () |
| Asynchronously fetch Uptane metadata. More... | |
| void | CheckUpdates () |
| Asynchronously load already-fetched Uptane metadata from disk. More... | |
| void | Download (const std::vector< Uptane::Target > &updates) |
| Asynchronously download targets. | |
| void | Install (const std::vector< Uptane::Target > &updates) |
| Asynchronously install targets. | |
| void | AddSecondary (const std::shared_ptr< Uptane::SecondaryInterface > &secondary) |
| Add new secondary to aktualizr. | |
| boost::signals2::connection | SetSignalHandler (std::function< void(std::shared_ptr< event::BaseEvent >)> &handler) |
| Provide a function to receive event notifications. More... | |
This class provides the main APIs necessary for launching and controlling libaktualizr.
Definition at line 19 of file aktualizr.h.
|
explicit |
Aktualizr requires a configuration object.
Examples can be found in the config directory.
Definition at line 14 of file aktualizr.cc.
| void Aktualizr::CampaignCheck | ( | ) |
Asynchronously perform a check for campaigns.
Campaigns are a concept outside of Uptane, and allow for user approval of updates before the contents of the update are known.
Definition at line 50 of file aktualizr.cc.
| void Aktualizr::CheckUpdates | ( | ) |
Asynchronously load already-fetched Uptane metadata from disk.
This is only needed when the metadata fetch and downloads/installation are in separate aktualizr runs.
Definition at line 58 of file aktualizr.cc.
| void Aktualizr::FetchMetadata | ( | ) |
Asynchronously fetch Uptane metadata.
This collects a client manifest, PUTs it to the director, then updates the Uptane metadata, including root and targets.
Definition at line 56 of file aktualizr.cc.
| int Aktualizr::Run | ( | ) |
Launch aktualizr.
Depending on the RunningMode in the configuration, this may run indefinitely, so you may want to run this on its own thread.
Definition at line 35 of file aktualizr.cc.
| void Aktualizr::SendDeviceData | ( | ) |
Asynchronously send local device data to the server.
This includes network status, installed packages, hardware etc.
Definition at line 54 of file aktualizr.cc.
| boost::signals2::connection Aktualizr::SetSignalHandler | ( | std::function< void(std::shared_ptr< event::BaseEvent >)> & | handler | ) |
Provide a function to receive event notifications.
| handler | a function that can receive event objects. |
Definition at line 64 of file aktualizr.cc.
1.8.14