1 // Copyright (c) 2018 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_STATIC_TABLE_H_ 6 #define QUICHE_QUIC_CORE_QPACK_QPACK_STATIC_TABLE_H_ 7 8 #include <vector> 9 10 #include "quiche/quic/platform/api/quic_export.h" 11 #include "quiche/spdy/core/hpack/hpack_constants.h" 12 #include "quiche/spdy/core/hpack/hpack_static_table.h" 13 14 namespace quic { 15 16 using QpackStaticEntry = spdy::HpackStaticEntry; 17 using QpackStaticTable = spdy::HpackStaticTable; 18 19 // QPACK static table defined at 20 // https://quicwg.org/base-drafts/draft-ietf-quic-qpack.html#static-table. 21 QUICHE_EXPORT const std::vector<QpackStaticEntry>& QpackStaticTableVector(); 22 23 // Returns a QpackStaticTable instance initialized with kQpackStaticTable. 24 // The instance is read-only, has static lifetime, and is safe to share amoung 25 // threads. This function is thread-safe. 26 QUICHE_EXPORT const QpackStaticTable& ObtainQpackStaticTable(); 27 28 } // namespace quic 29 30 #endif // QUICHE_QUIC_CORE_QPACK_QPACK_STATIC_TABLE_H_ 31