QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
19 #ifndef QGSFILTERRESPONSEDECORATOR_H
20 #define QGSFILTERRESPONSEDECORATOR_H
53 void setHeader(
const QString &key,
const QString &value )
override { mResponse.
setHeader( key, value ); }
57 QString
header(
const QString &key )
const override {
return mResponse.
header( key ); }
59 QMap<QString, QString>
headers()
const override {
return mResponse.
headers(); }
67 void sendError(
int code,
const QString &message )
override { mResponse.
sendError( code, message ); }
69 QIODevice *
io()
override {
return mResponse.
io(); }
73 void flush()
override;
77 QByteArray
data()
const override {
return mResponse.
data(); }
void clear() override
Reset all headers and content for this response.
void start() SIP_THROW(QgsServerException)
Call filters requestReady() method.
virtual void truncate()=0
Truncate data.
virtual void clear()=0
Reset all headers and content for this response.
void sendError(int code, const QString &message) override
Send error This method delegates error handling at the server level.
void flush() override
Flushes the current output buffer to the network.
void truncate() override
Truncate data.
void finish() override
Finish the response, ending the transaction.
QString header(const QString &key) const override
Returns the header value.
virtual int statusCode() const =0
Returns the http status code.
void removeHeader(const QString &key) override
Clear header Undo a previous 'setHeader' call.
bool headersSent() const override
Returns true if the headers have already been sent.
virtual QString header(const QString &key) const =0
Returns the header value.
virtual void setStatusCode(int code)=0
Set the http status code.
virtual void removeHeader(const QString &key)=0
Clear header Undo a previous 'setHeader' call.
virtual QByteArray data() const =0
Gets the data written so far.
QgsFilterResponseDecorator(QgsServerFiltersMap filters, QgsServerResponse &response)
Constructor for QgsFilterResponseDecorator.
Class defining decorator for calling filter's hooks.
virtual bool headersSent() const =0
Returns true if the headers have already been sent.
int statusCode() const override
Returns the http status code.
void setHeader(const QString &key, const QString &value) override
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
Exception base class for server exceptions.
void setStatusCode(int code) override
Set the http status code.
virtual QIODevice * io()=0
Returns the underlying QIODevice.
QMultiMap< int, QgsServerFilter * > QgsServerFiltersMap
QMap< QString, QString > headers() const override
Returns the header value.
QByteArray data() const override
Gets the data written so far.
QIODevice * io() override
Returns the underlying QIODevice.
virtual QMap< QString, QString > headers() const =0
Returns the header value.
virtual void sendError(int code, const QString &message)=0
Send error This method delegates error handling at the server level.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
virtual void setHeader(const QString &key, const QString &value)=0
Set Header entry Add Header entry to the response Note that it is usually an error to set Header afte...
#define SIP_VIRTUALERRORHANDLER(name)