comparison include/core/torrent.h @ 236:4d461ef7d424

HUGE UPDATE: convert build system to autotools why? because cmake sucks :)
author Paper <mrpapersonic@gmail.com>
date Fri, 19 Jan 2024 00:24:02 -0500
parents 39521c47c7a3
children 862d0d8619f6
comparison
equal deleted inserted replaced
235:593108b3d555 236:4d461ef7d424
3 3
4 #include <string> 4 #include <string>
5 #include <QDateTime> 5 #include <QDateTime>
6 6
7 /* this is really just a fancy struct... 7 /* this is really just a fancy struct...
8 8 *
9 this will be moved into its own namespace if 9 * this will be moved into its own namespace if
10 it's deemed necessary */ 10 * it's deemed necessary
11 */
11 class Torrent { 12 class Torrent {
12 public: 13 public:
13 std::string GetTitle() const { return _title; }; 14 std::string GetTitle() const { return _title; };
14 std::string GetCategory() const { return _category; }; 15 std::string GetCategory() const { return _category; };
15 std::string GetEpisode() const { return _episode; }; 16 std::string GetEpisode() const { return _episode; };
16 std::string GetGroup() const { return _group; }; 17 std::string GetGroup() const { return _group; };
17 size_t GetSize() const { return _size; }; 18 size_t GetSize() const { return _size; };
18 std::string GetResolution() const { return _resolution; }; 19 std::string GetResolution() const { return _resolution; };
19 int GetSeeders() const { return _seeders; }; 20 int GetSeeders() const { return _seeders; };
20 int GetLeechers() const { return _leechers; }; 21 int GetLeechers() const { return _leechers; };
21 int GetDownloaders() const { return _downloaders; }; 22 int GetDownloads() const { return _downloads; };
22 std::string GetDescription() const { return _description; }; 23 std::string GetDescription() const { return _description; };
23 std::string GetFilename() const { return _filename; }; 24 std::string GetFilename() const { return _filename; };
24 std::string GetLink() const { return _link; }; 25 std::string GetLink() const { return _link; };
25 std::string GetGuid() const { return _guid; }; 26 std::string GetGuid() const { return _guid; };
26 QDateTime GetDate() const { return _date; }; 27 QDateTime GetDate() const { return _date; };
31 void SetGroup(const std::string& group) { _group = group; }; 32 void SetGroup(const std::string& group) { _group = group; };
32 void SetSize(const size_t size) { _size = size; }; 33 void SetSize(const size_t size) { _size = size; };
33 void SetResolution(const std::string& resolution) { _resolution = resolution; }; 34 void SetResolution(const std::string& resolution) { _resolution = resolution; };
34 void SetSeeders(const int seeders) { _seeders = seeders; }; 35 void SetSeeders(const int seeders) { _seeders = seeders; };
35 void SetLeechers(const int leechers) { _leechers = leechers; }; 36 void SetLeechers(const int leechers) { _leechers = leechers; };
36 void SetDownloaders(const int downloaders) { _downloaders = downloaders; }; 37 void SetDownloads(const int downloads) { _downloads = downloads; };
37 void SetDescription(const std::string& description) { _description = description; }; 38 void SetDescription(const std::string& description) { _description = description; };
38 void SetFilename(const std::string& filename) { _filename = filename; }; 39 void SetFilename(const std::string& filename) { _filename = filename; };
39 void SetLink(const std::string& link) { _link = link; }; 40 void SetLink(const std::string& link) { _link = link; };
40 void SetGuid(const std::string& guid) { _guid = guid; }; 41 void SetGuid(const std::string& guid) { _guid = guid; };
41 void SetDate(const QDateTime& date) { _date = date; }; 42 void SetDate(const QDateTime& date) { _date = date; };
48 size_t _size = 0; 49 size_t _size = 0;
49 std::string _resolution; /* technically should be an int, 50 std::string _resolution; /* technically should be an int,
50 but std::string is more useful */ 51 but std::string is more useful */
51 int _seeders = 0; 52 int _seeders = 0;
52 int _leechers = 0; 53 int _leechers = 0;
53 int _downloaders = 0; 54 int _downloads = 0;
54 std::string _description; 55 std::string _description;
55 std::string _filename; 56 std::string _filename;
56 std::string _link; 57 std::string _link;
57 std::string _guid; 58 std::string _guid;
58 QDateTime _date; 59 QDateTime _date;