DBLSQD Qt SDK
release.h
1 #ifndef DBLSQD_RELEASE_H
2 #define DBLSQD_RELEASE_H
3 
4 #include <QtCore>
5 #include <QUrl>
6 #include "dblsqd/semver.h"
7 
8 namespace dblsqd {
9 
10 class Release
11 {
12 public:
13  Release(QJsonObject releaseInfo);
14  Release(QString version = QString(), QDateTime date = QDateTime());
15 
16  friend bool operator<(const Release &one, const Release &other);
17  friend bool operator==(const Release &one, const Release &other);
18  friend bool operator<=(const Release &one, const Release &other);
19 
20  QString getVersion() const;
21  QString getChangelog() const;
22  QDateTime getDate() const;
23  QUrl getDownloadUrl() const;
24  QString getDownloadSHA1() const;
25  QString getDownloadSHA256() const;
26  QString getDownloadDSA() const;
27  qint64 getDownloadSize() const;
28 
29 private:
30  QString version;
31  QDateTime date;
32  QString changelog;
33  QUrl downloadUrl;
34  long downloadSize;
35  QString downloadSHA1;
36  QString downloadSHA256;
37  QString downloadDSA;
38 };
39 
40 } // namespace dblsqd
41 
42 #endif // DBLSQD_RELEASE_H
QString getChangelog() const
Returns the Release changelog.
Definition: release.cpp:77
QDateTime getDate() const
Returns the Release date.
Definition: release.cpp:84
QString getDownloadSHA256() const
Returns the SHA256 hash of the Release download.
Definition: release.cpp:105
QString getDownloadDSA() const
Returns the DSA signature of the Release download.
Definition: release.cpp:112
QString getDownloadSHA1() const
Returns the SHA1 hash of the Release download.
Definition: release.cpp:98
qint64 getDownloadSize() const
Returns the size of the Release download in bytes.
Definition: release.cpp:119
Definition: feed.cpp:3
QUrl getDownloadUrl() const
Returns the Release download URL.
Definition: release.cpp:91
This class is used to represent information about a single Release from a Feed.
Definition: release.h:10
QString getVersion() const
Returns the Release version.
Definition: release.cpp:70
Release(QJsonObject releaseInfo)
Constructs a new Release from q QJsonObject.
Definition: release.cpp:14
friend bool operator<(const Release &one, const Release &other)
Compares two Releases.
Definition: release.cpp:45