30
30
struct tr_bitfield;
31
31
typedef struct tr_completion tr_completion;
33
tr_completion * tr_cpInit( tr_torrent * );
34
void tr_cpClose( tr_completion * );
33
tr_completion * tr_cpInit( tr_torrent * );
35
void tr_cpClose( tr_completion * );
38
cp_status_t tr_cpGetStatus ( const tr_completion * );
39
uint64_t tr_cpHaveTotal( const tr_completion * );
40
uint64_t tr_cpHaveValid( const tr_completion * );
41
uint64_t tr_cpLeftUntilComplete( const tr_completion * );
42
uint64_t tr_cpLeftUntilDone( const tr_completion * );
43
uint64_t tr_cpSizeWhenDone( const tr_completion * );
44
float tr_cpPercentComplete( const tr_completion * );
45
float tr_cpPercentDone( const tr_completion * );
46
void tr_cpInvalidateDND ( tr_completion * );
47
void tr_cpGetAmountDone( const tr_completion *, float * tab, int tabCount );
39
tr_completeness tr_cpGetStatus( const tr_completion * );
41
uint64_t tr_cpHaveTotal( const tr_completion * );
43
uint64_t tr_cpHaveValid( const tr_completion * );
45
uint64_t tr_cpLeftUntilComplete( const tr_completion * );
47
uint64_t tr_cpLeftUntilDone( const tr_completion * );
49
uint64_t tr_cpSizeWhenDone( const tr_completion * );
51
float tr_cpPercentComplete( const tr_completion * );
53
float tr_cpPercentDone( const tr_completion * );
55
void tr_cpInvalidateDND( tr_completion * );
57
void tr_cpGetAmountDone( const tr_completion * completion,
50
int tr_cpPieceIsComplete( const tr_completion *, tr_piece_index_t piece );
51
void tr_cpPieceAdd( tr_completion *, tr_piece_index_t piece );
52
void tr_cpPieceRem( tr_completion *, tr_piece_index_t piece );
62
int tr_cpPieceIsComplete( const tr_completion * completion,
63
tr_piece_index_t piece );
65
void tr_cpPieceAdd( tr_completion * completion,
66
tr_piece_index_t piece );
68
void tr_cpPieceRem( tr_completion * completion,
69
tr_piece_index_t piece );
55
int tr_cpBlockIsComplete( const tr_completion *, tr_block_index_t block );
56
void tr_cpBlockAdd( tr_completion *, tr_block_index_t block );
57
tr_errno tr_cpBlockBitfieldSet( tr_completion *, struct tr_bitfield * );
58
int tr_cpMissingBlocksInPiece( const tr_completion * cp,
59
tr_piece_index_t piece );
72
int tr_cpBlockIsComplete( const tr_completion * completion,
73
tr_block_index_t block );
75
void tr_cpBlockAdd( tr_completion * completion,
76
tr_block_index_t block );
78
int tr_cpBlockBitfieldSet( tr_completion * completion,
79
struct tr_bitfield * blocks );
81
int tr_cpMissingBlocksInPiece( const tr_completion * completion,
82
tr_piece_index_t piece );
62
85
const struct tr_bitfield * tr_cpPieceBitfield( const tr_completion* );
63
87
const struct tr_bitfield * tr_cpBlockBitfield( const tr_completion * );