Skip to content
Permalink
Browse files

Expose response body and infoFormat

  • Loading branch information
elpaso committed Oct 10, 2014
1 parent ca8e0c3 commit e3146057eded0cb9d6573ba6484fd1c6150e2794
Showing with 4 additions and 1 deletion.
  1. +0 −1 src/mapserver/qgshttprequesthandler.h
  2. +4 −0 src/mapserver/qgsrequesthandler.h
@@ -72,7 +72,6 @@ class QgsHttpRequestHandler: public QgsRequestHandler
QString readPostBody() const;

private:
QByteArray mBody; // The response payload
static void medianCut( QVector<QRgb>& colorTable, int nColors, const QImage& inputImage );
static void imageColors( QHash<QRgb, int>& colors, const QImage& image );
static void splitColorBox( QgsColorBox& colorBox, QgsColorBoxMap& colorBoxMap,
@@ -62,6 +62,7 @@ class QgsRequestHandler
virtual void appendBody( const QByteArray &body ) = 0;
/**Clears the response body*/
virtual void clearBody( ) = 0;
virtual QByteArray* body( ) { return &mBody; }
virtual void setInfoFormat( const QString &format ) = 0;
/**Send out HTTP headers and flush output buffer*/
virtual void sendResponse( ) = 0;
@@ -76,12 +77,14 @@ class QgsRequestHandler
virtual QString parameter( const QString &key ) const = 0;
QString format() const { return mFormat; }
bool headersSent() { return mHeadersSent; }
QString infoFormat() const { return mInfoFormat; }

protected:

virtual void sendHeaders( ) = 0;
virtual void sendBody( ) const = 0;
/**This is set by the parseInput methods of the subclasses (parameter FORMAT, e.g. 'FORMAT=PNG')*/
QByteArray mBody; // The response payload
QString mFormat;
QString mFormatString; //format string as it is passed in the request (with base)
bool mHeadersSent;
@@ -92,6 +95,7 @@ class QgsRequestHandler
/** Response headers. They can be empty, in this case headers are
automatically generated from the content mFormat */
QMap<QString, QString> mHeaders;

};

#endif

0 comments on commit e314605

Please sign in to comment.
You can’t perform that action at this time.