| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/network-web/networkfactory.h`/ |
| 2 | |
| 3 | #ifndef NETWORKFACTORY_H |
| 4 | #define NETWORKFACTORY_Hcxx . . $ `src/librssguard/network-web/networkfactory.h:4:9`! |
| 5 | |
| 6 | #include "definitions/typedefs.h"cxx . . $ `<file>/src/librssguard/definitions/typedefs.h`/ |
| 7 | #include "network-web/httpresponse.h"cxx . . $ `<file>/src/librssguard/network-web/httpresponse.h`/ |
| 8 | |
| 9 | #include <QCoreApplication> |
| 10 | #include <QHttpPart> |
| 11 | #include <QNetworkCookie> |
| 12 | #include <QNetworkProxy> |
| 13 | #include <QNetworkReply> |
| 14 | #include <QPair> |
| 15 | #include <QVariant> |
| 16 | |
| 17 | struct RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! NetworkResultcxx . . $ NetworkResult# { |
| 18 | QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# m_networkErrorcxx . . $ NetworkResult#m_networkError.; |
| 19 | int m_httpCodecxx . . $ NetworkResult#m_httpCode.; |
| 20 | QStringcxx . . $ QString# m_contentTypecxx . . $ NetworkResult#m_contentType.; |
| 21 | QListcxx . . $ QList#<QNetworkCookiecxx . . $ QNetworkCookie#> m_cookiescxx . . $ NetworkResult#m_cookies.; |
| 22 | QMapcxx . . $ QMap#<QStringcxx . . $ QString#, QStringcxx . . $ QString#> m_headerscxx . . $ NetworkResult#m_headers.; |
| 23 | QUrlcxx . . $ QUrl# m_urlcxx . . $ NetworkResult#m_url.; |
| 24 | |
| 25 | explicit NetworkResultcxx . . $ NetworkResult#NetworkResult(49f6e7a06ebc5aa8).(); |
| 26 | explicit NetworkResultcxx . . $ NetworkResult#NetworkResult(caab0cfefc35d2e1).(QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# err, |
| 27 | int http_code, |
| 28 | const QStringcxx . . $ QString#& ct, |
| 29 | const QListcxx . . $ QList#<QNetworkCookiecxx . . $ QNetworkCookie#>& cook); |
| 30 | }; |
| 31 | |
| 32 | class RSSGUARD_DLLSPECcxx . . $ `<built-in>:525:9`! NetworkFactorycxx . . $ NetworkFactory# { |
| 33 | Q_DECLARE_TR_FUNCTIONScxx . . $ `<external>/4097077756061479216/qcoreapplication.h:261:9`!(NetworkFactory) |
| 34 | |
| 35 | private: |
| 36 | explicit NetworkFactorycxx . . $ NetworkFactory#NetworkFactory(49f6e7a06ebc5aa8).() = default; |
| 37 | |
| 38 | public: |
| 39 | enum class NetworkAuthenticationcxx . . $ NetworkFactory#NetworkAuthentication# { |
| 40 | NoAuthenticationcxx . . $ NetworkFactory#NetworkAuthentication#NoAuthentication. = 0, |
| 41 | Basiccxx . . $ NetworkFactory#NetworkAuthentication#Basic. = 1, |
| 42 | Tokencxx . . $ NetworkFactory#NetworkAuthentication#Token. = 2 |
| 43 | }; |
| 44 | |
| 45 | enum class Http2Statuscxx . . $ NetworkFactory#Http2Status# { |
| 46 | DontSetcxx . . $ NetworkFactory#Http2Status#DontSet. = 0, // Use application-wide setting. |
| 47 | Enabledcxx . . $ NetworkFactory#Http2Status#Enabled. = 1, |
| 48 | Disabledcxx . . $ NetworkFactory#Http2Status#Disabled. = 2 |
| 49 | }; |
| 50 | |
| 51 | static QDateTimecxx . . $ QDateTime# extractRetryAftercxx . . $ NetworkFactory#extractRetryAfter(d82b2249834d7665).(const QStringcxx . . $ QString#& retry_after_value); |
| 52 | |
| 53 | static QStringListcxx . . $ QStringList# extractFeedLinksFromHtmlPagecxx . . $ NetworkFactory#extractFeedLinksFromHtmlPage(c84171cdf977b6b4).(const QUrlcxx . . $ QUrl#& url, const QStringcxx . . $ QString#& html); |
| 54 | static QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#> generateBasicAuthHeadercxx . . $ NetworkFactory#generateBasicAuthHeader(3d69ae3d4954f7a8).(NetworkAuthenticationcxx . . $ NetworkFactory#NetworkAuthentication# protection, |
| 55 | const QStringcxx . . $ QString#& username, |
| 56 | const QStringcxx . . $ QString#& password); |
| 57 | |
| 58 | // Returns human readable text for given network error. |
| 59 | static QStringcxx . . $ QString# networkErrorTextcxx . . $ NetworkFactory#networkErrorText(76e9e349cca0e801).(QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# error_code); |
| 60 | static QStringcxx . . $ QString# sanitizeUrlcxx . . $ NetworkFactory#sanitizeUrl(fd988a2ab94d906b).(const QStringcxx . . $ QString#& url); |
| 61 | |
| 62 | // Performs SYNCHRONOUS favicon download for the site, |
| 63 | // given URL belongs to. |
| 64 | static QNetworkReplycxx . . $ QNetworkReply#::NetworkErrorcxx . . $ QNetworkReply#NetworkError# downloadIconcxx . . $ NetworkFactory#downloadIcon(78f5e18766962eec).(const QListcxx . . $ QList#<IconLocationcxx . . $ IconLocation#>& urls, |
| 65 | int timeout, |
| 66 | QPixmapcxx . . $ QPixmap#& output, |
| 67 | const QListcxx . . $ QList#<QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#>>& additional_headers, |
| 68 | const QNetworkProxycxx . . $ QNetworkProxy#& custom_proxy = |
| 69 | QNetworkProxycxx . . $ QNetworkProxy#QNetworkProxy(846c25feb9a725cd).::ProxyTypecxx . . $ QNetworkProxy#ProxyType#::DefaultProxycxx . . $ QNetworkProxy#DefaultProxy., |
| 70 | Http2Statuscxx . . $ NetworkFactory#Http2Status# http2_status = Http2Statuscxx . . $ NetworkFactory#Http2Status#::DontSetcxx . . $ NetworkFactory#Http2Status#DontSet.); |
| 71 | static NetworkResultcxx . . $ NetworkResult# performNetworkOperationcxx . . $ NetworkFactory#performNetworkOperation(98c2fa0f32201561).(const QStringcxx . . $ QString#& url, |
| 72 | int timeout, |
| 73 | const QByteArraycxx . . $ QByteArray#& input_data, |
| 74 | QByteArraycxx . . $ QByteArray#& output, |
| 75 | QNetworkAccessManagercxx . . $ QNetworkAccessManager#::Operationcxx . . $ QNetworkAccessManager#Operation# operation, |
| 76 | const QListcxx . . $ QList#<QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#>>& additional_headers = |
| 77 | QListcxx . . $ QList#<QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#>>(), |
| 78 | bool protected_contents = false, |
| 79 | const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(), |
| 80 | const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).(), |
| 81 | const QNetworkProxycxx . . $ QNetworkProxy#& custom_proxy = |
| 82 | QNetworkProxycxx . . $ QNetworkProxy#QNetworkProxy(846c25feb9a725cd).::ProxyTypecxx . . $ QNetworkProxy#ProxyType#::DefaultProxycxx . . $ QNetworkProxy#DefaultProxy., |
| 83 | Http2Statuscxx . . $ NetworkFactory#Http2Status# http2_status = Http2Statuscxx . . $ NetworkFactory#Http2Status#::DontSetcxx . . $ NetworkFactory#Http2Status#DontSet.); |
| 84 | static NetworkResultcxx . . $ NetworkResult# performNetworkOperationcxx . . $ NetworkFactory#performNetworkOperation(fd315dc1c02cba94).(const QStringcxx . . $ QString#& url, |
| 85 | int timeout, |
| 86 | QHttpMultiPartcxx . . $ QHttpMultiPart#* input_data, |
| 87 | QListcxx . . $ QList#<HttpResponsecxx . . $ HttpResponse#>& output, |
| 88 | QNetworkAccessManagercxx . . $ QNetworkAccessManager#::Operationcxx . . $ QNetworkAccessManager#Operation# operation, |
| 89 | const QListcxx . . $ QList#<QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#>>& additional_headers = |
| 90 | QListcxx . . $ QList#<QPaircxx . . $ QPair#<QByteArraycxx . . $ QByteArray#, QByteArraycxx . . $ QByteArray#>>(), |
| 91 | bool protected_contents = false, |
| 92 | const QStringcxx . . $ QString#& username = QStringcxx . . $ QString#QString(ced63f7c635d850d).(), |
| 93 | const QStringcxx . . $ QString#& password = QStringcxx . . $ QString#QString(ced63f7c635d850d).(), |
| 94 | const QNetworkProxycxx . . $ QNetworkProxy#& custom_proxy = |
| 95 | QNetworkProxycxx . . $ QNetworkProxy#QNetworkProxy(846c25feb9a725cd).::ProxyTypecxx . . $ QNetworkProxy#ProxyType#::DefaultProxycxx . . $ QNetworkProxy#DefaultProxy., |
| 96 | Http2Statuscxx . . $ NetworkFactory#Http2Status# http2_status = Http2Statuscxx . . $ NetworkFactory#Http2Status#::DontSetcxx . . $ NetworkFactory#Http2Status#DontSet.); |
| 97 | }; |
| 98 | |
| 99 | Q_DECLARE_METATYPEcxx . . $ std/array#data(8e614c7de0b1573e).(NetworkResult) |
| 100 | Q_DECLARE_METATYPEcxx . . $ QtPrivate/(NetworkFactory::NetworkAuthentication) |
| 101 | |
| 102 | #endif // NETWORKFACTORY_H |