proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
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
18
class
StructuredHeadersDecoder
{
19
public
:
20
21
explicit
StructuredHeadersDecoder
(
const
std::string
&
s
):
buf_
(s) {}
22
23
StructuredHeaders::DecodeError
decodeItem
(
StructuredHeaderItem
& result);
24
25
StructuredHeaders::DecodeError
26
decodeList
(std::vector<StructuredHeaderItem>& result);
27
28
StructuredHeaders::DecodeError
decodeDictionary
(
Dictionary
& result);
29
30
StructuredHeaders::DecodeError
31
decodeParameterisedList
(
ParameterisedList
& result);
32
33
private
:
34
enum class
MapType
{
35
DICTIONARY
= 0,
36
PARAMETERISED_MAP
= 1
37
};
38
39
StructuredHeaders::DecodeError
decodeMap
(
40
std::unordered_map<std::string, StructuredHeaderItem>& result,
41
MapType
mapType);
42
43
StructuredHeadersBuffer
buf_
;
44
};
45
46
}
proxygen::StructuredHeadersDecoder::decodeMap
StructuredHeaders::DecodeError decodeMap(std::unordered_map< std::string, StructuredHeaderItem > &result, MapType mapType)
Definition:
StructuredHeadersDecoder.cpp:103
proxygen::StructuredHeadersDecoder::MapType::DICTIONARY
proxygen::StructuredHeaders::ParameterisedList
std::vector< StructuredHeaders::ParameterisedIdentifier > ParameterisedList
Definition:
StructuredHeadersConstants.h:59
StructuredHeadersBuffer.h
proxygen::StructuredHeadersDecoder::StructuredHeadersDecoder
StructuredHeadersDecoder(const std::string &s)
Definition:
StructuredHeadersDecoder.h:21
proxygen::StructuredHeadersDecoder
Definition:
StructuredHeadersDecoder.h:18
proxygen::StructuredHeadersDecoder::decodeParameterisedList
StructuredHeaders::DecodeError decodeParameterisedList(ParameterisedList &result)
Definition:
StructuredHeadersDecoder.cpp:65
proxygen::StructuredHeadersDecoder::decodeDictionary
StructuredHeaders::DecodeError decodeDictionary(Dictionary &result)
Definition:
StructuredHeadersDecoder.cpp:61
proxygen::StructuredHeaders::Dictionary
std::unordered_map< std::string, StructuredHeaderItem > Dictionary
Definition:
StructuredHeadersConstants.h:61
proxygen::StructuredHeaders::DecodeError
DecodeError
Definition:
StructuredHeadersConstants.h:63
proxygen::StructuredHeadersDecoder::MapType
MapType
Definition:
StructuredHeadersDecoder.h:34
proxygen::StructuredHeadersBuffer
Definition:
StructuredHeadersBuffer.h:20
proxygen::StructuredHeadersDecoder::decodeList
StructuredHeaders::DecodeError decodeList(std::vector< StructuredHeaderItem > &result)
Definition:
StructuredHeadersDecoder.cpp:27
string
const char * string
Definition:
Conv.cpp:212
proxygen::StructuredHeadersDecoder::MapType::PARAMETERISED_MAP
s
static set< string > s
Definition:
StringKeyedBenchmark.cpp:48
proxygen
Definition:
ExMessageHandler.h:14
proxygen::StructuredHeadersDecoder::decodeItem
StructuredHeaders::DecodeError decodeItem(StructuredHeaderItem &result)
Definition:
StructuredHeadersDecoder.cpp:17
proxygen::StructuredHeaders::StructuredHeaderItem
Definition:
StructuredHeadersConstants.h:24
proxygen::StructuredHeadersDecoder::buf_
StructuredHeadersBuffer buf_
Definition:
StructuredHeadersDecoder.h:43
proxygen
lib
http
structuredheaders
StructuredHeadersDecoder.h
Generated by
1.8.11