1/* 2 * This file Copyright (C) Mnemosyne LLC 3 * 4 * This file is licensed by the GPL version 2. Works owned by the 5 * Transmission project are granted a special exemption to clause 2(b) 6 * so that the bulk of its code can remain under the MIT license. 7 * This exemption does not extend to derived works not owned by 8 * the Transmission project. 9 * 10 * $Id: torrent-magnet.h 12204 2011-03-22 15:19:54Z jordan $ 11 */ 12 13#ifndef __TRANSMISSION__ 14 #error only libtransmission should #include this header. 15#endif 16 17#ifndef TR_TORRENT_MAGNET_H 18#define TR_TORRENT_MAGNET_H 1 19 20#include <time.h> 21 22enum 23{ 24 /* defined by BEP #9 */ 25 METADATA_PIECE_SIZE = ( 1024 * 16 ) 26}; 27 28void* tr_torrentGetMetadataPiece( tr_torrent * tor, int piece, int * len ); 29 30void tr_torrentSetMetadataPiece( tr_torrent * tor, int piece, const void * data, int len ); 31 32bool tr_torrentGetNextMetadataRequest( tr_torrent * tor, time_t now, int * setme ); 33 34void tr_torrentSetMetadataSizeHint( tr_torrent * tor, int metadata_size ); 35 36double tr_torrentGetMetadataPercent( const tr_torrent * tor ); 37 38#endif 39