Ticket #5770: torrent-magnet.h

File torrent-magnet.h, 979 bytes (added by basecase, 7 years ago)

Modifed torrent-magnet.h

Line 
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
19enum
20{
21    /* defined by BEP #9 */
22    METADATA_PIECE_SIZE = (1024 * 16)
23};
24
25void* tr_torrentGetMetadataPiece (tr_torrent * tor, int piece, int * len);
26
27void tr_torrentSetMetadataPiece (tr_torrent * tor, int piece, const void * data, int len);
28
29bool tr_torrentGetNextMetadataRequest (tr_torrent * tor, time_t now, int * setme);
30
31void tr_torrentSetMetadataSizeHint (tr_torrent * tor, int metadata_size);
32
33double tr_torrentGetMetadataPercent (const tr_torrent * tor);
34
35void tr_writeMagnetToFile (const tr_info * infomag, const char * downloadLocation, const char * magURL);
36
37#endif