OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // GetTaglist finds an element with the given tag containing zero or more | 76 // GetTaglist finds an element with the given tag containing zero or more |
77 // tags. If such a tag doesn't exist, it returns false. Otherwise it sets | 77 // tags. If such a tag doesn't exist, it returns false. Otherwise it sets |
78 // |out_tags| and |out_len| to point to the array of tags and returns true. | 78 // |out_tags| and |out_len| to point to the array of tags and returns true. |
79 // The array points into the CryptoHandshakeMessage and is valid only for as | 79 // The array points into the CryptoHandshakeMessage and is valid only for as |
80 // long as the CryptoHandshakeMessage exists and is not modified. | 80 // long as the CryptoHandshakeMessage exists and is not modified. |
81 QuicErrorCode GetTaglist(QuicTag tag, | 81 QuicErrorCode GetTaglist(QuicTag tag, |
82 const QuicTag** out_tags, | 82 const QuicTag** out_tags, |
83 size_t* out_len) const; | 83 size_t* out_len) const; |
84 | 84 |
85 bool GetStringPiece(QuicTag tag, base::StringPiece* out) const; | 85 bool GetStringPiece(QuicTag tag, base::StringPiece* out) const; |
| 86 bool HasStringPiece(QuicTag tag) const; |
86 | 87 |
87 // GetNthValue24 interprets the value with the given tag to be a series of | 88 // GetNthValue24 interprets the value with the given tag to be a series of |
88 // 24-bit, length prefixed values and it returns the subvalue with the given | 89 // 24-bit, length prefixed values and it returns the subvalue with the given |
89 // index. | 90 // index. |
90 QuicErrorCode GetNthValue24(QuicTag tag, | 91 QuicErrorCode GetNthValue24(QuicTag tag, |
91 unsigned index, | 92 unsigned index, |
92 base::StringPiece* out) const; | 93 base::StringPiece* out) const; |
93 QuicErrorCode GetUint32(QuicTag tag, uint32_t* out) const; | 94 QuicErrorCode GetUint32(QuicTag tag, uint32_t* out) const; |
94 QuicErrorCode GetUint64(QuicTag tag, uint64_t* out) const; | 95 QuicErrorCode GetUint64(QuicTag tag, uint64_t* out) const; |
95 | 96 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 size_t minimum_size_; | 131 size_t minimum_size_; |
131 | 132 |
132 // The serialized form of the handshake message. This member is constructed | 133 // The serialized form of the handshake message. This member is constructed |
133 // lasily. | 134 // lasily. |
134 mutable std::unique_ptr<QuicData> serialized_; | 135 mutable std::unique_ptr<QuicData> serialized_; |
135 }; | 136 }; |
136 | 137 |
137 } // namespace net | 138 } // namespace net |
138 | 139 |
139 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ | 140 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ |
OLD | NEW |