![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
QHttpHeaderRangeSpec represents a single byte range as used in the HTTP {Range} and {Content-Range} headers, which RFC 9110 calls a {range-spec}.
More...
#include <qhttpheaders.h>
Public Member Functions | |
| constexpr bool | isValid () const noexcept |
| \variable std::optional<qint64> QHttpHeaderRangeSpec::start | |
Public Attributes | |
| std::optional< qint64 > | start |
| std::optional< qint64 > | end |
Friends | |
| Q_NETWORK_EXPORT QDebug | operator<< (QDebug debug, const QHttpHeaderRangeSpec &range) |
| constexpr bool | comparesEqual (const QHttpHeaderRangeSpec &lhs, const QHttpHeaderRangeSpec &rhs) noexcept |
| size_t | qHash (QHttpHeaderRangeSpec range, size_t seed=0) noexcept |
QHttpHeaderRangeSpec represents a single byte range as used in the HTTP {Range} and {Content-Range} headers, which RFC 9110 calls a {range-spec}.
A range spec has an optional start and an optional end, both expressed as byte offsets. A missing start or end is represented as {std::nullopt}.
Use \l isValid() to check whether a range spec is well-formed before passing it to \l QHttpHeaders::setRangeValues().
Definition at line 27 of file qhttpheaders.h.
|
inlineconstexprnoexcept |
\variable std::optional<qint64> QHttpHeaderRangeSpec::start
Contains the start byte offset of the range, or {std::nullopt} if no start was set. A range without a start but with an end (e.g., {bytes=-500}) represents the last N bytes of the resource.
\variable std::optional<qint64> QHttpHeaderRangeSpec::end
Contains the end byte offset of the range, or {std::nullopt} if no end was set. A range with a start but without an end (e.g., {bytes=500-}) requests all bytes from the given offset to the end of the resource.
Returns true if the range spec is well-formed, false otherwise.
A range spec is considered invalid if: \list
{std::nullopt}. Definition at line 32 of file qhttpheaders.h.
|
friend |
Definition at line 50 of file qhttpheaders.h.
|
friend |
|
friend |
Definition at line 57 of file qhttpheaders.h.
| std::optional<qint64> QHttpHeaderRangeSpec::end |
Definition at line 30 of file qhttpheaders.h.
| std::optional<qint64> QHttpHeaderRangeSpec::start |
Definition at line 29 of file qhttpheaders.h.