QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsserver.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsserver.h
3 QGIS Server main class.
4 -------------------
5 begin : June 05, 2015
6 copyright : (C) 2015 by Alessandro Pasotti
7 email : a dot pasotti at itopen dot it
8
9 Based on previous work from:
10
11 begin : July 04, 2006
12 copyright : (C) 2006 by Marco Hugentobler & Ionut Iosifescu Enescu
13 email : marco dot hugentobler at karto dot baug dot ethz dot ch
14
15 ***************************************************************************/
16
17/***************************************************************************
18 * *
19 * This program is free software; you can redistribute it and/or modify *
20 * it under the terms of the GNU General Public License as published by *
21 * the Free Software Foundation; either version 2 of the License, or *
22 * (at your option) any later version. *
23 * *
24 ***************************************************************************/
25
26
27#ifndef QGSSERVER_H
28#define QGSSERVER_H
29
30#include <QFileInfo>
31#include "qgsrequesthandler.h"
32#include "qgsconfigcache.h"
34#include "qgsserviceregistry.h"
35#include "qgsserversettings.h"
36#include "qgsserverplugins.h"
38#include "qgis_server.h"
39#include "qgsserverrequest.h"
40
42class QgsProject;
43
48class SERVER_EXPORT QgsServer
49{
50 public:
54 QgsServer();
55
61 void putenv( const QString &var, const QString &val );
62
75 void handleRequest( QgsServerRequest &request, QgsServerResponse &response, const QgsProject *project = nullptr );
76
77
80
81#ifdef HAVE_SERVER_PYTHON_PLUGINS
82
87 void initPython();
88#endif
89
90 private:
91#ifdef SIP_RUN
92 QgsServer( const QgsServer & );
93 QgsServer &operator=( const QgsServer & );
94#endif
95
97 static bool init();
98
102 static QString configPath( const QString &defaultConfigPath, const QString &configPath );
103
109 static void printRequestParameters(
110 const QMap<QString, QString> &parameterMap,
111 Qgis::MessageLevel logLevel
112 );
113
117 static QFileInfo defaultProjectFile();
118 static QFileInfo defaultAdminSLD();
119
123 static void setupNetworkAccessManager();
124
125 // Status
126 static QString *sConfigFilePath;
127 static QgsCapabilitiesCache *sCapabilitiesCache;
128 static QgsServerInterfaceImpl *sServerInterface;
130 static bool sInitialized;
131
133 static QgsServiceRegistry *sServiceRegistry;
134
136 QgsConfigCache *mConfigCache = nullptr;
137
139 static void initLocale();
140};
141#endif // QGSSERVER_H
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:154
A cache for capabilities xml documents (by configuration file path)
Cache for server configuration.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
Interfaces exposed by QGIS Server and made available to plugins.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
The QgsServer class provides OGC web services.
Definition qgsserver.h:49
QgsServerInterfaceImpl * serverInterface()
Returns a pointer to the server interface.
Definition qgsserver.h:79
QgsServiceRegistry Class defining the registry manager for QGIS server services.
#define SIP_PYALTERNATIVETYPE(type)
Definition qgis_sip.h:141