xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/core/qpack/qpack_stream_sender_delegate.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright (c) 2019 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef QUICHE_QUIC_CORE_QPACK_QPACK_STREAM_SENDER_DELEGATE_H_
6 #define QUICHE_QUIC_CORE_QPACK_QPACK_STREAM_SENDER_DELEGATE_H_
7 
8 #include <cstdint>
9 
10 #include "absl/strings/string_view.h"
11 #include "quiche/quic/platform/api/quic_export.h"
12 
13 namespace quic {
14 
15 // This interface writes encoder/decoder data to peer.
16 class QUICHE_EXPORT QpackStreamSenderDelegate {
17  public:
18   virtual ~QpackStreamSenderDelegate() = default;
19 
20   // Write data on the unidirectional stream.
21   virtual void WriteStreamData(absl::string_view data) = 0;
22 
23   // Return the number of bytes buffered due to underlying stream being blocked.
24   virtual uint64_t NumBytesBuffered() const = 0;
25 };
26 
27 }  // namespace quic
28 
29 #endif  // QUICHE_QUIC_CORE_QPACK_QPACK_STREAM_SENDER_DELEGATE_H_
30