QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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 
44 SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
45 
46 
47 
60 class SERVER_EXPORT QgsServerInterface
61 {
62  public:
63 
66 
67  virtual ~QgsServerInterface() = default;
68 
74  virtual void setRequestHandler( QgsRequestHandler *requestHandler ) = 0 SIP_SKIP;
75 
81  virtual void clearRequestHandler() = 0 SIP_SKIP;
82 
88 
94 
100  virtual void registerFilter( QgsServerFilter *filter SIP_TRANSFER, int priority = 0 ) = 0;
101 
106  virtual void setFilters( QgsServerFiltersMap *filters SIP_TRANSFER ) = 0;
107 
113 
119  virtual void registerAccessControl( QgsAccessControlFilter *accessControl SIP_TRANSFER, int priority = 0 ) = 0;
120 
122  virtual QgsAccessControl *accessControls() const = 0;
123 
130  virtual void registerServerCache( QgsServerCacheFilter *serverCache SIP_TRANSFER, int priority = 0 ) = 0;
131 
136  virtual QgsServerCacheManager *cacheManager() const = 0;
137 
139  virtual QString getEnv( const QString &name ) const = 0;
140 
145  virtual QString configFilePath() = 0;
146 
151  virtual void setConfigFilePath( const QString &configFilePath ) = 0;
152 
157  virtual void removeConfigCacheEntry( const QString &path ) = 0;
158 
164 
172 
173  private:
174 #ifdef SIP_RUN
176 #endif
177 
178  QString mConfigFilePath;
179 };
180 
181 #endif // QGSSERVERINTERFACE_H
QgsServerCacheFilter
Class defining cache interface for QGIS Server plugins.
Definition: qgsservercachefilter.h:43
qgsserversettings.h
qgsaccesscontrolfilter.h
QgsServerInterface::~QgsServerInterface
virtual ~QgsServerInterface()=default
QgsCapabilitiesCache
A cache for capabilities xml documents (by configuration file path)
Definition: qgscapabilitiescache.h:35
QgsServerInterface::registerServerCache
virtual void registerServerCache(QgsServerCacheFilter *serverCache, int priority=0)=0
Register a server cache filter.
QgsServerInterface::getEnv
virtual QString getEnv(const QString &name) const =0
Returns an enrironment variable, used to pass environment variables to Python.
qgsserviceregistry.h
QgsServerInterface::setConfigFilePath
virtual void setConfigFilePath(const QString &configFilePath)=0
Set the configuration file path.
qgsservercachefilter.h
QgsServerInterface::accessControls
virtual QgsAccessControl * accessControls() const =0
Gets the registered access control filters.
SIP_KEEPREFERENCE
#define SIP_KEEPREFERENCE
Definition: qgis_sip.h:86
QgsServerInterface::registerFilter
virtual void registerFilter(QgsServerFilter *filter, int priority=0)=0
Register a QgsServerFilter.
QgsServerInterface::clearRequestHandler
virtual void clearRequestHandler()=0
Clear the request handler.
QgsServerInterface::requestHandler
virtual QgsRequestHandler * requestHandler()=0
Gets pointer to the request handler.
QgsServerSettings
Provides a way to retrieve settings by prioritizing according to environment variables,...
Definition: qgsserversettings.h:85
qgsservercachemanager.h
QgsServerInterface::configFilePath
virtual QString configFilePath()=0
Returns the configuration file path.
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
qgscapabilitiescache.h
QgsServerInterface::registerAccessControl
virtual void registerAccessControl(QgsAccessControlFilter *accessControl, int priority=0)=0
Register an access control filter.
QgsServerFilter
Class defining I/O filters for QGIS Server and implemented in plugins.
Definition: qgsserverfilter.h:44
QgsServerCacheManager
A helper class that centralizes caches accesses given by all the server cache filter plugins.
Definition: qgsservercachemanager.h:41
QgsAccessControlFilter
Class defining access control interface for QGIS Server plugins.
Definition: qgsaccesscontrolfilter.h:51
qgis_sip.h
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
QgsServerInterface::serverSettings
virtual QgsServerSettings * serverSettings()=0
Returns the server settings.
QgsServerInterface::setFilters
virtual void setFilters(QgsServerFiltersMap *filters)=0
Set the filters map.
QgsServerInterface::filters
virtual QgsServerFiltersMap filters()=0
Returns the list of current QgsServerFilter.
QgsAccessControl
A helper class that centralizes restrictions given by all the access control filter plugins.
Definition: qgsaccesscontrol.h:37
QgsServerInterface::removeConfigCacheEntry
virtual void removeConfigCacheEntry(const QString &path)=0
Remove entry from config cache.
SIP_IF_MODULE
#define SIP_IF_MODULE(condition)
Definition: qgis_sip.h:28
qgsaccesscontrol.h
QgsServerInterface::cacheManager
virtual QgsServerCacheManager * cacheManager() const =0
Gets the registered server cache filters.
QgsServiceRegistry
QgsServiceRegistry Class defining the registry manager for QGIS server services.
Definition: qgsserviceregistry.h:50
QgsServerFiltersMap
QMultiMap< int, QgsServerFilter * > QgsServerFiltersMap
Definition: qgsserverfilter.h:89
QgsRequestHandler
This class is an interface hiding the details of reading input and writing output from/to a wms reque...
Definition: qgsrequesthandler.h:39
qgsrequesthandler.h
qgsserverfilter.h
QgsServerInterface::serviceRegistry
virtual QgsServiceRegistry * serviceRegistry()=0
Returns the service registry.
QgsServerInterface
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
Definition: qgsserverinterface.h:61
QgsServerInterface::capabilitiesCache
virtual QgsCapabilitiesCache * capabilitiesCache()=0
Gets pointer to the capabiblities cache.
QgsServerInterface::setRequestHandler
virtual void setRequestHandler(QgsRequestHandler *requestHandler)=0
Set the request handler.