| 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_SPDY_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_SPDY_FRAMER_H_ |
| 6 #define NET_SPDY_SPDY_FRAMER_H_ | 6 #define NET_SPDY_SPDY_FRAMER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 virtual SpdyHeadersHandlerInterface* OnHeaderFrameStart( | 110 virtual SpdyHeadersHandlerInterface* OnHeaderFrameStart( |
| 111 SpdyStreamId stream_id) = 0; | 111 SpdyStreamId stream_id) = 0; |
| 112 | 112 |
| 113 // Called after processing the payload of a frame containing header data. | 113 // Called after processing the payload of a frame containing header data. |
| 114 // |end_headers| is true if there will not be any subsequent CONTINUATION | 114 // |end_headers| is true if there will not be any subsequent CONTINUATION |
| 115 // frames. | 115 // frames. |
| 116 virtual void OnHeaderFrameEnd(SpdyStreamId stream_id, bool end_headers) = 0; | 116 virtual void OnHeaderFrameEnd(SpdyStreamId stream_id, bool end_headers) = 0; |
| 117 | 117 |
| 118 // Called when a RST_STREAM frame has been parsed. | 118 // Called when a RST_STREAM frame has been parsed. |
| 119 virtual void OnRstStream(SpdyStreamId stream_id, | 119 virtual void OnRstStream(SpdyStreamId stream_id, |
| 120 SpdyRstStreamStatus status) = 0; | 120 SpdyErrorCode error_code) = 0; |
| 121 | 121 |
| 122 // Called when a SETTINGS frame is received. | 122 // Called when a SETTINGS frame is received. |
| 123 // |clear_persisted| True if the respective flag is set on the SETTINGS frame. | 123 // |clear_persisted| True if the respective flag is set on the SETTINGS frame. |
| 124 virtual void OnSettings(bool clear_persisted) {} | 124 virtual void OnSettings(bool clear_persisted) {} |
| 125 | 125 |
| 126 // Called when a complete setting within a SETTINGS frame has been parsed and | 126 // Called when a complete setting within a SETTINGS frame has been parsed and |
| 127 // validated. | 127 // validated. |
| 128 virtual void OnSetting(SpdySettingsIds id, uint32_t value) = 0; | 128 virtual void OnSetting(SpdySettingsIds id, uint32_t value) = 0; |
| 129 | 129 |
| 130 // Called when a SETTINGS frame is received with the ACK flag set. | 130 // Called when a SETTINGS frame is received with the ACK flag set. |
| 131 virtual void OnSettingsAck() {} | 131 virtual void OnSettingsAck() {} |
| 132 | 132 |
| 133 // Called before and after parsing SETTINGS id and value tuples. | 133 // Called before and after parsing SETTINGS id and value tuples. |
| 134 virtual void OnSettingsEnd() = 0; | 134 virtual void OnSettingsEnd() = 0; |
| 135 | 135 |
| 136 // Called when a PING frame has been parsed. | 136 // Called when a PING frame has been parsed. |
| 137 virtual void OnPing(SpdyPingId unique_id, bool is_ack) = 0; | 137 virtual void OnPing(SpdyPingId unique_id, bool is_ack) = 0; |
| 138 | 138 |
| 139 // Called when a GOAWAY frame has been parsed. | 139 // Called when a GOAWAY frame has been parsed. |
| 140 virtual void OnGoAway(SpdyStreamId last_accepted_stream_id, | 140 virtual void OnGoAway(SpdyStreamId last_accepted_stream_id, |
| 141 SpdyGoAwayStatus status) = 0; | 141 SpdyErrorCode error_code) = 0; |
| 142 | 142 |
| 143 // Called when a HEADERS frame is received. | 143 // Called when a HEADERS frame is received. |
| 144 // Note that header block data is not included. See OnHeaderFrameStart(). | 144 // Note that header block data is not included. See OnHeaderFrameStart(). |
| 145 // |stream_id| The stream receiving the header. | 145 // |stream_id| The stream receiving the header. |
| 146 // |has_priority| Whether or not the headers frame included a priority value, | 146 // |has_priority| Whether or not the headers frame included a priority value, |
| 147 // and stream dependency info. | 147 // and stream dependency info. |
| 148 // |weight| If |has_priority| is true, then weight (in the range [1, 256]) | 148 // |weight| If |has_priority| is true, then weight (in the range [1, 256]) |
| 149 // for the receiving stream, otherwise 0. | 149 // for the receiving stream, otherwise 0. |
| 150 // |parent_stream_id| If |has_priority| is true the parent stream of the | 150 // |parent_stream_id| If |has_priority| is true the parent stream of the |
| 151 // receiving stream, else 0. | 151 // receiving stream, else 0. |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 // rather than reading all available input. | 746 // rather than reading all available input. |
| 747 bool process_single_input_frame_ = false; | 747 bool process_single_input_frame_ = false; |
| 748 | 748 |
| 749 // Latched value of FLAGS_chromium_http2_flag_remove_rewritelength. | 749 // Latched value of FLAGS_chromium_http2_flag_remove_rewritelength. |
| 750 bool skip_rewritelength_ = false; | 750 bool skip_rewritelength_ = false; |
| 751 }; | 751 }; |
| 752 | 752 |
| 753 } // namespace net | 753 } // namespace net |
| 754 | 754 |
| 755 #endif // NET_SPDY_SPDY_FRAMER_H_ | 755 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |