diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-01-09 19:22:20 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-11 18:22:09 +0100 |
commit | a3f715c477a86b164c7db7a1740ac2ac3b21dbc7 (patch) | |
tree | f1405cbb169a4b3bfb92dc85c17ba917b4583bac /src | |
parent | a23160a405af764435a4d1662ea51e51d0b384ce (diff) | |
download | qtwebsockets-a3f715c477a86b164c7db7a1740ac2ac3b21dbc7.tar.gz |
Enable docs for QWebSocketProtocol
There is no advantage to haveing the cpp files have _p.cpp
and as the public docs are in this file, rename it.
In order to have the docs generated there needs to be a namespace page.
Change-Id: Id6ef10ba39b7ea8b18d5d8e1cde03e566e682926
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/websockets/qwebsocketprotocol.cpp (renamed from src/websockets/qwebsocketprotocol_p.cpp) | 24 | ||||
-rw-r--r-- | src/websockets/websockets.pro | 2 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/websockets/qwebsocketprotocol_p.cpp b/src/websockets/qwebsocketprotocol.cpp index 0fb7840..e25767a 100644 --- a/src/websockets/qwebsocketprotocol_p.cpp +++ b/src/websockets/qwebsocketprotocol.cpp @@ -44,6 +44,14 @@ #include <QtCore/QSet> #include <QtCore/QtEndian> +QT_BEGIN_NAMESPACE + +/*! + \namespace QWebSocketProtocol + \inmodule QtWebSockets + \brief Contains constants related to the WebSocket standard. +*/ + /*! \enum QWebSocketProtocol::CloseCode @@ -65,7 +73,7 @@ \value CC_BAD_OPERATION Internal server error \value CC_TLS_HANDSHAKE_FAILED TLS handshake failed - \sa \l{QWebSocket::} {close()} + \sa QWebSocket::close() */ /*! \enum QWebSocketProtocol::Version @@ -122,18 +130,11 @@ \internal */ -QT_BEGIN_NAMESPACE - -/** - * @brief Contains constants related to the WebSocket standard. - */ -namespace QWebSocketProtocol -{ /*! Parses the \a versionString and converts it to a Version value \internal */ -Version versionFromString(const QString &versionString) +QWebSocketProtocol::Version QWebSocketProtocol::versionFromString(const QString &versionString) { bool ok = false; Version version = V_Unknow; @@ -149,7 +150,7 @@ Version versionFromString(const QString &versionString) Mask the \a payload with the given \a maskingKey and stores the result back in \a payload. \internal */ -void mask(QByteArray *payload, quint32 maskingKey) +void QWebSocketProtocol::mask(QByteArray *payload, quint32 maskingKey) { Q_ASSERT(payload); mask(payload->data(), payload->size(), maskingKey); @@ -159,7 +160,7 @@ void mask(QByteArray *payload, quint32 maskingKey) Masks the \a payload of length \a size with the given \a maskingKey and stores the result back in \a payload. \internal */ -void mask(char *payload, quint64 size, quint32 maskingKey) +void QWebSocketProtocol::mask(char *payload, quint64 size, quint32 maskingKey) { Q_ASSERT(payload); const quint8 mask[] = { quint8((maskingKey & 0xFF000000u) >> 24), @@ -171,6 +172,5 @@ void mask(char *payload, quint64 size, quint32 maskingKey) while (size-- > 0) *payload++ ^= mask[i++ % 4]; } -} //end namespace WebSocketProtocol QT_END_NAMESPACE diff --git a/src/websockets/websockets.pro b/src/websockets/websockets.pro index 3964b73..90efe3b 100644 --- a/src/websockets/websockets.pro +++ b/src/websockets/websockets.pro @@ -34,7 +34,7 @@ SOURCES += \ $$PWD/qwebsocket_p.cpp \ $$PWD/qwebsocketserver.cpp \ $$PWD/qwebsocketserver_p.cpp \ - $$PWD/qwebsocketprotocol_p.cpp \ + $$PWD/qwebsocketprotocol.cpp \ $$PWD/qwebsockethandshakerequest_p.cpp \ $$PWD/qwebsockethandshakeresponse_p.cpp \ $$PWD/qwebsocketdataprocessor_p.cpp \ |