| 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 20 matching lines...) Expand all Loading... |
| 31 virtual void OnError(SpdyFramer::SpdyError error_code) = 0; | 31 virtual void OnError(SpdyFramer::SpdyError error_code) = 0; |
| 32 | 32 |
| 33 // Called if an error is detected in a SPDY stream. | 33 // Called if an error is detected in a SPDY stream. |
| 34 virtual void OnStreamError(SpdyStreamId stream_id, | 34 virtual void OnStreamError(SpdyStreamId stream_id, |
| 35 const std::string& description) = 0; | 35 const std::string& description) = 0; |
| 36 | 36 |
| 37 // Called after all the header data for SYN_STREAM control frame is received. | 37 // Called after all the header data for SYN_STREAM control frame is received. |
| 38 virtual void OnSynStream(SpdyStreamId stream_id, | 38 virtual void OnSynStream(SpdyStreamId stream_id, |
| 39 SpdyStreamId associated_stream_id, | 39 SpdyStreamId associated_stream_id, |
| 40 SpdyPriority priority, | 40 SpdyPriority priority, |
| 41 uint8 credential_slot, | |
| 42 bool fin, | 41 bool fin, |
| 43 bool unidirectional, | 42 bool unidirectional, |
| 44 const SpdyHeaderBlock& headers) = 0; | 43 const SpdyHeaderBlock& headers) = 0; |
| 45 | 44 |
| 46 // Called after all the header data for SYN_REPLY control frame is received. | 45 // Called after all the header data for SYN_REPLY control frame is received. |
| 47 virtual void OnSynReply(SpdyStreamId stream_id, | 46 virtual void OnSynReply(SpdyStreamId stream_id, |
| 48 bool fin, | 47 bool fin, |
| 49 const SpdyHeaderBlock& headers) = 0; | 48 const SpdyHeaderBlock& headers) = 0; |
| 50 | 49 |
| 51 // Called after all the header data for HEADERS control frame is received. | 50 // Called after all the header data for HEADERS control frame is received. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Set debug callbacks to be called from the framer. The debug visitor is | 119 // Set debug callbacks to be called from the framer. The debug visitor is |
| 121 // completely optional and need not be set in order for normal operation. | 120 // completely optional and need not be set in order for normal operation. |
| 122 // If this is called multiple times, only the last visitor will be used. | 121 // If this is called multiple times, only the last visitor will be used. |
| 123 void set_debug_visitor(SpdyFramerDebugVisitorInterface* debug_visitor); | 122 void set_debug_visitor(SpdyFramerDebugVisitorInterface* debug_visitor); |
| 124 | 123 |
| 125 // SpdyFramerVisitorInterface | 124 // SpdyFramerVisitorInterface |
| 126 virtual void OnError(SpdyFramer* spdy_framer) OVERRIDE; | 125 virtual void OnError(SpdyFramer* spdy_framer) OVERRIDE; |
| 127 virtual void OnSynStream(SpdyStreamId stream_id, | 126 virtual void OnSynStream(SpdyStreamId stream_id, |
| 128 SpdyStreamId associated_stream_id, | 127 SpdyStreamId associated_stream_id, |
| 129 SpdyPriority priority, | 128 SpdyPriority priority, |
| 130 uint8 credential_slot, | |
| 131 bool fin, | 129 bool fin, |
| 132 bool unidirectional) OVERRIDE; | 130 bool unidirectional) OVERRIDE; |
| 133 virtual void OnSynReply(SpdyStreamId stream_id, bool fin) OVERRIDE; | 131 virtual void OnSynReply(SpdyStreamId stream_id, bool fin) OVERRIDE; |
| 134 virtual void OnHeaders(SpdyStreamId stream_id, bool fin) OVERRIDE; | 132 virtual void OnHeaders(SpdyStreamId stream_id, bool fin) OVERRIDE; |
| 135 virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id, | 133 virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id, |
| 136 const char* header_data, | 134 const char* header_data, |
| 137 size_t len) OVERRIDE; | 135 size_t len) OVERRIDE; |
| 138 virtual void OnStreamFrameData(SpdyStreamId stream_id, | 136 virtual void OnStreamFrameData(SpdyStreamId stream_id, |
| 139 const char* data, | 137 const char* data, |
| 140 size_t len, | 138 size_t len, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 159 size_t ProcessInput(const char* data, size_t len); | 157 size_t ProcessInput(const char* data, size_t len); |
| 160 SpdyMajorVersion protocol_version(); | 158 SpdyMajorVersion protocol_version(); |
| 161 void Reset(); | 159 void Reset(); |
| 162 SpdyFramer::SpdyError error_code() const; | 160 SpdyFramer::SpdyError error_code() const; |
| 163 SpdyFramer::SpdyState state() const; | 161 SpdyFramer::SpdyState state() const; |
| 164 bool MessageFullyRead(); | 162 bool MessageFullyRead(); |
| 165 bool HasError(); | 163 bool HasError(); |
| 166 SpdyFrame* CreateSynStream(SpdyStreamId stream_id, | 164 SpdyFrame* CreateSynStream(SpdyStreamId stream_id, |
| 167 SpdyStreamId associated_stream_id, | 165 SpdyStreamId associated_stream_id, |
| 168 SpdyPriority priority, | 166 SpdyPriority priority, |
| 169 uint8 credential_slot, | |
| 170 SpdyControlFlags flags, | 167 SpdyControlFlags flags, |
| 171 const SpdyHeaderBlock* headers); | 168 const SpdyHeaderBlock* headers); |
| 172 SpdyFrame* CreateSynReply(SpdyStreamId stream_id, | 169 SpdyFrame* CreateSynReply(SpdyStreamId stream_id, |
| 173 SpdyControlFlags flags, | 170 SpdyControlFlags flags, |
| 174 const SpdyHeaderBlock* headers); | 171 const SpdyHeaderBlock* headers); |
| 175 SpdyFrame* CreateRstStream(SpdyStreamId stream_id, | 172 SpdyFrame* CreateRstStream(SpdyStreamId stream_id, |
| 176 SpdyRstStreamStatus status) const; | 173 SpdyRstStreamStatus status) const; |
| 177 SpdyFrame* CreateSettings(const SettingsMap& values) const; | 174 SpdyFrame* CreateSettings(const SettingsMap& values) const; |
| 178 SpdyFrame* CreatePingFrame(uint32 unique_id) const; | 175 SpdyFrame* CreatePingFrame(uint32 unique_id) const; |
| 179 SpdyFrame* CreateGoAway( | 176 SpdyFrame* CreateGoAway( |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 bool unidirectional; | 248 bool unidirectional; |
| 252 }; | 249 }; |
| 253 scoped_ptr<ControlFrameFields> control_frame_fields_; | 250 scoped_ptr<ControlFrameFields> control_frame_fields_; |
| 254 | 251 |
| 255 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); | 252 DISALLOW_COPY_AND_ASSIGN(BufferedSpdyFramer); |
| 256 }; | 253 }; |
| 257 | 254 |
| 258 } // namespace net | 255 } // namespace net |
| 259 | 256 |
| 260 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ | 257 #endif // NET_SPDY_BUFFERED_SPDY_FRAMER_H_ |
| OLD | NEW |