QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
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 public:
50 QgsServerCacheFilter( const QgsServerInterface *serverInterface );
51
52 virtual ~QgsServerCacheFilter() = default;
53
61 virtual QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
62
71 virtual bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
72
80 virtual bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
81
87 virtual bool deleteCachedDocuments( const QgsProject *project ) const;
88
96 virtual QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
97
106 virtual bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
107
115 virtual bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
116
122 virtual bool deleteCachedImages( const QgsProject *project ) const;
123};
124
126typedef QMultiMap<int, QgsServerCacheFilter *> QgsServerCacheFilterMap;
127
128#endif // QGSSERVERCACHEFILTER_H
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
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.