~ubuntu-branches/ubuntu/lucid/ktorrent/lucid

« back to all changes in this revision

Viewing changes to libbtcore/interfaces/peerinterface.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-12-08 19:17:41 UTC
  • mfrom: (1.2.1 upstream) (0.7.12 sid)
  • Revision ID: james.westby@ubuntu.com-20091208191741-lqlq0xvnlv8ki19u
Tags: 3.3.1+dfsg.1-1ubuntu1
* Merge with Debian Testing remaining changes:
  - Build-depend directly on libboost-serialization1.40-dev since
    libboost-serialization-dev from boost-defaults is not in Main
  - Add in rules: include /usr/lib/kubuntu-desktop-i18n/debhelper/kubuntu.mk
  - Don't use dpkg-source 3.0 format
  - Add quilt to build-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
                {
44
44
                        /// IP address of peer (dotted notation)
45
45
                        QString ip_address;
 
46
                        /// Host name of the peer
 
47
                        QString hostname;
46
48
                        /// The client (Azureus, BitComet, ...)
47
49
                        QString client;
48
50
                        /// Download rate (bytes/s)
63
65
                        bt::Uint64 bytes_downloaded;
64
66
                        /// Advanced choke algorithm score
65
67
                        double aca_score;
66
 
                        /// The evil flag is on when the peer has not choked us, 
67
 
                        /// but has snubbed us and requests have timedout
68
 
                        bool evil;
69
68
                        /// Flag to indicate if this peer has an upload slot
70
69
                        bool has_upload_slot;
71
70
                        /// Is the peer interested
84
83
                        bool local;
85
84
                        /// Whether or not the peer supports the extension protocol
86
85
                        bool extension_protocol;
 
86
                        
 
87
                        /// Get the address of the peer (hostname if it is valid, IP otherwise)
 
88
                        QString address() const {return hostname.isEmpty() ? ip_address : hostname;}
87
89
                };
88
90
 
89
91
                virtual const Stats & getStats() const = 0;