| Line | Branch | Exec | Source | 
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2022 Vinnie Falco (vinnie.falco@gmail.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/file.hpp> | ||
| 15 | #include <boost/http_proto/source.hpp> | ||
| 16 | #include <cstdint> | ||
| 17 | |||
| 18 | namespace boost { | ||
| 19 | namespace http_proto { | ||
| 20 | |||
| 21 | class BOOST_SYMBOL_VISIBLE | ||
| 22 | ✗ | file_body | |
| 23 | : public source | ||
| 24 | { | ||
| 25 | file f_; | ||
| 26 | std::uint64_t n_; | ||
| 27 | |||
| 28 | public: | ||
| 29 | file_body() = delete; | ||
| 30 | file_body( | ||
| 31 | file_body const&) = delete; | ||
| 32 | |||
| 33 | BOOST_HTTP_PROTO_DECL | ||
| 34 | file_body( | ||
| 35 | file_body&&) noexcept; | ||
| 36 | |||
| 37 | BOOST_HTTP_PROTO_DECL | ||
| 38 | ~file_body(); | ||
| 39 | |||
| 40 | BOOST_HTTP_PROTO_DECL | ||
| 41 | explicit | ||
| 42 | file_body( | ||
| 43 | file&& f, | ||
| 44 | std::uint64_t size = | ||
| 45 | std::uint64_t(-1)) noexcept; | ||
| 46 | |||
| 47 | BOOST_HTTP_PROTO_DECL | ||
| 48 | results | ||
| 49 | on_read( | ||
| 50 | buffers::mutable_buffer b) override; | ||
| 51 | }; | ||
| 52 | |||
| 53 | } // http_proto | ||
| 54 | } // boost | ||
| 55 | |||
| 56 | #endif | ||
| 57 |