QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
20 #include "qgsconfig.h"
27 #include <fcgi_stdio.h>
30 #include <QFontDatabase>
39 return FCGX_Accept( &FCGI_stdin->fcgx_stream, &FCGI_stdout->fcgx_stream, &FCGI_stderr->fcgx_stream, &environ );
45 int main(
int argc,
char *argv[] )
49 if ( argv[1] == QLatin1String(
"--version" ) || argv[1] == QLatin1String(
"-v" ) )
65 const char *display = getenv(
"DISPLAY" );
66 bool withDisplay =
true;
70 qputenv(
"QT_QPA_PLATFORM",
"offscreen" );
71 QgsMessageLog::logMessage(
"DISPLAY not set, running in offscreen mode, all printing capabilities will not be available.",
"Server", Qgis::MessageLevel::Info );
74 const QgsApplication app( argc, argv, withDisplay, QString(), QStringLiteral(
"server" ) );
76 #ifdef HAVE_SERVER_PYTHON_PLUGINS
int main(int argc, char *argv[])
void handleRequest(QgsServerRequest &request, QgsServerResponse &response, const QgsProject *project=nullptr)
Handles the request.
void sendError(int code, const QString &message) override
Send error This method delegates error handling at the server level.
Class defining fcgi request.
Class defining fcgi response.
QgsServerRequest::Method method() const
static void exitQgis()
deletes provider registry and map layer registry
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
bool hasError() const
Returns true if an error occurred during initialization.
Extends QApplication to provide access to QGIS specific resources such as theme paths,...
The QgsServer class provides OGC web services.
static QString allVersions()
Display all versions in the standard output stream.