1 | /* |
---|
2 | * This file Copyright (C) 2012-2014 Mnemosyne LLC |
---|
3 | * |
---|
4 | * It may be used under the GNU GPL versions 2 or 3 |
---|
5 | * or any future license endorsed by Mnemosyne LLC. |
---|
6 | * |
---|
7 | * $Id: torrent-magnet.h 14241 2014-01-21 03:10:30Z jordan $ |
---|
8 | */ |
---|
9 | |
---|
10 | #ifndef __TRANSMISSION__ |
---|
11 | #error only libtransmission should #include this header. |
---|
12 | #endif |
---|
13 | |
---|
14 | #ifndef TR_TORRENT_MAGNET_H |
---|
15 | #define TR_TORRENT_MAGNET_H 1 |
---|
16 | |
---|
17 | #include <time.h> |
---|
18 | |
---|
19 | enum |
---|
20 | { |
---|
21 | /* defined by BEP #9 */ |
---|
22 | METADATA_PIECE_SIZE = (1024 * 16) |
---|
23 | }; |
---|
24 | |
---|
25 | void* tr_torrentGetMetadataPiece (tr_torrent * tor, int piece, int * len); |
---|
26 | |
---|
27 | void tr_torrentSetMetadataPiece (tr_torrent * tor, int piece, const void * data, int len); |
---|
28 | |
---|
29 | bool tr_torrentGetNextMetadataRequest (tr_torrent * tor, time_t now, int * setme); |
---|
30 | |
---|
31 | void tr_torrentSetMetadataSizeHint (tr_torrent * tor, int metadata_size); |
---|
32 | |
---|
33 | double tr_torrentGetMetadataPercent (const tr_torrent * tor); |
---|
34 | |
---|
35 | void tr_writeMagnetToFile (const tr_info * infomag, const char * downloadLocation, const char * magURL); |
---|
36 | |
---|
37 | #endif |
---|