QGIS/python/server/auto_generated/qgsrequesthandler.sip.in

176 lines
4.1 KiB
Plaintext
Raw Normal View History

2017-05-16 11:56:45 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsrequesthandler.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
typedef QList< QPair<QRgb, int> > QgsColorBox; //Color / number of pixels
typedef QMultiMap< int, QgsColorBox > QgsColorBoxMap; // sum of pixels / color box
class QgsRequestHandler
2014-10-09 15:05:19 +02:00
{
2017-05-16 11:56:45 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
This class is an interface hiding the details of reading input and writing
output from/to a wms request mechanism.
2017-05-16 11:56:45 +02:00
%End
2014-10-09 15:05:19 +02:00
%TypeHeaderCode
#include "qgsrequesthandler.h"
%End
public:
2017-05-16 11:56:45 +02:00
explicit QgsRequestHandler( QgsServerRequest &request, QgsServerResponse &response );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor
2017-05-16 11:56:45 +02:00
2017-12-15 10:36:55 -04:00
Note that QgsServerRequest and QgsServerResponse MUST live in the same scope
2017-05-16 11:56:45 +02:00
%End
void setServiceException( const QgsServerException &ex );
2017-05-16 11:56:45 +02:00
%Docstring
2017-12-19 11:43:52 -04:00
Allow plugins to return a :py:class:`QgsMapServiceException`
2017-05-16 11:56:45 +02:00
%End
void sendResponse();
%Docstring
2017-12-15 10:36:55 -04:00
Send out HTTP headers and flush output buffer
2017-05-16 11:56:45 +02:00
2017-12-15 10:36:55 -04:00
This method is intended only for streaming
partial content.
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
void setResponseHeader( const QString &name, const QString &value );
2017-05-16 11:56:45 +02:00
%Docstring
Sets an HTTP response header
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
void removeResponseHeader( const QString &name );
2017-05-16 11:56:45 +02:00
%Docstring
Remove an HTTP response header
%End
2017-01-05 17:40:57 +01:00
QString responseHeader( const QString &name ) const;
2017-05-16 11:56:45 +02:00
%Docstring
Retrieve response header value
%End
2017-01-05 17:40:57 +01:00
QMap<QString, QString> responseHeaders() const;
2017-05-16 11:56:45 +02:00
%Docstring
Returns the response headers
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
void setRequestHeader( const QString &name, const QString &value );
2017-05-16 11:56:45 +02:00
%Docstring
Sets an HTTP request header
2017-05-16 11:56:45 +02:00
%End
void removeRequestHeader( const QString &name );
2017-05-16 11:56:45 +02:00
%Docstring
Remove an HTTP request header
%End
QString requestHeader( const QString &name ) const;
2017-05-16 11:56:45 +02:00
%Docstring
Retrieve request header value
%End
QMap<QString, QString> requestHeaders() const;
2017-05-16 11:56:45 +02:00
%Docstring
Returns the the Request headers
2017-05-16 11:56:45 +02:00
%End
void clear();
%Docstring
Clears the response body and headers
%End
2016-10-01 11:23:26 +02:00
void appendBody( const QByteArray &body );
2017-05-16 11:56:45 +02:00
%Docstring
Sets the info format string such as "text/xml"
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
2017-05-16 11:56:45 +02:00
bool exceptionRaised() const;
%Docstring
Pointer to last raised exception
%End
2016-10-01 11:23:26 +02:00
2017-05-16 11:56:45 +02:00
void clearBody();
%Docstring
Clear response buffer
%End
2017-05-16 11:56:45 +02:00
QByteArray body() const;
%Docstring
Returns the response body data
2017-05-16 11:56:45 +02:00
%End
2017-05-16 11:56:45 +02:00
QByteArray data() const;
%Docstring
Returns the request POST data (can be null)
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
2017-05-16 11:56:45 +02:00
QString url() const;
%Docstring
Returns the request url
2017-05-16 11:56:45 +02:00
%End
2017-05-16 11:56:45 +02:00
void setStatusCode( int code );
%Docstring
Sets response http status code
2017-05-16 11:56:45 +02:00
%End
2017-07-19 09:19:37 +02:00
int statusCode() const;
2017-05-16 11:56:45 +02:00
%Docstring
Returns the response http status code
2017-05-16 11:56:45 +02:00
%End
2017-01-05 17:40:57 +01:00
QMap<QString, QString> parameterMap() const;
2017-05-16 11:56:45 +02:00
%Docstring
Returns the parsed parameters as a key-value pair, to modify
2017-12-15 10:36:55 -04:00
a parameter setParameter( const QString &key, const QString &value)
and removeParameter(const QString &key) must be used
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
void setParameter( const QString &key, const QString &value );
2017-05-16 11:56:45 +02:00
%Docstring
Sets a request parameter
2017-05-16 11:56:45 +02:00
%End
QString parameter( const QString &key ) const;
%Docstring
Returns a request parameter
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
2017-01-05 17:40:57 +01:00
void removeParameter( const QString &key );
2017-05-16 11:56:45 +02:00
%Docstring
Remove a request parameter
%End
2016-10-01 11:23:26 +02:00
2014-10-09 15:05:19 +02:00
QString format() const;
2017-05-16 11:56:45 +02:00
%Docstring
Returns the requested format string
2017-05-16 11:56:45 +02:00
%End
2016-10-01 11:23:26 +02:00
2017-01-05 17:40:57 +01:00
bool headersSent() const;
2017-05-16 11:56:45 +02:00
%Docstring
Returns true if the HTTP headers were already sent to the client
2017-05-16 11:56:45 +02:00
%End
2014-10-09 15:05:19 +02:00
};
2017-05-16 11:56:45 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/server/qgsrequesthandler.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/