QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsservercachefilter.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsservercachefilter.h
3  ------------------------
4  Cache interface for QGIS Server plugins
5 
6  begin : 2018-07-05
7  copyright : (C) 2018 by RenĂ©-Luc D'Hont
8  email : rldhont at 3liz dot com
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 #ifndef QGSSERVERCACHEFILTER_H
21 #define QGSSERVERCACHEFILTER_H
22 
23 #include <QMultiMap>
24 #include <QDomDocument>
25 #include "qgsserverrequest.h"
26 #include "qgis_server.h"
27 #include "qgis_sip.h"
28 
29 class QgsProject;
30 
31 SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
32 
33 class QgsServerInterface;
34 
35 
42 class SERVER_EXPORT QgsServerCacheFilter
43 {
44 
45  public:
46 
52  QgsServerCacheFilter( const QgsServerInterface *serverInterface );
53 
54  virtual ~QgsServerCacheFilter() = default;
55 
63  virtual QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
64 
73  virtual bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
74 
82  virtual bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
83 
89  virtual bool deleteCachedDocuments( const QgsProject *project ) const;
90 
98  virtual QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
99 
108  virtual bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
109 
117  virtual bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
118 
124  virtual bool deleteCachedImages( const QgsProject *project ) const;
125 
126 };
127 
129 typedef QMultiMap<int, QgsServerCacheFilter *> QgsServerCacheFilterMap;
130 
131 #endif // QGSSERVERCACHEFILTER_H
QgsServerCacheFilter
Class defining cache interface for QGIS Server plugins.
Definition: qgsservercachefilter.h:42
QgsServerRequest
Definition: qgsserverrequest.h:38
QgsProject
Definition: qgsproject.h:92
qgsserverrequest.h
qgis_sip.h
QgsServerCacheFilterMap
QMultiMap< int, QgsServerCacheFilter * > QgsServerCacheFilterMap
The registry definition.
Definition: qgsservercachefilter.h:129
SIP_IF_MODULE
#define SIP_IF_MODULE(condition)
Definition: qgis_sip.h:28
QgsServerInterface
Definition: qgsserverinterface.h:60