|
MythTV
0.25-pre
|
#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) |
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 103 of file httprequest.h.
Definition at line 134 of file httprequest.cpp.
| virtual HTTPRequest::~HTTPRequest | ( | ) | [inline, virtual] |
Definition at line 183 of file httprequest.h.
| RequestType HTTPRequest::SetRequestType | ( | const QString & | sType | ) | [protected] |
Definition at line 152 of file httprequest.cpp.
Referenced by ProcessRequestLine().
| void HTTPRequest::SetRequestProtocol | ( | const QString & | sLine | ) | [protected] |
Definition at line 694 of file httprequest.cpp.
Referenced by ProcessRequestLine().
| ContentType HTTPRequest::SetContentType | ( | const QString & | sType | ) | [protected] |
Definition at line 707 of file httprequest.cpp.
Referenced by ParseRequest().
| void HTTPRequest::SetServerHeaders | ( | void | ) | [protected] |
| void HTTPRequest::ProcessRequestLine | ( | const QString & | sLine | ) | [protected] |
Definition at line 1098 of file httprequest.cpp.
Referenced by ParseRequest().
| bool HTTPRequest::ProcessSOAPPayload | ( | const QString & | sSOAPAction | ) | [protected] |
Definition at line 1294 of file httprequest.cpp.
Referenced by ParseRequest().
| void HTTPRequest::ExtractMethodFromURL | ( | ) | [protected] |
Definition at line 1267 of file httprequest.cpp.
Referenced by ParseRequest().
| QString HTTPRequest::GetResponseStatus | ( | void | ) | [protected] |
Definition at line 725 of file httprequest.cpp.
Referenced by BuildHeader(), and SendResponse().
| QString HTTPRequest::GetResponseType | ( | void | ) | [protected] |
Definition at line 762 of file httprequest.cpp.
Referenced by BuildHeader().
| QString HTTPRequest::GetAdditionalHeaders | ( | void | ) | [protected] |
Definition at line 904 of file httprequest.cpp.
Referenced by BuildHeader().
| bool HTTPRequest::ParseRange | ( | QString | sRange, |
| long long | llSize, | ||
| long long * | pllStart, | ||
| long long * | pllEnd | ||
| ) | [protected] |
Definition at line 1165 of file httprequest.cpp.
Referenced by SendResponseFile().
| QString HTTPRequest::BuildHeader | ( | long long | nSize | ) | [protected] |
Definition at line 176 of file httprequest.cpp.
Referenced by SendResponse(), and SendResponseFile().
| qint64 HTTPRequest::SendData | ( | QIODevice * | pDevice, |
| qint64 | llStart, | ||
| qint64 | llBytes | ||
| ) | [protected] |
Definition at line 446 of file httprequest.cpp.
Referenced by SendFile(), and SendResponse().
| qint64 HTTPRequest::SendFile | ( | QFile & | file, |
| qint64 | llStart, | ||
| qint64 | llBytes | ||
| ) | [protected] |
Definition at line 487 of file httprequest.cpp.
Referenced by SendResponseFile().
| bool HTTPRequest::IsUrlProtected | ( | const QString & | sBaseUrl | ) | [protected] |
Definition at line 1455 of file httprequest.cpp.
Referenced by ParseRequest().
| bool HTTPRequest::Authenticated | ( | ) | [protected] |
Definition at line 1474 of file httprequest.cpp.
Referenced by ParseRequest().
Definition at line 953 of file httprequest.cpp.
Referenced by HttpWorker::run().
| void HTTPRequest::FormatErrorResponse | ( | bool | bServerError, |
| const QString & | sFaultString, | ||
| const QString & | sDetails | ||
| ) |
Definition at line 541 of file httprequest.cpp.
Referenced by UPnp::FormatErrorResponse().
Definition at line 579 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 594 of file httprequest.cpp.
| void HTTPRequest::FormatFileResponse | ( | const QString & | sFileName | ) |
Definition at line 669 of file httprequest.cpp.
Referenced by ServiceHost::FormatResponse(), HttpConfig::ProcessRequest(), MythFEXML::ProcessRequest(), HtmlServerExtension::ProcessRequest(), UPnpMSRR::ProcessRequest(), UPnpCMGR::ProcessRequest(), and UPnpCDS::ProcessRequest().
| void HTTPRequest::FormatRawResponse | ( | const QString & | sXML | ) |
Definition at line 654 of file httprequest.cpp.
Referenced by InternetContent::GetInternetContent(), and InternetContent::GetInternetSearch().
| long HTTPRequest::SendResponse | ( | void | ) |
Definition at line 218 of file httprequest.cpp.
Referenced by UPnp::FormatRedirectResponse(), and HttpWorker::run().
| long HTTPRequest::SendResponseFile | ( | QString | sFileName | ) |
Definition at line 291 of file httprequest.cpp.
Referenced by SendResponse().
| QString HTTPRequest::GetHeaderValue | ( | const QString & | sKey, |
| QString | sDefault | ||
| ) |
Definition at line 889 of file httprequest.cpp.
Referenced by BuildHeader(), UPnpCDS::DetermineClient(), SSDPExtension::GetDeviceDesc(), GetKeepAlive(), GetSerializer(), Eventing::HandleSubscribe(), Eventing::HandleUnsubscribe(), ParseRequest(), and SendResponseFile().
Definition at line 928 of file httprequest.cpp.
Referenced by BuildHeader(), and HttpWorker::run().
Definition at line 1400 of file httprequest.cpp.
Referenced by ServiceHost::FormatResponse().
| QString HTTPRequest::GetMimeType | ( | const QString & | sFileExtension | ) | [static] |
Definition at line 778 of file httprequest.cpp.
Referenced by UPnpCDSMusic::AddItem(), UPnpCDSVideo::AddItem(), and TestMimeType().
| QString HTTPRequest::TestMimeType | ( | const QString & | sFileName | ) | [static] |
Definition at line 797 of file httprequest.cpp.
Referenced by UPnpCDSTv::AddItem(), ImportConfigurationGroup::probeCard(), DemoConfigurationGroup::probeCard(), and SendResponseFile().
| long HTTPRequest::GetParameters | ( | QString | sParams, |
| QStringMap & | mapParams | ||
| ) | [static] |
Definition at line 848 of file httprequest.cpp.
Referenced by ParseRequest(), UPnpCDSExtension::ProcessItem(), and ProcessRequestLine().
| QString HTTPRequest::Encode | ( | const QString & | sIn | ) | [static] |
Definition at line 1431 of file httprequest.cpp.
Referenced by FormatActionResponse(), and UPnp::FormatErrorResponse().
| virtual qlonglong HTTPRequest::BytesAvailable | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRequest().
| virtual qulonglong 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] |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRequest().
| virtual qlonglong HTTPRequest::ReadBlock | ( | char * | pData, |
| qulonglong | nMaxLen, | ||
| int | msecs = 0 |
||
| ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRequest().
| virtual qlonglong HTTPRequest::WriteBlock | ( | const char * | pData, |
| qulonglong | nLen | ||
| ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
| virtual qlonglong HTTPRequest::WriteBlockDirect | ( | const char * | pData, |
| qulonglong | nLen | ||
| ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
Referenced by SendData(), SendResponse(), and SendResponseFile().
| virtual QString HTTPRequest::GetHostAddress | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
Referenced by SSDPExtension::GetDeviceDesc().
| virtual QString HTTPRequest::GetPeerAddress | ( | ) | [pure virtual] |
Implemented in BufferedSocketDeviceRequest.
Referenced by 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] |
Implemented in BufferedSocketDeviceRequest.
Referenced by ParseRange(), ParseRequest(), SendFile(), SendResponse(), and SendResponseFile().
| 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] |
Definition at line 107 of file httprequest.h.
Referenced by GetAdditionalHeaders().
QRegExp HTTPRequest::m_procReqLineExp [protected] |
Definition at line 109 of file httprequest.h.
Referenced by ProcessRequestLine().
QRegExp HTTPRequest::m_parseRangeExp [protected] |
Definition at line 110 of file httprequest.h.
Referenced by ParseRange().
Definition at line 114 of file httprequest.h.
Referenced by ServiceHost::ProcessRequest(), Eventing::ProcessRequest(), ProcessRequestLine(), SendResponse(), SendResponseFile(), and SetRequestType().
Definition at line 115 of file httprequest.h.
Referenced by ParseRequest(), and SetContentType().
| QString HTTPRequest::m_sRawRequest |
Definition at line 117 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 119 of file httprequest.h.
Referenced by HttpServer::DelegateRequest(), ExtractMethodFromURL(), UPnpCDS::HandleBrowse(), UPnpCDS::HandleGetSearchCapabilities(), UPnpCDS::HandleGetSortCapabilities(), UPnpCDS::HandleGetSystemUpdateID(), UPnpCDS::HandleSearch(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpConfig::ProcessRequest(), MythFrontendStatus::ProcessRequest(), InternetContent::ProcessRequest(), MythFEXML::ProcessRequest(), HtmlServerExtension::ProcessRequest(), UPnpMSRR::ProcessRequest(), HttpStatus::ProcessRequest(), UPnpCMGR::ProcessRequest(), ServiceHost::ProcessRequest(), SSDPExtension::ProcessRequest(), UPnpCDS::ProcessRequest(), Eventing::ProcessRequest(), and ProcessRequestLine().
| QString HTTPRequest::m_sResourceUrl |
Definition at line 120 of file httprequest.h.
Referenced by HtmlServerExtension::ProcessRequest(), HttpStatus::ProcessRequest(), and ProcessRequestLine().
| QString HTTPRequest::m_sMethod |
Definition at line 121 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(), HttpStatus::ProcessRequest(), UPnpCMGR::ProcessRequest(), ServiceHost::ProcessRequest(), SSDPExtension::ProcessRequest(), UPnpCDS::ProcessRequest(), Eventing::ProcessRequest(), and ProcessSOAPPayload().
Definition at line 123 of file httprequest.h.
Referenced by InternetContent::GetInternetContent(), InternetContent::GetInternetSearch(), MythFEXML::GetScreenShot(), UPnpCDS::HandleBrowse(), UPnpCMGR::HandleGetCurrentConnectionInfo(), UPnpCDS::HandleSearch(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpConfig::ProcessRequest(), ServiceHost::ProcessRequest(), ProcessRequestLine(), and ProcessSOAPPayload().
Definition at line 124 of file httprequest.h.
Referenced by Authenticated(), UPnp::FormatRedirectResponse(), GetHeaderValue(), ParseRequest(), UPNPSubscription::ProcessRequest(), HttpWorker::run(), and SendResponseFile().
| QString HTTPRequest::m_sPayload |
Definition at line 126 of file httprequest.h.
Referenced by ParseRequest(), UPNPSubscription::ProcessRequest(), and ProcessSOAPPayload().
| QString HTTPRequest::m_sProtocol |
Definition at line 128 of file httprequest.h.
Referenced by SetRequestProtocol().
Definition at line 129 of file httprequest.h.
Referenced by BuildHeader(), GetKeepAlive(), and SetRequestProtocol().
Definition at line 130 of file httprequest.h.
Referenced by BuildHeader(), GetKeepAlive(), and SetRequestProtocol().
Definition at line 132 of file httprequest.h.
Referenced by GetAdditionalHeaders(), and ParseRequest().
Definition at line 134 of file httprequest.h.
Referenced by FormatActionResponse(), UPnp::FormatErrorResponse(), FormatErrorResponse(), GetSerializer(), and ProcessSOAPPayload().
| QString HTTPRequest::m_sNameSpace |
Definition at line 135 of file httprequest.h.
Referenced by FormatActionResponse(), GetSerializer(), and ProcessSOAPPayload().
Definition at line 139 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(), SendResponse(), and SendResponseFile().
| QString HTTPRequest::m_sResponseTypeText |
Definition at line 140 of file httprequest.h.
Referenced by BuildHeader(), FormatActionResponse(), HttpConfig::ProcessRequest(), and SendResponseFile().
Definition at line 142 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(), and SendResponseFile().
Definition at line 143 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(), and SendResponseFile().
| QString HTTPRequest::m_sFileName |
Definition at line 145 of file httprequest.h.
Referenced by FormatFileResponse(), SSDPExtension::GetFile(), InternetContent::GetInternetContent(), MythFEXML::GetScreenShot(), and SendResponse().
| QBuffer HTTPRequest::m_response |
Definition at line 147 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(), and SendResponse().
Definition at line 149 of file httprequest.h.
Referenced by Eventing::HandleSubscribe(), and HttpWorker::run().
1.7.6.1