22 #ifndef QGSREQUESTHANDLER_H 23 #define QGSREQUESTHANDLER_H 26 #include "qgsconfig.h" 30 #include <QStringList> 33 #ifdef HAVE_SERVER_PYTHON_PLUGINS 125 #ifdef HAVE_SERVER_PYTHON_PLUGINS 141 #ifdef HAVE_SERVER_PYTHON_PLUGINS QString format() const
Return the requested format string.
virtual void setGetCapabilitiesResponse(const QDomDocument &doc)=0
virtual QByteArray body()
Return the response body.
virtual void setServiceException(QgsMapServiceException ex)=0
Allow plugins to return a QgsMapServiceException.
virtual bool responseReady() const =0
Check whether there is any header set or the body is not empty.
virtual int removeParameter(const QString &key)=0
Remove a request parameter.
virtual void setGetCoverageResponse(QByteArray *ba)=0
virtual void sendHeaders()=0
virtual void setXmlResponse(const QDomDocument &doc)=0
bool headersSent()
Return true if the HTTP headers were already sent to the client.
virtual void clearBody()=0
Clears the response body.
virtual void endGetFeatureResponse(QByteArray *ba)=0
virtual bool exceptionRaised() const =0
Pointer to last raised exception.
QString infoFormat() const
Return the mime type for the response.
virtual void setHeader(const QString &name, const QString &value)=0
Set an HTTP header.
virtual ~QgsRequestHandler()
virtual void setGetMapResponse(const QString &service, QImage *img, int imageQuality)=0
Sends the map image back to the client.
QMap< QString, QString > mParameterMap
virtual void setGetFeatureResponse(QByteArray *ba)=0
QMap< QString, QString > mHeaders
Response headers.
virtual void parseInput()=0
Parses the input and creates a request neutral Parameter/Value map.
virtual void setGetFeatureInfoResponse(const QDomDocument &infoDoc, const QString &infoFormat)=0
virtual void clearHeaders()=0
Delete all HTTP headers.
This class is an interface hiding the details of reading input and writing output from/to a wms reque...
QgsMapServiceException * mException
virtual void setParameter(const QString &key, const QString &value)=0
Set a request parameter.
QMap< QString, QString > parameterMap()
Return a copy of the parsed parameters as a key-value pair, to modify a parameter setParameter( const...
virtual void appendBody(const QByteArray &body)=0
Append the bytestream to response body.
QString mFormat
This is set by the parseInput methods of the subclasses (parameter FORMAT, e.g.
virtual void setInfoFormat(const QString &format)=0
Set the info format string such as "text/xml".
virtual QPair< QByteArray, QByteArray > getResponse()=0
virtual QString parameter(const QString &key) const =0
Return a request parameter.
virtual int removeHeader(const QString &name)=0
Remove an HTTP header.
virtual void sendBody()=0
virtual void setGetPrintResponse(QByteArray *b)=0
virtual void sendResponse()=0
Send out HTTP headers and flush output buffer.
Exception class for WMS service exceptions.
virtual void setDefaultHeaders()
virtual bool startGetFeatureResponse(QByteArray *ba, const QString &infoFormat)=0