Changeset 9927


Ignore:
Timestamp:
Jan 13, 2010, 10:40:07 PM (12 years ago)
Author:
charles
Message:

(trunk) add tr_torrent_stat.id to RPC documentation. Rename tr_tracker_stat.identifier as tr_tracker_stat.id for consistency with tr_torrent.id

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/rpc-spec.txt

    r9662 r9927  
    246246   trackers           | array of objects, each containing:   |
    247247                      +-------------------------+------------+
    248                       | announce                | string     | tr_info
    249                       | scrape                  | string     | tr_info
    250                       | tier                    | number     | tr_info
     248                      | announce                | string     | tr_tracker_info
     249                      | scrape                  | string     | tr_tracker_info
     250                      | tier                    | number     | tr_tracker_info
     251                      | id                      | number     | tr_tracker_info
    251252   -------------------+--------------------------------------+
    252253   trackerStats       | array of objects, each containing:   |
  • trunk/libtransmission/announcer.c

    r9902 r9927  
    777777            }
    778778
    779             tierAddTracker( announcer, tier, info->announce, info->scrape, info->identifier );
     779            tierAddTracker( announcer, tier, info->announce, info->scrape, info->id );
    780780        }
    781781    }
  • trunk/libtransmission/metainfo.c

    r9904 r9927  
    11/*
    22 * This file Copyright (C) 2009-2010 Mnemosyne LLC
     3            trackers[trackerCount].id = 0;
    34 *
    45 * This file is licensed by the GPL version 2.  Works owned by the
     
    295296                        t->announce = tr_strdup( url );
    296297                        t->scrape = tr_convertAnnounceToScrape( url );
    297                         t->identifier = trackerCount;
     298                        t->id = trackerCount;
    298299
    299300                        anyAdded = TRUE;
     
    327328            trackers[trackerCount].announce = tr_strdup( url );
    328329            trackers[trackerCount].scrape = tr_convertAnnounceToScrape( url );
    329             trackers[trackerCount].identifier = 0;
     330            trackers[trackerCount].id = 0;
    330331            trackerCount++;
    331332            /*fprintf( stderr, "single announce: [%s]\n", url );*/
     
    600601            inf->trackers[i].announce = tr_strdup( url );
    601602            inf->trackers[i].scrape = tr_convertAnnounceToScrape( url );
    602             inf->trackers[i].identifier = i;
     603            inf->trackers[i].id = i;
    603604        }
    604605    }
  • trunk/libtransmission/rpcimpl.c

    r9904 r9927  
    362362        tr_benc *               d = tr_bencListAddDict( trackers, 4 );
    363363        tr_bencDictAddStr( d, "announce", t->announce );
    364         tr_bencDictAddInt( d, "identifier", t->identifier );
     364        tr_bencDictAddInt( d, "id", t->id );
    365365        tr_bencDictAddStr( d, "scrape", t->scrape );
    366366        tr_bencDictAddInt( d, "tier", t->tier );
  • trunk/libtransmission/transmission.h

    r9919 r9927  
    12091209    char *   announce;
    12101210    char *   scrape;
    1211     uint32_t identifier; /* used to match to a tr_tracker_stat */
     1211    uint32_t id; /* unique identifier used to match to a tr_tracker_stat */
    12121212}
    12131213tr_tracker_info;
  • trunk/macosx/Torrent.m

    r9908 r9927  
    632632    {
    633633        trackerStructs[i] = fInfo->trackers[i];
    634         trackerStructs[i].identifier = i;
     634        trackerStructs[i].id = i;
    635635    }
    636636   
    637637    trackerStructs[oldTrackerCount].announce = (char *)[tracker UTF8String];
    638638    trackerStructs[oldTrackerCount].tier = trackerStructs[oldTrackerCount-1].tier + 1;
    639     trackerStructs[oldTrackerCount].identifier = oldTrackerCount;
     639    trackerStructs[oldTrackerCount].id = oldTrackerCount;
    640640   
    641641    const BOOL success = tr_torrentSetAnnounceList(fHandle, trackerStructs, oldTrackerCount+1);
     
    653653    for (NSUInteger i = 0; i < fInfo->trackerCount; i++)
    654654    {
    655         if (![removeIdentifiers containsIndex: fInfo->trackers[i].identifier])
     655        if (![removeIdentifiers containsIndex: fInfo->trackers[i].id])
    656656        {
    657657            trackerStructs[newCount] = fInfo->trackers[i];
    658             trackerStructs[newCount].identifier = newCount++;
     658            trackerStructs[newCount].id = newCount++;
    659659        }
    660660    }
  • trunk/macosx/TrackerNode.m

    r9902 r9927  
    6767- (NSUInteger) identifier
    6868{
    69     return fStat.identifier;
     69    return fStat.id;
    7070}
    7171
Note: See TracChangeset for help on using the changeset viewer.