#include <httprequest.h>

Definition at line 87 of file httprequest.h.
Public Member Functions | |
| HTTPRequest () | |
| virtual | ~HTTPRequest () |
| void | Reset () |
| bool | ParseRequest () |
| void | FormatErrorResponse (bool bServerError, const QString &sFaultString, const QString &sDetails) |
| void | FormatActionResponse (NameValueList *pArgs) |
| void | FormatFileResponse (const QString &sFileName) |
| long | SendResponse (void) |
| long | SendResponseFile (QString sFileName) |
| QString | GetHeaderValue (const QString &sKey, QString sDefault) |
| bool | GetKeepAlive () |
| virtual Q_LONG | BytesAvailable ()=0 |
| virtual Q_ULONG | WaitForMore (int msecs, bool *timeout=NULL)=0 |
| virtual bool | CanReadLine ()=0 |
| virtual QString | ReadLine (int msecs=0)=0 |
| virtual Q_LONG | ReadBlock (char *pData, Q_ULONG nMaxLen, int msecs=0)=0 |
| virtual Q_LONG | WriteBlock (char *pData, Q_ULONG nLen)=0 |
| virtual Q_LONG | WriteBlockDirect (char *pData, Q_ULONG nLen)=0 |
| virtual QString | GetHostAddress ()=0 |
| virtual QString | GetPeerAddress ()=0 |
| virtual void | Flush ()=0 |
| virtual bool | IsValid ()=0 |
| virtual int | getSocketHandle ()=0 |
| virtual void | SetBlocking (bool bBlock)=0 |
| virtual bool | IsBlocking ()=0 |
Static Public Member Functions | |
| static QString & | Encode (QString &sStr) |
| static QString | GetMimeType (const QString &sFileExtension) |
| static long | GetParameters (QString sParams, QStringMap &mapParams) |
Public Attributes | |
| RequestType | m_eType |
| ContentType | m_eContentType |
| QString | m_sRawRequest |
| QString | m_sBaseUrl |
| QString | m_sMethod |
| QStringMap | m_mapParams |
| QStringMap | m_mapHeaders |
| QString | m_sPayload |
| QString | m_sProtocol |
| int | m_nMajor |
| int | m_nMinor |
| bool | m_bSOAPRequest |
| QString | m_sNameSpace |
| ResponseType | m_eResponseType |
| QString | m_sResponseTypeText |
| long | m_nResponseStatus |
| QStringMap | m_mapRespHeaders |
| QString | m_sFileName |
| QTextStream | m_response |
| IPostProcess * | m_pPostProcess |
Protected Member Functions | |
| RequestType | SetRequestType (const QString &sType) |
| void | SetRequestProtocol (const QString &sLine) |
| ContentType | SetContentType (const QString &sType) |
| void | SetServerHeaders (void) |
| void | ProcessRequestLine (const QString &sLine) |
| bool | ProcessSOAPPayload (const QString &sSOAPAction) |
| void | ExtractMethodFromURL () |
| QString | GetResponseStatus (void) |
| QString | GetResponseType (void) |
| QString | GetAdditionalHeaders (void) |
| bool | ParseRange (QString sRange, long long llSize, long long *pllStart, long long *pllEnd) |
| QString | BuildHeader (long long nSize) |
Protected Attributes | |
| QByteArray | m_aBuffer |
Static Protected Attributes | |
| static const char * | m_szServerHeaders = "Accept-Ranges: bytes\r\n" |
| HTTPRequest::HTTPRequest | ( | ) |
Definition at line 91 of file httprequest.cpp.
| virtual HTTPRequest::~HTTPRequest | ( | ) | [inline, virtual] |
Definition at line 160 of file httprequest.h.
| RequestType HTTPRequest::SetRequestType | ( | const QString & | sType | ) | [protected] |
| void HTTPRequest::SetRequestProtocol | ( | const QString & | sLine | ) | [protected] |
| ContentType HTTPRequest::SetContentType | ( | const QString & | sType | ) | [protected] |
| void HTTPRequest::SetServerHeaders | ( | void | ) | [protected] |
| void HTTPRequest::ProcessRequestLine | ( | const QString & | sLine | ) | [protected] |
| bool HTTPRequest::ProcessSOAPPayload | ( | const QString & | sSOAPAction | ) | [protected] |
| void HTTPRequest::ExtractMethodFromURL | ( | ) | [protected] |
| QString HTTPRequest::GetResponseStatus | ( | void | ) | [protected] |
| QString HTTPRequest::GetResponseType | ( | void | ) | [protected] |
| QString HTTPRequest::GetAdditionalHeaders | ( | void | ) | [protected] |
| bool HTTPRequest::ParseRange | ( | QString | sRange, | |
| long long | llSize, | |||
| long long * | pllStart, | |||
| long long * | pllEnd | |||
| ) | [protected] |
| QString HTTPRequest::BuildHeader | ( | long long | nSize | ) | [protected] |
Definition at line 165 of file httprequest.cpp.
Referenced by SendResponse(), and SendResponseFile().
| void HTTPRequest::Reset | ( | void | ) |
Definition at line 108 of file httprequest.cpp.
| bool HTTPRequest::ParseRequest | ( | ) |
| void HTTPRequest::FormatErrorResponse | ( | bool | bServerError, | |
| const QString & | sFaultString, | |||
| const QString & | sDetails | |||
| ) |
| void HTTPRequest::FormatActionResponse | ( | NameValueList * | pArgs | ) |
Definition at line 491 of file httprequest.cpp.
Referenced by MythXML::GetConnectionInfo(), SSDPExtension::GetDeviceList(), MythXML::GetExpiring(), MythXML::GetHosts(), MythXML::GetKeys(), MythXML::GetProgramDetails(), MythXML::GetProgramGuide(), MythXML::GetRecorded(), MythXML::GetSetting(), UPnpCDS::HandleBrowse(), UPnpCMGR::HandleGetCurrentConnectionIDs(), UPnpCMGR::HandleGetCurrentConnectionInfo(), UPnpCMGR::HandleGetProtocolInfo(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpMSRR::HandleIsAuthorized(), UPnpMSRR::HandleIsValidated(), UPnpMSRR::HandleRegisterDevice(), UPnpCDS::HandleSearch(), and MythXML::PutSetting().
| void HTTPRequest::FormatFileResponse | ( | const QString & | sFileName | ) |
Definition at line 546 of file httprequest.cpp.
Referenced by UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), UPnpCDS::ProcessRequest(), and MythXML::ProcessRequest().
| long HTTPRequest::SendResponse | ( | void | ) |
| long HTTPRequest::SendResponseFile | ( | QString | sFileName | ) |
| QString & HTTPRequest::Encode | ( | QString & | sStr | ) | [static] |
Definition at line 1138 of file httprequest.cpp.
Referenced by CDSObject::CDSObject(), FormatActionResponse(), UPnp::FormatErrorResponse(), MythXML::GetHosts(), MythXML::GetKeys(), MythXML::GetSetting(), SOAPClient::SendSOAPRequest(), and CDSObject::SetPropValue().
| QString HTTPRequest::GetHeaderValue | ( | const QString & | sKey, | |
| QString | sDefault | |||
| ) |
Definition at line 702 of file httprequest.cpp.
Referenced by BuildHeader(), SSDPExtension::GetDeviceDesc(), GetKeepAlive(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), ParseRequest(), and SendResponseFile().
| bool HTTPRequest::GetKeepAlive | ( | ) |
Definition at line 736 of file httprequest.cpp.
Referenced by BuildHeader(), and HttpWorkerThread::ProcessWork().
| QString HTTPRequest::GetMimeType | ( | const QString & | sFileExtension | ) | [static] |
Definition at line 648 of file httprequest.cpp.
Referenced by UPnpCDSVideo::AddItem(), UPnpCDSTv::AddItem(), UPnpCDSMusic::AddItem(), and SendResponseFile().
| long HTTPRequest::GetParameters | ( | QString | sParams, | |
| QStringMap & | mapParams | |||
| ) | [static] |
Definition at line 667 of file httprequest.cpp.
Referenced by ParseRequest(), UPnpCDSExtension::ProcessItem(), and ProcessRequestLine().
| virtual Q_LONG HTTPRequest::BytesAvailable | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual Q_ULONG HTTPRequest::WaitForMore | ( | int | msecs, | |
| bool * | timeout = NULL | |||
| ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual bool HTTPRequest::CanReadLine | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual QString HTTPRequest::ReadLine | ( | int | msecs = 0 |
) | [pure virtual] |
| virtual Q_LONG HTTPRequest::ReadBlock | ( | char * | pData, | |
| Q_ULONG | nMaxLen, | |||
| int | msecs = 0 | |||
| ) | [pure virtual] |
| virtual Q_LONG HTTPRequest::WriteBlock | ( | char * | pData, | |
| Q_ULONG | nLen | |||
| ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual Q_LONG HTTPRequest::WriteBlockDirect | ( | char * | pData, | |
| Q_ULONG | nLen | |||
| ) | [pure virtual] |
| virtual QString HTTPRequest::GetHostAddress | ( | ) | [pure virtual] |
| virtual QString HTTPRequest::GetPeerAddress | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
Referenced by MythXML::GetConnectionInfo(), and SendResponse().
| virtual void HTTPRequest::Flush | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual bool HTTPRequest::IsValid | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual int HTTPRequest::getSocketHandle | ( | ) | [pure virtual] |
| virtual void HTTPRequest::SetBlocking | ( | bool | bBlock | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual bool HTTPRequest::IsBlocking | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
const char * HTTPRequest::m_szServerHeaders = "Accept-Ranges: bytes\r\n" [static, protected] |
QByteArray HTTPRequest::m_aBuffer [protected] |
Definition at line 99 of file httprequest.h.
Referenced by Eventing::ProcessRequest(), ProcessRequestLine(), Reset(), SendResponse(), SendResponseFile(), and SetRequestType().
Definition at line 100 of file httprequest.h.
Referenced by ParseRequest(), Reset(), and SetContentType().
| QString HTTPRequest::m_sRawRequest |
Definition at line 102 of file httprequest.h.
Referenced by MythXML::GetAlbumArt(), MythXML::GetVideo(), MythXML::GetVideoArt(), MythXML::ProcessRequest(), ProcessRequestLine(), and Reset().
| QString HTTPRequest::m_sBaseUrl |
Definition at line 104 of file httprequest.h.
Referenced by ExtractMethodFromURL(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpCDS::HandleSearch(), UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), UPnpCDS::ProcessRequest(), SSDPExtension::ProcessRequest(), MythXML::ProcessRequest(), HttpStatus::ProcessRequest(), Eventing::ProcessRequest(), ProcessRequestLine(), and Reset().
| QString HTTPRequest::m_sMethod |
Definition at line 105 of file httprequest.h.
Referenced by ExtractMethodFromURL(), FormatActionResponse(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpCDS::HandleSearch(), UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), UPnpCDS::ProcessRequest(), SSDPExtension::ProcessRequest(), MythXML::ProcessRequest(), HttpStatus::ProcessRequest(), Eventing::ProcessRequest(), ProcessSOAPPayload(), and Reset().
Definition at line 107 of file httprequest.h.
Referenced by MythXML::GetAlbumArt(), MythXML::GetChannelIcon(), MythXML::GetConnectionInfo(), MythXML::GetKeys(), MythXML::GetMusic(), MythXML::GetPreviewImage(), MythXML::GetProgramDetails(), MythXML::GetProgramGuide(), MythXML::GetRecorded(), MythXML::GetRecording(), MythXML::GetSetting(), MythXML::GetVideo(), MythXML::GetVideoArt(), UPnpCDS::HandleBrowse(), UPnpCMGR::HandleGetCurrentConnectionInfo(), UPnpCDS::HandleSearch(), ParseRequest(), ProcessRequestLine(), ProcessSOAPPayload(), MythXML::PutSetting(), and Reset().
Definition at line 108 of file httprequest.h.
Referenced by GetHeaderValue(), ParseRequest(), and Reset().
| QString HTTPRequest::m_sPayload |
Definition at line 110 of file httprequest.h.
Referenced by ParseRequest(), ProcessSOAPPayload(), and Reset().
| QString HTTPRequest::m_sProtocol |
Definition at line 113 of file httprequest.h.
Referenced by BuildHeader(), GetKeepAlive(), Reset(), and SetRequestProtocol().
Definition at line 114 of file httprequest.h.
Referenced by BuildHeader(), GetKeepAlive(), Reset(), and SetRequestProtocol().
Definition at line 117 of file httprequest.h.
Referenced by FormatActionResponse(), UPnp::FormatErrorResponse(), FormatErrorResponse(), ProcessSOAPPayload(), and Reset().
| QString HTTPRequest::m_sNameSpace |
Definition at line 118 of file httprequest.h.
Referenced by FormatActionResponse(), ProcessSOAPPayload(), and Reset().
Definition at line 122 of file httprequest.h.
Referenced by BuildHeader(), HttpServer::DelegateRequest(), FormatActionResponse(), FormatErrorResponse(), FormatFileResponse(), MythXML::GetAlbumArt(), MythXML::GetChannelIcon(), SSDPExtension::GetDeviceDesc(), SSDPExtension::GetDeviceList(), SSDPExtension::GetFile(), MythXML::GetMusic(), MythXML::GetPreviewImage(), MythXML::GetRecording(), GetResponseType(), HttpStatus::GetStatusHTML(), HttpStatus::GetStatusXML(), MythXML::GetVideo(), MythXML::GetVideoArt(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), HttpStatus::ProcessRequest(), Reset(), SendResponse(), and SendResponseFile().
| QString HTTPRequest::m_sResponseTypeText |
Definition at line 125 of file httprequest.h.
Referenced by HttpServer::DelegateRequest(), FormatActionResponse(), FormatErrorResponse(), FormatFileResponse(), MythXML::GetAlbumArt(), MythXML::GetChannelIcon(), SSDPExtension::GetDeviceList(), SSDPExtension::GetFile(), MythXML::GetMusic(), MythXML::GetPreviewImage(), MythXML::GetRecording(), GetResponseStatus(), MythXML::GetVideo(), MythXML::GetVideoArt(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), HttpStatus::ProcessRequest(), ProcessRequestLine(), HttpWorkerThread::ProcessWork(), Reset(), and SendResponseFile().
Definition at line 126 of file httprequest.h.
Referenced by FormatActionResponse(), FormatErrorResponse(), FormatFileResponse(), GetAdditionalHeaders(), MythXML::GetConnectionInfo(), SSDPExtension::GetFile(), MythXML::GetHosts(), MythXML::GetKeys(), MythXML::GetMusic(), MythXML::GetProgramDetails(), MythXML::GetProgramGuide(), MythXML::GetRecording(), MythXML::GetSetting(), HttpStatus::GetStatusHTML(), HttpStatus::GetStatusXML(), MythXML::GetVideo(), Eventing::HandleSubscribe(), MythXML::PutSetting(), Reset(), and SendResponseFile().
| QString HTTPRequest::m_sFileName |
Definition at line 128 of file httprequest.h.
Referenced by FormatFileResponse(), MythXML::GetAlbumArt(), MythXML::GetChannelIcon(), SSDPExtension::GetFile(), MythXML::GetMusic(), MythXML::GetPreviewImage(), MythXML::GetRecording(), MythXML::GetVideo(), MythXML::GetVideoArt(), Reset(), and SendResponse().
| QTextStream HTTPRequest::m_response |
Definition at line 130 of file httprequest.h.
Referenced by FormatActionResponse(), FormatErrorResponse(), SSDPExtension::GetDeviceDesc(), HttpStatus::GetStatusHTML(), HttpStatus::GetStatusXML(), and HTTPRequest().
Definition at line 132 of file httprequest.h.
Referenced by Eventing::HandleSubscribe(), HttpWorkerThread::ProcessWork(), and Reset().
1.5.5