1// qwebsocket.sip generated by MetaSIP 2// 3// This file is part of the QtWebSockets 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 23%If (Qt_5_3_0 -) 24 25class QWebSocket : QObject 26{ 27%TypeHeaderCode 28#include <qwebsocket.h> 29%End 30 31%ConvertToSubClassCode 32 static struct class_graph { 33 const char *name; 34 sipTypeDef **type; 35 int yes, no; 36 } graph[] = { 37 {sipName_QWebSocket, &sipType_QWebSocket, -1, 1}, 38 {sipName_QWebSocketServer, &sipType_QWebSocketServer, -1, 2}, 39 {sipName_QMaskGenerator, &sipType_QMaskGenerator, -1, -1}, 40 }; 41 42 int i = 0; 43 44 sipType = NULL; 45 46 do 47 { 48 struct class_graph *cg = &graph[i]; 49 50 if (cg->name != NULL && sipCpp->inherits(cg->name)) 51 { 52 sipType = *cg->type; 53 i = cg->yes; 54 } 55 else 56 i = cg->no; 57 } 58 while (i >= 0); 59%End 60 61public: 62 QWebSocket(const QString &origin = QString(), QWebSocketProtocol::Version version = QWebSocketProtocol::VersionLatest, QObject *parent /TransferThis/ = 0); 63 virtual ~QWebSocket(); 64 void abort(); 65 QAbstractSocket::SocketError error() const; 66 QString errorString() const; 67 bool flush() /ReleaseGIL/; 68 bool isValid() const; 69 QHostAddress localAddress() const; 70 quint16 localPort() const; 71 QAbstractSocket::PauseModes pauseMode() const; 72 QHostAddress peerAddress() const; 73 QString peerName() const; 74 quint16 peerPort() const; 75 QNetworkProxy proxy() const; 76 void setProxy(const QNetworkProxy &networkProxy); 77 void setMaskGenerator(const QMaskGenerator *maskGenerator /KeepReference/); 78 const QMaskGenerator *maskGenerator() const; 79 qint64 readBufferSize() const; 80 void setReadBufferSize(qint64 size); 81 void resume() /ReleaseGIL/; 82 void setPauseMode(QAbstractSocket::PauseModes pauseMode); 83 QAbstractSocket::SocketState state() const; 84 QWebSocketProtocol::Version version() const; 85 QString resourceName() const; 86 QUrl requestUrl() const; 87 QString origin() const; 88 QWebSocketProtocol::CloseCode closeCode() const; 89 QString closeReason() const; 90 qint64 sendTextMessage(const QString &message) /ReleaseGIL/; 91 qint64 sendBinaryMessage(const QByteArray &data) /ReleaseGIL/; 92%If (PyQt_SSL) 93 void ignoreSslErrors(const QList<QSslError> &errors); 94%End 95%If (PyQt_SSL) 96 void setSslConfiguration(const QSslConfiguration &sslConfiguration); 97%End 98%If (PyQt_SSL) 99 QSslConfiguration sslConfiguration() const; 100%End 101%If (Qt_5_6_0 -) 102 QNetworkRequest request() const; 103%End 104 105public slots: 106 void close(QWebSocketProtocol::CloseCode closeCode = QWebSocketProtocol::CloseCodeNormal, const QString &reason = QString()) /ReleaseGIL/; 107 void open(const QUrl &url) /ReleaseGIL/; 108%If (Qt_5_6_0 -) 109 void open(const QNetworkRequest &request) /ReleaseGIL/; 110%End 111 void ping(const QByteArray &payload = QByteArray()) /ReleaseGIL/; 112%If (PyQt_SSL) 113 void ignoreSslErrors(); 114%End 115 116signals: 117 void aboutToClose(); 118 void connected(); 119 void disconnected(); 120 void stateChanged(QAbstractSocket::SocketState state); 121 void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *pAuthenticator); 122 void readChannelFinished(); 123 void textFrameReceived(const QString &frame, bool isLastFrame); 124 void binaryFrameReceived(const QByteArray &frame, bool isLastFrame); 125 void textMessageReceived(const QString &message); 126 void binaryMessageReceived(const QByteArray &message); 127 void error(QAbstractSocket::SocketError error); 128 void pong(quint64 elapsedTime, const QByteArray &payload); 129 void bytesWritten(qint64 bytes); 130%If (PyQt_SSL) 131 void sslErrors(const QList<QSslError> &errors); 132%End 133%If (Qt_5_8_0 -) 134%If (PyQt_SSL) 135 void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *authenticator); 136%End 137%End 138 139public: 140%If (Qt_5_12_0 -) 141 qint64 bytesToWrite() const; 142%End 143%If (Qt_5_15_0 -) 144 void setMaxAllowedIncomingFrameSize(quint64 maxAllowedIncomingFrameSize); 145%End 146%If (Qt_5_15_0 -) 147 quint64 maxAllowedIncomingFrameSize() const; 148%End 149%If (Qt_5_15_0 -) 150 void setMaxAllowedIncomingMessageSize(quint64 maxAllowedIncomingMessageSize); 151%End 152%If (Qt_5_15_0 -) 153 quint64 maxAllowedIncomingMessageSize() const; 154%End 155%If (Qt_5_15_0 -) 156 static quint64 maxIncomingMessageSize(); 157%End 158%If (Qt_5_15_0 -) 159 static quint64 maxIncomingFrameSize(); 160%End 161%If (Qt_5_15_0 -) 162 void setOutgoingFrameSize(quint64 outgoingFrameSize); 163%End 164%If (Qt_5_15_0 -) 165 quint64 outgoingFrameSize() const; 166%End 167%If (Qt_5_15_0 -) 168 static quint64 maxOutgoingFrameSize(); 169%End 170}; 171 172%End 173