From 9ec5babafbd872a82bdbda8262a0096bdfde23b4 Mon Sep 17 00:00:00 2001 From: SaltyTrout Date: Sun, 1 Oct 2023 16:32:29 -0400 Subject: [PATCH 1/2] Updates to use fileName instead of index --- src/idownloadmanager.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/idownloadmanager.h b/src/idownloadmanager.h index cb596f97..124338db 100644 --- a/src/idownloadmanager.h +++ b/src/idownloadmanager.h @@ -40,7 +40,7 @@ class QDLLEXPORT IDownloadManager : public QObject * @return absoute path to the downloaded file. This file may not yet exist if the * download is incomplete */ - virtual QString downloadPath(int id) = 0; + virtual QString downloadPath(QString fileName) = 0; /** * @brief Installs a handler to be called when a download complete. @@ -51,7 +51,8 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool onDownloadComplete(const std::function& callback) = 0; + virtual bool + onDownloadComplete(const std::function& callback) = 0; /** * @brief Installs a handler to be called when a download is paused. @@ -62,7 +63,8 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool onDownloadPaused(const std::function& callback) = 0; + virtual bool + onDownloadPaused(const std::function& callback) = 0; /** * @brief Installs a handler to be called when a download fails. @@ -73,7 +75,8 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool onDownloadFailed(const std::function& callback) = 0; + virtual bool + onDownloadFailed(const std::function& callback) = 0; /** * @brief Installs a handler to be called when a download is removed. @@ -84,7 +87,8 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool onDownloadRemoved(const std::function& callback) = 0; + virtual bool + onDownloadRemoved(const std::function& callback) = 0; }; } // namespace MOBase From a2fe976b8dbec7f94aee59e9b64b462a1353812a Mon Sep 17 00:00:00 2001 From: SaltyTrout Date: Sat, 7 Oct 2023 22:14:10 -0400 Subject: [PATCH 2/2] Changed name from fileName to moId --- src/idownloadmanager.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/idownloadmanager.h b/src/idownloadmanager.h index 124338db..2bde7437 100644 --- a/src/idownloadmanager.h +++ b/src/idownloadmanager.h @@ -40,7 +40,7 @@ class QDLLEXPORT IDownloadManager : public QObject * @return absoute path to the downloaded file. This file may not yet exist if the * download is incomplete */ - virtual QString downloadPath(QString fileName) = 0; + virtual QString downloadPath(QString moId) = 0; /** * @brief Installs a handler to be called when a download complete. @@ -52,7 +52,7 @@ class QDLLEXPORT IDownloadManager : public QObject * reason this should fail). */ virtual bool - onDownloadComplete(const std::function& callback) = 0; + onDownloadComplete(const std::function& callback) = 0; /** * @brief Installs a handler to be called when a download is paused. @@ -63,8 +63,7 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool - onDownloadPaused(const std::function& callback) = 0; + virtual bool onDownloadPaused(const std::function& callback) = 0; /** * @brief Installs a handler to be called when a download fails. @@ -75,8 +74,7 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool - onDownloadFailed(const std::function& callback) = 0; + virtual bool onDownloadFailed(const std::function& callback) = 0; /** * @brief Installs a handler to be called when a download is removed. @@ -87,8 +85,7 @@ class QDLLEXPORT IDownloadManager : public QObject * @return true if the handler was successfully installed (there is as of now no known * reason this should fail). */ - virtual bool - onDownloadRemoved(const std::function& callback) = 0; + virtual bool onDownloadRemoved(const std::function& callback) = 0; }; } // namespace MOBase