X-Git-Url: http://git.maemo.org/git/?p=qtrapids;a=blobdiff_plain;f=src%2Fserver%2FTorrentHandle.hpp;h=f3e034351ebebd364115c339387690bb6cfded98;hp=bf4423e58ea39185e055a1d6b05048b3efdbf7cd;hb=1d97c0a567b80cf9fc67791669debfe3aa9c4c84;hpb=d27c2db830de9a65d6a419479ee598cbf3697746 diff --git a/src/server/TorrentHandle.hpp b/src/server/TorrentHandle.hpp index bf4423e..f3e0343 100644 --- a/src/server/TorrentHandle.hpp +++ b/src/server/TorrentHandle.hpp @@ -1,11 +1,9 @@ /*************************************************************************** - * Copyright (C) 2009 by Lassi Väätämöinen * - * lassi.vaatamoinen@ixonos.com * + * Copyright (C) 2010 by Ixonos Plc * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * the Free Software Foundation; version 2 of the License. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -36,7 +34,7 @@ typedef libtorrent::sha1_hash Sha1Hash; inline QString Hash2QStr(Sha1Hash const& hash) { - return QString(hash.to_string().c_str()); + return QString(hash.to_string().c_str()); } /** @@ -46,39 +44,39 @@ class TorrentHandle { public: - TorrentHandle(libtorrent::torrent_handle handle); - ~TorrentHandle(); + TorrentHandle(libtorrent::torrent_handle handle); + ~TorrentHandle(); - torrent_info_cref getTorrentInfo() const; + torrent_info_cref getTorrentInfo() const; - bool isValid() const; + bool isValid() const; - Sha1Hash hash() const - { - return torrentHandle_.info_hash(); - } + Sha1Hash hash() const { + return torrentHandle_.info_hash(); + } - QString name() const; - size_t getTotalSize() const; - TorrentStatus::Id state() const; - float progress() const; - float uploadRate() const; - float downloadRate() const; - qint32 numSeeds() const; - qint32 numLeeches() const; - qint32 ratio() const; + QString name() const; + size_t getTotalSize() const; + size_t getTotalDone() const; + TorrentStatus::Id state() const; + float progress() const; + float uploadRate() const; + float downloadRate() const; + qint32 numSeeds() const; + qint32 numLeeches() const; + qint32 ratio() const; - torrent_handle_t getHandle() const; - bool operator==(TorrentHandle const& h) const; - bool operator<(TorrentHandle const& h) const; + torrent_handle_t getHandle() const; + bool operator==(TorrentHandle const& h) const; + bool operator<(TorrentHandle const& h) const; private: - TorrentHandle(); // Prevent default construct. - torrent_handle_t torrentHandle_; + TorrentHandle(); // Prevent default construct. + torrent_handle_t torrentHandle_; - TorrentStatus_t status() const; + TorrentStatus_t status() const; };