mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
If I don't misread the docs, if a template is given, the file is created in the current directory instead of the temporary directory reported by QDir::tempPath() Furthermore it cannot be set by env TMPDIR. This issue drove me crazy (and no exceptions and no logs!) until when I switched the server user to root (that is of course not what we want). As a temporary workaround, the server can be configured to use /tmp or another www-data writeable directory as a working directory. By prefixing with tempPath() the file will be created in the system temp directory.
101 lines
2.9 KiB
Plaintext
101 lines
2.9 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/server/qgsserviceregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsServiceRegistry
|
|
{
|
|
%Docstring
|
|
QgsServiceRegistry
|
|
Class defining the registry manager for QGIS server services
|
|
|
|
This class provides methods for registering and retrieving
|
|
services.
|
|
|
|
IMPORTANT: The registry hold ownership of registered services and
|
|
will call 'delete' on cleanup
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsserviceregistry.h"
|
|
%End
|
|
public:
|
|
|
|
QgsServiceRegistry();
|
|
%Docstring
|
|
Constructor
|
|
%End
|
|
|
|
~QgsServiceRegistry();
|
|
|
|
QgsService *getService( const QString &name, const QString &version = QString() );
|
|
%Docstring
|
|
Retrieve a service from its name
|
|
|
|
:param name: the name of the service
|
|
:param version: the version string (optional)
|
|
|
|
:return: :py:class:`QgsService`
|
|
|
|
If the version is not provided the higher version of the service is returned
|
|
%End
|
|
|
|
void registerService( QgsService *service /Transfer/ );
|
|
%Docstring
|
|
Register a service by its name and version
|
|
|
|
This method is intended to be called by modules for registering
|
|
services. A module may register multiple services.
|
|
|
|
The registry gain ownership of services and will call 'delete' on cleanup
|
|
|
|
:param service: a QgsService to be registered
|
|
%End
|
|
|
|
int unregisterService( const QString &name, const QString &version = QString() );
|
|
%Docstring
|
|
Unregister service from its name and version
|
|
|
|
:param name: the tame of the service
|
|
:param version: (optional) the specific version to unload
|
|
|
|
:return: the number of services unregistered
|
|
|
|
If the version is not specified then all versions from the specified service
|
|
are unloaded
|
|
%End
|
|
|
|
void init( const QString &nativeModulepath, QgsServerInterface *serverIface = 0 );
|
|
%Docstring
|
|
Initialize registry, load modules and auto register services
|
|
|
|
:param serverIface: the server interface
|
|
:param nativeModulepath: the native module path
|
|
%End
|
|
|
|
void cleanUp();
|
|
%Docstring
|
|
Clean up registered service and unregister modules
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/server/qgsserviceregistry.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|