Support range requests for get requests including multipart/byterange.
More...
#include <range_file_body.hpp>
Support range requests for get requests including multipart/byterange.
◆ RangeFileBodyImpl() [1/3]
Roar::Detail::RangeFileBodyImpl::RangeFileBodyImpl |
( |
| ) |
|
|
inline |
◆ ~RangeFileBodyImpl()
Roar::Detail::RangeFileBodyImpl::~RangeFileBodyImpl |
( |
| ) |
|
|
default |
◆ RangeFileBodyImpl() [2/3]
◆ RangeFileBodyImpl() [3/3]
◆ boundary()
std::string Roar::Detail::RangeFileBodyImpl::boundary |
( |
| ) |
const |
|
inline |
◆ close()
void Roar::Detail::RangeFileBodyImpl::close |
( |
| ) |
|
|
inline |
◆ file()
std::fstream & Roar::Detail::RangeFileBodyImpl::file |
( |
| ) |
|
|
inline |
◆ fileSize()
std::uint64_t Roar::Detail::RangeFileBodyImpl::fileSize |
( |
| ) |
|
|
inline |
◆ firstRange()
std::pair< std::uint64_t, std::uint64_t > Roar::Detail::RangeFileBodyImpl::firstRange |
( |
| ) |
|
|
inline |
◆ isMultipart()
bool Roar::Detail::RangeFileBodyImpl::isMultipart |
( |
| ) |
const |
|
inline |
◆ isOpen()
bool Roar::Detail::RangeFileBodyImpl::isOpen |
( |
| ) |
const |
|
inline |
◆ open()
void Roar::Detail::RangeFileBodyImpl::open |
( |
std::filesystem::path const & |
filename, |
|
|
std::ios_base::openmode |
mode, |
|
|
std::error_code & |
ec |
|
) |
| |
|
inline |
Opens the file.
- Parameters
-
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ read()
std::size_t Roar::Detail::RangeFileBodyImpl::read |
( |
char * |
buf, |
|
|
std::size_t |
amount |
|
) |
| |
|
inline |
Reads some of the multipart data into the buffer.
- Parameters
-
- Returns
- std::size_t
◆ remaining()
std::uint64_t Roar::Detail::RangeFileBodyImpl::remaining |
( |
| ) |
const |
|
inline |
◆ reset() [1/2]
void Roar::Detail::RangeFileBodyImpl::reset |
( |
| ) |
|
|
inline |
Resets the fstream state and goes back to the start.
◆ reset() [2/2]
void Roar::Detail::RangeFileBodyImpl::reset |
( |
std::fstream && |
file | ) |
|
|
inline |
Resets the file stream with a new stream.
- Parameters
-
◆ setReadRanges()
void Roar::Detail::RangeFileBodyImpl::setReadRanges |
( |
Ranges const & |
ranges, |
|
|
std::string_view |
contentType |
|
) |
| |
|
inline |
Set the Read Range.
- Parameters
-
◆ size()
std::uint64_t Roar::Detail::RangeFileBodyImpl::size |
( |
| ) |
const |
|
inline |
◆ write()
std::streamsize Roar::Detail::RangeFileBodyImpl::write |
( |
char const * |
buf, |
|
|
std::streamsize |
amount, |
|
|
bool & |
error |
|
) |
| |
|
inline |
Writes the given buffer to the file.
- Parameters
-
- Returns
- std::size_t
◆ consumed_
std::uint64_t Roar::Detail::RangeFileBodyImpl::consumed_ |
|
private |
◆ file_
std::fstream Roar::Detail::RangeFileBodyImpl::file_ {} |
|
private |
◆ sequences_
std::vector<Sequence> Roar::Detail::RangeFileBodyImpl::sequences_ |
|
private |
◆ splitter_
std::string Roar::Detail::RangeFileBodyImpl::splitter_ |
|
private |
◆ SplitterLength
constexpr unsigned Roar::Detail::RangeFileBodyImpl::SplitterLength = 16 |
|
staticconstexprprivate |
◆ totalSize_
std::uint64_t Roar::Detail::RangeFileBodyImpl::totalSize_ |
|
private |
The documentation for this class was generated from the following file: