diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2014-01-18 19:14:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-18 20:45:46 +0100 |
commit | 367a9ffcc20fd79ee1ea83e4fd5c6b6ae16c5729 (patch) | |
tree | 8e25402a7ac3d154d6901ce415903890b4f98727 /src/websockets/qwebsocketprotocol_p.h | |
parent | d6abdaf4921cd375d71d9016c36d27ac83138a20 (diff) | |
download | qtwebsockets-367a9ffcc20fd79ee1ea83e4fd5c6b6ae16c5729.tar.gz |
Rename enumerations to comply with Qt style
Change-Id: Id72fe27cec606e7f02b8e9ac1d0d763890e86a95
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Diffstat (limited to 'src/websockets/qwebsocketprotocol_p.h')
-rw-r--r-- | src/websockets/qwebsocketprotocol_p.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/websockets/qwebsocketprotocol_p.h b/src/websockets/qwebsocketprotocol_p.h index 2fcbb4d..e2c883a 100644 --- a/src/websockets/qwebsocketprotocol_p.h +++ b/src/websockets/qwebsocketprotocol_p.h @@ -54,35 +54,35 @@ 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 + OpCodeContinue = 0x0, + OpCodeText = 0x1, + OpCodeBinary = 0x2, + OpCodeReserved3 = 0x3, + OpCodeReserved4 = 0x4, + OpCodeReserved5 = 0x5, + OpCodeReserved6 = 0x6, + OpCodeReserved7 = 0x7, + OpCodeClose = 0x8, + OpCodePing = 0x9, + OpCodePong = 0xA, + OpCodeReservedB = 0xB, + OpCodeReservedC = 0xC, + OpCodeReservedD = 0xD, + OpCodeReservedE = 0xE, + OpCodeReservedF = 0xF }; inline bool isOpCodeReserved(OpCode code) { - return ((code > OC_BINARY) && (code < OC_CLOSE)) || (code > OC_PONG); + return ((code > OpCodeBinary) && (code < OpCodeClose)) || (code > OpCodePong); } inline bool isCloseCodeValid(int closeCode) { return (closeCode > 999) && (closeCode < 5000) && - (closeCode != CC_RESERVED_1004) && //see RFC6455 7.4.1 - (closeCode != CC_MISSING_STATUS_CODE) && - (closeCode != CC_ABNORMAL_DISCONNECTION) && + (closeCode != CloseCodeReserved1004) && //see RFC6455 7.4.1 + (closeCode != CloseCodeMissingStatusCode) && + (closeCode != CloseCodeAbnormalDisconnection) && ((closeCode >= 3000) || (closeCode < 1012)); } |