19#ifndef QGSFCGISERVERRESPONSE_H 
   20#define QGSFCGISERVERRESPONSE_H 
   58    std::atomic_bool mShouldStop;
 
   59    std::shared_ptr<QgsFeedback> mFeedback;
 
   63    std::timed_mutex mMutex;
 
 
   82    void setHeader( 
const QString &key, 
const QString &value ) 
override;
 
   86    QString 
header( 
const QString &key ) 
const override;
 
   88    QMap<QString, QString> 
headers()
 const override { 
return mHeaders; }
 
   96    void sendError( 
int code, 
const QString &message ) 
override;
 
   98    QIODevice *
io() 
override;
 
  102    void flush() 
override;
 
  104    void clear() 
override;
 
  106    QByteArray 
data() 
const override;
 
  113    void setDefaultHeaders();
 
  122    QMap<QString, QString> mHeaders;
 
  124    bool mFinished = 
false;
 
  125    bool mHeadersSent = 
false;
 
  130    std::unique_ptr<QgsSocketMonitoringThread> mSocketMonitoringThread;
 
  134    std::shared_ptr<QgsFeedback> mFeedback;
 
 
QgsFeedback * feedback() const override
Returns socket feedback if any.
 
QMap< QString, QString > headers() const override
Returns the header value.
 
int statusCode() const override
Returns the http status code.
 
Base class for feedback objects to be used for cancellation of something running in a worker thread.
 
Method
HTTP Method (or equivalent) used for the request.
 
Defines the response interface passed to QgsService.
 
virtual void removeHeader(const QString &key)=0
Clear header Undo a previous 'setHeader' call.
 
virtual void truncate()=0
Truncate data.
 
virtual void flush()
Flushes the current output buffer to the network.
 
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 void clear()=0
Reset all headers and content for this response.
 
virtual void finish()
Finish the response, ending the transaction.
 
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.
 
Thread used to monitor the fcgi socket.
 
void run()
main thread function
 
void stop()
Stop the thread.