19#ifndef QGSFILTERRESPONSEDECORATOR_H
20#define QGSFILTERRESPONSEDECORATOR_H
58 void setHeader(
const QString &key,
const QString &value )
override { mResponse.
setHeader( key, value ); }
62 QString
header(
const QString &key )
const override {
return mResponse.
header( key ); }
64 QMap<QString, QString>
headers()
const override {
return mResponse.
headers(); }
72 void sendError(
int code,
const QString &message )
override { mResponse.
sendError( code, message ); }
74 QIODevice *
io()
override {
return mResponse.
io(); }
78 void flush()
override;
82 QByteArray
data()
const override {
return mResponse.
data(); }
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Class defining decorator for calling filter's hooks.
void clear() override
Reset all headers and content for this response.
int statusCode() const override
Returns the http status code.
void sendError(int code, const QString &message) override
Send error This method delegates error handling at the server level.
QgsFeedback * feedback() const override
Returns the socket feedback if any.
QIODevice * io() override
Returns the underlying QIODevice.
void flush() override
Flushes the current output buffer to the network.
void start()
Call filters requestReady() method.
void finish() override
Finish the response, ending the transaction.
void removeHeader(const QString &key) override
Clear header Undo a previous 'setHeader' call.
void setStatusCode(int code) override
Set the http status code.
QByteArray data() const override
Gets the data written so far.
void truncate() override
Truncate data.
bool headersSent() const override
Returns true if the headers have already been sent.
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...
void ready()
Call filters projectReady() method.
QString header(const QString &key) const override
Returns the header value.
QMap< QString, QString > headers() const override
Returns the header value.
Exception base class for server exceptions.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
virtual void removeHeader(const QString &key)=0
Clear header Undo a previous 'setHeader' call.
virtual int statusCode() const =0
Returns the http status code.
virtual void truncate()=0
Truncate data.
virtual QMap< QString, QString > headers() const =0
Returns the header value.
virtual QByteArray data() const =0
Gets the data written so far.
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...
virtual QgsFeedback * feedback() const
Returns the socket feedback if any.
virtual void clear()=0
Reset all headers and content for this response.
virtual bool headersSent() const =0
Returns true if the headers have already been sent.
virtual void sendError(int code, const QString &message)=0
Send error This method delegates error handling at the server level.
virtual QIODevice * io()=0
Returns the underlying QIODevice.
virtual QString header(const QString &key) const =0
Returns the header value.
virtual void setStatusCode(int code)=0
Set the http status code.
#define SIP_VIRTUALERRORHANDLER(name)
#define SIP_THROW(name,...)
QMultiMap< int, QgsServerFilter * > QgsServerFiltersMap