QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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"
27#include "qgsrequesthandler.h"
28#include "qgsserverfilter.h"
29#include "qgsserversettings.h"
30#ifdef HAVE_SERVER_PYTHON_PLUGINS
32#include "qgsaccesscontrol.h"
35#else
40#endif
41#include "qgsserviceregistry.h"
42#include "qgis_server.h"
43
44SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
45
46
47
60class SERVER_EXPORT QgsServerInterface
61{
62 public:
65
66 virtual ~QgsServerInterface() = default;
67
73 virtual void setRequestHandler( QgsRequestHandler *requestHandler ) = 0 SIP_SKIP;
74
80 virtual void clearRequestHandler() = 0 SIP_SKIP;
81
87
93
99 virtual void registerFilter( QgsServerFilter *filter SIP_TRANSFER, int priority = 0 ) = 0;
100
105 virtual void setFilters( QgsServerFiltersMap *filters SIP_TRANSFER ) = 0;
106
112
118 virtual void registerAccessControl( QgsAccessControlFilter *accessControl SIP_TRANSFER, int priority = 0 ) = 0;
119
121 virtual QgsAccessControl *accessControls() const = 0;
122
129 virtual void registerServerCache( QgsServerCacheFilter *serverCache SIP_TRANSFER, int priority = 0 ) = 0;
130
136
138 virtual QString getEnv( const QString &name ) const = 0;
139
144 virtual QString configFilePath() = 0;
145
150 virtual void setConfigFilePath( const QString &configFilePath ) = 0;
151
156 virtual void removeConfigCacheEntry( const QString &path ) = 0;
157
163
171
177 virtual void reloadSettings() = 0;
178
179 private:
180#ifdef SIP_RUN
182#endif
183
184 QString mConfigFilePath;
185};
186
187#endif // QGSSERVERINTERFACE_H
Class defining access control interface for QGIS Server plugins.
A helper class that centralizes restrictions given by all the access control filter plugins.
A cache for capabilities xml documents (by configuration file path)
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 helper class that centralizes caches accesses given by all the server cache filter plugins.
Class defining I/O filters for QGIS Server and implemented in plugins.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
virtual QgsServiceRegistry * serviceRegistry()=0
Returns the service registry.
virtual void removeConfigCacheEntry(const QString &path)=0
Remove entry from config cache.
virtual void setConfigFilePath(const QString &configFilePath)=0
Set the configuration file path.
virtual QgsRequestHandler * requestHandler()=0
Gets pointer to the request handler.
virtual void registerServerCache(QgsServerCacheFilter *serverCache, int priority=0)=0
Register a server cache filter.
virtual void reloadSettings()=0
Reloads the server settings re-reading the configuration.
virtual QgsServerFiltersMap filters()=0
Returns the list of current QgsServerFilter.
virtual ~QgsServerInterface()=default
virtual QgsServerCacheManager * cacheManager() const =0
Gets the registered server cache filters.
virtual void registerAccessControl(QgsAccessControlFilter *accessControl, int priority=0)=0
Register an access control filter.
virtual void clearRequestHandler()=0
Clear the request handler.
virtual QString configFilePath()=0
Returns the configuration file path.
virtual void setFilters(QgsServerFiltersMap *filters)=0
Set the filters map.
virtual QgsAccessControl * accessControls() const =0
Gets the registered access control filters.
virtual QgsServerSettings * serverSettings()=0
Returns the server settings.
virtual QgsCapabilitiesCache * capabilitiesCache()=0
Gets pointer to the capabiblities cache.
virtual void registerFilter(QgsServerFilter *filter, int priority=0)=0
Register a QgsServerFilter.
virtual void setRequestHandler(QgsRequestHandler *requestHandler)=0
Set the request handler.
virtual QString getEnv(const QString &name) const =0
Returns an enrironment variable, used to pass environment variables to Python.
Provides a way to retrieve settings by prioritizing according to environment variables,...
QgsServiceRegistry Class defining the registry manager for QGIS server services.
#define SIP_IF_MODULE(condition)
Definition qgis_sip.h:28
#define SIP_KEEPREFERENCE
Definition qgis_sip.h:86
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_TRANSFER
Definition qgis_sip.h:36
QMultiMap< int, QgsServerFilter * > QgsServerFiltersMap