MythTV  master
Public Member Functions | Public Attributes | List of all members
BufferedSocketDeviceRequest Class Reference

#include <httprequest.h>

Inheritance diagram for BufferedSocketDeviceRequest:
Inheritance graph
Collaboration diagram for BufferedSocketDeviceRequest:
Collaboration graph

Public Member Functions

 BufferedSocketDeviceRequest (QTcpSocket *pSocket)
 ~BufferedSocketDeviceRequest () override=default
QString ReadLine (std::chrono::milliseconds msecs) override
qint64 ReadBlock (char *pData, qint64 nMaxLen, std::chrono::milliseconds msecs=0ms) override
qint64 WriteBlock (const char *pData, qint64 nLen) override
QString GetHostAddress () override
quint16 GetHostPort () override
QString GetPeerAddress () override
int getSocketHandle () override
- Public Member Functions inherited from HTTPRequest
 HTTPRequest ()
virtual ~HTTPRequest ()=default
bool ParseRequest ()
void FormatErrorResponse (bool bServerError, const QString &sFaultString, const QString &sDetails)
void FormatActionResponse (Serializer *ser)
void FormatActionResponse (const NameValues &pArgs)
void FormatFileResponse (const QString &sFileName)
void FormatRawResponse (const QString &sXML)
qint64 SendResponse (void)
qint64 SendResponseFile (const QString &sFileName)
void SetResponseHeader (const QString &sKey, const QString &sValue, bool replace=false)
void SetCookie (const QString &sKey, const QString &sValue, const QDateTime &expiryDate, bool secure)
QString GetRequestHeader (const QString &sKey, const QString &sDefault)
bool GetKeepAlive () const
SerializerGetSerializer ()
QByteArray GetResponsePage (void)
QString GetRequestProtocol () const
QString GetRequestType () const
QString GetLastHeader (const QString &sType) const
void SetKeepAliveTimeout (std::chrono::seconds nTimeout)
virtual QString GetHostName ()

Public Attributes

QTcpSocket * m_pSocket {nullptr}
- Public Attributes inherited from HTTPRequest
HttpRequestType m_eType {RequestTypeUnknown}
HttpContentType m_eContentType {ContentType_Unknown}
QString m_sRawRequest
QString m_sOriginalUrl
QString m_sRequestUrl
QString m_sBaseUrl
QString m_sResourceUrl
QString m_sMethod
QStringMap m_mapParams
QStringMultiMap m_mapHeaders
QStringMap m_mapCookies
QString m_sPayload
QString m_sProtocol
int m_nMajor {0}
int m_nMinor {0}
bool m_bProtected {false}
bool m_bEncrypted {false}
bool m_bSOAPRequest {false}
QString m_sNameSpace
HttpResponseType m_eResponseType {ResponseTypeUnknown}
QString m_sResponseTypeText
long m_nResponseStatus {200}
QStringMap m_mapRespHeaders
QString m_sFileName
QBuffer m_response
IPostProcessm_pPostProcess {nullptr}
QString m_sPrivateToken
MythUserSession m_userSession

Additional Inherited Members

- Static Public Member Functions inherited from HTTPRequest
static QString GetResponseProtocol ()
static QString GetMimeType (const QString &sFileExtension)
static QStringList GetSupportedMimeTypes ()
static QString TestMimeType (const QString &sFileName)
static long GetParameters (QString sParams, QStringMap &mapParams)
static QString Encode (const QString &sIn)
static QString Decode (const QString &sIn)
static QString GetETagHash (const QByteArray &data)
static bool IsUrlProtected (const QString &sBaseUrl)
- Protected Member Functions inherited from HTTPRequest
HttpRequestType SetRequestType (const QString &sType)
void SetRequestProtocol (const QString &sLine)
HttpContentType SetContentType (const QString &sType)
void ProcessRequestLine (const QString &sLine)
bool ProcessSOAPPayload (const QString &sSOAPAction)
void ExtractMethodFromURL ()
QString GetResponseStatus (void) const
QString GetResponseType (void) const
QString GetResponseHeaders (void)
bool ParseRange (QString sRange, long long llSize, long long *pllStart, long long *pllEnd)
bool ParseKeepAlive (void)
void ParseCookies (void)
QString BuildResponseHeader (long long nSize)
qint64 SendData (QIODevice *pDevice, qint64 llStart, qint64 llBytes)
qint64 SendFile (QFile &file, qint64 llStart, qint64 llBytes)
bool IsProtected () const
bool IsEncrypted () const
bool Authenticated ()
QString GetAuthenticationHeader (bool isStale=false)
QString CalculateDigestNonce (const QString &timeStamp) const
bool BasicAuthentication ()
bool DigestAuthentication ()
void AddCORSHeaders (const QString &sOrigin)
- Protected Attributes inherited from HTTPRequest
QRegularExpression m_procReqLineExp {"\\s+"}
QRegularExpression m_parseRangeExp {"(\\d|\\-)"}
- Static Protected Attributes inherited from HTTPRequest
static const char * s_szServerHeaders = "Accept-Ranges: bytes\r\n"

Detailed Description

Definition at line 277 of file httprequest.h.

Constructor & Destructor Documentation

◆ BufferedSocketDeviceRequest()

BufferedSocketDeviceRequest::BufferedSocketDeviceRequest ( QTcpSocket *  pSocket)

Definition at line 285 of file httprequest.h.

◆ ~BufferedSocketDeviceRequest()

BufferedSocketDeviceRequest::~BufferedSocketDeviceRequest ( )

Member Function Documentation

◆ ReadLine()

QString BufferedSocketDeviceRequest::ReadLine ( std::chrono::milliseconds  msecs)

Implements HTTPRequest.

Definition at line 2388 of file httprequest.cpp.

◆ ReadBlock()

qint64 BufferedSocketDeviceRequest::ReadBlock ( char *  pData,
qint64  nMaxLen,
std::chrono::milliseconds  msecs = 0ms 

Implements HTTPRequest.

Definition at line 2420 of file httprequest.cpp.

◆ WriteBlock()

qint64 BufferedSocketDeviceRequest::WriteBlock ( const char *  pData,
qint64  nLen 

Implements HTTPRequest.

Definition at line 2455 of file httprequest.cpp.

◆ GetHostAddress()

QString BufferedSocketDeviceRequest::GetHostAddress ( )

Implements HTTPRequest.

Definition at line 2472 of file httprequest.cpp.

◆ GetHostPort()

quint16 BufferedSocketDeviceRequest::GetHostPort ( )

Implements HTTPRequest.

Definition at line 2481 of file httprequest.cpp.

◆ GetPeerAddress()

QString BufferedSocketDeviceRequest::GetPeerAddress ( )

Implements HTTPRequest.

Definition at line 2491 of file httprequest.cpp.

◆ getSocketHandle()

int BufferedSocketDeviceRequest::getSocketHandle ( )

Implements HTTPRequest.

Definition at line 295 of file httprequest.h.

Member Data Documentation

◆ m_pSocket

QTcpSocket* BufferedSocketDeviceRequest::m_pSocket {nullptr}

The documentation for this class was generated from the following files: