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_BUFFERED_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 6 #define NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // visitor to do nothing. If this is called multiple times, only the last | 128 // visitor to do nothing. If this is called multiple times, only the last |
129 // visitor will be used. | 129 // visitor will be used. |
130 void set_visitor(BufferedSpdyFramerVisitorInterface* visitor); | 130 void set_visitor(BufferedSpdyFramerVisitorInterface* visitor); |
131 | 131 |
132 // Set debug callbacks to be called from the framer. The debug visitor is | 132 // Set debug callbacks to be called from the framer. The debug visitor is |
133 // completely optional and need not be set in order for normal operation. | 133 // completely optional and need not be set in order for normal operation. |
134 // If this is called multiple times, only the last visitor will be used. | 134 // If this is called multiple times, only the last visitor will be used. |
135 void set_debug_visitor(SpdyFramerDebugVisitorInterface* debug_visitor); | 135 void set_debug_visitor(SpdyFramerDebugVisitorInterface* debug_visitor); |
136 | 136 |
137 // SpdyFramerVisitorInterface | 137 // SpdyFramerVisitorInterface |
138 virtual void OnError(SpdyFramer* spdy_framer) OVERRIDE; | 138 virtual void OnError(SpdyFramer* spdy_framer) override; |
139 virtual void OnSynStream(SpdyStreamId stream_id, | 139 virtual void OnSynStream(SpdyStreamId stream_id, |
140 SpdyStreamId associated_stream_id, | 140 SpdyStreamId associated_stream_id, |
141 SpdyPriority priority, | 141 SpdyPriority priority, |
142 bool fin, | 142 bool fin, |
143 bool unidirectional) OVERRIDE; | 143 bool unidirectional) override; |
144 virtual void OnSynReply(SpdyStreamId stream_id, bool fin) OVERRIDE; | 144 virtual void OnSynReply(SpdyStreamId stream_id, bool fin) override; |
145 virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) OVERRIDE; | 145 virtual void OnHeaders(SpdyStreamId stream_id, bool fin, bool end) override; |
146 virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id, | 146 virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id, |
147 const char* header_data, | 147 const char* header_data, |
148 size_t len) OVERRIDE; | 148 size_t len) override; |
149 virtual void OnStreamFrameData(SpdyStreamId stream_id, | 149 virtual void OnStreamFrameData(SpdyStreamId stream_id, |
150 const char* data, | 150 const char* data, |
151 size_t len, | 151 size_t len, |
152 bool fin) OVERRIDE; | 152 bool fin) override; |
153 virtual void OnSettings(bool clear_persisted) OVERRIDE; | 153 virtual void OnSettings(bool clear_persisted) override; |
154 virtual void OnSetting( | 154 virtual void OnSetting( |
155 SpdySettingsIds id, uint8 flags, uint32 value) OVERRIDE; | 155 SpdySettingsIds id, uint8 flags, uint32 value) override; |
156 virtual void OnSettingsAck() OVERRIDE; | 156 virtual void OnSettingsAck() override; |
157 virtual void OnSettingsEnd() OVERRIDE; | 157 virtual void OnSettingsEnd() override; |
158 virtual void OnPing(SpdyPingId unique_id, bool is_ack) OVERRIDE; | 158 virtual void OnPing(SpdyPingId unique_id, bool is_ack) override; |
159 virtual void OnRstStream(SpdyStreamId stream_id, | 159 virtual void OnRstStream(SpdyStreamId stream_id, |
160 SpdyRstStreamStatus status) OVERRIDE; | 160 SpdyRstStreamStatus status) override; |
161 virtual void OnGoAway(SpdyStreamId last_accepted_stream_id, | 161 virtual void OnGoAway(SpdyStreamId last_accepted_stream_id, |
162 SpdyGoAwayStatus status) OVERRIDE; | 162 SpdyGoAwayStatus status) override; |
163 virtual void OnWindowUpdate(SpdyStreamId stream_id, | 163 virtual void OnWindowUpdate(SpdyStreamId stream_id, |
164 uint32 delta_window_size) OVERRIDE; | 164 uint32 delta_window_size) override; |
165 virtual void OnPushPromise(SpdyStreamId stream_id, | 165 virtual void OnPushPromise(SpdyStreamId stream_id, |
166 SpdyStreamId promised_stream_id, | 166 SpdyStreamId promised_stream_id, |
167 bool end) OVERRIDE; | 167 bool end) override; |
168 virtual void OnDataFrameHeader(SpdyStreamId stream_id, | 168 virtual void OnDataFrameHeader(SpdyStreamId stream_id, |
169 size_t length, | 169 size_t length, |
170 bool fin) OVERRIDE; | 170 bool fin) override; |
171 virtual void OnContinuation(SpdyStreamId stream_id, bool end) OVERRIDE; | 171 virtual void OnContinuation(SpdyStreamId stream_id, bool end) override; |
172 virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) OVERRIDE; | 172 virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) override; |
173 | 173 |
174 // SpdyFramer methods. | 174 // SpdyFramer methods. |
175 size_t ProcessInput(const char* data, size_t len); | 175 size_t ProcessInput(const char* data, size_t len); |
176 SpdyMajorVersion protocol_version(); | 176 SpdyMajorVersion protocol_version(); |
177 void Reset(); | 177 void Reset(); |
178 SpdyFramer::SpdyError error_code() const; | 178 SpdyFramer::SpdyError error_code() const; |
179 SpdyFramer::SpdyState state() const; | 179 SpdyFramer::SpdyState state() const; |
180 bool MessageFullyRead(); | 180 bool MessageFullyRead(); |
181 bool HasError(); | 181 bool HasError(); |
182 SpdyFrame* CreateSynStream(SpdyStreamId stream_id, | 182 SpdyFrame* CreateSynStream(SpdyStreamId stream_id, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 bool unidirectional; | 270 bool unidirectional; |
271 }; | 271 }; |
272 scoped_ptr<ControlFrameFields> control_frame_fields_; | 272 scoped_ptr<ControlFrameFields> control_frame_fields_; |
273 | 273 |
274 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); | 274 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); |
275 }; | 275 }; |
276 | 276 |
277 } // namespace net | 277 } // namespace net |
278 | 278 |
279 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 279 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
OLD | NEW |