6#include <albert/export.h>
23 Download(
const QUrl &url,
const QString &path, QObject *parent =
nullptr);
31 static std::shared_ptr<Download>
unique(
const QUrl &url,
const QString &path);
57 std::unique_ptr<Private> d;
Downloads a file from the given URL to the given path.
Definition download.h:18
static std::shared_ptr< Download > unique(const QUrl &url, const QString &path)
Returns a unique download for url and path.
const QUrl & url()
Returns the url of the download. Threadsafe.
const QString & error()
Returns the error of the download, if any. Threadsafe.
void start()
Starts the download.
Download(const QUrl &url, const QString &path, QObject *parent=nullptr)
Constructs a download with the given url and path. Threadsafe.
const QString & path()
Returns the destination path of the download. Threadsafe.
bool isActive()
Returns true if the download is active. Threadsafe.
Albert utility namespace.
Definition albert.h:14