mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	The goals are: * To have better result in the GetCapabilities URL without having to fill it in the Project configuration * Be able to be set by an integrator with environment variable or by providing headers from a proxy The server resolution will use the following order: - Value defined in the project per service. - The ``<service>_SERVICE_URL`` environment variable. - The ``SERVICE_URL`` environment variable. - The custom ``X-Qgis-<service>-Servcie-Url`` header. - The custom ``X-Qgis-Service-Url`` header. - Build form the standard ``Forwarded`` header. - Build form the pseudo standard ``X-Forwarded-Host`` and ``X-Forwarded-Proto`` headers. - Build form the standard ``Host`` header and the server protocol. - Build form the server name and the server protocol.
		
			
				
	
	
		
			144 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			144 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * 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(signature="appended")
 | 
						|
A helper class that centralizes caches accesses given by all the server cache filter plugins.
 | 
						|
 | 
						|
.. versionadded:: 3.4
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsservercachemanager.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
    QgsServerCacheManager( const QgsServerSettings &settings = QgsServerSettings() );
 | 
						|
%Docstring
 | 
						|
Constructor
 | 
						|
%End
 | 
						|
 | 
						|
    QgsServerCacheManager( const QgsServerCacheManager © );
 | 
						|
%Docstring
 | 
						|
Copy constructor
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    ~QgsServerCacheManager();
 | 
						|
 | 
						|
    bool getCachedDocument( QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) const;
 | 
						|
%Docstring
 | 
						|
Returns cached document (or 0 if document not in cache) like capabilities
 | 
						|
 | 
						|
:param doc: the document to update by content found in 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 accessControl: the access control to identify different documents for the same request provided by server interface
 | 
						|
 | 
						|
:return: ``True`` if the document has been found in cache and the document's content set
 | 
						|
%End
 | 
						|
 | 
						|
    bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) 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 accessControl: the access control to identify different documents for the same request provided by server interface
 | 
						|
 | 
						|
:return: ``True`` if the document has been cached
 | 
						|
%End
 | 
						|
 | 
						|
    bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) 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 accessControl: the access control to identify different documents for the same request provided by server interface
 | 
						|
 | 
						|
: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, QgsAccessControl *accessControl ) 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 accessControl: the access control to identify different documents for the same request provided by server interface
 | 
						|
 | 
						|
:return: the cached image or 0 if no corresponding image found
 | 
						|
%End
 | 
						|
 | 
						|
    bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) 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 accessControl: the access control to identify different documents for the same request provided by server interface
 | 
						|
 | 
						|
:return: ``True`` if the image has been cached
 | 
						|
%End
 | 
						|
 | 
						|
    bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, QgsAccessControl *accessControl ) 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 accessControl: the access control to identify different documents for the same request provided by server interface
 | 
						|
 | 
						|
: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   *
 | 
						|
 ************************************************************************/
 |