(trunk libT) make tr_torrentFindFile() a public API

This commit is contained in:
Charles Kerr 2009-10-19 13:55:42 +00:00
parent 6af5b7691e
commit 5a96ee9fc4
2 changed files with 11 additions and 8 deletions

View File

@ -354,14 +354,6 @@ static TR_INLINE const char * tr_torrentName( const tr_torrent * tor )
return tor->info.name;
}
/**
* Get the file that exists on the disk, or NULL if no file exists yet.
* @return the file that exists on the disk, or NULL if no file exists yet.
* @param tor the torrent whose file we're using
* @param fileNum the fileIndex, in [0..tor->info.fileCount)
*/
char* tr_torrentFindFile( const tr_torrent * tor, tr_file_index_t fileNo );
/**
* Tell the tr_torrent that one of its files has become complete
*/

View File

@ -996,6 +996,17 @@ int tr_torrentId( const tr_torrent * torrent );
tr_torrent* tr_torrentFindFromId( tr_session * session, int id );
/**
* @brief find the location of a torrent's file by looking with and without
* the ".part" suffix, looking in downloadDir and incompleteDir, etc.
* @return a newly-allocated string (that must be tr_freed() by the caller when done)
* that gives the location of this file on disk, or NULL if no file exists yet.
* @param tor the torrent whose file we're looking for
* @param fileNum the fileIndex, in [0...tr_info.fileCount)
*/
char* tr_torrentFindFile( const tr_torrent * tor, tr_file_index_t fileNo );
/***
**** Torrent speed limits
****