19#ifndef QGSSERVICEREGISTRY_H
20#define QGSSERVICEREGISTRY_H
95 int unregisterApi(
const QString &name,
const QString &version = QString() );
125 int unregisterService(
const QString &name,
const QString &version = QString() );
142 typedef QHash<QString, std::shared_ptr<QgsService>> ServiceTable;
143 typedef QHash<QString, std::shared_ptr<QgsServerApi>> ApiTable;
144 typedef QHash<QString, QPair<QString, QString>> VersionTable;
148 ServiceTable mServices;
149 VersionTable mServiceVersions;
151 VersionTable mApiVersions;
Server generic API endpoint abstract base class.
Defines interfaces exposed by QGIS Server and made available to plugins.
Defines requests passed to QgsService classes.
Defines the native service module loader for QGIS server services.
void cleanUp()
Clean up registered service and unregister modules.
bool registerApi(QgsServerApi *api)
Registers the QgsServerApi api.
int unregisterService(const QString &name, const QString &version=QString())
Unregister service from its name and version.
int unregisterApi(const QString &name, const QString &version=QString())
Unregisters API from its name and version.
QgsServiceRegistry()=default
QgsServerApi * apiForRequest(const QgsServerRequest &request) const
Searches the API register for an API matching the request and returns a (possibly NULL) pointer to it...
void init(const QString &nativeModulepath, QgsServerInterface *serverIface=nullptr)
Initialize registry, load modules and auto register services.
QgsService * getService(const QString &name, const QString &version=QString())
Retrieve a service from its name.
void registerService(QgsService *service)
Register a service by its name and version.
QgsServerApi * getApi(const QString &name, const QString &version=QString())
Retrieves an API from its name.
Defines interfaces for QGIS server services.