- Moved from libcommoncpp to libcurl for downloads from urls

- Added SOCKS5 proxy support when downloading from urls
This commit is contained in:
Christophe Dumez 2007-11-23 22:57:49 +00:00
parent 8ecf79e91c
commit 61eb921e44
7 changed files with 157 additions and 117 deletions

View file

@ -29,29 +29,18 @@
#include <QMutexLocker>
#include <QWaitCondition>
#include <QStringList>
namespace ost {
class URLStream;
}
typedef struct {
QString IP;
int port;
QString username;
QString password;
} tmp_proxy;
#include <curl/curl.h>
class subDownloadThread : public QThread {
Q_OBJECT
private:
QString url;
ost::URLStream *url_stream;
bool abort;
public:
subDownloadThread(QObject *parent, QString url);
~subDownloadThread();
QString errorCodeToString(int status);
QString errorCodeToString(CURLcode status);
signals:
// For subthreads
@ -90,7 +79,6 @@ class downloadThread : public QThread {
protected slots:
void propagateDownloadedFile(subDownloadThread* st, QString url, QString path);
void propagateDownloadFailure(subDownloadThread* st, QString url, QString reason);
};