Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2022 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_FILE_BODY_HPP |
11 |
|
|
#define BOOST_HTTP_PROTO_FILE_BODY_HPP |
12 |
|
|
|
13 |
|
|
#include <boost/http_proto/detail/config.hpp> |
14 |
|
|
#include <boost/http_proto/buffer.hpp> |
15 |
|
|
#include <boost/http_proto/file.hpp> |
16 |
|
|
#include <boost/http_proto/source.hpp> |
17 |
|
|
#include <cstdint> |
18 |
|
|
|
19 |
|
|
namespace boost { |
20 |
|
|
namespace http_proto { |
21 |
|
|
|
22 |
|
|
class BOOST_SYMBOL_VISIBLE |
23 |
|
✗ |
file_body |
24 |
|
|
: public source |
25 |
|
|
{ |
26 |
|
|
file f_; |
27 |
|
|
std::uint64_t n_; |
28 |
|
|
|
29 |
|
|
public: |
30 |
|
|
file_body() = delete; |
31 |
|
|
file_body( |
32 |
|
|
file_body const&) = delete; |
33 |
|
|
|
34 |
|
|
BOOST_HTTP_PROTO_DECL |
35 |
|
|
file_body( |
36 |
|
|
file_body&&) noexcept; |
37 |
|
|
|
38 |
|
|
BOOST_HTTP_PROTO_DECL |
39 |
|
|
~file_body(); |
40 |
|
|
|
41 |
|
|
BOOST_HTTP_PROTO_DECL |
42 |
|
|
explicit |
43 |
|
|
file_body( |
44 |
|
|
file&& f, |
45 |
|
|
std::uint64_t size = |
46 |
|
|
std::uint64_t(-1)) noexcept; |
47 |
|
|
|
48 |
|
|
BOOST_HTTP_PROTO_DECL |
49 |
|
|
results |
50 |
|
|
read( |
51 |
|
|
mutable_buffers_pair dest); |
52 |
|
|
}; |
53 |
|
|
|
54 |
|
|
} // http_proto |
55 |
|
|
} // boost |
56 |
|
|
|
57 |
|
|
#endif |
58 |
|
|
|