1 #ifndef QUICHE_HTTP2_ADAPTER_HTTP2_SESSION_H_ 2 #define QUICHE_HTTP2_ADAPTER_HTTP2_SESSION_H_ 3 4 #include <cstdint> 5 6 #include "absl/strings/string_view.h" 7 #include "quiche/http2/adapter/http2_protocol.h" 8 #include "quiche/common/platform/api/quiche_export.h" 9 10 namespace http2 { 11 namespace adapter { 12 13 struct QUICHE_EXPORT Http2SessionCallbacks {}; 14 15 // A class to represent the state of a single HTTP/2 connection. 16 class QUICHE_EXPORT Http2Session { 17 public: 18 Http2Session() = default; ~Http2Session()19 virtual ~Http2Session() {} 20 21 virtual int64_t ProcessBytes(absl::string_view bytes) = 0; 22 23 virtual int Consume(Http2StreamId stream_id, size_t num_bytes) = 0; 24 25 virtual bool want_read() const = 0; 26 virtual bool want_write() const = 0; 27 virtual int GetRemoteWindowSize() const = 0; 28 }; 29 30 } // namespace adapter 31 } // namespace http2 32 33 #endif // QUICHE_HTTP2_ADAPTER_HTTP2_SESSION_H_ 34