| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 size_t* out_len) const; | 78 size_t* out_len) const; |
| 79 | 79 |
| 80 bool GetStringPiece(QuicTag tag, base::StringPiece* out) const; | 80 bool GetStringPiece(QuicTag tag, base::StringPiece* out) const; |
| 81 | 81 |
| 82 // GetNthValue24 interprets the value with the given tag to be a series of | 82 // GetNthValue24 interprets the value with the given tag to be a series of |
| 83 // 24-bit, length prefixed values and it returns the subvalue with the given | 83 // 24-bit, length prefixed values and it returns the subvalue with the given |
| 84 // index. | 84 // index. |
| 85 QuicErrorCode GetNthValue24(QuicTag tag, | 85 QuicErrorCode GetNthValue24(QuicTag tag, |
| 86 unsigned index, | 86 unsigned index, |
| 87 base::StringPiece* out) const; | 87 base::StringPiece* out) const; |
| 88 QuicErrorCode GetUint16(QuicTag tag, uint16* out) const; | |
| 89 QuicErrorCode GetUint32(QuicTag tag, uint32* out) const; | 88 QuicErrorCode GetUint32(QuicTag tag, uint32* out) const; |
| 90 QuicErrorCode GetUint64(QuicTag tag, uint64* out) const; | 89 QuicErrorCode GetUint64(QuicTag tag, uint64* out) const; |
| 91 | 90 |
| 92 // size returns 4 (message tag) + 2 (uint16, number of entries) + | 91 // size returns 4 (message tag) + 2 (uint16, number of entries) + |
| 93 // (4 (tag) + 4 (end offset))*tag_value_map_.size() + ∑ value sizes. | 92 // (4 (tag) + 4 (end offset))*tag_value_map_.size() + ∑ value sizes. |
| 94 size_t size() const; | 93 size_t size() const; |
| 95 | 94 |
| 96 // set_minimum_size sets the minimum number of bytes that the message should | 95 // set_minimum_size sets the minimum number of bytes that the message should |
| 97 // consume. The CryptoFramer will add a PAD tag as needed when serializing in | 96 // consume. The CryptoFramer will add a PAD tag as needed when serializing in |
| 98 // order to ensure this. Setting a value of 0 disables padding. | 97 // order to ensure this. Setting a value of 0 disables padding. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 126 size_t minimum_size_; | 125 size_t minimum_size_; |
| 127 | 126 |
| 128 // The serialized form of the handshake message. This member is constructed | 127 // The serialized form of the handshake message. This member is constructed |
| 129 // lasily. | 128 // lasily. |
| 130 mutable scoped_ptr<QuicData> serialized_; | 129 mutable scoped_ptr<QuicData> serialized_; |
| 131 }; | 130 }; |
| 132 | 131 |
| 133 } // namespace net | 132 } // namespace net |
| 134 | 133 |
| 135 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ | 134 #endif // NET_QUIC_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_ |
| OLD | NEW |