libnick 2025.9.1
A cross-platform base for native Nickvision applications.
Loading...
Searching...
No Matches
appinfo.h
Go to the documentation of this file.
1
22
23#ifndef APPINFO_H
24#define APPINFO_H
25
26#include <string>
27#include <unordered_map>
28#include <vector>
29#include "update/version.h"
30
32{
36 class AppInfo
37 {
38 public:
42 AppInfo() noexcept = default;
43 AppInfo(const AppInfo&) noexcept = default;
44 AppInfo(AppInfo&&) noexcept = default;
51 AppInfo(const std::string& id, const std::string& name, const std::string& englishShortName) noexcept;
56 const std::string& getId() const noexcept;
61 void setId(const std::string& id) noexcept;
66 const std::string& getName() const noexcept;
71 void setName(const std::string& name) noexcept;
76 const std::string& getShortName() const noexcept;
81 void setShortName(const std::string& shortName) noexcept;
86 const std::string& getEnglishShortName() const noexcept;
91 void setEnglishShortName(const std::string& englishShortName) noexcept;
96 const std::string& getDescription() const noexcept;
101 void setDescription(const std::string& description) noexcept;
106 const Update::Version& getVersion() const noexcept;
111 void setVersion(const Update::Version& version) noexcept;
116 const std::string& getChangelog() const noexcept;
121 void setChangelog(const std::string& changelog) noexcept;
126 const std::string& getHtmlChangelog() const noexcept;
131 const std::string& getSourceRepo() const noexcept;
138 bool setSourceRepo(const std::string& sourceRepo) noexcept;
143 const std::string& getIssueTracker() const noexcept;
150 bool setIssueTracker(const std::string& issueTracker) noexcept;
155 const std::string& getSupportUrl() const noexcept;
162 bool setSupportUrl(const std::string& supportUrl) noexcept;
167 const std::string& getHtmlDocsStore() const noexcept;
172 void setHtmlDocsStore(const std::string& htmlDocsStore) noexcept;
177 std::unordered_map<std::string, std::string>& getExtraLinks() noexcept;
182 const std::unordered_map<std::string, std::string>& getExtraLinks() const noexcept;
187 std::unordered_map<std::string, std::string>& getDevelopers() noexcept;
192 const std::unordered_map<std::string, std::string>& getDevelopers() const noexcept;
197 std::unordered_map<std::string, std::string>& getDesigners() noexcept;
202 const std::unordered_map<std::string, std::string>& getDesigners() const noexcept;
207 std::unordered_map<std::string, std::string>& getArtists() noexcept;
212 const std::unordered_map<std::string, std::string>& getArtists() const noexcept;
217 const std::string& getTranslatorCredits() const noexcept;
222 void setTranslatorCredits(const std::string& translatorCredits) noexcept;
227 std::vector<std::string> getTranslatorNames() const noexcept;
228 AppInfo& operator=(const AppInfo&) noexcept = default;
229 AppInfo& operator=(AppInfo&&) noexcept = default;
230
231 private:
232 std::string m_id;
233 std::string m_name;
234 std::string m_shortName;
235 std::string m_englishShortName;
236 std::string m_description;
237 Update::Version m_version;
238 std::string m_changelog;
239 std::string m_htmlChangelog;
240 std::string m_sourceRepo;
241 std::string m_issueTracker;
242 std::string m_supportUrl;
243 std::string m_htmlDocsStore;
244 std::unordered_map<std::string, std::string> m_extraLinks;
245 std::unordered_map<std::string, std::string> m_developers;
246 std::unordered_map<std::string, std::string> m_designers;
247 std::unordered_map<std::string, std::string> m_artists;
248 std::string m_translatorCredits;
249 };
250}
251
252#endif // APPINFO_H
const std::string & getSupportUrl() const noexcept
Gets the application support url.
const std::string & getChangelog() const noexcept
Gets the application changelog.
std::unordered_map< std::string, std::string > & getDevelopers() noexcept
Gets the application developers.
void setChangelog(const std::string &changelog) noexcept
Sets the application changelog.
std::vector< std::string > getTranslatorNames() const noexcept
Gets the list of translator names.
void setId(const std::string &id) noexcept
Sets the application id.
bool setIssueTracker(const std::string &issueTracker) noexcept
Sets the application issue tracker url.
std::unordered_map< std::string, std::string > & getArtists() noexcept
Gets the application artists.
bool setSourceRepo(const std::string &sourceRepo) noexcept
Sets the application source repo url.
const std::string & getName() const noexcept
Gets the application name.
std::unordered_map< std::string, std::string > & getExtraLinks() noexcept
Gets the extra links for the application.
void setTranslatorCredits(const std::string &translatorCredits) noexcept
Sets the application translator credits.
void setShortName(const std::string &shortName) noexcept
Sets the application short name.
const std::string & getHtmlChangelog() const noexcept
Gets the application changelog in HTML form.
const Update::Version & getVersion() const noexcept
Gets the application version.
const std::string & getSourceRepo() const noexcept
Gets the application source repo url.
const std::string & getHtmlDocsStore() const noexcept
Gets the application html docs store url.
const std::string & getTranslatorCredits() const noexcept
Gets the application translator credits.
const std::string & getId() const noexcept
Gets the application id.
const std::string & getDescription() const noexcept
Gets the application description.
const std::string & getEnglishShortName() const noexcept
Gets the application English short name.
const std::string & getShortName() const noexcept
Gets the application short name.
const std::string & getIssueTracker() const noexcept
Gets the application issue tracker url.
void setVersion(const Update::Version &version) noexcept
Sets the application version.
std::unordered_map< std::string, std::string > & getDesigners() noexcept
Gets the application designers.
void setHtmlDocsStore(const std::string &htmlDocsStore) noexcept
Sets the application html docs store url.
AppInfo() noexcept=default
Constructs an AppInfo.
void setDescription(const std::string &description) noexcept
Sets the application description.
void setEnglishShortName(const std::string &englishShortName) noexcept
Sets the application English short name.
bool setSupportUrl(const std::string &supportUrl) noexcept
Sets the application support url.
void setName(const std::string &name) noexcept
Sets the application name.
Definition appinfo.h:32
Definition updater.h:33