Mercurial > minori
annotate include/core/torrent.h @ 299:246017a7907a
dep/animone: clean up OS X code
GetProcessName() really belongs in fd.cc after removing the
stupid unnecessary LaunchServices code that was stolen from...
some library :)
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 13 May 2024 14:15:47 -0400 |
| parents | 3ec7804abf17 |
| children | b1f625b0227c |
| rev | line source |
|---|---|
|
261
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
1 #ifndef MINORI_CORE_TORRENT_H_ |
|
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
2 #define MINORI_CORE_TORRENT_H_ |
| 114 | 3 |
| 258 | 4 #include <QDateTime> |
| 114 | 5 #include <string> |
| 6 | |
|
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
7 /* this is really just a fancy struct... |
|
236
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
118
diff
changeset
|
8 * |
|
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
118
diff
changeset
|
9 * this will be moved into its own namespace if |
|
4d461ef7d424
HUGE UPDATE: convert build system to autotools
Paper <mrpapersonic@gmail.com>
parents:
118
diff
changeset
|
10 * it's deemed necessary |
| 258 | 11 */ |
| 114 | 12 class Torrent { |
| 258 | 13 public: |
| 14 std::string GetTitle() const { return _title; }; | |
| 15 std::string GetCategory() const { return _category; }; | |
| 16 std::string GetEpisode() const { return _episode; }; | |
| 17 std::string GetGroup() const { return _group; }; | |
| 18 size_t GetSize() const { return _size; }; | |
| 19 std::string GetResolution() const { return _resolution; }; | |
| 20 int GetSeeders() const { return _seeders; }; | |
| 21 int GetLeechers() const { return _leechers; }; | |
| 22 int GetDownloads() const { return _downloads; }; | |
| 23 std::string GetDescription() const { return _description; }; | |
| 24 std::string GetFilename() const { return _filename; }; | |
| 25 std::string GetLink() const { return _link; }; | |
| 26 std::string GetGuid() const { return _guid; }; | |
| 27 QDateTime GetDate() const { return _date; }; | |
| 114 | 28 |
| 258 | 29 void SetTitle(const std::string& title) { _title = title; }; |
| 30 void SetCategory(const std::string& category) { _category = category; }; | |
| 31 void SetEpisode(const std::string& episode) { _episode = episode; }; | |
| 32 void SetGroup(const std::string& group) { _group = group; }; | |
| 33 void SetSize(const size_t size) { _size = size; }; | |
| 34 void SetResolution(const std::string& resolution) { _resolution = resolution; }; | |
| 35 void SetSeeders(const int seeders) { _seeders = seeders; }; | |
| 36 void SetLeechers(const int leechers) { _leechers = leechers; }; | |
| 37 void SetDownloads(const int downloads) { _downloads = downloads; }; | |
| 38 void SetDescription(const std::string& description) { _description = description; }; | |
| 39 void SetFilename(const std::string& filename) { _filename = filename; }; | |
| 40 void SetLink(const std::string& link) { _link = link; }; | |
| 41 void SetGuid(const std::string& guid) { _guid = guid; }; | |
| 42 void SetDate(const QDateTime& date) { _date = date; }; | |
| 114 | 43 |
| 258 | 44 private: |
| 45 std::string _title; | |
| 46 std::string _category; | |
| 47 std::string _episode; | |
| 48 std::string _group; | |
| 49 size_t _size = 0; | |
| 50 std::string _resolution; /* technically should be an int, | |
| 51 but std::string is more useful */ | |
| 52 int _seeders = 0; | |
| 53 int _leechers = 0; | |
| 54 int _downloads = 0; | |
| 55 std::string _description; | |
| 56 std::string _filename; | |
| 57 std::string _link; | |
| 58 std::string _guid; | |
| 59 QDateTime _date; | |
| 114 | 60 }; |
| 61 | |
|
261
3ec7804abf17
include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents:
258
diff
changeset
|
62 #endif // MINORI_CORE_TORRENT_H_ |
