The UpdatableAppImage class provides a programmatic interface for inspecting the properties and metadata of an AppImage file. It is used to extract information required for the update process, such as the file type, cryptographic signatures, and update information embedded within the image.
Key capabilities include:
- Retrieving the file path.
- Identifying the AppImage type (e.g., ELF or ISO).
- Reading the embedded signature and signing key.
- Extracting raw update information.
- Calculating the file's hash for integrity verification.
#include "src/util/updatableappimage.h"
// Initialize with the path to the AppImage file
appimage::update::UpdatableAppImage appImage("/path/to/your/application.AppImage");
// Access metadata
std::string path = appImage.path();
int type = appImage.appImageType();
std::string signature = appImage.readSignature();
std::string updateInfo = appImage.readRawUpdateInformation();
std::string hash = appImage.calculateHash();