Debian Codegraph @

src/librssguard/network-web/downloader.h

raw symbols SCIP
1 // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/network-web/downloader.h`/
2
3 #ifndef DOWNLOADER_H
4 #define DOWNLOADER_Hcxx . . $ `src/librssguard/network-web/downloader.h:4:9`!
5
6 #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/
7 #include "network-web/gemini/geminiclient.h"cxx . . $ `<file>/src/librssguard/network-web/gemini/geminiclient.h`/
8 #include "network-web/gemini/geminiparser.h"cxx . . $ `<file>/src/librssguard/network-web/gemini/geminiparser.h`/
9 #include "network-web/httpresponse.h"cxx . . $ `<file>/src/librssguard/network-web/httpresponse.h`/
10 #include "network-web/networkfactory.h"cxx . . $ `<file>/src/librssguard/network-web/networkfactory.h`/
11
12 #include <QHttpMultiPart>
13 #include <QNetworkProxy>
14 #include <QNetworkReply>
15 #include <QObject>
16 #include <QSslError>
17
18 class SilentNetworkAccessManagercxx . . $ SilentNetworkAccessManager#;
19 class QTimercxx . . $ QTimer#;
20
21 class Downloadercxx . . $ Downloader# : public QObjectcxx . . $ QObject# {
22 Q_OBJECTcxx . . $ Downloader#QPrivateSignal#QPrivateSignal(49f6e7a06ebc5aa8).
23
24 public:
25 explicit Downloadercxx . . $ Downloader#Downloader(749de1b6ae65bddd).(QObjectcxx . . $ QObject#* parent = nullptr);
26 virtual ~cxx . . $ Downloader#`~Downloader`(ced63f7c635d850d).Downloadercxx . . $ Downloader#();
27
28 // Access to last received full output data/error/content-type.
29 QByteArraycxx . . $ QByteArray# lastOutputDatacxx . . $ Downloader#lastOutputData(a96750bfbcb1fbe9).() const;
30 QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# lastOutputErrorcxx . . $ Downloader#lastOutputError(c916dcceceba1ae7).() const;
31 QListcxx . . $ QList#<HttpResponsecxx . . $ HttpResponse#> lastOutputMultipartDatacxx . . $ Downloader#lastOutputMultipartData(30a835898c73e47).() const;
32 QStringcxx . . $ QString# lastContentTypecxx . . $ Downloader#lastContentType(6ef7b6c27b00b43d).() const;
33 QListcxx . . $ QList#<QNetworkCookiecxx . . $ QNetworkCookie#> lastCookiescxx . . $ Downloader#lastCookies(d667f74267dd00c).() const;
34 int lastHttpStatusCodecxx . . $ Downloader#lastHttpStatusCode(455f465bc33b4cdf).() const;
35 QMapcxx . . $ QMap#<QStringcxx . . $ QString#, QStringcxx . . $ QString#> lastHeaderscxx . . $ Downloader#lastHeaders(d2c84686db60f716).() const;
36 QUrlcxx . . $ QUrl# lastUrlcxx . . $ Downloader#lastUrl(36d9834fe7321282).() const;
37
38 void setHttp2Statuscxx . . $ Downloader#setHttp2Status(b6895be502365f2f).(NetworkFactorycxx . . $ NetworkFactory#::Http2Statuscxx . . $ NetworkFactory#Http2Status# status);
39 void setProxycxx . . $ Downloader#setProxy(efbe238af4b4e748).(const QNetworkProxycxx . . $ QNetworkProxy#& proxy);
40
41 public slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!:
42 void cancelcxx . . $ Downloader#cancel(49f6e7a06ebc5aa8).();
43
44 void appendRawHeaderscxx . . $ Downloader#appendRawHeaders(7b5e3954c99f4a55).(const QListcxx . . $ QList#<QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#>>& headers);
45 void appendRawHeadercxx . . $ Downloader#appendRawHeader(a34492a60dbd2bdc).(const QByteArraycxx . . $ QByteArray#& name, const QByteArraycxx . . $ QByteArray#& value);
46
47 // Performs asynchronous download of given file. Redirections are handled.
48 void downloadFilecxx . . $ Downloader#downloadFile(59dca4567f557537).(const QStringcxx . . $ QString#& url,
49 int timeout = DOWNLOAD_TIMEOUTcxx . . $ `src/librssguard/definitions/definitions.h:75:9`!,
50 bool protected_contents = false,
51 const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(),
52 const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).());
53
54 void uploadFilecxx . . $ Downloader#uploadFile(ff82e17042abd466).(const QStringcxx . . $ QString#& url,
55 const QByteArraycxx . . $ QByteArray#& data,
56 int timeout = DOWNLOAD_TIMEOUTcxx . . $ `src/librssguard/definitions/definitions.h:75:9`!,
57 bool protected_contents = false,
58 const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(),
59 const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).());
60
61 void manipulateDatacxx . . $ Downloader#manipulateData(3688cabcec565115).(const QStringcxx . . $ QString#& url,
62 QNetworkAccessManagercxx . . $ QNetworkAccessManager#::Operationcxx . . $ QNetworkAccessManager#Operation# operation,
63 QHttpMultiPartcxx . . $ QHttpMultiPart#* multipart_data,
64 int timeout = DOWNLOAD_TIMEOUTcxx . . $ `src/librssguard/definitions/definitions.h:75:9`!,
65 bool protected_contents = false,
66 const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(),
67 const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).());
68
69 void manipulateDatacxx . . $ Downloader#manipulateData(6b89976b71ced0d1).(const QStringcxx . . $ QString#& url,
70 QNetworkAccessManagercxx . . $ QNetworkAccessManager#::Operationcxx . . $ QNetworkAccessManager#Operation# operation,
71 const QByteArraycxx . . $ QByteArray#& data = QByteArraycxx . . $ QByteArray#QByteArray(ced63f7c635d850d).(),
72 int timeout = DOWNLOAD_TIMEOUTcxx . . $ `src/librssguard/definitions/definitions.h:75:9`!,
73 bool protected_contents = false,
74 const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(),
75 const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).());
76
77 signalscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:43:14`!:
78 void progresscxx . . $ Downloader#progress(8be204668a5c1685).(qint64cxx . . $ qint64# bytes_received, qint64cxx . . $ qint64# bytes_total);
79 void completedcxx . . $ Downloader#completed(2e59411b5306353b).(const QUrlcxx . . $ QUrl#& url, QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# status, int http_code, QByteArraycxx . . $ QByteArray# contents =cxx . . $ QByteArray#QByteArray(ced63f7c635d850d). {});
80
81 private slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!:
82 void geminiRedirectcxx . . $ Downloader#geminiRedirect(61e5b15e0cd21ddb).(const QUrlcxx . . $ QUrl#& uri, bool is_permanent);
83 void geminiFinishedcxx . . $ Downloader#geminiFinished(84d6cb2703da46aa).(const QByteArraycxx . . $ QByteArray#& data, const QStringcxx . . $ QString#& mime);
84 void geminiErrorcxx . . $ Downloader#geminiError(bf7ef9a2ade9db5c).(GeminiClientcxx . . $ GeminiClient#::NetworkErrorcxx . . $ GeminiClient#NetworkError# error, const QStringcxx . . $ QString#& reason);
85
86 // Called when current reply is processed.
87 void finishedcxx . . $ Downloader#finished(49f6e7a06ebc5aa8).();
88
89 // Called when progress of downloaded file changes.
90 void progressInternalcxx . . $ Downloader#progressInternal(8be204668a5c1685).(qint64cxx . . $ qint64# bytes_received, qint64cxx . . $ qint64# bytes_total);
91
92 private:
93 void setCustomPropsToReplycxx . . $ Downloader#setCustomPropsToReply(a14709ced3df193c).(QNetworkReplycxx . . $ QNetworkReply#* reply);
94 QListcxx . . $ QList#<HttpResponsecxx . . $ HttpResponse#> decodeMultipartAnswercxx . . $ Downloader#decodeMultipartAnswer(44a69cdb09e5ba5c).(QNetworkReplycxx . . $ QNetworkReply#* reply);
95 void manipulateDatacxx . . $ Downloader#manipulateData(4e1a6d2315e70f4e).(const QStringcxx . . $ QString#& url,
96 QNetworkAccessManagercxx . . $ QNetworkAccessManager#::Operationcxx . . $ QNetworkAccessManager#Operation# operation,
97 const QByteArraycxx . . $ QByteArray#& data,
98 QHttpMultiPartcxx . . $ QHttpMultiPart#* multipart_data,
99 int timeout = DOWNLOAD_TIMEOUTcxx . . $ `src/librssguard/definitions/definitions.h:75:9`!,
100 bool protected_contents = false,
101 const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(),
102 const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).());
103 void runDeleteRequestcxx . . $ Downloader#runDeleteRequest(95fe34facd437029).(const QNetworkRequestcxx . . $ QNetworkRequest#& request);
104 void runPutRequestcxx . . $ Downloader#runPutRequest(e6545d3c3e42c11e).(const QNetworkRequestcxx . . $ QNetworkRequest#& request, const QByteArraycxx . . $ QByteArray#& data);
105 void runPostRequestcxx . . $ Downloader#runPostRequest(889baa9f86cc5a45).(const QNetworkRequestcxx . . $ QNetworkRequest#& request, QHttpMultiPartcxx . . $ QHttpMultiPart#* multipart_data);
106 void runPostRequestcxx . . $ Downloader#runPostRequest(e6545d3c3e42c11e).(const QNetworkRequestcxx . . $ QNetworkRequest#& request, const QByteArraycxx . . $ QByteArray#& data);
107 void runGetRequestcxx . . $ Downloader#runGetRequest(95fe34facd437029).(const QNetworkRequestcxx . . $ QNetworkRequest#& request);
108 void runGeminiRequestcxx . . $ Downloader#runGeminiRequest(37355d2f77053a23).(const QUrlcxx . . $ QUrl#& url);
109
110 private:
111 GeminiClientcxx . . $ GeminiClient#* m_geminiClientcxx . . $ Downloader#m_geminiClient.;
112 GeminiParsercxx . . $ GeminiParser# m_geminiParsercxx . . $ Downloader#m_geminiParser.;
113 QNetworkReplycxx . . $ QNetworkReply#* m_activeReplycxx . . $ Downloader#m_activeReply.;
114 QScopedPointercxx . . $ QScopedPointer#<SilentNetworkAccessManagercxx . . $ SilentNetworkAccessManager#> m_downloadManagercxx . . $ Downloader#m_downloadManager.;
115 QTimercxx . . $ QTimer#* m_timercxx . . $ Downloader#m_timer.;
116 QHashcxx . . $ QHash#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#> m_customHeaderscxx . . $ Downloader#m_customHeaders.;
117 QByteArraycxx . . $ QByteArray# m_inputDatacxx . . $ Downloader#m_inputData.;
118 QHttpMultiPartcxx . . $ QHttpMultiPart#* m_inputMultipartDatacxx . . $ Downloader#m_inputMultipartData.;
119 bool m_targetProtectedcxx . . $ Downloader#m_targetProtected.;
120 QStringcxx . . $ QString# m_targetUsernamecxx . . $ Downloader#m_targetUsername.;
121 QStringcxx . . $ QString# m_targetPasswordcxx . . $ Downloader#m_targetPassword.;
122
123 // Response data.
124 QByteArraycxx . . $ QByteArray# m_lastOutputDatacxx . . $ Downloader#m_lastOutputData.;
125 QListcxx . . $ QList#<HttpResponsecxx . . $ HttpResponse#> m_lastOutputMultipartDatacxx . . $ Downloader#m_lastOutputMultipartData.;
126 QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# m_lastOutputErrorcxx . . $ Downloader#m_lastOutputError.;
127 int m_lastHttpStatusCodecxx . . $ Downloader#m_lastHttpStatusCode.;
128 QStringcxx . . $ QString# m_lastContentTypecxx . . $ Downloader#m_lastContentType.;
129 QUrlcxx . . $ QUrl# m_lastUrlcxx . . $ Downloader#m_lastUrl.;
130 QListcxx . . $ QList#<QNetworkCookiecxx . . $ QNetworkCookie#> m_lastCookiescxx . . $ Downloader#m_lastCookies.;
131 QMapcxx . . $ QMap#<QStringcxx . . $ QString#, QStringcxx . . $ QString#> m_lastHeaderscxx . . $ Downloader#m_lastHeaders.;
132 };
133
134 #endif // DOWNLOADER_H