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_CRYPTO_CRYPTO_FRAMER_H_ | 5 #ifndef NET_QUIC_CRYPTO_CRYPTO_FRAMER_H_ |
6 #define NET_QUIC_CRYPTO_CRYPTO_FRAMER_H_ | 6 #define NET_QUIC_CRYPTO_CRYPTO_FRAMER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | |
10 | 9 |
11 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
12 #include "base/logging.h" | 11 #include "base/logging.h" |
13 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
14 #include "base/string_piece.h" | 13 #include "base/string_piece.h" |
15 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
16 #include "net/quic/crypto/crypto_protocol.h" | 15 #include "net/quic/crypto/crypto_protocol.h" |
17 #include "net/quic/quic_protocol.h" | 16 #include "net/quic/quic_protocol.h" |
18 | 17 |
19 namespace net { | 18 namespace net { |
20 | 19 |
21 class CryptoFramer; | 20 class CryptoFramer; |
22 class QuicDataReader; | 21 class QuicDataReader; |
23 class QuicData; | 22 class QuicData; |
| 23 struct CryptoHandshakeMessage; |
24 | 24 |
25 class NET_EXPORT_PRIVATE CryptoFramerVisitorInterface { | 25 class NET_EXPORT_PRIVATE CryptoFramerVisitorInterface { |
26 public: | 26 public: |
27 virtual ~CryptoFramerVisitorInterface() {} | 27 virtual ~CryptoFramerVisitorInterface() {} |
28 | 28 |
29 // Called if an error is detected. | 29 // Called if an error is detected. |
30 virtual void OnError(CryptoFramer* framer) = 0; | 30 virtual void OnError(CryptoFramer* framer) = 0; |
31 | 31 |
32 // Called when a complete handshake message has been parsed. | 32 // Called when a complete handshake message has been parsed. |
33 virtual void OnHandshakeMessage( | 33 virtual void OnHandshakeMessage( |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 std::map<CryptoTag, size_t> tag_length_map_; | 110 std::map<CryptoTag, size_t> tag_length_map_; |
111 // Data associated with each tag in the message currently being parsed. | 111 // Data associated with each tag in the message currently being parsed. |
112 CryptoTagValueMap tag_value_map_; | 112 CryptoTagValueMap tag_value_map_; |
113 // Cumulative length of all values in the message currently being parsed. | 113 // Cumulative length of all values in the message currently being parsed. |
114 size_t values_len_; | 114 size_t values_len_; |
115 }; | 115 }; |
116 | 116 |
117 } // namespace net | 117 } // namespace net |
118 | 118 |
119 #endif // NET_QUIC_CRYPTO_CRYPTO_FRAMER_H_ | 119 #endif // NET_QUIC_CRYPTO_CRYPTO_FRAMER_H_ |
OLD | NEW |