|
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/server/qgsservercachemanager.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +class QgsServerCacheManager |
| 15 | +{ |
| 16 | +%Docstring |
| 17 | +A helper class that centralizes caches accesses given by all the server cache filter plugins. |
| 18 | + |
| 19 | +.. versionadded:: 3.4 |
| 20 | +%End |
| 21 | + |
| 22 | +%TypeHeaderCode |
| 23 | +#include "qgsservercachemanager.h" |
| 24 | +#include "qgsservercachefilter.h" |
| 25 | +%End |
| 26 | + public: |
| 27 | + QgsServerCacheManager(); |
| 28 | +%Docstring |
| 29 | +Constructor |
| 30 | +%End |
| 31 | + |
| 32 | + QgsServerCacheManager( const QgsServerCacheManager © ); |
| 33 | +%Docstring |
| 34 | +Copy constructor |
| 35 | +%End |
| 36 | + |
| 37 | + |
| 38 | + ~QgsServerCacheManager(); |
| 39 | + |
| 40 | + bool getCachedDocument( QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const; |
| 41 | +%Docstring |
| 42 | +Returns cached document (or 0 if document not in cache) like capabilities |
| 43 | + |
| 44 | +:param doc: the document to update by content found in cache |
| 45 | +:param project: the project used to generate the document to provide path |
| 46 | +:param request: the request used to generate the document to provider parameters or data |
| 47 | +:param accessControl: the access control to identify different documents for the same request provided by server interface |
| 48 | + |
| 49 | +:return: true if the document has been found in cache and the document's content set |
| 50 | +%End |
| 51 | + |
| 52 | + bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const; |
| 53 | +%Docstring |
| 54 | +Updates or inserts the document in cache like capabilities |
| 55 | + |
| 56 | +:param doc: the document to cache |
| 57 | +:param project: the project used to generate the document to provide path |
| 58 | +:param request: the request used to generate the document to provider parameters or data |
| 59 | +:param accessControl: the access control to identify different documents for the same request provided by server interface |
| 60 | + |
| 61 | +:return: true if the document has been cached |
| 62 | +%End |
| 63 | + |
| 64 | + bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const; |
| 65 | +%Docstring |
| 66 | +Deletes the cached document |
| 67 | + |
| 68 | +:param project: the project used to generate the document to provide path |
| 69 | +:param request: the request used to generate the document to provider parameters or data |
| 70 | +:param accessControl: the access control to identify different documents for the same request provided by server interface |
| 71 | + |
| 72 | +:return: true if the document has been deleted |
| 73 | +%End |
| 74 | + |
| 75 | + bool deleteCachedDocuments( const QgsProject *project ) const; |
| 76 | +%Docstring |
| 77 | +Deletes all cached documents for a QGIS project |
| 78 | + |
| 79 | +:param project: the project used to generate the document to provide path |
| 80 | + |
| 81 | +:return: true if the document has been deleted |
| 82 | +%End |
| 83 | + |
| 84 | + QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const; |
| 85 | +%Docstring |
| 86 | +Returns cached image (or 0 if image not in cache) like tiles |
| 87 | + |
| 88 | +:param project: the project used to generate the image to provide path |
| 89 | +:param request: the request used to generate the image to provider parameters or data |
| 90 | +:param accessControl: the access control to identify different documents for the same request provided by server interface |
| 91 | + |
| 92 | +:return: the cached image or 0 if no corresponding image found |
| 93 | +%End |
| 94 | + |
| 95 | + bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const; |
| 96 | +%Docstring |
| 97 | +Updates or inserts the image in cache like tiles |
| 98 | + |
| 99 | +:param img: the image to cache |
| 100 | +:param project: the project used to generate the image to provide path |
| 101 | +:param request: the request used to generate the image to provider parameters or data |
| 102 | +:param accessControl: the access control to identify different documents for the same request provided by server interface |
| 103 | + |
| 104 | +:return: true if the image has been cached |
| 105 | +%End |
| 106 | + |
| 107 | + bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const; |
| 108 | +%Docstring |
| 109 | +Deletes the cached image |
| 110 | + |
| 111 | +:param project: the project used to generate the image to provide path |
| 112 | +:param request: the request used to generate the image to provider parameters or data |
| 113 | +:param accessControl: the access control to identify different documents for the same request provided by server interface |
| 114 | + |
| 115 | +:return: true if the image has been deleted |
| 116 | +%End |
| 117 | + |
| 118 | + bool deleteCachedImages( const QgsProject *project ) const; |
| 119 | +%Docstring |
| 120 | +Deletes all cached images for a QGIS project |
| 121 | + |
| 122 | +:param project: the project used to generate the images to provide path |
| 123 | + |
| 124 | +:return: true if the images have been deleted |
| 125 | +%End |
| 126 | + |
| 127 | + void registerServerCache( QgsServerCacheFilter *serverCache, int priority = 0 ); |
| 128 | +%Docstring |
| 129 | +Register a server cache filter |
| 130 | + |
| 131 | +:param serverCache: the server cache to add |
| 132 | +:param priority: the priority used to define the order |
| 133 | +%End |
| 134 | + |
| 135 | +}; |
| 136 | + |
| 137 | +/************************************************************************ |
| 138 | + * This file has been generated automatically from * |
| 139 | + * * |
| 140 | + * src/server/qgsservercachemanager.h * |
| 141 | + * * |
| 142 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 143 | + ************************************************************************/ |
0 commit comments