MythTV master
mythhttpranges.h
Go to the documentation of this file.
1#ifndef MYTHHTTPRANGES_H
2#define MYTHHTTPRANGES_H
3
4// MythTV
8
9using HTTPRange = std::pair<uint64_t,uint64_t>;
10using HTTPRanges = std::vector<HTTPRange>;
11
13{
14 public:
15 static void HandleRangeRequest (MythHTTPResponse* Response, const QString& Request);
16 static void BuildMultipartHeaders(MythHTTPResponse* Response);
17 static QString GetRangeHeader (HTTPRanges& Ranges, int64_t Size);
18 static QString GetRangeHeader (HTTPRange& Range, int64_t Size);
19 static HTTPMulti HandleRangeWrite (HTTPVariant Data, int64_t Available, int64_t& ToWrite, int64_t& Offset);
20
21 protected:
22 static MythHTTPStatus ParseRanges (const QString& Request, int64_t TotalSize,
23 HTTPRanges& Ranges, int64_t& PartialSize);
24};
25
26#endif
static QString GetRangeHeader(HTTPRanges &Ranges, int64_t Size)
static MythHTTPStatus ParseRanges(const QString &Request, int64_t TotalSize, HTTPRanges &Ranges, int64_t &PartialSize)
Parse a range request header.
static void BuildMultipartHeaders(MythHTTPResponse *Response)
static HTTPMulti HandleRangeWrite(HTTPVariant Data, int64_t Available, int64_t &ToWrite, int64_t &Offset)
static void HandleRangeRequest(MythHTTPResponse *Response, const QString &Request)
std::vector< HTTPRange > HTTPRanges
std::pair< uint64_t, uint64_t > HTTPRange
Definition: mythhttpranges.h:9
MythHTTPStatus
std::variant< std::monostate, HTTPData, HTTPFile > HTTPVariant
Definition: mythhttptypes.h:42
std::pair< HTTPData, HTTPData > HTTPMulti
Definition: mythhttptypes.h:49