Server session persistence is implemented
[qtrapids] / src / include / qtrapids / info.hpp
1 #ifndef _QTRAPIDS_INFO_HPP_
2 #define _QTRAPIDS_INFO_HPP_
3
4 #include <libtorrent/torrent_handle.hpp>
5
6 //#include <limits>
7 //#include <stdint.h>
8
9 #include <QString>
10
11 namespace qtrapids
12 {
13
14 static const uint32_t torrent_progress_max = 1000000;
15 static const uint32_t torrent_progress_percent = 10000;
16 //std::numeric_limits<uint32_t>::max();
17
18 typedef libtorrent::torrent_status TorrentStatus_t;
19 typedef libtorrent::torrent_status::state_t TorrentStatusIds_t;
20
21 struct TorrentStatus {
22         enum Id {
23                 QUEUED_FOR_CHECKING = TorrentStatus_t::queued_for_checking,
24                 CHECKING_FILES = TorrentStatus_t::checking_files,
25                 DOWNLOADING_METADATA = TorrentStatus_t::downloading_metadata,
26                 DOWNLOADING = TorrentStatus_t::downloading,
27                 FINISHED = TorrentStatus_t::finished,
28                 SEEDING = TorrentStatus_t::seeding,
29                 ALLOCATING = TorrentStatus_t::allocating,
30                 CHECKING_RESUME_DATA = TorrentStatus_t::checking_resume_data,
31                 UNSPECIFIED
32         };
33 };
34
35 struct TorrentDownloadInfo {
36         QString hash;
37         QString path;
38         QString download_path;
39 };
40
41
42 } // namespace qtrapids
43
44 #endif // _QTRAPIDS_INFO_HPP_
45