OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_CORE_QUIC_ERROR_CODES_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_ERROR_CODES_H_ |
6 #define NET_QUIC_CORE_QUIC_ERROR_CODES_H_ | 6 #define NET_QUIC_CORE_QUIC_ERROR_CODES_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <limits> | 10 #include <limits> |
11 | 11 |
12 #include "net/base/net_export.h" | 12 #include "net/quic/platform/api/quic_export.h" |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 enum QuicRstStreamErrorCode { | 16 enum QuicRstStreamErrorCode { |
17 // Complete response has been sent, sending a RST to ask the other endpoint | 17 // Complete response has been sent, sending a RST to ask the other endpoint |
18 // to stop sending request data without discarding the response. | 18 // to stop sending request data without discarding the response. |
19 QUIC_STREAM_NO_ERROR = 0, | 19 QUIC_STREAM_NO_ERROR = 0, |
20 | 20 |
21 // There was some error which halted stream processing. | 21 // There was some error which halted stream processing. |
22 QUIC_ERROR_PROCESSING_STREAM, | 22 QUIC_ERROR_PROCESSING_STREAM, |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 // No error. Used as bound while iterating. | 277 // No error. Used as bound while iterating. |
278 QUIC_LAST_ERROR = 97, | 278 QUIC_LAST_ERROR = 97, |
279 }; | 279 }; |
280 // QuicErrorCodes is encoded as a single octet on-the-wire. | 280 // QuicErrorCodes is encoded as a single octet on-the-wire. |
281 static_assert(static_cast<int>(QUIC_LAST_ERROR) <= | 281 static_assert(static_cast<int>(QUIC_LAST_ERROR) <= |
282 std::numeric_limits<uint8_t>::max(), | 282 std::numeric_limits<uint8_t>::max(), |
283 "QuicErrorCode exceeds single octet"); | 283 "QuicErrorCode exceeds single octet"); |
284 | 284 |
285 // Returns the name of the QuicRstStreamErrorCode as a char* | 285 // Returns the name of the QuicRstStreamErrorCode as a char* |
286 NET_EXPORT_PRIVATE const char* QuicRstStreamErrorCodeToString( | 286 QUIC_EXPORT_PRIVATE const char* QuicRstStreamErrorCodeToString( |
287 QuicRstStreamErrorCode error); | 287 QuicRstStreamErrorCode error); |
288 | 288 |
289 // Returns the name of the QuicErrorCode as a char* | 289 // Returns the name of the QuicErrorCode as a char* |
290 NET_EXPORT_PRIVATE const char* QuicErrorCodeToString(QuicErrorCode error); | 290 QUIC_EXPORT_PRIVATE const char* QuicErrorCodeToString(QuicErrorCode error); |
291 | 291 |
292 } // namespace net | 292 } // namespace net |
293 | 293 |
294 #endif // NET_QUIC_CORE_QUIC_ERROR_CODES_H_ | 294 #endif // NET_QUIC_CORE_QUIC_ERROR_CODES_H_ |
OLD | NEW |