mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
- Moved from libcommoncpp to libcurl for downloads from urls
- Added SOCKS5 proxy support when downloading from urls
This commit is contained in:
parent
8ecf79e91c
commit
61eb921e44
7 changed files with 157 additions and 117 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue