QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
This class is an interface hiding the details of reading input and writing output from/to a wms request mechanism. More...
#include <qgsrequesthandler.h>
Public Member Functions | |
QgsRequestHandler () | |
virtual | ~QgsRequestHandler () |
virtual void | appendBody (const QByteArray &body)=0 |
Append the bytestream to response body. More... | |
virtual QByteArray | body () |
Return the response body. More... | |
virtual void | clearBody ()=0 |
Clears the response body. More... | |
virtual void | clearHeaders ()=0 |
Delete all HTTP headers. More... | |
virtual void | endGetFeatureResponse (QByteArray *ba)=0 |
virtual bool | exceptionRaised () const =0 |
Pointer to last raised exception. More... | |
QString | format () const |
Return the requested format string. More... | |
virtual QPair< QByteArray, QByteArray > | getResponse ()=0 |
bool | headersSent () |
Return true if the HTTP headers were already sent to the client. More... | |
QString | infoFormat () const |
Return the mime type for the response. More... | |
virtual QString | parameter (const QString &key) const =0 |
Return a request parameter. More... | |
QMap< QString, QString > | parameterMap () |
Return a copy of the parsed parameters as a key-value pair, to modify a parameter setParameter( const QString &key, const QString &value) and removeParameter(const QString &key) must be used. More... | |
virtual void | parseInput ()=0 |
Parses the input and creates a request neutral Parameter/Value map. More... | |
virtual int | removeHeader (const QString &name)=0 |
Remove an HTTP header. More... | |
virtual int | removeParameter (const QString &key)=0 |
Remove a request parameter. More... | |
virtual bool | responseReady () const =0 |
Check whether there is any header set or the body is not empty. More... | |
virtual void | sendResponse ()=0 |
Send out HTTP headers and flush output buffer. More... | |
virtual void | setDefaultHeaders () |
virtual void | setGetCapabilitiesResponse (const QDomDocument &doc)=0 |
virtual void | setGetCoverageResponse (QByteArray *ba)=0 |
virtual void | setGetFeatureInfoResponse (const QDomDocument &infoDoc, const QString &infoFormat)=0 |
virtual void | setGetFeatureResponse (QByteArray *ba)=0 |
virtual void | setGetMapResponse (const QString &service, QImage *img, int imageQuality)=0 |
Sends the map image back to the client. More... | |
virtual void | setGetPrintResponse (QByteArray *b)=0 |
virtual void | setHeader (const QString &name, const QString &value)=0 |
Set an HTTP header. More... | |
virtual void | setInfoFormat (const QString &format)=0 |
Set the info format string such as "text/xml". More... | |
virtual void | setParameter (const QString &key, const QString &value)=0 |
Set a request parameter. More... | |
virtual void | setServiceException (QgsMapServiceException ex)=0 |
Allow plugins to return a QgsMapServiceException. More... | |
virtual void | setXmlResponse (const QDomDocument &doc)=0 |
virtual void | setXmlResponse (const QDomDocument &doc, const QString &mimeType)=0 |
virtual bool | startGetFeatureResponse (QByteArray *ba, const QString &infoFormat)=0 |
Protected Member Functions | |
virtual void | sendBody ()=0 |
virtual void | sendHeaders ()=0 |
Protected Attributes | |
QByteArray | mBody |
QgsMapServiceException * | mException |
QString | mFormat |
This is set by the parseInput methods of the subclasses (parameter FORMAT, e.g. More... | |
QString | mFormatString |
QMap< QString, QString > | mHeaders |
Response headers. More... | |
bool | mHeadersSent |
QString | mInfoFormat |
QMap< QString, QString > | mParameterMap |
QString | mService |
This class is an interface hiding the details of reading input and writing output from/to a wms request mechanism.
Examples of possible mechanisms are cgi Get, cgi Post, SOAP or the usage as a standalone command line executable
Definition at line 48 of file qgsrequesthandler.h.
|
inline |
Definition at line 53 of file qgsrequesthandler.h.
|
inlinevirtual |
Definition at line 57 of file qgsrequesthandler.h.
|
pure virtual |
Append the bytestream to response body.
|
inlinevirtual |
Return the response body.
Definition at line 99 of file qgsrequesthandler.h.
|
pure virtual |
Clears the response body.
|
pure virtual |
Delete all HTTP headers.
|
pure virtual |
|
pure virtual |
Pointer to last raised exception.
|
inline |
Return the requested format string.
Definition at line 120 of file qgsrequesthandler.h.
|
pure virtual |
|
inline |
Return true if the HTTP headers were already sent to the client.
Definition at line 124 of file qgsrequesthandler.h.
|
inline |
Return the mime type for the response.
Definition at line 122 of file qgsrequesthandler.h.
Return a request parameter.
Return a copy of the parsed parameters as a key-value pair, to modify a parameter setParameter( const QString &key, const QString &value) and removeParameter(const QString &key) must be used.
Definition at line 112 of file qgsrequesthandler.h.
|
pure virtual |
Parses the input and creates a request neutral Parameter/Value map.
|
pure virtual |
Remove an HTTP header.
|
pure virtual |
Remove a request parameter.
|
pure virtual |
Check whether there is any header set or the body is not empty.
|
protectedpure virtual |
|
protectedpure virtual |
|
pure virtual |
Send out HTTP headers and flush output buffer.
|
inlinevirtual |
Definition at line 87 of file qgsrequesthandler.h.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Sends the map image back to the client.
|
pure virtual |
|
pure virtual |
Set an HTTP header.
|
pure virtual |
Set the info format string such as "text/xml".
|
pure virtual |
Set a request parameter.
|
pure virtual |
Allow plugins to return a QgsMapServiceException.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
protected |
Definition at line 144 of file qgsrequesthandler.h.
|
protected |
Definition at line 151 of file qgsrequesthandler.h.
|
protected |
This is set by the parseInput methods of the subclasses (parameter FORMAT, e.g.
'FORMAT=PNG')
Definition at line 146 of file qgsrequesthandler.h.
|
protected |
Definition at line 147 of file qgsrequesthandler.h.
Response headers.
They can be empty, in this case headers are automatically generated from the content mFormat
Definition at line 155 of file qgsrequesthandler.h.
|
protected |
Definition at line 148 of file qgsrequesthandler.h.
|
protected |
Definition at line 150 of file qgsrequesthandler.h.
Definition at line 152 of file qgsrequesthandler.h.
|
protected |
Definition at line 149 of file qgsrequesthandler.h.