Skip to content

Commit

Permalink
Add new settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Aug 27, 2020
1 parent a8f80f0 commit 48b21a0
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions python/server/auto_generated/qgsserversettings.sip.in
Expand Up @@ -153,6 +153,22 @@ Returns the server-wide max width of a WMS GetMap request. The lower one of this
:return: the max width of a WMS GetMap request.

.. versionadded:: 3.6.2
%End

QString projectsDirectories() const;
%Docstring
Returns the directory used by the landing page service to find .qgs and
.qgz projects.

.. versionadded:: 3.16
%End

QString projectsPgConnections() const;
%Docstring
Returns the PostgreSQL connection string used by the landing page
service to find projects.

.. versionadded:: 3.16
%End

QString apiResourcesDirectory() const;
Expand Down
10 changes: 10 additions & 0 deletions src/server/qgsserversettings.cpp
Expand Up @@ -442,6 +442,16 @@ int QgsServerSettings::wmsMaxWidth() const
return value( QgsServerSettingsEnv::QGIS_SERVER_WMS_MAX_WIDTH ).toInt();
}

QString QgsServerSettings::projectsDirectories() const
{
return value( QgsServerSettingsEnv::QGIS_SERVER_PROJECTS_DIRECTORIES ).toString();
}

QString QgsServerSettings::projectsPgConnections() const
{
return value( QgsServerSettingsEnv::QGIS_SERVER_PROJECTS_PG_CONNECTIONS ).toString();
}

QString QgsServerSettings::apiResourcesDirectory() const
{
return value( QgsServerSettingsEnv::QGIS_SERVER_API_RESOURCES_DIRECTORY ).toString();
Expand Down
16 changes: 16 additions & 0 deletions src/server/qgsserversettings.h
Expand Up @@ -70,6 +70,8 @@ class SERVER_EXPORT QgsServerSettingsEnv : public QObject
QGIS_SERVER_API_WFS3_MAX_LIMIT, //!< Maximum value for "limit" in a features request, defaults to 10000 (since QGIS 3.10).
QGIS_SERVER_TRUST_LAYER_METADATA, //!< Trust layer metadata. Improves project read time. (since QGIS 3.16).
QGIS_SERVER_DISABLE_GETPRINT //!< Disabled WMS GetPrint request and don't load layouts. Improves project read time. (since QGIS 3.16).
QGIS_SERVER_PROJECTS_DIRECTORIES, //!< Directory used by the landing page service to find .qgs and .qgz projects (since QGIS 3.16)
QGIS_SERVER_PROJECTS_PG_CONNECTIONS //!< PostgreSQL connection string used by the landing page service to find projects (since QGIS 3.16)
};
Q_ENUM( EnvVar )
};
Expand Down Expand Up @@ -205,6 +207,20 @@ class SERVER_EXPORT QgsServerSettings
*/
int wmsMaxWidth() const;

/**
* Returns the directory used by the landing page service to find .qgs and
* .qgz projects.
* \since QGIS 3.16
*/
QString projectsDirectories() const;

/**
* Returns the PostgreSQL connection string used by the landing page
* service to find projects.
* \since QGIS 3.16
*/
QString projectsPgConnections() const;

/**
* Returns the server-wide base directory where HTML templates and static assets (e.g. images, js and css files) are searched for.
*
Expand Down

0 comments on commit 48b21a0

Please sign in to comment.