1 /*
2  * Copyright (c) Facebook, Inc. and its affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <proxygen/lib/http/codec/SPDYVersion.h>
12 #include <string>
13 
14 namespace folly { namespace io {
15 class Cursor;
16 }} // namespace folly::io
17 
18 namespace proxygen {
19 
20 /**
21  * Helper struct to carry common settings for a spdy version
22  */
23 struct SPDYVersionSettings {
24   const std::string versionStr;
25   const std::string statusStr;
26   const std::string methodStr;
27   const std::string pathStr;
28   const std::string schemeStr;
29   const std::string hostStr;
30   const std::string protoName;
31   uint32_t (*parseSizeFun)(folly::io::Cursor*);
32   void (*appendSizeFun)(uint8_t*&, size_t);
33   const unsigned char* dict;
34   size_t dictSize;
35   uint16_t controlVersion;
36   uint16_t synReplySize;
37   uint16_t nameValueSize;
38   uint16_t goawaySize;
39   uint8_t priShift;
40   uint8_t majorVersion;
41   uint8_t minorVersion;
42   SPDYVersion version;
43   const std::string& protocolVersionString;
44 };
45 
46 } // namespace proxygen
47