QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgsserverinterface.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsserverinterface.h
3 
4  Class defining the interface made available to QGIS Server plugins.
5  -------------------
6  begin : 2014-09-10
7  copyright : (C) 2014 by Alessandro Pasotti
8  email : a dot pasotti at itopen dot it
9  ***************************************************************************/
10 
11 /***************************************************************************
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * *
18  ***************************************************************************/
19 
20 
21 #ifndef QGSSERVERINTERFACE_H
22 #define QGSSERVERINTERFACE_H
23 
24 #include "qgsconfig.h"
25 #include "qgis_sip.h"
26 #include "qgscapabilitiescache.h"
27 #include "qgsrequesthandler.h"
28 #include "qgsserverfilter.h"
29 #include "qgsserversettings.h"
30 #ifdef HAVE_SERVER_PYTHON_PLUGINS
31 #include "qgsaccesscontrolfilter.h"
32 #include "qgsaccesscontrol.h"
33 #include "qgsservercachefilter.h"
34 #include "qgsservercachemanager.h"
35 #else
36 class QgsAccessControl;
40 #endif
41 #include "qgsserviceregistry.h"
42 #include "qgis_server.h"
43 #include "qgis_sip.h"
44 
45 SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
46 
47 
48 
61 class SERVER_EXPORT QgsServerInterface
62 {
63  public:
64 
66  QgsServerInterface() SIP_SKIP;
67 
68  virtual ~QgsServerInterface() = default;
69 
75  virtual void setRequestHandler( QgsRequestHandler *requestHandler ) = 0 SIP_SKIP;
76 
82  virtual void clearRequestHandler() = 0 SIP_SKIP;
83 
88  virtual QgsCapabilitiesCache *capabilitiesCache() = 0 SIP_KEEPREFERENCE;
89 
94  virtual QgsRequestHandler *requestHandler() = 0 SIP_KEEPREFERENCE;
95 
101  virtual void registerFilter( QgsServerFilter *filter SIP_TRANSFER, int priority = 0 ) = 0;
102 
107  virtual void setFilters( QgsServerFiltersMap *filters SIP_TRANSFER ) = 0;
108 
113  virtual QgsServerFiltersMap filters() = 0;
114 
120  virtual void registerAccessControl( QgsAccessControlFilter *accessControl SIP_TRANSFER, int priority = 0 ) = 0;
121 
123  virtual QgsAccessControl *accessControls() const = 0;
124 
131  virtual void registerServerCache( QgsServerCacheFilter *serverCache SIP_TRANSFER, int priority = 0 ) = 0;
132 
137  virtual QgsServerCacheManager *cacheManager() const = 0;
138 
140  virtual QString getEnv( const QString &name ) const = 0;
141 
146  virtual QString configFilePath() = 0;
147 
152  virtual void setConfigFilePath( const QString &configFilePath ) = 0;
153 
158  virtual void removeConfigCacheEntry( const QString &path ) = 0;
159 
164  virtual QgsServiceRegistry *serviceRegistry() = 0 SIP_KEEPREFERENCE;
165 
172  virtual QgsServerSettings *serverSettings() = 0 SIP_SKIP;
173 
174  private:
175 #ifdef SIP_RUN
176  QgsServerInterface();
177 #endif
178 
179  QString mConfigFilePath;
180 };
181 
182 #endif // QGSSERVERINTERFACE_H
Provides a way to retrieve settings by prioritizing according to environment variables, ini file and default values.
#define SIP_IF_MODULE(condition)
Definition: qgis_sip.h:28
Class defining I/O filters for QGIS Server and implemented in plugins.
Class defining access control interface for QGIS Server plugins.
#define SIP_SKIP
Definition: qgis_sip.h:119
QMultiMap< int, QgsServerFilter * > QgsServerFiltersMap
#define SIP_TRANSFER
Definition: qgis_sip.h:36
A helper class that centralizes caches accesses given by all the server cache filter plugins...
#define SIP_KEEPREFERENCE
Definition: qgis_sip.h:79
This class is an interface hiding the details of reading input and writing output from/to a wms reque...
Class defining cache interface for QGIS Server plugins.
A cache for capabilities xml documents (by configuration file path)
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
QgsServiceRegistry Class defining the registry manager for QGIS server services.
A helper class that centralizes restrictions given by all the access control filter plugins...