20 #include "qgsconfig.h" 26 #include <fcgi_stdio.h> 37 return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ );
43 int main(
int argc,
char *argv[] )
54 const char *display = getenv(
"DISPLAY" );
55 bool withDisplay =
true;
59 qputenv(
"QT_QPA_PLATFORM",
"offscreen" );
63 QgsApplication app( argc, argv, withDisplay, QString(), QStringLiteral(
"server" ) );
65 #ifdef HAVE_SERVER_PYTHON_PLUGINS 79 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.
bool hasError() const
Returns true if an error occurred during initialization.
The QgsServer class provides OGC web services.
Class defining fcgi request.
static void exitQgis()
deletes provider registry and map layer registry
QgsServerRequest::Method method() const
void handleRequest(QgsServerRequest &request, QgsServerResponse &response, const QgsProject *project=nullptr)
Handles the request.