proxygen
StructuredHeadersDecoder.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
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. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
12 #include <unordered_map>
13 #include <vector>
14 #include "StructuredHeadersBuffer.h" // @manual=:structured_headers
15 
16 namespace proxygen {
17 
19 public:
20 
21  explicit StructuredHeadersDecoder(const std::string& s): buf_(s) {}
22 
24 
26  decodeList(std::vector<StructuredHeaderItem>& result);
27 
29 
32 
33 private:
34  enum class MapType {
35  DICTIONARY = 0,
37  };
38 
40  std::unordered_map<std::string, StructuredHeaderItem>& result,
41  MapType mapType);
42 
44 };
45 
46 }
StructuredHeaders::DecodeError decodeMap(std::unordered_map< std::string, StructuredHeaderItem > &result, MapType mapType)
std::vector< StructuredHeaders::ParameterisedIdentifier > ParameterisedList
StructuredHeaders::DecodeError decodeParameterisedList(ParameterisedList &result)
StructuredHeaders::DecodeError decodeDictionary(Dictionary &result)
std::unordered_map< std::string, StructuredHeaderItem > Dictionary
StructuredHeaders::DecodeError decodeList(std::vector< StructuredHeaderItem > &result)
const char * string
Definition: Conv.cpp:212
static set< string > s
StructuredHeaders::DecodeError decodeItem(StructuredHeaderItem &result)