QGIS API Documentation  3.0.2-Girona (307d082)
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 #else
34 class QgsAccessControl;
36 #endif
37 #include "qgsserviceregistry.h"
38 #include "qgis_server.h"
39 #include "qgis_sip.h"
40 
41 SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
42 
43 
44 
57 class SERVER_EXPORT QgsServerInterface
58 {
59  public:
60 
62  QgsServerInterface() SIP_SKIP;
63 
64  virtual ~QgsServerInterface() = default;
65 
71  virtual void setRequestHandler( QgsRequestHandler *requestHandler ) = 0 SIP_SKIP;
72 
78  virtual void clearRequestHandler() = 0 SIP_SKIP;
79 
84  virtual QgsCapabilitiesCache *capabilitiesCache() = 0 SIP_KEEPREFERENCE;
85 
90  virtual QgsRequestHandler *requestHandler() = 0 SIP_KEEPREFERENCE;
91 
97  virtual void registerFilter( QgsServerFilter *filter SIP_TRANSFER, int priority = 0 ) = 0;
98 
103  virtual void setFilters( QgsServerFiltersMap *filters SIP_TRANSFER ) = 0;
104 
109  virtual QgsServerFiltersMap filters() = 0;
110 
116  virtual void registerAccessControl( QgsAccessControlFilter *accessControl SIP_TRANSFER, int priority = 0 ) = 0;
117 
119  virtual QgsAccessControl *accessControls() const = 0;
120 
122  virtual QString getEnv( const QString &name ) const = 0;
123 
128  virtual QString configFilePath() = 0;
129 
134  virtual void setConfigFilePath( const QString &configFilePath ) = 0;
135 
140  virtual void removeConfigCacheEntry( const QString &path ) = 0;
141 
146  virtual void removeProjectLayers( const QString &path ) = 0;
147 
152  virtual QgsServiceRegistry *serviceRegistry() = 0 SIP_KEEPREFERENCE;
153 
160  virtual QgsServerSettings *serverSettings() = 0 SIP_SKIP;
161 
162  private:
163 #ifdef SIP_RUN
164  QgsServerInterface();
165 #endif
166 
167  QString mConfigFilePath;
168 };
169 
170 #endif // QGSSERVERINTERFACE_H
#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
#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...
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.