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

#include <httprequest.h>

Inheritance diagram for BufferedSocketDeviceRequest:
Inheritance graph
[legend]
Collaboration diagram for BufferedSocketDeviceRequest:
Collaboration graph
[legend]

Public Member Functions

 BufferedSocketDeviceRequest (QTcpSocket *pSocket)
 
virtual ~BufferedSocketDeviceRequest ()=default
 
QString ReadLine (int msecs) override
 
qint64 ReadBlock (char *pData, qint64 nMaxLen, int msecs=0) 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, QString sDefault)
 
bool GetKeepAlive ()
 
SerializerGetSerializer ()
 
QByteArray GetResponsePage (void)
 
QString GetRequestProtocol () const
 
QString GetResponseProtocol () const
 
QString GetRequestType () const
 
void SetKeepAliveTimeout (int nTimeout)
 
bool IsUrlProtected (const QString &sBaseUrl)
 
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
 
QStringMap 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 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)
 
- 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)
 
QString GetResponseType (void)
 
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)
 
bool BasicAuthentication ()
 
bool DigestAuthentication ()
 
void AddCORSHeaders (const QString &sOrigin)
 
- Protected Attributes inherited from HTTPRequest
QRegExp m_procReqLineExp {"[ \r\n][ \r\n]*"}
 
QRegExp m_parseRangeExp {"(\\d|\\-)"}
 
- Static Protected Attributes inherited from HTTPRequest
static const char * s_szServerHeaders = "Accept-Ranges: bytes\r\n"
 

Detailed Description

Definition at line 273 of file httprequest.h.

Constructor & Destructor Documentation

◆ BufferedSocketDeviceRequest()

BufferedSocketDeviceRequest::BufferedSocketDeviceRequest ( QTcpSocket *  pSocket)
inlineexplicit

Definition at line 281 of file httprequest.h.

◆ ~BufferedSocketDeviceRequest()

virtual BufferedSocketDeviceRequest::~BufferedSocketDeviceRequest ( )
virtualdefault

Member Function Documentation

◆ ReadLine()

QString BufferedSocketDeviceRequest::ReadLine ( int  msecs)
overridevirtual

Implements HTTPRequest.

Definition at line 2343 of file httprequest.cpp.

◆ ReadBlock()

qint64 BufferedSocketDeviceRequest::ReadBlock ( char *  pData,
qint64  nMaxLen,
int  msecs = 0 
)
overridevirtual

Implements HTTPRequest.

Definition at line 2375 of file httprequest.cpp.

◆ WriteBlock()

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

Implements HTTPRequest.

Definition at line 2410 of file httprequest.cpp.

◆ GetHostAddress()

QString BufferedSocketDeviceRequest::GetHostAddress ( )
overridevirtual

Implements HTTPRequest.

Definition at line 2427 of file httprequest.cpp.

◆ GetHostPort()

quint16 BufferedSocketDeviceRequest::GetHostPort ( )
overridevirtual

Implements HTTPRequest.

Definition at line 2436 of file httprequest.cpp.

◆ GetPeerAddress()

QString BufferedSocketDeviceRequest::GetPeerAddress ( void  )
overridevirtual

Implements HTTPRequest.

Definition at line 2446 of file httprequest.cpp.

◆ getSocketHandle()

int BufferedSocketDeviceRequest::getSocketHandle ( )
inlineoverridevirtual

Implements HTTPRequest.

Definition at line 291 of file httprequest.h.

Member Data Documentation

◆ m_pSocket

QTcpSocket* BufferedSocketDeviceRequest::m_pSocket {nullptr}

Definition at line 277 of file httprequest.h.

Referenced by getSocketHandle().


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