QGIS API Documentation
3.2.0-Bonn (bc43194)
|
QgsServiceRegistry Class defining the registry manager for QGIS server services. More...
#include <qgsserviceregistry.h>
Public Member Functions | |
QgsServiceRegistry ()=default | |
Constructor. More... | |
~QgsServiceRegistry () | |
Destructor. More... | |
void | cleanUp () |
Clean up registered service and unregister modules. More... | |
QgsService * | getService (const QString &name, const QString &version=QString()) |
Retrieve a service from its name. More... | |
void | init (const QString &nativeModulepath, QgsServerInterface *serverIface=nullptr) |
Initialize registry, load modules and auto register services. More... | |
void | registerService (QgsService *service) |
Register a service by its name and version. More... | |
int | unregisterService (const QString &name, const QString &version=QString()) |
Unregister service from its name and version. More... | |
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
Definition at line 47 of file qgsserviceregistry.h.
|
default |
Constructor.
QgsServiceRegistry::~QgsServiceRegistry | ( | ) |
Destructor.
void QgsServiceRegistry::cleanUp | ( | ) |
Clean up registered service and unregister modules.
QgsService* QgsServiceRegistry::getService | ( | const QString & | name, |
const QString & | version = QString() |
||
) |
Retrieve a service from its name.
name | the name of the service |
version | the version string (optional) |
If the version is not provided the higher version of the service is returned
void QgsServiceRegistry::init | ( | const QString & | nativeModulepath, |
QgsServerInterface * | serverIface = nullptr |
||
) |
Initialize registry, load modules and auto register services.
serverIface | the server interface |
nativeModulepath | the native module path |
void QgsServiceRegistry::registerService | ( | QgsService * | service | ) |
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
service | a QgsService to be registered |
int QgsServiceRegistry::unregisterService | ( | const QString & | name, |
const QString & | version = QString() |
||
) |
Unregister service from its name and version.
name | the tame of the service |
version | (optional) the specific version to unload |
If the version is not specified then all versions from the specified service are unloaded