QGIS API Documentation 3.29.0-Master (19d7edcfed)
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
29class QgsProject;
30
31SIP_IF_MODULE( HAVE_SERVER_PYTHON_PLUGINS )
32
34
35
42class 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
129typedef QMultiMap<int, QgsServerCacheFilter *> QgsServerCacheFilterMap;
130
131#endif // QGSSERVERCACHEFILTER_H
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:105
Class defining cache interface for QGIS Server plugins.
virtual ~QgsServerCacheFilter()=default
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
#define SIP_IF_MODULE(condition)
Definition: qgis_sip.h:28
QMultiMap< int, QgsServerCacheFilter * > QgsServerCacheFilterMap
The registry definition.