Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to use fileName instead of index #134

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/idownloadmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 moId) = 0;

/**
* @brief Installs a handler to be called when a download complete.
Expand All @@ -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<void(int)>& callback) = 0;
virtual bool
onDownloadComplete(const std::function<void(QString moId)>& callback) = 0;

/**
* @brief Installs a handler to be called when a download is paused.
Expand All @@ -62,7 +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<void(int)>& callback) = 0;
virtual bool onDownloadPaused(const std::function<void(QString moId)>& callback) = 0;

/**
* @brief Installs a handler to be called when a download fails.
Expand All @@ -73,7 +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<void(int)>& callback) = 0;
virtual bool onDownloadFailed(const std::function<void(QString moId)>& callback) = 0;

/**
* @brief Installs a handler to be called when a download is removed.
Expand All @@ -84,7 +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<void(int)>& callback) = 0;
virtual bool onDownloadRemoved(const std::function<void(QString moId)>& callback) = 0;
};

} // namespace MOBase
Expand Down