diff options
| author | Tannin <devnull@localhost> | 2014-01-04 16:05:39 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-01-04 16:05:39 +0100 |
| commit | 0ea7d99b9f2a2119abce2454ae4ed13fcf065895 (patch) | |
| tree | 9d0262f7f6d06196c22873de6d58751ab6b4a130 /src/downloadmanager.h | |
| parent | e45b747c82832d227b9ee3ae9dcb214c4c7f67b5 (diff) | |
| parent | 6cffbd4f274106ac09d3729e104bf526141d7d79 (diff) | |
Merge
Diffstat (limited to 'src/downloadmanager.h')
| -rw-r--r-- | src/downloadmanager.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/downloadmanager.h b/src/downloadmanager.h index 099e6084..62396666 100644 --- a/src/downloadmanager.h +++ b/src/downloadmanager.h @@ -206,6 +206,19 @@ public: int numTotalDownloads() const; /** + * @brief retrieve number of pending downloads (nexus downloads for which we don't know the name and url yet) + * @return number of pending downloads + */ + int numPendingDownloads() const; + + /** + * @brief retrieve the info of a pending download + * @param index index of the pending download (index in the range [0, numPendingDownloads()[) + * @return pair of modid, fileid + */ + std::pair<int, int> getPendingDownload(int index); + + /** * @brief retrieve the full path to the download specified by index * * @param index the index to look up @@ -357,6 +370,11 @@ signals: */ void downloadSpeed(const QString &serverName, int bytesPerSecond); + /** + * @brief emitted whenever a new download is added to the list + */ + void downloadAdded(); + public slots: /** @@ -440,6 +458,8 @@ private: QDateTime matchDate(const QString &timeString); + void removePending(int modID, int fileID); + private: static const int AUTOMATIC_RETRIES = 3; @@ -447,6 +467,9 @@ private: private: NexusInterface *m_NexusInterface; + + QVector<std::pair<int, int> > m_PendingDownloads; + QVector<DownloadInfo*> m_ActiveDownloads; QString m_OutputDirectory; @@ -465,4 +488,6 @@ private: }; + + #endif // DOWNLOADMANAGER_H |
