QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsserverinterfaceimpl.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsseerversinterface.h
3 Interface class for exposing functions in QGIS Server for use by plugins
4 -------------------
5 begin : 2014-09-10
6 copyright : (C) 2014 by Alessandro Pasotti
7 email : a dot pasotti at itopen dot it
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef QGSSERVERINTERFACEIMPL_H
20#define QGSSERVERINTERFACEIMPL_H
21
22#define SIP_NO_FILE
23
24
25#include "qgsserverinterface.h"
28
34class SERVER_EXPORT QgsServerInterfaceImpl : public QgsServerInterface
35{
36 public:
38 explicit QgsServerInterfaceImpl( QgsCapabilitiesCache *capCache, QgsServiceRegistry *srvRegistry, QgsServerSettings *serverSettings );
39
40
41 ~QgsServerInterfaceImpl() override;
42
43 void setRequestHandler( QgsRequestHandler *requestHandler ) override;
44 void clearRequestHandler() override;
45 QgsCapabilitiesCache *capabilitiesCache() override { return mCapabilitiesCache; }
47 QgsRequestHandler *requestHandler() override { return mRequestHandler; }
48 void registerFilter( QgsServerFilter *filter, int priority = 0 ) override;
49 QgsServerFiltersMap filters() override { return mFilters; }
50
52 void registerAccessControl( QgsAccessControlFilter *accessControl, int priority = 0 ) override;
53
58 QgsAccessControl *accessControls() const override { return mAccessControls; }
59
60
67 void registerServerCache( QgsServerCacheFilter *serverCache SIP_TRANSFER, int priority = 0 ) override;
68
74 QgsServerCacheManager *cacheManager() const override;
75
76 QString getEnv( const QString &name ) const override;
77 QString configFilePath() override { return mConfigFilePath; }
78 void setConfigFilePath( const QString &configFilePath ) override;
79 void setFilters( QgsServerFiltersMap *filters ) override;
80 void removeConfigCacheEntry( const QString &path ) override;
81
83
85
86 void reloadSettings() override;
87
88 private:
89 QString mConfigFilePath;
90 QgsServerFiltersMap mFilters;
91 QgsAccessControl *mAccessControls = nullptr;
92 QgsServerCacheManager *mCacheManager = nullptr;
93 QgsCapabilitiesCache *mCapabilitiesCache = nullptr;
94 QgsRequestHandler *mRequestHandler = nullptr;
95 QgsServiceRegistry *mServiceRegistry = nullptr;
96 QgsServerSettings *mServerSettings = nullptr;
97};
98
99#endif // QGSSERVERINTERFACEIMPL_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.
Interfaces exposed by QGIS Server and made available to plugins.
QgsRequestHandler * requestHandler() override
Returns the QgsRequestHandler, to be used only in server plugins.
QgsServerFiltersMap filters() override
Returns the list of current QgsServerFilter.
QgsCapabilitiesCache * capabilitiesCache() override
Gets pointer to the capabiblities cache.
QString configFilePath() override
Returns the configuration file path.
QgsAccessControl * accessControls() const override
Gets the helper over all the registered access control filters.
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 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 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 void setFilters(QgsServerFiltersMap *filters)=0
Set the filters map.
virtual QgsServerSettings * serverSettings()=0
Returns the server settings.
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_TRANSFER
Definition qgis_sip.h:36
QMultiMap< int, QgsServerFilter * > QgsServerFiltersMap