Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: net/spdy/core/hpack/hpack_constants.h

Issue 2839373002: Implement SPDY_EXPORT and SPDY_EXPORT_PRIVATE macros. (Closed)
Patch Set: Rebase: manually resolve trivial merge conflicts. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/spdy/core/fuzzing/hpack_fuzz_util.h ('k') | net/spdy/core/hpack/hpack_decoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CONSTANTS_H_ 5 #ifndef NET_SPDY_CORE_HPACK_HPACK_CONSTANTS_H_
6 #define NET_SPDY_CORE_HPACK_HPACK_CONSTANTS_H_ 6 #define NET_SPDY_CORE_HPACK_HPACK_CONSTANTS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <vector> 11 #include <vector>
12 12
13 #include "net/base/net_export.h" 13 #include "net/spdy/platform/api/spdy_export.h"
14 14
15 // All section references below are to 15 // All section references below are to
16 // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-08 16 // http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-08
17 17
18 namespace net { 18 namespace net {
19 19
20 // An HpackPrefix signifies |bits| stored in the top |bit_size| bits 20 // An HpackPrefix signifies |bits| stored in the top |bit_size| bits
21 // of an octet. 21 // of an octet.
22 struct HpackPrefix { 22 struct HpackPrefix {
23 uint8_t bits; 23 uint8_t bits;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const HpackPrefix kLiteralNoIndexOpcode = {0x0, 4}; 63 const HpackPrefix kLiteralNoIndexOpcode = {0x0, 4};
64 64
65 // 7.2.3: Opcode for a literal header field which is never indexed. 65 // 7.2.3: Opcode for a literal header field which is never indexed.
66 const HpackPrefix kLiteralNeverIndexOpcode = {0x1, 4}; 66 const HpackPrefix kLiteralNeverIndexOpcode = {0x1, 4};
67 67
68 // 7.3: Opcode for maximum header table size update. Begins a varint-encoded 68 // 7.3: Opcode for maximum header table size update. Begins a varint-encoded
69 // table size with a 5-bit prefix. 69 // table size with a 5-bit prefix.
70 const HpackPrefix kHeaderTableSizeUpdateOpcode = {0x1, 3}; 70 const HpackPrefix kHeaderTableSizeUpdateOpcode = {0x1, 3};
71 71
72 // Returns symbol code table from "Appendix C. Huffman Code". 72 // Returns symbol code table from "Appendix C. Huffman Code".
73 NET_EXPORT_PRIVATE std::vector<HpackHuffmanSymbol> HpackHuffmanCode(); 73 SPDY_EXPORT_PRIVATE std::vector<HpackHuffmanSymbol> HpackHuffmanCode();
74 74
75 // Returns static table from "Appendix B. Static Table Definition". 75 // Returns static table from "Appendix B. Static Table Definition".
76 NET_EXPORT_PRIVATE std::vector<HpackStaticEntry> HpackStaticTableVector(); 76 SPDY_EXPORT_PRIVATE std::vector<HpackStaticEntry> HpackStaticTableVector();
77 77
78 // Returns a HpackHuffmanTable instance initialized with |kHpackHuffmanCode|. 78 // Returns a HpackHuffmanTable instance initialized with |kHpackHuffmanCode|.
79 // The instance is read-only, has static lifetime, and is safe to share amoung 79 // The instance is read-only, has static lifetime, and is safe to share amoung
80 // threads. This function is thread-safe. 80 // threads. This function is thread-safe.
81 NET_EXPORT_PRIVATE const HpackHuffmanTable& ObtainHpackHuffmanTable(); 81 SPDY_EXPORT_PRIVATE const HpackHuffmanTable& ObtainHpackHuffmanTable();
82 82
83 // Returns a HpackStaticTable instance initialized with |kHpackStaticTable|. 83 // Returns a HpackStaticTable instance initialized with |kHpackStaticTable|.
84 // The instance is read-only, has static lifetime, and is safe to share amoung 84 // The instance is read-only, has static lifetime, and is safe to share amoung
85 // threads. This function is thread-safe. 85 // threads. This function is thread-safe.
86 NET_EXPORT_PRIVATE const HpackStaticTable& ObtainHpackStaticTable(); 86 SPDY_EXPORT_PRIVATE const HpackStaticTable& ObtainHpackStaticTable();
87 87
88 // Pseudo-headers start with a colon. (HTTP2 8.1.2.1., HPACK 3.1.) 88 // Pseudo-headers start with a colon. (HTTP2 8.1.2.1., HPACK 3.1.)
89 const char kPseudoHeaderPrefix = ':'; 89 const char kPseudoHeaderPrefix = ':';
90 90
91 } // namespace net 91 } // namespace net
92 92
93 #endif // NET_SPDY_CORE_HPACK_HPACK_CONSTANTS_H_ 93 #endif // NET_SPDY_CORE_HPACK_HPACK_CONSTANTS_H_
OLDNEW
« no previous file with comments | « net/spdy/core/fuzzing/hpack_fuzz_util.h ('k') | net/spdy/core/hpack/hpack_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698