QGIS API Documentation  3.4.15-Madeira (e83d02e274)
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 <QObject>
26 #include "qgsserverrequest.h"
27 #include "qgis_server.h"
28 #include "qgis_sip.h"
29 
30 class QgsProject;
31 
32 SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
33 
34 class QgsServerInterface;
35 
36 
43 class SERVER_EXPORT QgsServerCacheFilter
44 {
45 
46  public:
47 
53  QgsServerCacheFilter( const QgsServerInterface *serverInterface );
54 
55  virtual ~QgsServerCacheFilter() = default;
56 
64  virtual QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
65 
74  virtual bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
75 
83  virtual bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
84 
90  virtual bool deleteCachedDocuments( const QgsProject *project ) const;
91 
99  virtual QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
100 
109  virtual bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
110 
118  virtual bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
119 
125  virtual bool deleteCachedImages( const QgsProject *project ) const;
126 
127 };
128 
130 typedef QMultiMap<int, QgsServerCacheFilter *> QgsServerCacheFilterMap;
131 
132 #endif // QGSSERVERCACHEFILTER_H
#define SIP_IF_MODULE(condition)
Definition: qgis_sip.h:28
Reads and writes project states.
Definition: qgsproject.h:89
Class defining cache interface for QGIS Server plugins.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
QMultiMap< int, QgsServerCacheFilter * > QgsServerCacheFilterMap
The registry definition.