Changeset 2332


Ignore:
Timestamp:
Jul 13, 2007, 12:27:47 AM (15 years ago)
Author:
charles
Message:

revise tr_torrentSetFilePriorities() for BMW

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/torrent.c

    r2330 r2332  
    11611161
    11621162void
    1163 tr_torrentSetFilePriorities( tr_torrent_t         * tor,
    1164                              const tr_priority_t  * filePriorities )
     1163tr_torrentSetFilePriorities( tr_torrent_t        * tor,
     1164                             int                 * files,
     1165                             int                   fileCount,
     1166                             tr_priority_t         priority )
    11651167{
    11661168    int i;
    1167     for( i=0; i<tor->info.pieceCount; ++i )
    1168         tr_torrentSetFilePriorityImpl( tor, i, filePriorities[i], FALSE );
     1169    for( i=0; i<fileCount; ++i ) {
     1170        const int fileIndex = files[i];
     1171        tr_torrentSetFilePriorityImpl( tor, fileIndex, priority, FALSE );
     1172    }
    11691173    fastResumeSave( tor );
    11701174}
  • trunk/libtransmission/transmission.h

    r2330 r2332  
    214214typedef int8_t tr_priority_t;
    215215
    216 /* priorities should be an array of tor->info.fileCount bytes,
    217  * each holding a value of TR_PRI_NORMAL, _HIGH, or _LOW */
    218 void tr_torrentSetFilePriorities ( tr_torrent_t *, const tr_priority_t * priorities );
     216/* set a batch of files to a particular priority. */
     217void tr_torrentSetFilePriorities( tr_torrent_t        * tor,
     218                                  int                 * files,
     219                                  int                   fileCount,
     220                                  tr_priority_t         priority );
     221
    219222
    220223/* single-file form of tr_torrentPrioritizeFiles.
Note: See TracChangeset for help on using the changeset viewer.