-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Server][Feature][needs-docs] Add Cache manager SIP files
- Loading branch information
Showing
2 changed files
with
277 additions
and
0 deletions.
There are no files selected for viewing
133 changes: 133 additions & 0 deletions
133
python/server/auto_generated/qgsservercachefilter.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/server/qgsservercachefilter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsServerCacheFilter | ||
{ | ||
%Docstring | ||
Class defining cache interface for QGIS Server plugins. | ||
|
||
.. versionadded:: 3.4 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsservercachefilter.h" | ||
%End | ||
public: | ||
|
||
QgsServerCacheFilter( const QgsServerInterface *serverInterface ); | ||
%Docstring | ||
Constructor | ||
QgsServerInterface passed to plugins constructors | ||
and must be passed to QgsServerCacheFilter instances. | ||
%End | ||
|
||
virtual ~QgsServerCacheFilter(); | ||
|
||
virtual QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Returns cached document (or 0 if document not in cache) like capabilities | ||
|
||
:param project: the project used to generate the document to provide path | ||
:param request: the request used to generate the document to provider parameters or data | ||
:param key: the key provided by the access control to identify different documents for the same request | ||
|
||
:return: QByteArray of the cached document or an empty one if no corresponding document found | ||
%End | ||
|
||
virtual bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Updates or inserts the document in cache like capabilities | ||
|
||
:param doc: the document to cache | ||
:param project: the project used to generate the document to provide path | ||
:param request: the request used to generate the document to provider parameters or data | ||
:param key: the key provided by the access control to identify different documents for the same request | ||
|
||
:return: true if the document has been cached | ||
%End | ||
|
||
virtual bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Deletes the cached document | ||
|
||
:param project: the project used to generate the document to provide path | ||
:param request: the request used to generate the document to provider parameters or data | ||
:param key: the key provided by the access control to identify different documents for the same request | ||
|
||
:return: true if the document has been deleted | ||
%End | ||
|
||
virtual bool deleteCachedDocuments( const QgsProject *project ) const; | ||
%Docstring | ||
Deletes all cached documents for a QGIS project | ||
|
||
:param project: the project used to generate the documents to provide path | ||
|
||
:return: true if the documents have been deleted | ||
%End | ||
|
||
virtual QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Returns cached image (or 0 if document not in cache) like tiles | ||
|
||
:param project: the project used to generate the image to provide path | ||
:param request: the request used to generate the image to provider parameters or data | ||
:param key: the key provided by the access control to identify different images for the same request | ||
|
||
:return: QByteArray of the cached image or an empty one if no corresponding image found | ||
%End | ||
|
||
virtual bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Updates or inserts the image in cache like tiles | ||
|
||
:param img: the document to cache | ||
:param project: the project used to generate the image to provide path | ||
:param request: the request used to generate the image to provider parameters or data | ||
:param key: the key provided by the access control to identify different images for the same request | ||
|
||
:return: true if the image has been cached | ||
%End | ||
|
||
virtual bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Deletes the cached image | ||
|
||
:param project: the project used to generate the image to provide path | ||
:param request: the request used to generate the image to provider parameters or data | ||
:param key: the key provided by the access control to identify different images for the same request | ||
|
||
:return: true if the image has been deleted | ||
%End | ||
|
||
virtual bool deleteCachedImages( const QgsProject *project ) const; | ||
%Docstring | ||
Deletes all cached images for a QGIS project | ||
|
||
:param project: the project used to generate the images to provide path | ||
|
||
:return: true if the images have been deleted | ||
%End | ||
|
||
}; | ||
|
||
typedef QMultiMap<int, QgsServerCacheFilter *> QgsServerCacheFilterMap; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/server/qgsservercachefilter.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
144 changes: 144 additions & 0 deletions
144
python/server/auto_generated/qgsservercachemanager.sip.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/server/qgsservercachemanager.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class QgsServerCacheManager | ||
{ | ||
%Docstring | ||
A helper class that centralizes caches accesses given by all the server cache filter plugins. | ||
|
||
.. versionadded:: 3.4 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgsservercachemanager.h" | ||
#include "qgsservercachefilter.h" | ||
%End | ||
public: | ||
QgsServerCacheManager(); | ||
%Docstring | ||
Constructor | ||
%End | ||
|
||
QgsServerCacheManager( const QgsServerCacheManager © ); | ||
%Docstring | ||
Constructor | ||
%End | ||
|
||
|
||
~QgsServerCacheManager(); | ||
|
||
QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Returns cached document (or 0 if document not in cache) like capabilities | ||
|
||
:param project: the project used to generate the document to provide path | ||
:param request: the request used to generate the document to provider parameters or data | ||
:param key: the key provided by the access control to identify different documents for the same request | ||
|
||
:return: the cached document or 0 if no corresponding document found | ||
%End | ||
|
||
bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Updates or inserts the document in cache like capabilities | ||
|
||
:param doc: the document to cache | ||
:param project: the project used to generate the document to provide path | ||
:param request: the request used to generate the document to provider parameters or data | ||
:param key: the key provided by the access control to identify different documents for the same request | ||
|
||
:return: true if the document has been cached | ||
%End | ||
|
||
bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Deletes the cached document | ||
|
||
:param project: the project used to generate the document to provide path | ||
:param request: the request used to generate the document to provider parameters or data | ||
:param key: the key provided by the access control to identify different documents for the same request | ||
|
||
:return: true if the document has been deleted | ||
%End | ||
|
||
bool deleteCachedDocuments( const QgsProject *project ) const; | ||
%Docstring | ||
Deletes all cached documents for a QGIS project | ||
|
||
:param project: the project used to generate the document to provide path | ||
|
||
:return: true if the document has been deleted | ||
%End | ||
|
||
QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Returns cached image (or 0 if image not in cache) like tiles | ||
|
||
:param project: the project used to generate the image to provide path | ||
:param request: the request used to generate the image to provider parameters or data | ||
:param key: the key provided by the access control to identify different images for the same request | ||
|
||
:return: the cached image or 0 if no corresponding image found | ||
%End | ||
|
||
bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Updates or inserts the image in cache like tiles | ||
|
||
:param img: the image to cache | ||
:param project: the project used to generate the image to provide path | ||
:param request: the request used to generate the image to provider parameters or data | ||
:param key: the key provided by the access control to identify different images for the same request | ||
|
||
:return: true if the image has been cached | ||
%End | ||
|
||
bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const; | ||
%Docstring | ||
Deletes the cached image | ||
|
||
:param project: the project used to generate the image to provide path | ||
:param request: the request used to generate the image to provider parameters or data | ||
:param key: the key provided by the access control to identify different images for the same request | ||
|
||
:return: true if the image has been deleted | ||
%End | ||
|
||
bool deleteCachedImages( const QgsProject *project ) const; | ||
%Docstring | ||
Deletes all cached images for a QGIS project | ||
|
||
:param project: the project used to generate the images to provide path | ||
|
||
:return: true if the images have been deleted | ||
%End | ||
|
||
void registerServerCache( QgsServerCacheFilter *serverCache, int priority = 0 ); | ||
%Docstring | ||
Register a server cache filter | ||
|
||
:param serverCache: the server cache to add | ||
:param priority: the priority used to define the order | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/server/qgsservercachemanager.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |