QGIS API Documentation  2.12.0-Lyon
Public Member Functions | Static Public Member Functions | List of all members
QgsServer Class Reference

The QgsServer class provides OGC web services. More...

#include <qgsserver.h>

Public Member Functions

 QgsServer ()
 
 ~QgsServer ()
 
QPair< QByteArray, QByteArrayhandleRequest (const QString queryString=QString())
 Handles the request. More...
 

Static Public Member Functions

static bool init (int &argc, char **argv)
 Server initialisation: intialise QGIS ang QT core application. More...
 
static bool init ()
 The following is mainly for python bindings, that do not pass argc/argv. More...
 

Detailed Description

The QgsServer class provides OGC web services.

Definition at line 47 of file qgsserver.h.

Constructor & Destructor Documentation

QgsServer::QgsServer ( )
QgsServer::~QgsServer ( )

Member Function Documentation

QPair<QByteArray, QByteArray> QgsServer::handleRequest ( const QString  queryString = QString())

Handles the request.

The output is normally printed trough FCGI printf by the request handler or, in case the server has been invoked from python bindings, a flag is set that captures all the output headers and body, instead of printing it returns the output as a QPair of QByteArray. The query string is normally read from environment but can be also passed in args and in this case overrides the environment variable

Parameters
queryStringoptional QString containing the query string
Returns
the response headers and body QPair of QByteArray if called from python bindings, empty otherwise
static bool QgsServer::init ( int &  argc,
char **  argv 
)
static

Server initialisation: intialise QGIS ang QT core application.

This method is automatically called by handleRequest if it wasn't explicitly called before

Note
Not available in Python bindings
static bool QgsServer::init ( )
static

The following is mainly for python bindings, that do not pass argc/argv.


The documentation for this class was generated from the following file: