Aktualizr
C++ SOTA Client
Public Member Functions | List of all members
Aktualizr Class Reference

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
 
Aktualizroperator= (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...
 

Detailed Description

This class provides the main APIs necessary for launching and controlling libaktualizr.

Definition at line 19 of file aktualizr.h.

Constructor & Destructor Documentation

◆ Aktualizr()

Aktualizr::Aktualizr ( Config config)
explicit

Aktualizr requires a configuration object.

Examples can be found in the config directory.

Definition at line 14 of file aktualizr.cc.

Member Function Documentation

◆ CampaignCheck()

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.

◆ CheckUpdates()

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.

◆ FetchMetadata()

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.

◆ Run()

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.

◆ SendDeviceData()

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.

◆ SetSignalHandler()

boost::signals2::connection Aktualizr::SetSignalHandler ( std::function< void(std::shared_ptr< event::BaseEvent >)> &  handler)

Provide a function to receive event notifications.

Parameters
handlera function that can receive event objects.
Returns
a signal connection object, which can be disconnected if desired.

Definition at line 64 of file aktualizr.cc.


The documentation for this class was generated from the following files: