Ignore:
Timestamp:
Feb 15, 2008, 4:00:46 PM (13 years ago)
Author:
charles
Message:

modify "verify local data" to not lose the blocks in incomplete pieces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/inout.h

    r4734 r5042  
    3333 * or TR_ERROR_IO_* otherwise.
    3434 */
    35 int tr_ioRead  ( struct tr_torrent*, int index, int begin, int len, uint8_t * );
     35int tr_ioRead  ( const struct tr_torrent  * tor,
     36                 int                        pieceIndex,
     37                 int                        offset,
     38                 int                        len,
     39                 uint8_t                  * setme );
    3640
    3741/**
     
    4044 * or TR_ERROR_IO_* otherwise.
    4145 */
    42 tr_errno tr_ioWrite ( struct tr_torrent *, int index, int begin, int len, const uint8_t * );
     46tr_errno tr_ioWrite ( struct tr_torrent  * tor,
     47                      int                  pieceIndex,
     48                      int                  offset,
     49                      int                  len,
     50                      const uint8_t      * writeme );
    4351
    44 /* hashes the specified piece and updates the completion accordingly. */
     52/**
     53 * returns true if the piece matches its metainfo's SHA1 checksum,
     54 * false otherwise.
     55 */
     56int tr_ioTestPiece( const tr_torrent*, int piece );
     57
     58
     59/**
     60 * tests the specified piece and uses the results to
     61 * update the torrent's "completion" and "blame" fields.
     62 */
    4563int tr_ioHash ( tr_torrent*, int piece );
    4664
    47 /**
    48 ***
    49 **/
    50 
    51 typedef void (*tr_recheck_done_cb)( tr_torrent * tor );
    52 
    53 void tr_ioRecheckAdd( tr_torrent          * tor,
    54                       tr_recheck_done_cb    recheck_done_cb );
    55 
    56 void tr_ioRecheckRemove( tr_torrent * tor );
    57 
    58 /**
    59 ***
    60 **/
    6165
    6266#endif
Note: See TracChangeset for help on using the changeset viewer.