Changeset 2333


Ignore:
Timestamp:
Jul 13, 2007, 1:17:21 AM (15 years ago)
Author:
charles
Message:

... and do the same for tr_torrentGetFileDL()

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r2332 r2333  
    12401240
    12411241void
    1242 tr_torrentSetFileDLs ( tr_torrent_t * tor, const uint8_t * enabled )
     1242tr_torrentSetFileDLs ( tr_torrent_t   * tor,
     1243                       int            * files,
     1244                       int              fileCount,
     1245                       int              do_download )
    12431246{
    12441247    int i, j;
     1248    const int dnd = !do_download;
    12451249
    12461250    tr_torrentWriterLock( tor );
    12471251
    1248     for( i=0; i<tor->info.fileCount; ++i ) {
    1249         const int dnd = !enabled[i];
    1250         tr_file_t * file = &tor->info.files[i];
     1252    for( i=0; i<fileCount; ++i ) {
     1253        const int fileIndex = files[i];
     1254        tr_file_t * file = &tor->info.files[fileIndex];
    12511255        file->dnd = dnd;
    12521256        for( j=file->firstPiece; j<=file->lastPiece; ++j )
  • trunk/libtransmission/transmission.h

    r2332 r2333  
    237237int tr_torrentGetFileDL( const tr_torrent_t *, int file );
    238238
    239 /* enabled should be an array of tor->info.fileCount bytes,
    240  * each holding a nonzero value if the file is to be downloaded */
    241 void tr_torrentSetFileDLs ( tr_torrent_t *, const uint8_t * enabled );
     239/* set a batch of files to be downloaded or not. */
     240void tr_torrentSetFileDLs ( tr_torrent_t   * tor,
     241                            int            * files,
     242                            int              fileCount,
     243                            int              do_download );
    242244
    243245/* single-file form of tr_torrentSetFileDLs */
Note: See TracChangeset for help on using the changeset viewer.