##// END OF EJS Templates
Really basic implementation of Downloader which might replace current...
Really basic implementation of Downloader which might replace current NetworkController It is currently really basic, it only does synchronous DLs with or without authentication. It is written to isolate as much as possible Qt Network classes. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1342:91cbf8a85daf
r1342:91cbf8a85daf
Show More
Downloader.h
36 lines | 715 B | text/x-c | CLexer
#ifndef DOWNLOADER_H
#define DOWNLOADER_H
#include "CoreGlobal.h"
#include "Response.h"
#include <Common/MetaTypes.h>
#include <Common/spimpl.h>
#include <functional>
#include <QString>
#include <QByteArray>
/**
* @brief The Downloader handles all data donwloads in SciQLOP.
*/
class SCIQLOP_CORE_EXPORT Downloader{
public:
static Response get(const QString& url);
static Response get(const QString& url, const QString& user, const QString& passwd);
static Downloader& instance()
{
static Downloader inst;
return inst;
}
private:
class p_Downloader;
explicit Downloader();
spimpl::unique_impl_ptr<Downloader::p_Downloader> impl;
};
#endif // DOWNLOADER_H