~ubuntu-branches/ubuntu/jaunty/transmission/jaunty-security

« back to all changes in this revision

Viewing changes to libtransmission/session.h

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2008-12-28 18:50:08 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20081228185008-2u8ac12dbckrwn7c
Tags: 1.42-0ubuntu1
* New upstream version (LP: #311959):
  - All platforms:
    - Better peer management in large swarms
    - Support BitTorrent Enhancement Proposal (BEP) #21 "Extension for 
      Partial Seeds"
    - Partial support for BEP #6 "Fast Extension" (reject, have all/none)
    - Honor the peer's BEP #10 reqq key, when available
    - Fix 1.40 "Got HTTP Status Code: 0" error message
    - Fix 1.40 "lazy bitfield" error
    - Fix 1.40 "jumpy upload speed" bug
    - Fix handshake peer_id error
    - Corrrectly handle Windows-style newlines in Bluetack blocklists
    - More accurate bandwidth measurement
    - File selection & priority was reset when editing a torrent's 
      tracker list
    - Fix autoconf/automake build warnings
  - GTK+:
    - In the Details dialog's peer tabs, rows were sometimes duplicated
    - Minor bugfixes, usability changes, and locale improvements
    - Three new translations: Afrikaans, Asturian, Bosnian
    - Sixteen updated translations
  - Daemon:
    - Fix 1.40 bug in handling IP whitelist
    - Minor bugfixes and output cleanup
    - Windows portability
  - CLI:
    - Fix minor free-memory-read bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: session.h 7069 2008-11-08 02:49:04Z charles $
 
2
 * $Id: session.h 7365 2008-12-13 22:52:13Z charles $
3
3
 *
4
4
 * Copyright (c) 2005-2008 Transmission authors and contributors
5
5
 *
22
22
 * DEALINGS IN THE SOFTWARE.
23
23
 *****************************************************************************/
24
24
 
 
25
#ifndef __TRANSMISSION__
 
26
#error only libtransmission should #include this header.
 
27
#endif
 
28
 
25
29
#ifndef TR_INTERNAL_H
26
30
#define TR_INTERNAL_H 1
27
31
 
48
52
    char *  filename;
49
53
};
50
54
 
51
 
struct tr_ratecontrol;
 
55
struct tr_bandwidth;
52
56
 
53
57
struct tr_handle
54
58
{
55
 
    unsigned int                 isPortSet          : 1;
56
 
    unsigned int                 isPexEnabled       : 1;
57
 
    unsigned int                 isBlocklistEnabled : 1;
58
 
    unsigned int                 isProxyEnabled     : 1;
59
 
    unsigned int                 isProxyAuthEnabled : 1;
60
 
    unsigned int                 isClosed           : 1;
61
 
    unsigned int                 useUploadLimit     : 1;
62
 
    unsigned int                 useDownloadLimit   : 1;
63
 
    unsigned int                 useLazyBitfield    : 1;
 
59
    tr_bool                      isPortSet;
 
60
    tr_bool                      isPexEnabled;
 
61
    tr_bool                      isBlocklistEnabled;
 
62
    tr_bool                      isProxyEnabled;
 
63
    tr_bool                      isProxyAuthEnabled;
 
64
    tr_bool                      isClosed;
 
65
    tr_bool                      useLazyBitfield;
 
66
 
 
67
    tr_bool                      isSpeedLimited[2];
 
68
    int                          speedLimit[2];
64
69
 
65
70
    tr_encryption_mode           encryptionMode;
66
71
 
84
89
    char *                       proxyUsername;
85
90
    char *                       proxyPassword;
86
91
 
87
 
    int                          uploadLimit;
88
 
    int                          downloadLimit;
89
 
 
90
92
    struct tr_list *             blocklists;
91
93
    struct tr_peerMgr *          peerMgr;
92
94
    struct tr_shared *           shared;
105
107
    struct tr_metainfo_lookup *  metainfoLookup;
106
108
    int                          metainfoLookupCount;
107
109
 
108
 
    /* the rate at which pieces are being transferred between client and peer.
109
 
     * protocol overhead is NOT included; this is only the piece data */
110
 
    struct tr_ratecontrol     *  pieceSpeed[2];
111
 
 
112
 
    /* the rate at which bytes are being transferred between client and peer. */
113
 
    struct tr_ratecontrol     *  rawSpeed[2];
 
110
    /* the size of the output buffer for peer connections */
 
111
    int so_sndbuf;
 
112
 
 
113
    /* the size of the input buffer for peer connections */
 
114
    int so_rcvbuf;
 
115
 
 
116
    /* monitors the "global pool" speeds */
 
117
    struct tr_bandwidth       * bandwidth;
114
118
};
115
119
 
116
120
const char * tr_sessionFindTorrentFile( const tr_session * session,