4 changed files with 44 additions and 8 deletions
@ -1,8 +1,29 @@
|
||||
#ifndef _TR_TEST_TORRENT_CONTEXT_HPP_ |
||||
#define _TR_TEST_TORRENT_CONTEXT_HPP_ |
||||
#include <string> |
||||
|
||||
class InfoHash { |
||||
public: |
||||
std::string to_string() { return "banana"; } |
||||
}; |
||||
|
||||
class TorrentStatus { |
||||
public: |
||||
bool paused = false; |
||||
bool is_seeding = false; |
||||
int state = 0; |
||||
int priority = 0; |
||||
std::string name = "N/A"; |
||||
}; |
||||
|
||||
class TestTorrent { |
||||
|
||||
public: |
||||
bool is_valid(); |
||||
InfoHash info_hash(); |
||||
TorrentStatus status(int type); |
||||
int query_name = 1; |
||||
int query_save_path = 2; |
||||
bool valid = true; |
||||
}; |
||||
|
||||
#endif |
||||
@ -0,0 +1,13 @@
|
||||
#include <TorrentContext.hpp> |
||||
|
||||
InfoHash TestTorrent::info_hash() { |
||||
return InfoHash(); |
||||
} |
||||
|
||||
TorrentStatus TestTorrent::status(int type) { |
||||
return TorrentStatus(); |
||||
} |
||||
|
||||
bool TestTorrent::is_valid() { |
||||
return valid; |
||||
} |
||||
Loading…
Reference in new issue