1// qnetworkaccessmanager.sip generated by MetaSIP 2// 3// This file is part of the QtNetwork Python extension module. 4// 5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com> 6// 7// This file is part of PyQt5. 8// 9// This file may be used under the terms of the GNU General Public License 10// version 3.0 as published by the Free Software Foundation and appearing in 11// the file LICENSE included in the packaging of this file. Please review the 12// following information to ensure the GNU General Public License version 3.0 13// requirements will be met: http://www.gnu.org/copyleft/gpl.html. 14// 15// If you do not wish to use this file under the terms of the GPL version 3.0 16// then you may purchase a commercial license. For more information contact 17// info@riverbankcomputing.com. 18// 19// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 20// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 21 22 23class QNetworkAccessManager : QObject 24{ 25%TypeHeaderCode 26#include <qnetworkaccessmanager.h> 27%End 28 29public: 30 enum Operation 31 { 32 HeadOperation, 33 GetOperation, 34 PutOperation, 35 PostOperation, 36 DeleteOperation, 37 CustomOperation, 38 }; 39 40 explicit QNetworkAccessManager(QObject *parent /TransferThis/ = 0); 41 virtual ~QNetworkAccessManager(); 42 QNetworkProxy proxy() const; 43 void setProxy(const QNetworkProxy &proxy); 44 QNetworkCookieJar *cookieJar() const; 45 void setCookieJar(QNetworkCookieJar *cookieJar /Transfer/); 46 QNetworkReply *head(const QNetworkRequest &request); 47 QNetworkReply *get(const QNetworkRequest &request); 48 QNetworkReply *post(const QNetworkRequest &request, QIODevice *data); 49 QNetworkReply *post(const QNetworkRequest &request, const QByteArray &data); 50 QNetworkReply *post(const QNetworkRequest &request, QHttpMultiPart *multiPart); 51 QNetworkReply *put(const QNetworkRequest &request, QIODevice *data); 52 QNetworkReply *put(const QNetworkRequest &request, const QByteArray &data); 53 QNetworkReply *put(const QNetworkRequest &request, QHttpMultiPart *multiPart); 54 55signals: 56 void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator); 57 void authenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator); 58 void finished(QNetworkReply *reply); 59%If (Qt_5_1_0 -) 60%If (PyQt_SSL) 61 void encrypted(QNetworkReply *reply); 62%End 63%End 64%If (PyQt_SSL) 65 void sslErrors(QNetworkReply *reply, const QList<QSslError> &errors); 66%End 67 void networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility accessible); 68%If (Qt_5_5_0 -) 69%If (PyQt_SSL) 70 void preSharedKeyAuthenticationRequired(QNetworkReply *reply, QSslPreSharedKeyAuthenticator *authenticator); 71%End 72%End 73 74protected: 75 virtual QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *device = 0) /AbortOnException,DisallowNone,ReleaseGIL/; 76 77public: 78 QNetworkProxyFactory *proxyFactory() const; 79 void setProxyFactory(QNetworkProxyFactory *factory /Transfer/); 80 QAbstractNetworkCache *cache() const; 81 void setCache(QAbstractNetworkCache *cache /Transfer/); 82 QNetworkReply *deleteResource(const QNetworkRequest &request); 83 84 enum NetworkAccessibility 85 { 86 UnknownAccessibility, 87 NotAccessible, 88 Accessible, 89 }; 90 91 QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QIODevice *data = 0); 92%If (Qt_5_8_0 -) 93 QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, const QByteArray &data); 94%End 95%If (Qt_5_8_0 -) 96 QNetworkReply *sendCustomRequest(const QNetworkRequest &request, const QByteArray &verb, QHttpMultiPart *multiPart); 97%End 98 void setConfiguration(const QNetworkConfiguration &config); 99 QNetworkConfiguration configuration() const; 100 QNetworkConfiguration activeConfiguration() const; 101 void setNetworkAccessible(QNetworkAccessManager::NetworkAccessibility accessible); 102 QNetworkAccessManager::NetworkAccessibility networkAccessible() const; 103 void clearAccessCache(); 104%If (Qt_5_2_0 -) 105 QStringList supportedSchemes() const; 106%End 107%If (Qt_5_2_0 -) 108%If (PyQt_SSL) 109 void connectToHostEncrypted(const QString &hostName, quint16 port = 443, const QSslConfiguration &sslConfiguration = QSslConfiguration::defaultConfiguration()); 110%End 111%End 112%If (Qt_5_13_0 -) 113%If (PyQt_SSL) 114 void connectToHostEncrypted(const QString &hostName, quint16 port, const QSslConfiguration &sslConfiguration, const QString &peerName); 115%End 116%End 117%If (Qt_5_2_0 -) 118 void connectToHost(const QString &hostName, quint16 port = 80); 119%End 120 121protected slots: 122%If (Qt_5_2_0 -) 123 QStringList supportedSchemesImplementation() const; 124%End 125 126public: 127%If (Qt_5_9_0 -) 128 void clearConnectionCache(); 129%End 130%If (Qt_5_9_0 -) 131 void setStrictTransportSecurityEnabled(bool enabled); 132%End 133%If (Qt_5_9_0 -) 134 bool isStrictTransportSecurityEnabled() const; 135%End 136%If (Qt_5_9_0 -) 137 void addStrictTransportSecurityHosts(const QVector<QHstsPolicy> &knownHosts); 138%End 139%If (Qt_5_9_0 -) 140 QVector<QHstsPolicy> strictTransportSecurityHosts() const; 141%End 142%If (Qt_5_9_0 -) 143 void setRedirectPolicy(QNetworkRequest::RedirectPolicy policy); 144%End 145%If (Qt_5_9_0 -) 146 QNetworkRequest::RedirectPolicy redirectPolicy() const; 147%End 148%If (Qt_5_10_0 -) 149 void enableStrictTransportSecurityStore(bool enabled, const QString &storeDir = QString()); 150%End 151%If (Qt_5_10_0 -) 152 bool isStrictTransportSecurityStoreEnabled() const; 153%End 154%If (Qt_5_14_0 -) 155 bool autoDeleteReplies() const; 156%End 157%If (Qt_5_14_0 -) 158 void setAutoDeleteReplies(bool autoDelete); 159%End 160%If (Qt_5_15_0 -) 161 int transferTimeout() const; 162%End 163%If (Qt_5_15_0 -) 164 void setTransferTimeout(int timeout = QNetworkRequest::TransferTimeoutConstant::DefaultTransferTimeoutConstant); 165%End 166}; 167