36 #define QSTR_COMPARE( str, lit )\ 37 (str.compare( QLatin1String( lit ), Qt::CaseInsensitive ) == 0) 59 , mServerIface( serverIface )
62 QString
name()
const override {
return QStringLiteral(
"WMS" ); }
63 QString
version()
const override {
return mVersion; }
76 if ( version.isEmpty() )
80 version = parameters.
wmtver();
90 const QString req = parameters.
request();
94 QStringLiteral(
"Please check the value of the REQUEST parameter" ), 501 );
97 if ( ( mVersion.compare( QLatin1String(
"1.1.1" ) ) == 0 \
106 version = QStringLiteral(
"1.3.0" );
114 writeAsDxf( mServerIface, project, version, request, response );
118 writeGetMap( mServerIface, project, version, request, response );
135 writeGetStyle( mServerIface, project, version, request, response );
139 writeGetStyles( mServerIface, project, version, request, response );
151 writeGetPrint( mServerIface, project, version, request, response );
157 QStringLiteral(
"Request %1 is not supported" ).arg( req ), 501 );
178 QgsDebugMsg( QStringLiteral(
"WMSModule::registerSelf called" ) );
bool versionIsValid(const QString version) const
Returns true if version is valid, false otherwise.
void writeGetStyles(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetStyles response.
QString request() const
Returns REQUEST parameter as a string or an empty string if not defined.
Module specialized for WMS service.
void writeAsDxf(QgsServerInterface *serverIface, const QgsProject *project, const QString &, const QgsServerRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.
void writeGetMap(QgsServerInterface *serverIface, const QgsProject *project, const QString &, const QgsServerRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.
Class defining the service module interface for QGIS server services.
QString version() const override
Service(const QString &version, QgsServerInterface *serverIface)
Constructor for WMS service.
void writeGetFeatureInfo(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetFeatureInfo response.
Method
HTTP Method (or equivalent) used for the request.
Exception class for WMS service exceptions.
void writeGetCapabilities(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response, bool projectSettings)
Output GetCapabilities response.
void executeRequest(const QgsServerRequest &request, QgsServerResponse &response, const QgsProject *project) override
Execute the requests and set result in QgsServerRequest.
QGISEXTERN void QGS_ServiceModule_Exit(QgsServiceModule *)
Provides an interface to retrieve and manipulate WMS parameters received from the client...
#define QSTR_COMPARE(str, lit)
void writeGetContext(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetContext response.
QString version() const
Returns VERSION parameter as a string or an empty string if not defined.
OGC web service specialized for WMS.
bool allowMethod(QgsServerRequest::Method method) const override
Returns true if the given method is supported for that service.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts, annotations, canvases, etc.
void registerService(QgsService *service)
Register a service by its name and version.
void writeGetPrint(QgsServerInterface *serverIface, const QgsProject *project, const QString &, const QgsServerRequest &request, QgsServerResponse &response)
Output GetPrint response.
void writeGetLegendGraphics(QgsServerInterface *serverIface, const QgsProject *project, const QString &, const QgsServerRequest &request, QgsServerResponse &response)
Output GetLegendGRaphics response.
void writeGetStyle(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetStyle response.
Median cut implementation.
void registerSelf(QgsServiceRegistry ®istry, QgsServerInterface *serverIface) override
Asks the module to register all provided services.
QgsService Class defining interfaces for QGIS server services.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
QgsServiceRegistry Class defining the registry manager for QGIS server services.
void writeGetSchemaExtension(QgsServerInterface *serverIface, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetSchemaExtension response.
QString name() const override
QString formatAsString() const
Returns FORMAT parameter as a string.
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
QString wmtver() const
Returns WMTVER parameter or an empty string if not defined.
void writeDescribeLayer(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.
QGISEXTERN QgsServiceModule * QGS_ServiceModule_Init()