OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef NET_SPDY_CORE_HPACK_HPACK_STATIC_TABLE_H_ | 5 #ifndef NET_SPDY_CORE_HPACK_HPACK_STATIC_TABLE_H_ |
6 #define NET_SPDY_CORE_HPACK_HPACK_STATIC_TABLE_H_ | 6 #define NET_SPDY_CORE_HPACK_HPACK_STATIC_TABLE_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "net/base/net_export.h" | |
11 #include "net/spdy/core/hpack/hpack_header_table.h" | 10 #include "net/spdy/core/hpack/hpack_header_table.h" |
| 11 #include "net/spdy/platform/api/spdy_export.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 struct HpackStaticEntry; | 15 struct HpackStaticEntry; |
16 | 16 |
17 // HpackStaticTable provides |static_entries_| and |static_index_| for HPACK | 17 // HpackStaticTable provides |static_entries_| and |static_index_| for HPACK |
18 // encoding and decoding contexts. Once initialized, an instance is read only | 18 // encoding and decoding contexts. Once initialized, an instance is read only |
19 // and may be accessed only through its const interface. Such an instance may | 19 // and may be accessed only through its const interface. Such an instance may |
20 // be shared accross multiple HPACK contexts. | 20 // be shared accross multiple HPACK contexts. |
21 class NET_EXPORT_PRIVATE HpackStaticTable { | 21 class SPDY_EXPORT_PRIVATE HpackStaticTable { |
22 public: | 22 public: |
23 HpackStaticTable(); | 23 HpackStaticTable(); |
24 ~HpackStaticTable(); | 24 ~HpackStaticTable(); |
25 | 25 |
26 // Prepares HpackStaticTable by filling up static_entries_ and static_index_ | 26 // Prepares HpackStaticTable by filling up static_entries_ and static_index_ |
27 // from an array of struct HpackStaticEntry. Must be called exactly once. | 27 // from an array of struct HpackStaticEntry. Must be called exactly once. |
28 void Initialize(const HpackStaticEntry* static_entry_table, | 28 void Initialize(const HpackStaticEntry* static_entry_table, |
29 size_t static_entry_count); | 29 size_t static_entry_count); |
30 | 30 |
31 // Returns whether Initialize() has been called. | 31 // Returns whether Initialize() has been called. |
(...skipping 15 matching lines...) Expand all Loading... |
47 | 47 |
48 private: | 48 private: |
49 HpackHeaderTable::EntryTable static_entries_; | 49 HpackHeaderTable::EntryTable static_entries_; |
50 HpackHeaderTable::UnorderedEntrySet static_index_; | 50 HpackHeaderTable::UnorderedEntrySet static_index_; |
51 HpackHeaderTable::NameToEntryMap static_name_index_; | 51 HpackHeaderTable::NameToEntryMap static_name_index_; |
52 }; | 52 }; |
53 | 53 |
54 } // namespace net | 54 } // namespace net |
55 | 55 |
56 #endif // NET_SPDY_CORE_HPACK_HPACK_STATIC_TABLE_H_ | 56 #endif // NET_SPDY_CORE_HPACK_HPACK_STATIC_TABLE_H_ |
OLD | NEW |