Added test torrent files to right place, $HOME/MyDocs.
[qtrapids] / src / engine / QTorrentHandle.h
index 855f0ca..e665d8f 100644 (file)
@@ -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        *
@@ -34,54 +32,55 @@ typedef libtorrent::torrent_handle TorrentHandle;
        @author Lassi Väätämöinen <lassi.vaatamoinen@ixonos.com>
 */
 
-namespace qtrapids {
-       
-       class QTorrentHandle 
-       {
-               public:
-                       
-                       enum State {
-                               QUEUED_FOR_CHECKING = TorrentStatus::queued_for_checking,
-                               CHECKING_FILES,
-                               DOWNLOADING_METADATA,
-                               DOWNLOADING,
-                               FINISHED,
-                               SEEDING,
-                               ALLOCATING,
-                               UNSPECIFIED
-                       };
-                       
-                       QTorrentHandle(libtorrent::torrent_handle handle);
-                       ~QTorrentHandle();
-                       
-
-                       
-                       TorrentInfo const& getTorrentInfo() const;
-                       
-                       bool isValid() const;
-
-                       QString name() const;
-                       size_t getTotalSize() const;
-                       QTorrentHandle::State state() const;
-                       float progress() const;
-                       float uploadRate() const;
-                       float downloadRate() const;
-                       qint32 numSeeds() const;
-                       qint32 numLeeches() const;
-                       qint32 ratio() const;
-                       
-                       TorrentHandle getHandle() const;
-                       
-                       bool operator==(QTorrentHandle const& h) const; 
-                       bool operator<(QTorrentHandle const& h) const;
-                       
-               private:
-                       QTorrentHandle(); // Prevent default construct.
-                       TorrentHandle torrentHandle_;
-               
-                       TorrentStatus status() const;
+namespace qtrapids
+{
 
+class QTorrentHandle
+{
+public:
+
+       enum State {
+               QUEUED_FOR_CHECKING = TorrentStatus::queued_for_checking,
+               CHECKING_FILES,
+               DOWNLOADING_METADATA,
+               DOWNLOADING,
+               FINISHED,
+               SEEDING,
+               ALLOCATING,
+               UNSPECIFIED
        };
 
+       QTorrentHandle(libtorrent::torrent_handle handle);
+       ~QTorrentHandle();
+
+
+
+       TorrentInfo const& getTorrentInfo() const;
+
+       bool isValid() const;
+
+       QString name() const;
+       size_t getTotalSize() const;
+       QTorrentHandle::State state() const;
+       float progress() const;
+       float uploadRate() const;
+       float downloadRate() const;
+       qint32 numSeeds() const;
+       qint32 numLeeches() const;
+       qint32 ratio() const;
+
+       TorrentHandle getHandle() const;
+
+       bool operator==(QTorrentHandle const& h) const;
+       bool operator<(QTorrentHandle const& h) const;
+
+private:
+       QTorrentHandle(); // Prevent default construct.
+       TorrentHandle torrentHandle_;
+
+       TorrentStatus status() const;
+
+};
+
 } // namespace qtrapids
 #endif