aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKurt Pattyn <pattyn.kurt@gmail.com>2014-01-13 11:23:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-13 16:14:28 +0100
commit9b0513ac67f0fa5d3658c48574f4f89c49c20945 (patch)
treeee59c76b070a9fb7ec1381cefebc4e89b54cb8da
parentc15e979b02bec88baecb464b8e526e7d876d30e1 (diff)
Move OpCode out of public API
Change-Id: Ic0b34b684d6f9ca98789304ead1cf8b993422d02 Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
-rw-r--r--src/websockets/qwebsocketdataprocessor_p.h1
-rw-r--r--src/websockets/qwebsocketframe_p.h3
-rw-r--r--src/websockets/qwebsocketprotocol.h20
-rw-r--r--src/websockets/qwebsocketprotocol_p.h20
-rw-r--r--tests/auto/handshakerequest/tst_handshakerequest.cpp1
-rw-r--r--tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp1
6 files changed, 25 insertions, 21 deletions
diff --git a/src/websockets/qwebsocketdataprocessor_p.h b/src/websockets/qwebsocketdataprocessor_p.h
index e4252a7..256bcf4 100644
--- a/src/websockets/qwebsocketdataprocessor_p.h
+++ b/src/websockets/qwebsocketdataprocessor_p.h
@@ -58,6 +58,7 @@
#include <QtCore/QString>
#include <QtCore/QTextCodec>
#include "qwebsocketprotocol.h"
+#include "qwebsocketprotocol_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsocketframe_p.h b/src/websockets/qwebsocketframe_p.h
index bf7e1d5..74597a2 100644
--- a/src/websockets/qwebsocketframe_p.h
+++ b/src/websockets/qwebsocketframe_p.h
@@ -46,8 +46,9 @@
#include <QtCore/QByteArray>
#include <limits.h>
-#include "qwebsocketprotocol.h"
#include "qwebsockets_global.h"
+#include "qwebsocketprotocol.h"
+#include "qwebsocketprotocol_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/websockets/qwebsocketprotocol.h b/src/websockets/qwebsocketprotocol.h
index 89dbed4..de62d75 100644
--- a/src/websockets/qwebsocketprotocol.h
+++ b/src/websockets/qwebsocketprotocol.h
@@ -84,26 +84,6 @@ enum CloseCode
CC_TLS_HANDSHAKE_FAILED = 1015
};
-enum OpCode
-{
- OC_CONTINUE = 0x0,
- OC_TEXT = 0x1,
- OC_BINARY = 0x2,
- OC_RESERVED_3 = 0x3,
- OC_RESERVED_4 = 0x4,
- OC_RESERVED_5 = 0x5,
- OC_RESERVED_6 = 0x6,
- OC_RESERVED_7 = 0x7,
- OC_CLOSE = 0x8,
- OC_PING = 0x9,
- OC_PONG = 0xA,
- OC_RESERVED_B = 0xB,
- OC_RESERVED_C = 0xC,
- OC_RESERVED_D = 0xD,
- OC_RESERVED_E = 0xE,
- OC_RESERVED_F = 0xF
-};
-
inline Version currentVersion() { return V_LATEST; }
} //end namespace QWebSocketProtocol
diff --git a/src/websockets/qwebsocketprotocol_p.h b/src/websockets/qwebsocketprotocol_p.h
index 2f29e14..2fcbb4d 100644
--- a/src/websockets/qwebsocketprotocol_p.h
+++ b/src/websockets/qwebsocketprotocol_p.h
@@ -52,6 +52,26 @@ class QByteArray;
namespace QWebSocketProtocol
{
+enum OpCode
+{
+ OC_CONTINUE = 0x0,
+ OC_TEXT = 0x1,
+ OC_BINARY = 0x2,
+ OC_RESERVED_3 = 0x3,
+ OC_RESERVED_4 = 0x4,
+ OC_RESERVED_5 = 0x5,
+ OC_RESERVED_6 = 0x6,
+ OC_RESERVED_7 = 0x7,
+ OC_CLOSE = 0x8,
+ OC_PING = 0x9,
+ OC_PONG = 0xA,
+ OC_RESERVED_B = 0xB,
+ OC_RESERVED_C = 0xC,
+ OC_RESERVED_D = 0xD,
+ OC_RESERVED_E = 0xE,
+ OC_RESERVED_F = 0xF
+};
+
inline bool isOpCodeReserved(OpCode code)
{
return ((code > OC_BINARY) && (code < OC_CLOSE)) || (code > OC_PONG);
diff --git a/tests/auto/handshakerequest/tst_handshakerequest.cpp b/tests/auto/handshakerequest/tst_handshakerequest.cpp
index 8b9133c..ca36ff2 100644
--- a/tests/auto/handshakerequest/tst_handshakerequest.cpp
+++ b/tests/auto/handshakerequest/tst_handshakerequest.cpp
@@ -45,6 +45,7 @@
#include <QtCore/QtEndian>
#include "private/qwebsockethandshakerequest_p.h"
+#include "private/qwebsocketprotocol_p.h"
#include "QtWebSockets/qwebsocketprotocol.h"
QT_USE_NAMESPACE
diff --git a/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp b/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp
index 80e7b39..6d44241 100644
--- a/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp
+++ b/tests/auto/websocketcorsauthenticator/tst_websocketcorsauthenticator.cpp
@@ -46,6 +46,7 @@
#include "QtWebSockets/qwebsocketcorsauthenticator.h"
#include "QtWebSockets/qwebsocketprotocol.h"
+#include "private/qwebsocketprotocol_p.h"
QT_USE_NAMESPACE