QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsserverapicontext.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsserverapicontext.h - QgsServerApiContext
3
4 ---------------------
5 begin : 13.5.2019
6 copyright : (C) 2019 by Alessandro Pasotti
7 email : elpaso at itopen dot it
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSSERVERAPICONTEXT_H
17#define QGSSERVERAPICONTEXT_H
18
19#include "qgis_server.h"
20
21#include <QString>
22
26class QgsProject;
27
40class SERVER_EXPORT QgsServerApiContext
41{
42 public:
43
55
59 const QgsServerRequest *request() const;
60
65
70 const QgsProject *project() const;
71
76 void setProject( const QgsProject *project );
77
82
93 const QString matchedPath() const;
94
98 QString apiRootPath() const;
99
103 void setRequest( const QgsServerRequest *request );
104
111 QString handlerPath() const;
112
113 private:
114 QString mApiRootPath;
115 const QgsServerRequest *mRequest = nullptr;
116 QgsServerResponse *mResponse = nullptr;
117 const QgsProject *mProject = nullptr;
118 QgsServerInterface *mServerInterface = nullptr;
119};
120
121#endif // QGSSERVERAPICONTEXT_H
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:109
const QgsProject * project() const
Returns the (possibly NULL) project.
QgsServerResponse * response() const
Returns the server response object.
QString handlerPath() const
Returns the handler component of the URL path, i.e.
const QgsServerRequest * request() const
Returns the server request object.
void setProject(const QgsProject *project)
Sets the project to project.
void setRequest(const QgsServerRequest *request)
Sets context request to request.
QgsServerInterface * serverInterface() const
Returns the server interface.
QString apiRootPath() const
Returns the API root path.
QgsServerApiContext(const QString &apiRootPath, const QgsServerRequest *request, QgsServerResponse *response, const QgsProject *project, QgsServerInterface *serverInterface)
QgsServerApiContext constructor.
const QString matchedPath() const
Returns the initial part of the incoming request URL path that matches the API root path.
Defines interfaces exposed by QGIS Server and made available to plugins.
Defines requests passed to QgsService classes.
Defines the response interface passed to QgsService.