35 #define QSTR_COMPARE( str, lit )\ 36 (str.compare( QLatin1String( lit ), Qt::CaseInsensitive ) == 0) 58 , mServerIface( serverIface )
61 QString
name()
const override {
return QStringLiteral(
"WMS" ); }
62 QString
version()
const override {
return mVersion; }
75 if ( version.isEmpty() )
79 version = parameters.
wmtver();
89 const QString req = parameters.
request();
93 QStringLiteral(
"Please check the value of the REQUEST parameter" ) );
96 if ( ( mVersion.compare( QLatin1String(
"1.1.1" ) ) == 0 \
97 && req.compare( QLatin1String(
"capabilities" ) ) == 0 )
98 || req.compare( QLatin1String(
"GetCapabilities" ) ) == 0 )
105 version = QStringLiteral(
"1.3.0" );
113 writeAsDxf( mServerIface, project, version, request, response );
117 writeGetMap( mServerIface, project, version, request, response );
134 writeGetStyle( mServerIface, project, version, request, response );
138 writeGetStyles( mServerIface, project, version, request, response );
150 writeGetPrint( mServerIface, project, version, request, response );
156 QString(
"Request %1 is not supported" ).arg( req ) );
177 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 &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetMap response in DXF format.
void writeGetMap(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, 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.
Reads and writes project states.
void registerService(QgsService *service)
Register a service by its name and version.
void writeGetPrint(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, const QgsServerRequest &request, QgsServerResponse &response)
Output GetPrint response.
void writeGetLegendGraphics(QgsServerInterface *serverIface, const QgsProject *project, const QString &version, 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()