Mercurial > minori
comparison include/core/torrent.h @ 114:ab191e28e69d
*: add initial torrent stuff
WOAH!
these checkboxes are a pain in my fucking ass
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 07 Nov 2023 08:03:42 -0500 |
| parents | |
| children | 39521c47c7a3 |
comparison
equal
deleted
inserted
replaced
| 113:32afe0e940bf | 114:ab191e28e69d |
|---|---|
| 1 #ifndef __core__torrent_h | |
| 2 #define __core__torrent_h | |
| 3 | |
| 4 #include <string> | |
| 5 #include <QDateTime> | |
| 6 | |
| 7 /* this will be moved into its own namespace if | |
| 8 it's deemed necessary */ | |
| 9 class Torrent { | |
| 10 public: | |
| 11 std::string GetTitle() const { return _title; }; | |
| 12 std::string GetEpisode() const { return _episode; }; | |
| 13 std::string GetGroup() const { return _group; }; | |
| 14 size_t GetSize() const { return _size; }; | |
| 15 std::string GetResolution() const { return _resolution; }; | |
| 16 int GetSeeders() const { return _seeders; }; | |
| 17 int GetLeechers() const { return _leechers; }; | |
| 18 int GetDownloaders() const { return _downloaders; }; | |
| 19 std::string GetDescription() const { return _description; }; | |
| 20 std::string GetFilename() const { return _filename; }; | |
| 21 std::string GetLink() const { return _link; }; | |
| 22 std::string GetGuid() const { return _guid; }; | |
| 23 QDateTime GetDate() const { return _date; }; | |
| 24 | |
| 25 void SetTitle(const std::string& title) { _title = title; }; | |
| 26 void SetEpisode(const std::string& episode) { _episode = episode; }; | |
| 27 void SetGroup(const std::string& group) { _group = group; }; | |
| 28 void SetSize(const size_t size) { _size = size; }; | |
| 29 void SetResolution(const std::string& resolution) { _resolution = resolution; }; | |
| 30 void SetSeeders(const int seeders) { _seeders = seeders; }; | |
| 31 void SetLeechers(const int leechers) { _leechers = leechers; }; | |
| 32 void SetDownloaders(const int downloaders) { _downloaders = downloaders; }; | |
| 33 void SetDescription(const std::string& description) { _description = description; }; | |
| 34 void SetFilename(const std::string& filename) { _filename = filename; }; | |
| 35 void SetLink(const std::string& link) { _link = link; }; | |
| 36 void SetGuid(const std::string& guid) { _guid = guid; }; | |
| 37 void SetDate(const QDateTime& date) { _date = date; }; | |
| 38 | |
| 39 private: | |
| 40 std::string _title; | |
| 41 std::string _episode; | |
| 42 std::string _group; | |
| 43 size_t _size = 0; | |
| 44 std::string _resolution; /* technically should be an int, | |
| 45 but std::string is more useful */ | |
| 46 int _seeders = 0; | |
| 47 int _leechers = 0; | |
| 48 int _downloaders = 0; | |
| 49 std::string _description; | |
| 50 std::string _filename; | |
| 51 std::string _link; | |
| 52 std::string _guid; | |
| 53 QDateTime _date; | |
| 54 }; | |
| 55 | |
| 56 #endif // __core__torrent_h |
