Changeset 13902


Ignore:
Timestamp:
Jan 30, 2013, 8:00:43 PM (8 years ago)
Author:
jordan
Message:

(libT) copyediting: fix whitespace

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/announcer-common.h

    r13625 r13902  
    3737typedef struct
    3838{
    39     /* the scrape URL */
    40     char * url;
    41 
    42     /* the name to use when deep logging is enabled */
    43     char log_name[128];
    44 
    45     /* info hashes of the torrents to scrape */
    46     uint8_t info_hash[TR_MULTISCRAPE_MAX][SHA_DIGEST_LENGTH];
    47 
    48     /* how many hashes to use in the info_hash field */
    49     int info_hash_count;
     39  /* the scrape URL */
     40  char * url;
     41
     42  /* the name to use when deep logging is enabled */
     43  char log_name[128];
     44
     45  /* info hashes of the torrents to scrape */
     46  uint8_t info_hash[TR_MULTISCRAPE_MAX][SHA_DIGEST_LENGTH];
     47
     48  /* how many hashes to use in the info_hash field */
     49  int info_hash_count;
    5050}
    5151tr_scrape_request;
     
    5353struct tr_scrape_response_row
    5454{
    55     /* the torrent's info_hash */
    56     uint8_t info_hash[SHA_DIGEST_LENGTH];
    57 
    58     /* how many peers are seeding this torrent */
    59     int seeders;
    60 
    61     /* how many peers are downloading this torrent */
    62     int leechers;
    63 
    64     /* how many times this torrent has been downloaded */
    65     int downloads;
    66 
    67     /* the number of active downloaders in the swarm.
    68      * this is a BEP 21 extension that some trackers won't support.
    69      * http://www.bittorrent.org/beps/bep_0021.html#tracker-scrapes  */
    70     int downloaders;
     55  /* the torrent's info_hash */
     56  uint8_t info_hash[SHA_DIGEST_LENGTH];
     57
     58  /* how many peers are seeding this torrent */
     59  int seeders;
     60
     61  /* how many peers are downloading this torrent */
     62  int leechers;
     63
     64  /* how many times this torrent has been downloaded */
     65  int downloads;
     66
     67  /* the number of active downloaders in the swarm.
     68   * this is a BEP 21 extension that some trackers won't support.
     69   * http://www.bittorrent.org/beps/bep_0021.html#tracker-scrapes  */
     70  int downloaders;
    7171};
    7272
    7373typedef struct
    7474{
    75     /* whether or not we managed to connect to the tracker */
    76     bool did_connect;
    77 
    78     /* whether or not the scrape timed out */
    79     bool did_timeout;
    80 
    81     /* how many info hashes are in the 'rows' field */
    82     int row_count;
    83 
    84     /* the individual torrents' scrape results */
    85     struct tr_scrape_response_row rows[TR_MULTISCRAPE_MAX];
    86 
    87     /* the raw scrape url */
    88     char * url;
    89 
    90     /* human-readable error string on failure, or NULL */
    91     char * errmsg;
    92 
    93     /* minimum interval (in seconds) allowed between scrapes.
    94      * this is an unofficial extension that some trackers won't support. */
    95     int min_request_interval;
     75  /* whether or not we managed to connect to the tracker */
     76  bool did_connect;
     77
     78  /* whether or not the scrape timed out */
     79  bool did_timeout;
     80
     81  /* how many info hashes are in the 'rows' field */
     82  int row_count;
     83
     84  /* the individual torrents' scrape results */
     85  struct tr_scrape_response_row rows[TR_MULTISCRAPE_MAX];
     86
     87  /* the raw scrape url */
     88  char * url;
     89
     90  /* human-readable error string on failure, or NULL */
     91  char * errmsg;
     92
     93  /* minimum interval (in seconds) allowed between scrapes.
     94   * this is an unofficial extension that some trackers won't support. */
     95  int min_request_interval;
    9696}
    9797tr_scrape_response;
     
    116116typedef enum
    117117{
    118     TR_ANNOUNCE_EVENT_NONE,
    119     TR_ANNOUNCE_EVENT_COMPLETED,
    120     TR_ANNOUNCE_EVENT_STARTED,
    121     TR_ANNOUNCE_EVENT_STOPPED
     118  TR_ANNOUNCE_EVENT_NONE,
     119  TR_ANNOUNCE_EVENT_COMPLETED,
     120  TR_ANNOUNCE_EVENT_STARTED,
     121  TR_ANNOUNCE_EVENT_STOPPED
    122122}
    123123tr_announce_event;
     
    127127typedef struct
    128128{
    129     tr_announce_event event;
    130     bool partial_seed;
    131 
    132     /* the port we listen for incoming peers on */
    133     int port;
    134 
    135     /* per-session key */
    136     int key;
    137 
    138     /* the number of peers we'd like to get back in the response */
    139     int numwant;
    140 
    141     /* the number of bytes we uploaded since the last 'started' event */
    142     uint64_t up;
    143 
    144     /* the number of good bytes we downloaded since the last 'started' event */
    145     uint64_t down;
    146 
    147     /* the number of bad bytes we downloaded since the last 'started' event */
    148     uint64_t corrupt;
    149 
    150     /* the total size of the torrent minus the number of bytes completed */
    151     uint64_t leftUntilComplete;
    152 
    153     /* the tracker's announce URL */
    154     char * url;
    155 
    156     /* key generated by and returned from an http tracker.
    157      * see tr_announce_response.tracker_id_str */
    158     char * tracker_id_str;
    159 
    160     /* the torrent's peer id.
    161      * this changes when a torrent is stopped -> restarted. */
    162     char peer_id[PEER_ID_LEN];
    163 
    164     /* the torrent's info_hash */
    165     uint8_t info_hash[SHA_DIGEST_LENGTH];
    166 
    167     /* the name to use when deep logging is enabled */
    168     char log_name[128];
     129  tr_announce_event event;
     130  bool partial_seed;
     131
     132  /* the port we listen for incoming peers on */
     133  int port;
     134
     135  /* per-session key */
     136  int key;
     137
     138  /* the number of peers we'd like to get back in the response */
     139  int numwant;
     140
     141  /* the number of bytes we uploaded since the last 'started' event */
     142  uint64_t up;
     143
     144  /* the number of good bytes we downloaded since the last 'started' event */
     145  uint64_t down;
     146
     147  /* the number of bad bytes we downloaded since the last 'started' event */
     148  uint64_t corrupt;
     149
     150  /* the total size of the torrent minus the number of bytes completed */
     151  uint64_t leftUntilComplete;
     152
     153  /* the tracker's announce URL */
     154  char * url;
     155
     156  /* key generated by and returned from an http tracker.
     157   * see tr_announce_response.tracker_id_str */
     158  char * tracker_id_str;
     159
     160  /* the torrent's peer id.
     161   * this changes when a torrent is stopped -> restarted. */
     162  char peer_id[PEER_ID_LEN];
     163
     164  /* the torrent's info_hash */
     165  uint8_t info_hash[SHA_DIGEST_LENGTH];
     166
     167  /* the name to use when deep logging is enabled */
     168  char log_name[128];
    169169}
    170170tr_announce_request;
     
    174174typedef struct
    175175{
    176     /* the torrent's info hash */
    177     uint8_t info_hash[SHA_DIGEST_LENGTH];
    178 
    179     /* whether or not we managed to connect to the tracker */
    180     bool did_connect;
    181 
    182     /* whether or not the scrape timed out */
    183     bool did_timeout;
    184 
    185     /* preferred interval between announces.
    186      * transmission treats this as the interval for periodic announces */
    187     int interval;
    188 
    189     /* minimum interval between announces. (optional)
    190      * transmission treats this as the min interval for manual announces */
    191     int min_interval;
    192 
    193     /* how many peers are seeding this torrent */
    194     int seeders;
    195 
    196     /* how many peers are downloading this torrent */
    197     int leechers;
    198 
    199     /* how many times this torrent has been downloaded */
    200     int downloads;
    201 
    202     /* number of items in the 'pex' field */
    203     size_t pex_count;
    204 
    205     /* IPv4 peers that we acquired from the tracker */
    206     struct tr_pex * pex;
    207 
    208     /* number of items in the 'pex6' field */
    209     size_t pex6_count;
    210 
    211     /* IPv6 peers that we acquired from the tracker */
    212     struct tr_pex * pex6;
    213 
    214     /* human-readable error string on failure, or NULL */
    215     char * errmsg;
    216 
    217     /* human-readable warning string or NULL */
    218     char * warning;
    219 
    220     /* key generated by and returned from an http tracker.
    221      * if this is provided, subsequent http announces must include this. */
    222     char * tracker_id_str;
     176  /* the torrent's info hash */
     177  uint8_t info_hash[SHA_DIGEST_LENGTH];
     178
     179  /* whether or not we managed to connect to the tracker */
     180  bool did_connect;
     181
     182  /* whether or not the scrape timed out */
     183  bool did_timeout;
     184
     185  /* preferred interval between announces.
     186   * transmission treats this as the interval for periodic announces */
     187  int interval;
     188
     189  /* minimum interval between announces. (optional)
     190   * transmission treats this as the min interval for manual announces */
     191  int min_interval;
     192
     193  /* how many peers are seeding this torrent */
     194  int seeders;
     195
     196  /* how many peers are downloading this torrent */
     197  int leechers;
     198
     199  /* how many times this torrent has been downloaded */
     200  int downloads;
     201
     202  /* number of items in the 'pex' field */
     203  size_t pex_count;
     204
     205  /* IPv4 peers that we acquired from the tracker */
     206  struct tr_pex * pex;
     207
     208  /* number of items in the 'pex6' field */
     209  size_t pex6_count;
     210
     211  /* IPv6 peers that we acquired from the tracker */
     212  struct tr_pex * pex6;
     213
     214  /* human-readable error string on failure, or NULL */
     215  char * errmsg;
     216
     217  /* human-readable warning string or NULL */
     218  char * warning;
     219
     220  /* key generated by and returned from an http tracker.
     221   * if this is provided, subsequent http announces must include this. */
     222  char * tracker_id_str;
    223223}
    224224tr_announce_response;
  • trunk/libtransmission/web.h

    r13625 r13902  
    4343
    4444typedef void (tr_web_done_func)(tr_session       * session,
    45                                    bool               timeout_flag,
    46                                    bool               did_connect_flag,
    47                                    long               response_code,
    48                                    const void       * response,
    49                                    size_t             response_byte_count,
    50                                    void             * user_data);
     45                                bool               timeout_flag,
     46                                bool               did_connect_flag,
     47                                long               response_code,
     48                                const void       * response,
     49                                size_t             response_byte_count,
     50                                void             * user_data);
    5151
    5252const char * tr_webGetResponseStr (long response_code);
Note: See TracChangeset for help on using the changeset viewer.