QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
server
qgsserverapi.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsserverapi.h
3
4
Class defining the service interface for QGIS server APIs.
5
-------------------
6
begin : 2019-04-16
7
copyright : (C) 2019 by Alessandro Pasotti
8
email : elpaso at itopen dot it
9
***************************************************************************/
10
11
/***************************************************************************
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* *
18
***************************************************************************/
19
20
21
#ifndef QGSSERVERAPI_H
22
#define QGSSERVERAPI_H
23
24
#include "qgis_server.h"
25
#include "
qgsserverexception.h
"
26
#include "
qgsserverrequest.h
"
27
28
#include <QRegularExpression>
29
30
class
QgsServerResponse
;
31
class
QgsProject
;
32
class
QgsServerApiContext
;
33
class
QgsServerInterface
;
34
80
class
SERVER_EXPORT
QgsServerApi
81
{
82
public
:
86
QgsServerApi
(
QgsServerInterface
*
serverIface
);
87
88
virtual
~QgsServerApi
() =
default
;
89
93
virtual
const
QString
name
()
const
= 0;
94
98
virtual
const
QString
description
()
const
= 0;
99
104
virtual
const
QString
version
()
const
{
return
QString(); }
105
109
virtual
const
QString
rootPath
()
const
= 0;
110
114
virtual
bool
accept
(
const
QUrl &url )
const
;
115
119
virtual
void
executeRequest
(
const
QgsServerApiContext
&context )
const
= 0;
120
124
QgsServerInterface
*
serverIface
()
const
;
125
126
private
:
127
QgsServerInterface
*mServerIface =
nullptr
;
128
};
129
130
131
#endif
// QGSSERVERAPI_H
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
QgsServerApiContext
Encapsulates the resources for a particular client request.
Definition
qgsserverapicontext.h:41
QgsServerApi::QgsServerApi
QgsServerApi(QgsServerInterface *serverIface)
Creates a QgsServerApi object.
Definition
qgsserverapi.cpp:23
QgsServerApi::serverIface
QgsServerInterface * serverIface() const
Returns the server interface.
Definition
qgsserverapi.cpp:32
QgsServerApi::version
virtual const QString version() const
Returns the version of the service.
Definition
qgsserverapi.h:104
QgsServerApi::description
virtual const QString description() const =0
Returns the API description.
QgsServerApi::name
virtual const QString name() const =0
Returns the API name.
QgsServerApi::accept
virtual bool accept(const QUrl &url) const
Returns true if the given url is handled by the API, default implementation checks for the presence o...
Definition
qgsserverapi.cpp:27
QgsServerApi::executeRequest
virtual void executeRequest(const QgsServerApiContext &context) const =0
Executes a request by passing the given context to the API handlers.
QgsServerApi::rootPath
virtual const QString rootPath() const =0
Returns the root path for the API.
QgsServerApi::~QgsServerApi
virtual ~QgsServerApi()=default
QgsServerInterface
Defines interfaces exposed by QGIS Server and made available to plugins.
Definition
qgsserverinterface.h:61
QgsServerResponse
Defines the response interface passed to QgsService.
Definition
qgsserverresponse.h:42
qgsserverexception.h
qgsserverrequest.h
Generated on
for QGIS API Documentation by
1.17.0