libnick 2024.12.0
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
updater.h
Go to the documentation of this file.
1
23#ifndef UPDATER_H
24#define UPDATER_H
25
26#include <mutex>
27#include <string>
28#include "version.h"
29
31{
35 class Updater
36 {
37 public:
43 Updater(std::string githubRepoUrl);
48 Updater(const Updater& u);
53 Updater(Updater&& u) noexcept;
61#ifdef _WIN32
68 bool windowsUpdate(VersionType versionType);
69#endif
81 Updater& operator=(Updater&& u) noexcept;
82
83 private:
84 mutable std::mutex m_mutex;
85 std::string m_repoOwner;
86 std::string m_repoName;
87 int m_latestStableReleaseId;
88 int m_latestPreviewReleaseId;
89 };
90}
91
92#endif //UPDATER_H
An object to check for application updates through GitHub.
Definition updater.h:36
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.
Updater & operator=(const Updater &u)
Copies an Updater.
Updater & operator=(Updater &&u) noexcept
Moves an Updater.
Version fetchCurrentVersion(VersionType versionType)
Gets the latest version of the provided type from the GitHub repo.
A model for a version number.
Definition version.h:37
Definition updater.h:31
VersionType
Types of a version.
Definition versiontype.h:32