Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2021 Vinnie Falco (vinnie dot falco at gmail dot com) |
3 |
|
|
// |
4 |
|
|
// Distributed under the Boost Software License, Version 1.0. (See accompanying |
5 |
|
|
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 |
|
|
// |
7 |
|
|
// Official repository: https://github.com/CPPAlliance/http_proto |
8 |
|
|
// |
9 |
|
|
|
10 |
|
|
#ifndef BOOST_HTTP_PROTO_CODEC_CODECS_HPP |
11 |
|
|
#define BOOST_HTTP_PROTO_CODEC_CODECS_HPP |
12 |
|
|
|
13 |
|
|
#include <boost/http_proto/detail/config.hpp> |
14 |
|
|
#include <boost/http_proto/string_view.hpp> |
15 |
|
|
|
16 |
|
|
namespace boost { |
17 |
|
|
namespace http_proto { |
18 |
|
|
|
19 |
|
|
#ifndef BOOST_HTTP_PROTO_DOCS |
20 |
|
|
class decoder_type; |
21 |
|
|
class encoder_type; |
22 |
|
|
#endif |
23 |
|
|
|
24 |
|
|
class BOOST_SYMBOL_VISIBLE |
25 |
|
10 |
codecs |
26 |
|
|
{ |
27 |
|
|
public: |
28 |
|
|
BOOST_HTTP_PROTO_DECL |
29 |
|
|
virtual ~codecs() noexcept; |
30 |
|
|
|
31 |
|
|
virtual |
32 |
|
|
void |
33 |
|
|
add_decoder( |
34 |
|
|
string_view name, |
35 |
|
|
decoder_type&) = 0; |
36 |
|
|
|
37 |
|
|
virtual |
38 |
|
|
decoder_type* |
39 |
|
|
find_decoder( |
40 |
|
|
string_view name) noexcept = 0; |
41 |
|
|
|
42 |
|
|
virtual |
43 |
|
|
void |
44 |
|
|
add_encoder( |
45 |
|
|
string_view name, |
46 |
|
|
encoder_type&) = 0; |
47 |
|
|
|
48 |
|
|
virtual |
49 |
|
|
encoder_type* |
50 |
|
|
find_encoder( |
51 |
|
|
string_view name) noexcept = 0; |
52 |
|
|
}; |
53 |
|
|
|
54 |
|
|
} // http_proto |
55 |
|
|
} // boost |
56 |
|
|
|
57 |
|
|
#endif |
58 |
|
|
|