20 #include "qgsconfig.h" 27 #include <fcgi_stdio.h> 36 return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ );
42 int main(
int argc,
char *argv[] )
53 const char *display = getenv(
"DISPLAY" );
54 bool withDisplay =
true;
58 qputenv(
"QT_QPA_PLATFORM",
"offscreen" );
62 QgsApplication app( argc, argv, withDisplay, QString(), QStringLiteral(
"server" ) );
64 #ifdef HAVE_SERVER_PYTHON_PLUGINS 78 response.sendError( 400,
"Bad request" );
Extends QApplication to provide access to QGIS specific resources such as theme paths, database paths etc.
int main(int argc, char *argv[])
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
Class defining fcgi response.
The QgsServer class provides OGC web services.
bool hasError() const
Returns true if an error occurred during initialization.
QgsServerRequest::Method method() const
Class defining fcgi request.
static void exitQgis()
deletes provider registry and map layer registry
void handleRequest(QgsServerRequest &request, QgsServerResponse &response, const QgsProject *project=nullptr)
Handles the request.