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 // This file contains some protocol structures for use with SPDY 2 and 3 | 5 // This file contains some protocol structures for use with SPDY 2 and 3 |
6 // The SPDY 2 spec can be found at: | 6 // The SPDY 2 spec can be found at: |
7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 | 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 |
8 // The SPDY 3 spec can be found at: | 8 // The SPDY 3 spec can be found at: |
9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 | 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 |
10 | 10 |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 SpdyGoAwayStatus status_; | 823 SpdyGoAwayStatus status_; |
824 const base::StringPiece description_; | 824 const base::StringPiece description_; |
825 | 825 |
826 DISALLOW_COPY_AND_ASSIGN(SpdyGoAwayIR); | 826 DISALLOW_COPY_AND_ASSIGN(SpdyGoAwayIR); |
827 }; | 827 }; |
828 | 828 |
829 class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithNameValueBlockIR { | 829 class NET_EXPORT_PRIVATE SpdyHeadersIR : public SpdyFrameWithNameValueBlockIR { |
830 public: | 830 public: |
831 explicit SpdyHeadersIR(SpdyStreamId stream_id) | 831 explicit SpdyHeadersIR(SpdyStreamId stream_id) |
832 : SpdyFrameWithNameValueBlockIR(stream_id), | 832 : SpdyFrameWithNameValueBlockIR(stream_id), |
833 end_headers_(true), | |
834 has_priority_(false), | 833 has_priority_(false), |
835 priority_(0) {} | 834 priority_(0) {} |
836 | 835 |
837 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 836 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
838 | 837 |
839 bool end_headers() const { return end_headers_; } | |
840 void set_end_headers(bool end_headers) {end_headers_ = end_headers;} | |
841 bool has_priority() const { return has_priority_; } | 838 bool has_priority() const { return has_priority_; } |
842 void set_has_priority(bool has_priority) { has_priority_ = has_priority; } | 839 void set_has_priority(bool has_priority) { has_priority_ = has_priority; } |
843 uint32 priority() const { return priority_; } | 840 uint32 priority() const { return priority_; } |
844 void set_priority(SpdyPriority priority) { priority_ = priority; } | 841 void set_priority(SpdyPriority priority) { priority_ = priority; } |
845 | 842 |
846 private: | 843 private: |
847 bool end_headers_; | |
848 bool has_priority_; | 844 bool has_priority_; |
849 // 31-bit priority. | 845 // 31-bit priority. |
850 uint32 priority_; | 846 uint32 priority_; |
851 DISALLOW_COPY_AND_ASSIGN(SpdyHeadersIR); | 847 DISALLOW_COPY_AND_ASSIGN(SpdyHeadersIR); |
852 }; | 848 }; |
853 | 849 |
854 class NET_EXPORT_PRIVATE SpdyWindowUpdateIR : public SpdyFrameWithStreamIdIR { | 850 class NET_EXPORT_PRIVATE SpdyWindowUpdateIR : public SpdyFrameWithStreamIdIR { |
855 public: | 851 public: |
856 SpdyWindowUpdateIR(SpdyStreamId stream_id, int32 delta) | 852 SpdyWindowUpdateIR(SpdyStreamId stream_id, int32 delta) |
857 : SpdyFrameWithStreamIdIR(stream_id) { | 853 : SpdyFrameWithStreamIdIR(stream_id) { |
(...skipping 24 matching lines...) Expand all Loading... |
882 | 878 |
883 private: | 879 private: |
884 DISALLOW_COPY_AND_ASSIGN(SpdyBlockedIR); | 880 DISALLOW_COPY_AND_ASSIGN(SpdyBlockedIR); |
885 }; | 881 }; |
886 | 882 |
887 class NET_EXPORT_PRIVATE SpdyPushPromiseIR | 883 class NET_EXPORT_PRIVATE SpdyPushPromiseIR |
888 : public SpdyFrameWithNameValueBlockIR { | 884 : public SpdyFrameWithNameValueBlockIR { |
889 public: | 885 public: |
890 SpdyPushPromiseIR(SpdyStreamId stream_id, SpdyStreamId promised_stream_id) | 886 SpdyPushPromiseIR(SpdyStreamId stream_id, SpdyStreamId promised_stream_id) |
891 : SpdyFrameWithNameValueBlockIR(stream_id), | 887 : SpdyFrameWithNameValueBlockIR(stream_id), |
892 promised_stream_id_(promised_stream_id), | 888 promised_stream_id_(promised_stream_id) {} |
893 end_push_promise_(true) {} | |
894 SpdyStreamId promised_stream_id() const { return promised_stream_id_; } | 889 SpdyStreamId promised_stream_id() const { return promised_stream_id_; } |
895 void set_promised_stream_id(SpdyStreamId id) { promised_stream_id_ = id; } | 890 void set_promised_stream_id(SpdyStreamId id) { promised_stream_id_ = id; } |
896 bool end_push_promise() const { return end_push_promise_; } | |
897 void set_end_push_promise(bool end_push_promise) { | |
898 end_push_promise_ = end_push_promise; | |
899 } | |
900 | 891 |
901 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; | 892 virtual void Visit(SpdyFrameVisitor* visitor) const OVERRIDE; |
902 | 893 |
903 private: | 894 private: |
904 SpdyStreamId promised_stream_id_; | 895 SpdyStreamId promised_stream_id_; |
905 bool end_push_promise_; | |
906 DISALLOW_COPY_AND_ASSIGN(SpdyPushPromiseIR); | 896 DISALLOW_COPY_AND_ASSIGN(SpdyPushPromiseIR); |
907 }; | 897 }; |
908 | 898 |
909 // TODO(jgraettinger): This representation needs review. SpdyContinuationIR | 899 // TODO(jgraettinger): This representation needs review. SpdyContinuationIR |
910 // needs to frame a portion of a single, arbitrarily-broken encoded buffer. | 900 // needs to frame a portion of a single, arbitrarily-broken encoded buffer. |
911 class NET_EXPORT_PRIVATE SpdyContinuationIR | 901 class NET_EXPORT_PRIVATE SpdyContinuationIR |
912 : public SpdyFrameWithNameValueBlockIR { | 902 : public SpdyFrameWithNameValueBlockIR { |
913 public: | 903 public: |
914 explicit SpdyContinuationIR(SpdyStreamId stream_id) | 904 explicit SpdyContinuationIR(SpdyStreamId stream_id) |
915 : SpdyFrameWithNameValueBlockIR(stream_id), | 905 : SpdyFrameWithNameValueBlockIR(stream_id), |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 SpdyFrameVisitor() {} | 981 SpdyFrameVisitor() {} |
992 virtual ~SpdyFrameVisitor() {} | 982 virtual ~SpdyFrameVisitor() {} |
993 | 983 |
994 private: | 984 private: |
995 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 985 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
996 }; | 986 }; |
997 | 987 |
998 } // namespace net | 988 } // namespace net |
999 | 989 |
1000 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 990 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
OLD | NEW |