QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
server
qgsserver.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsserver.h
3
QGIS Server main class.
4
-------------------
5
begin : June 05, 2015
6
copyright : (C) 2015 by Alessandro Pasotti
7
email : a dot pasotti at itopen dot it
8
9
Based on previous work from:
10
11
begin : July 04, 2006
12
copyright : (C) 2006 by Marco Hugentobler & Ionut Iosifescu Enescu
13
email : marco dot hugentobler at karto dot baug dot ethz dot ch
14
15
***************************************************************************/
16
17
/***************************************************************************
18
* *
19
* This program is free software; you can redistribute it and/or modify *
20
* it under the terms of the GNU General Public License as published by *
21
* the Free Software Foundation; either version 2 of the License, or *
22
* (at your option) any later version. *
23
* *
24
***************************************************************************/
25
26
27
#ifndef QGSSERVER_H
28
#define QGSSERVER_H
29
30
#include "qgis_server.h"
31
#include "
qgscapabilitiescache.h
"
32
#include "
qgsconfigcache.h
"
33
#include "
qgsrequesthandler.h
"
34
#include "
qgsserverinterfaceimpl.h
"
35
#include "
qgsserverplugins.h
"
36
#include "
qgsserverrequest.h
"
37
#include "
qgsserversettings.h
"
38
#include "
qgsserviceregistry.h
"
39
40
#include <QFileInfo>
41
42
class
QgsServerResponse
;
43
class
QgsProject
;
44
49
class
SERVER_EXPORT
QgsServer
50
{
51
public
:
55
QgsServer
();
56
62
void
putenv
(
const
QString &var,
const
QString &val );
63
76
void
handleRequest
(
QgsServerRequest
&request,
QgsServerResponse
&response,
const
QgsProject
*project =
nullptr
);
77
78
80
QgsServerInterfaceImpl
SIP_PYALTERNATIVETYPE
(
QgsServerInterface
) *
serverInterface
() {
return
sServerInterface; }
81
82
#ifdef HAVE_SERVER_PYTHON_PLUGINS
83
88
void
initPython();
89
#endif
90
91
private
:
92
#ifdef SIP_RUN
93
QgsServer
(
const
QgsServer
& );
94
QgsServer
&operator=(
const
QgsServer
& );
95
#endif
96
98
static
bool
init();
99
103
static
QString configPath(
const
QString &defaultConfigPath,
const
QString &configPath );
104
110
static
void
printRequestParameters(
const
QMap<QString, QString> ¶meterMap,
Qgis::MessageLevel
logLevel );
111
115
static
QFileInfo defaultProjectFile();
116
static
QFileInfo defaultAdminSLD();
117
121
static
void
setupNetworkAccessManager();
122
123
// Status
124
static
QString *sConfigFilePath;
125
static
QgsCapabilitiesCache
*sCapabilitiesCache;
126
static
QgsServerInterfaceImpl
*sServerInterface;
128
static
bool
sInitialized;
129
131
static
QgsServiceRegistry
*sServiceRegistry;
132
134
QgsConfigCache
*mConfigCache =
nullptr
;
135
137
static
void
initLocale();
138
};
139
#endif
// QGSSERVER_H
Qgis::MessageLevel
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition
qgis.h:160
QgsCapabilitiesCache
A cache for capabilities xml documents (by configuration file path).
Definition
qgscapabilitiescache.h:36
QgsConfigCache
Cache for server configuration.
Definition
qgsconfigcache.h:79
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
QgsServerInterfaceImpl
Interfaces exposed by QGIS Server and made available to plugins.
Definition
qgsserverinterfaceimpl.h:35
QgsServerInterface
Defines interfaces exposed by QGIS Server and made available to plugins.
Definition
qgsserverinterface.h:61
QgsServerRequest
Defines requests passed to QgsService classes.
Definition
qgsserverrequest.h:36
QgsServerResponse
Defines the response interface passed to QgsService.
Definition
qgsserverresponse.h:42
QgsServer
A server which provides OGC web services.
Definition
qgsserver.h:50
QgsServer::QgsServer
QgsServer()
Creates the server instance.
Definition
qgsserver.cpp:74
QgsServer::serverInterface
QgsServerInterfaceImpl * serverInterface()
Returns a pointer to the server interface.
Definition
qgsserver.h:80
QgsServer::handleRequest
void handleRequest(QgsServerRequest &request, QgsServerResponse &response, const QgsProject *project=nullptr)
Handles the request.
Definition
qgsserver.cpp:405
QgsServer::putenv
void putenv(const QString &var, const QString &val)
Set environment variable.
Definition
qgsserver.cpp:392
QgsServiceRegistry
A registry manager for QGIS server services.
Definition
qgsserviceregistry.h:49
SIP_PYALTERNATIVETYPE
#define SIP_PYALTERNATIVETYPE(type)
Definition
qgis_sip.h:153
qgscapabilitiescache.h
qgsconfigcache.h
qgsrequesthandler.h
qgsserverinterfaceimpl.h
qgsserverplugins.h
qgsserverrequest.h
qgsserversettings.h
qgsserviceregistry.h
Generated on
for QGIS API Documentation by
1.17.0