- Torrent addign and removal functional
[qtrapids] / src / engine / QTorrentHandle.cpp
index c69162c..3fb6ec0 100644 (file)
@@ -55,20 +55,6 @@ QString QTorrentHandle::name() const
        return QString::fromStdString(torrentHandle_.name());
 }
 
-
-
-
-bool QTorrentHandle::operator==(QTorrentHandle const& h)
-{
-       return torrentHandle_ == h.torrentHandle_;
-}
-
-
-bool QTorrentHandle::operator<(QTorrentHandle const& h)
-{
-       return torrentHandle_ < h.torrentHandle_;
-}
-
 size_t QTorrentHandle::getTotalSize() const
 {
        TorrentInfo info = getTorrentInfo();
@@ -99,18 +85,21 @@ float QTorrentHandle::downloadRate() const
        return statusTmp.download_rate;
 }
 
+
 qint32 QTorrentHandle::numSeeds() const
 {
        TorrentStatus statusTmp = status();
        return statusTmp.list_seeds;
 }
 
+
 qint32 QTorrentHandle::numLeeches() const
 {
        TorrentStatus statusTmp = status();
        return (statusTmp.list_peers - statusTmp.list_seeds);
 }
 
+
 qint32 QTorrentHandle::ratio() const
 {
        TorrentStatus statusTmp = status();
@@ -125,6 +114,25 @@ qint32 QTorrentHandle::ratio() const
 }
 
 
+TorrentHandle QTorrentHandle::getHandle() const
+{
+       return torrentHandle_;
+}
+
+
+bool QTorrentHandle::operator==(QTorrentHandle const& h) const
+{
+       return torrentHandle_ == h.torrentHandle_;
+}
+
+
+bool QTorrentHandle::operator<(QTorrentHandle const& h) const
+{
+       return torrentHandle_ < h.torrentHandle_;
+}
+
+
+
 QString QTorrentHandle::GetStatusString(TorrentStatus const& status) const
 {
        switch (status.state) {
@@ -147,4 +155,5 @@ QString QTorrentHandle::GetStatusString(TorrentStatus const& status) const
        }
 }
 
+
                                
\ No newline at end of file