libnick 2024.9.2
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
Nickvision::Update::Updater Class Reference

An object to check for application updates through GitHub. More...

#include <updater.h>

Public Member Functions

 Updater (std::string githubRepoUrl)
 Constructs an Updater.
 
 Updater (const Updater &u)
 Constructs an Updater via copy.
 
 Updater (Updater &&u) noexcept
 Constructs an Updater via move.
 
Version fetchCurrentVersion (VersionType versionType)
 Gets the latest version of the provided type from the GitHub repo.
 
Updateroperator= (const Updater &u)
 Copies an Updater.
 
Updateroperator= (Updater &&u) noexcept
 Moves an Updater.
 

Detailed Description

An object to check for application updates through GitHub.

Constructor & Destructor Documentation

◆ Updater() [1/3]

Nickvision::Update::Updater::Updater ( std::string githubRepoUrl)

Constructs an Updater.

Parameters
githubRepoUrlThe url of the GitHub repo to fetch updates for
Exceptions
std::invalid_argumentThrown if the GitHub url is not of valid format

◆ Updater() [2/3]

Nickvision::Update::Updater::Updater ( const Updater & u)

Constructs an Updater via copy.

Parameters
uThe object to copy

◆ Updater() [3/3]

Nickvision::Update::Updater::Updater ( Updater && u)
noexcept

Constructs an Updater via move.

Parameters
uThe object to move

Member Function Documentation

◆ fetchCurrentVersion()

Version Nickvision::Update::Updater::fetchCurrentVersion ( VersionType versionType)

Gets the latest version of the provided type from the GitHub repo.

This method looks for tags in the format major.minor.build-dev for preview versions and major.minor.build for stable versions.

Parameters
versionTypeThe type of the version to get
Returns
The current version of the provided type if available, else empty Version

◆ operator=() [1/2]

Updater & Nickvision::Update::Updater::operator= ( const Updater & u)

Copies an Updater.

Parameters
uThe Updater to copy
Returns
this

◆ operator=() [2/2]

Updater & Nickvision::Update::Updater::operator= ( Updater && u)
noexcept

Moves an Updater.

Parameters
uThe Updater to move
Returns
this

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