![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
QHttpHeaderRange represents a single byte range as used in the HTTP {Range} and {Content-Range} headers.
More...
#include <qhttpheaders.h>
Public Member Functions | |
| constexpr bool | isValid () const noexcept |
| \variable std::optional<qint64> QHttpHeaderRange::start | |
Public Attributes | |
| std::optional< qint64 > | start |
| std::optional< qint64 > | end |
Friends | |
| Q_NETWORK_EXPORT QDebug | operator<< (QDebug debug, const QHttpHeaderRange &range) |
| constexpr bool | comparesEqual (const QHttpHeaderRange &lhs, const QHttpHeaderRange &rhs) noexcept |
| size_t | qHash (QHttpHeaderRange range, size_t seed=0) noexcept |
QHttpHeaderRange represents a single byte range as used in the HTTP {Range} and {Content-Range} headers.
A range 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 is well-formed before passing it to \l QHttpHeaders::setRangeValues().
Definition at line 26 of file qhttpheaders.h.
|
inlineconstexprnoexcept |
\variable std::optional<qint64> QHttpHeaderRange::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> QHttpHeaderRange::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 is well-formed, false otherwise.
A range is considered invalid if: \list
{std::nullopt}. Definition at line 31 of file qhttpheaders.h.
|
friend |
Definition at line 49 of file qhttpheaders.h.
|
friend |
|
friend |
Definition at line 56 of file qhttpheaders.h.
| std::optional<qint64> QHttpHeaderRange::end |
Definition at line 29 of file qhttpheaders.h.
| std::optional<qint64> QHttpHeaderRange::start |
Definition at line 28 of file qhttpheaders.h.