|
MythTV
0.27pre
|
#include <httprequest.h>


Public Member Functions | |
| HTTPRequest () | |
| virtual | ~HTTPRequest () |
| 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) |
| long | SendResponse (void) |
| long | SendResponseFile (QString sFileName) |
| QString | GetHeaderValue (const QString &sKey, QString sDefault) |
| bool | GetKeepAlive () |
| Serializer * | GetSerializer () |
| virtual qlonglong | BytesAvailable ()=0 |
| virtual qulonglong | WaitForMore (int msecs, bool *timeout=NULL)=0 |
| virtual bool | CanReadLine ()=0 |
| virtual QString | ReadLine (int msecs=0)=0 |
| virtual qlonglong | ReadBlock (char *pData, qulonglong nMaxLen, int msecs=0)=0 |
| virtual qlonglong | WriteBlock (const char *pData, qulonglong nLen)=0 |
| virtual qlonglong | WriteBlockDirect (const char *pData, qulonglong 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 | GetMimeType (const QString &sFileExtension) |
| static QString | TestMimeType (const QString &sFileName) |
| static long | GetParameters (QString sParams, QStringMap &mapParams) |
| static QString | Encode (const QString &sIn) |
| static QString | GetETagHash (const QByteArray &data) |
Public Attributes | |
| RequestType | m_eType |
| ContentType | m_eContentType |
| QString | m_sRawRequest |
| QString | m_sBaseUrl |
| QString | m_sResourceUrl |
| QString | m_sMethod |
| QStringMap | m_mapParams |
| QStringMap | m_mapHeaders |
| QString | m_sPayload |
| QString | m_sProtocol |
| int | m_nMajor |
| int | m_nMinor |
| bool | m_bProtected |
| bool | m_bSOAPRequest |
| QString | m_sNameSpace |
| ResponseType | m_eResponseType |
| QString | m_sResponseTypeText |
| long | m_nResponseStatus |
| QStringMap | m_mapRespHeaders |
| QString | m_sFileName |
| QBuffer | 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) |
| qint64 | SendData (QIODevice *pDevice, qint64 llStart, qint64 llBytes) |
| qint64 | SendFile (QFile &file, qint64 llStart, qint64 llBytes) |
| bool | IsUrlProtected (const QString &sBaseUrl) |
| bool | Authenticated () |
Protected Attributes | |
| QRegExp | m_procReqLineExp |
| QRegExp | m_parseRangeExp |
Static Protected Attributes | |
| static const char * | m_szServerHeaders = "Accept-Ranges: bytes\r\n" |
Definition at line 92 of file httprequest.h.
| HTTPRequest::HTTPRequest | ( | ) |
Definition at line 130 of file httprequest.cpp.
|
inlinevirtual |
Definition at line 172 of file httprequest.h.
|
protected |
Definition at line 148 of file httprequest.cpp.
Referenced by ProcessRequestLine().
|
protected |
Definition at line 771 of file httprequest.cpp.
Referenced by ProcessRequestLine().
|
protected |
Definition at line 784 of file httprequest.cpp.
Referenced by ParseRequest().
|
protected |
Definition at line 1176 of file httprequest.cpp.
Referenced by ParseRequest().
|
protected |
Definition at line 1372 of file httprequest.cpp.
Referenced by ParseRequest().
|
protected |
Definition at line 1345 of file httprequest.cpp.
Referenced by ParseRequest().
|
protected |
Definition at line 802 of file httprequest.cpp.
Referenced by BuildHeader(), and SendResponse().
|
protected |
Definition at line 840 of file httprequest.cpp.
Referenced by BuildHeader().
|
protected |
Definition at line 982 of file httprequest.cpp.
Referenced by BuildHeader().
|
protected |
Definition at line 1243 of file httprequest.cpp.
Referenced by SendResponseFile().
Definition at line 172 of file httprequest.cpp.
Referenced by SendResponse(), and SendResponseFile().
|
protected |
Definition at line 513 of file httprequest.cpp.
Referenced by SendFile(), and SendResponse().
|
protected |
Definition at line 564 of file httprequest.cpp.
Referenced by SendResponseFile().
|
protected |
Definition at line 1546 of file httprequest.cpp.
Referenced by ParseRequest().
|
protected |
Definition at line 1565 of file httprequest.cpp.
Referenced by ParseRequest().
| bool HTTPRequest::ParseRequest | ( | ) |
Definition at line 1031 of file httprequest.cpp.
Referenced by HttpWorker::run().
| void HTTPRequest::FormatErrorResponse | ( | bool | bServerError, |
| const QString & | sFaultString, | ||
| const QString & | sDetails | ||
| ) |
Definition at line 618 of file httprequest.cpp.
Referenced by UPnp::FormatErrorResponse().
| void HTTPRequest::FormatActionResponse | ( | Serializer * | ser | ) |
Definition at line 656 of file httprequest.cpp.
Referenced by ServiceHost::FormatResponse(), SSDPExtension::GetDeviceList(), InternetContent::GetInternetSources(), UPnpCDS::HandleBrowse(), UPnpCMGR::HandleGetCurrentConnectionIDs(), UPnpCMGR::HandleGetCurrentConnectionInfo(), UPnpCMGR::HandleGetProtocolInfo(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpMSRR::HandleIsAuthorized(), UPnpMSRR::HandleIsValidated(), UPnpMSRR::HandleRegisterDevice(), and UPnpCDS::HandleSearch().
| void HTTPRequest::FormatActionResponse | ( | const NameValues & | pArgs | ) |
Definition at line 671 of file httprequest.cpp.
| void HTTPRequest::FormatFileResponse | ( | const QString & | sFileName | ) |
Definition at line 746 of file httprequest.cpp.
Referenced by ServiceHost::FormatResponse(), HttpConfig::ProcessRequest(), HtmlServerExtension::ProcessRequest(), MythFEXML::ProcessRequest(), UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), and UPnpCDS::ProcessRequest().
| void HTTPRequest::FormatRawResponse | ( | const QString & | sXML | ) |
Definition at line 731 of file httprequest.cpp.
Referenced by InternetContent::GetInternetContent(), and InternetContent::GetInternetSearch().
Definition at line 214 of file httprequest.cpp.
Referenced by UPnp::FormatRedirectResponse(), and HttpWorker::run().
| long HTTPRequest::SendResponseFile | ( | QString | sFileName | ) |
Definition at line 344 of file httprequest.cpp.
Referenced by SendResponse().
| QString HTTPRequest::GetHeaderValue | ( | const QString & | sKey, |
| QString | sDefault | ||
| ) |
Definition at line 967 of file httprequest.cpp.
Referenced by BuildHeader(), UPnpCDS::DetermineClient(), SSDPExtension::GetDeviceDesc(), GetKeepAlive(), GetSerializer(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), ParseRequest(), SendResponse(), and SendResponseFile().
| bool HTTPRequest::GetKeepAlive | ( | ) |
Definition at line 1006 of file httprequest.cpp.
Referenced by BuildHeader(), and HttpWorker::run().
| Serializer * HTTPRequest::GetSerializer | ( | ) |
Definition at line 1478 of file httprequest.cpp.
Referenced by ServiceHost::FormatResponse().
|
static |
Definition at line 856 of file httprequest.cpp.
Referenced by UPnpCDSMusic::AddItem(), UPnpCDSVideo::AddItem(), and TestMimeType().
|
static |
Definition at line 875 of file httprequest.cpp.
Referenced by UPnpCDSTv::AddItem(), ImportConfigurationGroup::probeCard(), DemoConfigurationGroup::probeCard(), and SendResponseFile().
|
static |
Definition at line 926 of file httprequest.cpp.
Referenced by ParseRequest(), UPnpCDSExtension::ProcessItem(), and ProcessRequestLine().
|
static |
Definition at line 1511 of file httprequest.cpp.
Referenced by FormatActionResponse(), and UPnp::FormatErrorResponse().
|
static |
Definition at line 1535 of file httprequest.cpp.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRequest().
Implemented in BufferedSocketDeviceRequest.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRequest().
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRequest().
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by SendData(), SendResponse(), and SendResponseFile().
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by SSDPExtension::GetDeviceDesc().
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by SendResponse().
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRange(), ParseRequest(), SendFile(), SendResponse(), and SendResponseFile().
Implemented in BufferedSocketDeviceRequest.
|
pure virtual |
Implemented in BufferedSocketDeviceRequest.
|
staticprotected |
Definition at line 96 of file httprequest.h.
Referenced by GetAdditionalHeaders().
|
protected |
Definition at line 98 of file httprequest.h.
Referenced by ProcessRequestLine().
|
protected |
Definition at line 99 of file httprequest.h.
Referenced by ParseRange().
| RequestType HTTPRequest::m_eType |
Definition at line 103 of file httprequest.h.
Referenced by ServiceHost::ProcessRequest(), Eventing::ProcessRequest(), ProcessRequestLine(), SendResponse(), SendResponseFile(), and SetRequestType().
| ContentType HTTPRequest::m_eContentType |
Definition at line 104 of file httprequest.h.
Referenced by ParseRequest(), and SetContentType().
| QString HTTPRequest::m_sRawRequest |
Definition at line 106 of file httprequest.h.
Referenced by UPnp::FormatRedirectResponse(), UPNPSubscription::ProcessRequest(), InternetContent::ProcessRequest(), MythFEXML::ProcessRequest(), ServiceHost::ProcessRequest(), and ProcessRequestLine().
| QString HTTPRequest::m_sBaseUrl |
Definition at line 108 of file httprequest.h.
Referenced by HttpServer::DelegateRequest(), ExtractMethodFromURL(), Wsdl::GetWSDL(), UPnpCDS::HandleBrowse(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpCDS::HandleSearch(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), InternetContent::ProcessRequest(), HtmlServerExtension::ProcessRequest(), MythFEXML::ProcessRequest(), UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), ServiceHost::ProcessRequest(), HttpStatus::ProcessRequest(), SSDPExtension::ProcessRequest(), UPnpCDS::ProcessRequest(), Eventing::ProcessRequest(), and ProcessRequestLine().
| QString HTTPRequest::m_sResourceUrl |
Definition at line 109 of file httprequest.h.
Referenced by HtmlServerExtension::ProcessRequest(), HttpStatus::ProcessRequest(), ProcessRequestLine(), Xsd::RenderArrayXSD(), Xsd::RenderMapXSD(), and Xsd::RenderXSD().
| QString HTTPRequest::m_sMethod |
Definition at line 110 of file httprequest.h.
Referenced by ExtractMethodFromURL(), FormatActionResponse(), GetSerializer(), UPnpCDS::HandleBrowse(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpCDS::HandleSearch(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), InternetContent::ProcessRequest(), MythFEXML::ProcessRequest(), UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), ServiceHost::ProcessRequest(), HttpStatus::ProcessRequest(), SSDPExtension::ProcessRequest(), UPnpCDS::ProcessRequest(), Eventing::ProcessRequest(), and ProcessSOAPPayload().
| QStringMap HTTPRequest::m_mapParams |
Definition at line 112 of file httprequest.h.
Referenced by InternetContent::GetInternetContent(), InternetContent::GetInternetSearch(), MythFEXML::GetScreenShot(), Wsdl::GetWSDL(), Xsd::GetXSD(), UPnpCDS::HandleBrowse(), UPnpCMGR::HandleGetCurrentConnectionInfo(), UPnpCDS::HandleSearch(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpConfig::ProcessRequest(), HtmlServerExtension::ProcessRequest(), ServiceHost::ProcessRequest(), ProcessRequestLine(), ProcessSOAPPayload(), and Xsd::RenderMapXSD().
| QStringMap HTTPRequest::m_mapHeaders |
Definition at line 113 of file httprequest.h.
Referenced by Authenticated(), UPnp::FormatRedirectResponse(), GetHeaderValue(), Wsdl::GetWSDL(), ParseRequest(), UPNPSubscription::ProcessRequest(), Xsd::RenderArrayXSD(), Xsd::RenderMapXSD(), Xsd::RenderXSD(), HttpWorker::run(), SendResponse(), and SendResponseFile().
| QString HTTPRequest::m_sPayload |
Definition at line 115 of file httprequest.h.
Referenced by ParseRequest(), UPNPSubscription::ProcessRequest(), and ProcessSOAPPayload().
| QString HTTPRequest::m_sProtocol |
Definition at line 117 of file httprequest.h.
Referenced by SetRequestProtocol().
| int HTTPRequest::m_nMajor |
Definition at line 118 of file httprequest.h.
Referenced by BuildHeader(), GetKeepAlive(), and SetRequestProtocol().
| int HTTPRequest::m_nMinor |
Definition at line 119 of file httprequest.h.
Referenced by BuildHeader(), GetKeepAlive(), and SetRequestProtocol().
| bool HTTPRequest::m_bProtected |
Definition at line 121 of file httprequest.h.
Referenced by GetAdditionalHeaders(), and ParseRequest().
| bool HTTPRequest::m_bSOAPRequest |
Definition at line 123 of file httprequest.h.
Referenced by FormatActionResponse(), UPnp::FormatErrorResponse(), FormatErrorResponse(), GetSerializer(), and ProcessSOAPPayload().
| QString HTTPRequest::m_sNameSpace |
Definition at line 124 of file httprequest.h.
Referenced by FormatActionResponse(), GetSerializer(), and ProcessSOAPPayload().
| ResponseType HTTPRequest::m_eResponseType |
Definition at line 128 of file httprequest.h.
Referenced by BuildHeader(), HttpServer::DelegateRequest(), FormatActionResponse(), FormatErrorResponse(), FormatFileResponse(), FormatRawResponse(), UPnp::FormatRedirectResponse(), MythFEXML::GetActionListTest(), SSDPExtension::GetDeviceDesc(), SSDPExtension::GetDeviceList(), SSDPExtension::GetFile(), InternetContent::GetInternetContent(), InternetContent::GetInternetSearch(), InternetContent::GetInternetSources(), MythFEXML::GetRemote(), GetResponseType(), MythFEXML::GetScreenShot(), HttpStatus::GetStatusHTML(), HttpStatus::GetStatusXML(), Wsdl::GetWSDL(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), HtmlServerExtension::ProcessRequest(), HttpStatus::ProcessRequest(), Xsd::RenderArrayXSD(), Xsd::RenderMapXSD(), Xsd::RenderXSD(), SendResponse(), and SendResponseFile().
| QString HTTPRequest::m_sResponseTypeText |
Definition at line 129 of file httprequest.h.
Referenced by BuildHeader(), FormatActionResponse(), HttpConfig::ProcessRequest(), and SendResponseFile().
| long HTTPRequest::m_nResponseStatus |
Definition at line 131 of file httprequest.h.
Referenced by HttpServer::DelegateRequest(), FormatActionResponse(), FormatErrorResponse(), FormatFileResponse(), FormatRawResponse(), UPnp::FormatRedirectResponse(), SSDPExtension::GetDeviceList(), SSDPExtension::GetFile(), InternetContent::GetInternetContent(), GetResponseStatus(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpStatus::ProcessRequest(), ProcessRequestLine(), HttpWorker::run(), SendResponse(), and SendResponseFile().
| QStringMap HTTPRequest::m_mapRespHeaders |
Definition at line 132 of file httprequest.h.
Referenced by FormatActionResponse(), FormatErrorResponse(), FormatFileResponse(), UPnp::FormatRedirectResponse(), MythFEXML::GetActionListTest(), GetAdditionalHeaders(), SSDPExtension::GetFile(), MythFEXML::GetRemote(), HttpStatus::GetStatusHTML(), HttpStatus::GetStatusXML(), Eventing::HandleSubscribe(), ParseRequest(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), SendResponse(), and SendResponseFile().
| QString HTTPRequest::m_sFileName |
Definition at line 134 of file httprequest.h.
Referenced by FormatFileResponse(), SSDPExtension::GetFile(), InternetContent::GetInternetContent(), MythFEXML::GetScreenShot(), and SendResponse().
| QBuffer HTTPRequest::m_response |
Definition at line 136 of file httprequest.h.
Referenced by FormatActionResponse(), FormatErrorResponse(), FormatRawResponse(), MythFEXML::GetActionListTest(), SSDPExtension::GetDeviceDesc(), MythFEXML::GetRemote(), GetSerializer(), HttpStatus::GetStatusHTML(), HttpStatus::GetStatusXML(), Wsdl::GetWSDL(), HTTPRequest(), ParseRequest(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), HtmlServerExtension::ProcessRequest(), Xsd::RenderArrayXSD(), Xsd::RenderMapXSD(), Xsd::RenderXSD(), and SendResponse().
| IPostProcess* HTTPRequest::m_pPostProcess |
Definition at line 138 of file httprequest.h.
Referenced by Eventing::HandleSubscribe(), and HttpWorker::run().
1.8.1.2