DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::updating::ReleaseInformationFetcher Class Referencefinal

A utility class for retrieving the application version release information. More...

#include <ReleaseInformationFetcher.hpp>

Inheritance diagram for drn::updating::ReleaseInformationFetcher:
Collaboration diagram for drn::updating::ReleaseInformationFetcher:

Signals

void fetched (const std::set< drn::updating::ReleaseInformation > &versions)
 Triggered when the version information has been successfully fetched.
 

Public Member Functions

 ReleaseInformationFetcher (networking::NotifyingSender &sender, const drn::foundation::QtPtr<::QObject > &parent)
 Full initialisation constructor for retrieving application version release information.
 
void fetch ()
 Initiates the process of retrieving version release information.
 

Detailed Description

A utility class for retrieving the application version release information.

Usage:

  • Create an instance of VersionFetcher to initialize the version fetching process.
  • Use provided methods to retrieve version information from the desired source.
  • Process or store the fetched version data as needed within your application.

It abstracts the complex logic behind version retrieval by providing a simple interface. It ensures that version information is consistently parsed and represented, regardless of the source of the data.

Constructor & Destructor Documentation

◆ ReleaseInformationFetcher()

drn::updating::ReleaseInformationFetcher::ReleaseInformationFetcher ( networking::NotifyingSender & sender,
const drn::foundation::QtPtr<::QObject > & parent )

Full initialisation constructor for retrieving application version release information.

Parameters
senderThe reference to a NotifyingSender instance used to send network requests. This object should handle the communication requirements needed to fetch version information.
parentThe Qt object that acts as the parent of the instance. This parameter ensures proper memory management and cleanup of the QObject hierarchy. If no parent is needed, an empty QtPtr can be used.

Member Function Documentation

◆ fetch()

void drn::updating::ReleaseInformationFetcher::fetch ( )

Initiates the process of retrieving version release information.

This method constructs a network request to communicate with the server hosting the version release data. It formats the request URL, sets appropriate headers for authentication, and sends the request through a NotifyingSender instance.

Usage:

  • Call this method to start the process of fetching version information.
  • Connect the fetched signal to your application logic to handle the retrieved data.

The method establishes a connection to process and handle the server's response. This allows seamless integration of fetched version data into your application.

◆ fetched

void drn::updating::ReleaseInformationFetcher::fetched ( const std::set< drn::updating::ReleaseInformation > & versions)
signal

Triggered when the version information has been successfully fetched.

This signal provides a list of version information objects that have been retrieved, allowing you to act upon or process them. It is typically used to notify other parts of the application about the available versions, whether for display, storage, or comparison.

Usage:

  • Connect this signal to slots where you want to handle the retrieved version data.
  • The connected slot can process, display, or act upon the provided version information as required.
Parameters
versionsA collection of version information representing the fetched version data. These objects may contain details such as version numbers, metadata, and other related information.