#ifndef QUICHE_QUIC_CORE_QPACK_QPACK_HEADER_TABLE_H_
#define QUICHE_QUIC_CORE_QPACK_QPACK_HEADER_TABLE_H_
#include <cstdint>
#include <deque>
#include "absl/strings/string_view.h"
#include "quiche/http2/hpack/hpack_entry.h"
#include "quiche/http2/hpack/hpack_header_table.h"
#include "quiche/quic/platform/api/quic_export.h"
#include "quiche/common/quiche_circular_deque.h"
namespace quic {
QpackEntry;
QpackLookupEntry;
constexpr size_t kQpackEntrySizeOverhead = …;
QpackEncoderDynamicTable;
QpackDecoderDynamicTable;
template <typename DynamicEntryTable>
class QUICHE_EXPORT QpackHeaderTableBase { … };
template <typename DynamicEntryTable>
QpackHeaderTableBase<DynamicEntryTable>::QpackHeaderTableBase()
: … { … }
template <typename DynamicEntryTable>
bool QpackHeaderTableBase<DynamicEntryTable>::EntryFitsDynamicTableCapacity(
absl::string_view name, absl::string_view value) const { … }
namespace internal {
QUICHE_EXPORT inline size_t GetSize(const QpackEntry& entry) { … }
QUICHE_EXPORT inline size_t GetSize(const std::unique_ptr<QpackEntry>& entry) { … }
QUICHE_EXPORT inline std::unique_ptr<QpackEntry> NewEntry(
std::string name, std::string value, QpackEncoderDynamicTable& ) { … }
QUICHE_EXPORT inline QpackEntry NewEntry(std::string name, std::string value,
QpackDecoderDynamicTable& ) { … }
}
template <typename DynamicEntryTable>
uint64_t QpackHeaderTableBase<DynamicEntryTable>::InsertEntry(
absl::string_view name, absl::string_view value) { … }
template <typename DynamicEntryTable>
bool QpackHeaderTableBase<DynamicEntryTable>::SetDynamicTableCapacity(
uint64_t capacity) { … }
template <typename DynamicEntryTable>
bool QpackHeaderTableBase<DynamicEntryTable>::SetMaximumDynamicTableCapacity(
uint64_t maximum_dynamic_table_capacity) { … }
template <typename DynamicEntryTable>
void QpackHeaderTableBase<DynamicEntryTable>::RemoveEntryFromEnd() { … }
template <typename DynamicEntryTable>
void QpackHeaderTableBase<DynamicEntryTable>::EvictDownToCapacity(
uint64_t capacity) { … }
class QUICHE_EXPORT QpackEncoderHeaderTable
: public QpackHeaderTableBase<QpackEncoderDynamicTable> { … };
class QUICHE_EXPORT QpackDecoderHeaderTable
: public QpackHeaderTableBase<QpackDecoderDynamicTable> { … };
}
#endif