| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ | 5 #ifndef NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ |
| 6 #define NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ | 6 #define NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 void Reset() override; | 50 void Reset() override; |
| 51 void ResetForNewInterface(int32 server_idx) override {} | 51 void ResetForNewInterface(int32 server_idx) override {} |
| 52 void ResetForNewConnection() override; | 52 void ResetForNewConnection() override; |
| 53 void Cleanup() override; | 53 void Cleanup() override; |
| 54 int PostAcceptHook() override; | 54 int PostAcceptHook() override; |
| 55 void NewStream(uint32 stream_id, | 55 void NewStream(uint32 stream_id, |
| 56 uint32 priority, | 56 uint32 priority, |
| 57 const std::string& filename) override {} | 57 const std::string& filename) override {} |
| 58 void SendEOF(uint32 stream_id) override {} | 58 void SendEOF(uint32 stream_id) override {} |
| 59 void SendErrorNotFound(uint32 stream_id) override {} | 59 void SendErrorNotFound(uint32 stream_id) override {} |
| 60 virtual void SendOKResponse(uint32 stream_id, std::string output) {} | 60 virtual void SendOKResponse(uint32 stream_id, const std::string& output) {} |
| 61 size_t SendSynStream(uint32 stream_id, const BalsaHeaders& headers) override; | 61 size_t SendSynStream(uint32 stream_id, const BalsaHeaders& headers) override; |
| 62 size_t SendSynReply(uint32 stream_id, const BalsaHeaders& headers) override; | 62 size_t SendSynReply(uint32 stream_id, const BalsaHeaders& headers) override; |
| 63 void SendDataFrame(uint32 stream_id, | 63 void SendDataFrame(uint32 stream_id, |
| 64 const char* data, | 64 const char* data, |
| 65 int64 len, | 65 int64 len, |
| 66 uint32 flags, | 66 uint32 flags, |
| 67 bool compress) override {} | 67 bool compress) override {} |
| 68 void set_is_request() override; | 68 void set_is_request() override; |
| 69 static std::string forward_ip_header() { return forward_ip_header_; } | 69 static std::string forward_ip_header() { return forward_ip_header_; } |
| 70 static void set_forward_ip_header(std::string value) { | 70 static void set_forward_ip_header(const std::string& value) { |
| 71 forward_ip_header_ = value; | 71 forward_ip_header_ = value; |
| 72 } | 72 } |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 void SendEOFImpl(uint32 stream_id) {} | 75 void SendEOFImpl(uint32 stream_id) {} |
| 76 void SendErrorNotFoundImpl(uint32 stream_id) {} | 76 void SendErrorNotFoundImpl(uint32 stream_id) {} |
| 77 void SendOKResponseImpl(uint32 stream_id, std::string* output) {} | 77 void SendOKResponseImpl(uint32 stream_id, std::string* output) {} |
| 78 size_t SendSynReplyImpl(uint32 stream_id, const BalsaHeaders& headers) { | 78 size_t SendSynReplyImpl(uint32 stream_id, const BalsaHeaders& headers) { |
| 79 return 0; | 79 return 0; |
| 80 } | 80 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 FlipAcceptor* acceptor_; | 125 FlipAcceptor* acceptor_; |
| 126 bool is_request_; | 126 bool is_request_; |
| 127 BalsaFrame* http_framer_; | 127 BalsaFrame* http_framer_; |
| 128 BalsaHeaders headers_; | 128 BalsaHeaders headers_; |
| 129 static std::string forward_ip_header_; | 129 static std::string forward_ip_header_; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace net | 132 } // namespace net |
| 133 | 133 |
| 134 #endif // NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ | 134 #endif // NET_TOOLS_FLIP_SERVER_STREAMER_INTERFACE_H_ |
| OLD | NEW |