MythTV  master
mythhttpranges.h
Go to the documentation of this file.
1 #ifndef MYTHHTTPRANGES_H
2 #define MYTHHTTPRANGES_H
3 
4 // MythTV
8 
9 using HTTPRange = std::pair<uint64_t,uint64_t>;
10 using 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
MythHTTPRanges::BuildMultipartHeaders
static void BuildMultipartHeaders(MythHTTPResponse *Response)
Definition: mythhttpranges.cpp:36
HTTPVariant
std::variant< std::monostate, HTTPData, HTTPFile > HTTPVariant
Definition: mythhttptypes.h:41
MythHTTPResponse
Definition: mythhttpresponse.h:16
MythHTTPRanges::HandleRangeWrite
static HTTPMulti HandleRangeWrite(HTTPVariant Data, int64_t Available, int64_t &ToWrite, int64_t &Offset)
Definition: mythhttpranges.cpp:97
mythhttpdata.h
MythHTTPRanges
Definition: mythhttpranges.h:12
HTTPMulti
std::pair< HTTPData, HTTPData > HTTPMulti
Definition: mythhttptypes.h:48
MythHTTPStatus
MythHTTPStatus
Definition: mythhttptypes.h:104
mythhttpresponse.h
mythhttptypes.h
MythHTTPRanges::ParseRanges
static MythHTTPStatus ParseRanges(const QString &Request, int64_t TotalSize, HTTPRanges &Ranges, int64_t &PartialSize)
Parse a range request header.
Definition: mythhttpranges.cpp:157
hardwareprofile.distros.mythtv_data.request.Request
def Request(url=None)
Definition: request.py:62
MythHTTPRanges::GetRangeHeader
static QString GetRangeHeader(HTTPRanges &Ranges, int64_t Size)
Definition: mythhttpranges.cpp:88
HTTPRange
std::pair< uint64_t, uint64_t > HTTPRange
Definition: mythhttpranges.h:9
HTTPRanges
std::vector< HTTPRange > HTTPRanges
Definition: mythhttpranges.h:10
MythHTTPRanges::HandleRangeRequest
static void HandleRangeRequest(MythHTTPResponse *Response, const QString &Request)
Definition: mythhttpranges.cpp:12