Skip to content

Commit b7d524c

Browse files
committed
sipify server
1 parent 9068fea commit b7d524c

35 files changed

+2022
-1325
lines changed

python/auto_sip.blacklist

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,2 @@
11
core/conversions.sip
22
core/qgsexception.sip
3-
server/qgsserverfilter.sip
4-
server/qgsserverinterface.sip
5-
server/qgsaccesscontrolfilter.sip
6-
server/qgsaccesscontrol.sip
7-
server/qgsmapserviceexception.sip
8-
server/qgscapabilitiescache.sip
9-
server/qgsserverprojectparser.sip
10-
server/qgswmsconfigparser.sip
11-
server/qgswmsprojectparser.sip
12-
server/qgsconfigcache.sip
13-
server/qgsserversettings.sip
14-
server/qgsserverprojectutils.sip
15-
server/qgsserver.sip
16-
server/qgsserverrequest.sip
17-
server/qgsserverresponse.sip
18-
server/qgsserverexception.sip
19-
server/qgsservice.sip
20-
server/qgsservicemodule.sip
21-
server/qgsserviceregistry.sip

python/server/qgsaccesscontrol.sip

Lines changed: 134 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,143 @@
1-
/***************************************************************************
2-
qgsaccesscontrol.sip
3-
--------------------
4-
Access control helper for Qgis Server plugins
5-
6-
begin : 2015-05-19
7-
copyright : (C) 2015 by Stéphane Brunner
8-
email : stephane dot brunner at camptocamp dot org
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-
* \class QgsAccessControl
22-
* \brief Class defining access control helper for QGIS Server.
23-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/server/qgsaccesscontrol.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
13+
14+
2415
class QgsAccessControl : QgsFeatureFilterProvider
2516
{
17+
%Docstring
18+
A helper class that centralize the restrictions given by all the
19+
access control filter plugins.
20+
*
21+
%End
22+
2623
%TypeHeaderCode
2724
#include "qgsaccesscontrol.h"
25+
2826
#include "qgsaccesscontrolfilter.h"
27+
%End
28+
public:
29+
QgsAccessControl();
30+
%Docstring
31+
Constructor
32+
%End
33+
34+
QgsAccessControl( const QgsAccessControl &copy );
35+
%Docstring
36+
Constructor
37+
%End
38+
39+
40+
~QgsAccessControl();
41+
42+
void resolveFilterFeatures( const QList<QgsMapLayer *> &layers );
43+
%Docstring
44+
Resolve features' filter of layers
45+
\param layers to filter
46+
%End
47+
48+
void filterFeatures( const QgsVectorLayer *layer, QgsFeatureRequest &filterFeatures ) const;
49+
%Docstring
50+
Filter the features of the layer
51+
\param layer the layer to control
52+
\param filterFeatures the request to fill
53+
%End
2954

30-
#include <QMultiMap>
55+
QgsFeatureFilterProvider *clone() const /Factory/;
56+
%Docstring
57+
Return a clone of the object
58+
:return: A clone
59+
:rtype: QgsFeatureFilterProvider
60+
%End
61+
62+
QString extraSubsetString( const QgsVectorLayer *layer ) const;
63+
%Docstring
64+
Return an additional subset string (typically SQL) filter
65+
\param layer the layer to control
66+
:return: the subset string to use
67+
:rtype: str
68+
%End
69+
70+
bool layerReadPermission( const QgsMapLayer *layer ) const;
71+
%Docstring
72+
Return the layer read right
73+
\param layer the layer to control
74+
:return: true if it can be read
75+
:rtype: bool
76+
%End
77+
78+
bool layerInsertPermission( const QgsVectorLayer *layer ) const;
79+
%Docstring
80+
Return the layer insert right
81+
\param layer the layer to control
82+
:return: true if we can insert on it
83+
:rtype: bool
84+
%End
85+
86+
bool layerUpdatePermission( const QgsVectorLayer *layer ) const;
87+
%Docstring
88+
Return the layer update right
89+
\param layer the layer to control
90+
:return: true if we can do an update
91+
:rtype: bool
92+
%End
93+
94+
bool layerDeletePermission( const QgsVectorLayer *layer ) const;
95+
%Docstring
96+
Return the layer delete right
97+
\param layer the layer to control
98+
:return: true if we can do a delete
99+
:rtype: bool
100+
%End
101+
102+
QStringList layerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const;
103+
%Docstring
104+
Return the authorized layer attributes
105+
\param layer the layer to control
106+
\param attributes the list of attribute
107+
:return: the list of visible attributes
108+
:rtype: list of str
109+
%End
110+
111+
bool allowToEdit( const QgsVectorLayer *layer, const QgsFeature &feature ) const;
112+
%Docstring
113+
Are we authorized to modify the following geometry
114+
\param layer the layer to control
115+
\param feature the concerned feature
116+
:return: true if we are allowed to edit the feature
117+
:rtype: bool
118+
%End
119+
120+
bool fillCacheKey( QStringList &cacheKey ) const;
121+
%Docstring
122+
Fill the capabilities caching key
123+
\param cacheKey the list to fill with a cache variant
124+
:return: false if we can't create a cache
125+
:rtype: bool
126+
%End
127+
128+
void registerAccessControl( QgsAccessControlFilter *accessControl, int priority = 0 );
129+
%Docstring
130+
Register an access control filter
131+
\param accessControl the access control to add
132+
\param priority the priority used to define the order
31133
%End
32134

33135
};
136+
137+
/************************************************************************
138+
* This file has been generated automatically from *
139+
* *
140+
* src/server/qgsaccesscontrol.h *
141+
* *
142+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
143+
************************************************************************/
Lines changed: 83 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,44 @@
1-
/***************************************************************************
2-
qgsaccesscontrolfilter.sip
3-
--------------------------
4-
Access control interface for Qgis Server plugins
5-
6-
begin : 2015-05-19
7-
copyright : (C) 2015 by Stéphane Brunner
8-
email : stephane dot brunner at camptocamp dot org
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-
* \ingroup server
22-
* \class QgsAccessControlFilter
23-
* \brief Class defining access control interface for QGIS Server plugins.
24-
*
25-
* Security can define any (or none) of the following method:
26-
* * layerFilterExpression() - To get an additional expression filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature)
27-
* * layerFilterSQL() - To get an additional SQL filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature) for layer that support SQL
28-
* * layerPermissions() - To give the general layer permissins (read / update / insert / delete)
29-
* * authorizedLayerAttributes() - Tho filter the attributes (WMS/GetFeatureInfo, WFS/GetFeature)
30-
* * allowToEdit() - (all WFS-T requests)
31-
* * cacheKey()
32-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/server/qgsaccesscontrolfilter.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
3313

3414
class QgsAccessControlFilter
3515
{
16+
%Docstring
17+
Class defining access control interface for QGIS Server plugins.
18+
19+
Security can define any (or none) of the following method:
20+
* layerFilterExpression() - To get an additional expression filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature)
21+
* layerFilterSQL() - To get an additional SQL filter (WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature) for layer that support SQL
22+
* layerPermissions() - To give the general layer permissins (read / update / insert / delete)
23+
* authorizedLayerAttributes() - Tho filter the attributes (WMS/GetFeatureInfo, WFS/GetFeature)
24+
* allowToEdit() - (all WFS-T requests)
25+
* cacheKey()
26+
%End
27+
3628
%TypeHeaderCode
3729
#include "qgsaccesscontrolfilter.h"
3830
%End
39-
4031
public:
41-
/** Constructor
42-
* QgsServerInterface passed to plugins constructors
43-
* and must be passed to QgsAccessControlFilter instances.
44-
*/
32+
4533
QgsAccessControlFilter( const QgsServerInterface *serverInterface );
46-
/** Destructor */
34+
%Docstring
35+
Constructor
36+
QgsServerInterface passed to plugins constructors
37+
and must be passed to QgsAccessControlFilter instances.
38+
%End
39+
4740
virtual ~QgsAccessControlFilter();
4841

49-
/** Describe the layer permission */
5042
struct LayerPermissions
5143
{
5244
bool canRead;
@@ -55,45 +47,70 @@ class QgsAccessControlFilter
5547
bool canDelete;
5648
};
5749

58-
/** Return the QgsServerInterface instance*/
5950
const QgsServerInterface *serverInterface() const;
51+
%Docstring
52+
Return the QgsServerInterface instance
53+
:rtype: QgsServerInterface
54+
%End
6055

61-
/** Return an additional expression filter
62-
* @param layer the layer to control
63-
* @return the filter expression
64-
*/
6556
virtual QString layerFilterExpression( const QgsVectorLayer *layer ) const;
57+
%Docstring
58+
Return an additional expression filter
59+
\param layer the layer to control
60+
:return: the filter expression
61+
:rtype: str
62+
%End
6663

67-
/** Return an additional subset string (typically SQL) filter
68-
* @param layer the layer to control
69-
* @return the subset string
70-
*/
7164
virtual QString layerFilterSubsetString( const QgsVectorLayer *layer ) const;
65+
%Docstring
66+
Return an additional subset string (typically SQL) filter
67+
\param layer the layer to control
68+
:return: the subset string
69+
:rtype: str
70+
%End
7271

73-
/** Return the layer permissions
74-
* @param layer the layer to control
75-
* @return the permission to use on the layer
76-
*/
7772
virtual LayerPermissions layerPermissions( const QgsMapLayer *layer ) const;
73+
%Docstring
74+
Return the layer permissions
75+
\param layer the layer to control
76+
:return: the permission to use on the layer
77+
:rtype: LayerPermissions
78+
%End
7879

79-
/** Return the authorized layer attributes
80-
* @param layer the layer to control
81-
* @param attributes the current list of visible attribute
82-
* @return the new list of visible attributes
83-
*/
8480
virtual QStringList authorizedLayerAttributes( const QgsVectorLayer *layer, const QStringList &attributes ) const;
81+
%Docstring
82+
Return the authorized layer attributes
83+
\param layer the layer to control
84+
\param attributes the current list of visible attribute
85+
:return: the new list of visible attributes
86+
:rtype: list of str
87+
%End
8588

86-
/** Are we authorized to modify the following geometry
87-
* @param layer the layer to control
88-
* @param feature the concerned feature
89-
* @return true if we are allowed to edit
90-
*/
9189
virtual bool allowToEdit( const QgsVectorLayer *layer, const QgsFeature &feature ) const;
90+
%Docstring
91+
Are we authorized to modify the following geometry
92+
\param layer the layer to control
93+
\param feature the concerned feature
94+
:return: true if we are allowed to edit
95+
:rtype: bool
96+
%End
9297

93-
/** Cache key to used to create the capabilities cache
94-
* @return the cache key, "" for no cache
95-
*/
9698
virtual QString cacheKey() const;
99+
%Docstring
100+
Cache key to used to create the capabilities cache
101+
:return: the cache key, "" for no cache
102+
:rtype: str
103+
%End
104+
97105
};
98106

99-
typedef QMultiMap<int, QgsAccessControlFilter*> QgsAccessControlFilterMap;
107+
typedef QMultiMap<int, QgsAccessControlFilter *> QgsAccessControlFilterMap;
108+
109+
110+
/************************************************************************
111+
* This file has been generated automatically from *
112+
* *
113+
* src/server/qgsaccesscontrolfilter.h *
114+
* *
115+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
116+
************************************************************************/

python/server/qgsbufferserverrequest.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ class QgsBufferServerRequest : QgsServerRequest
2121
%End
2222
public:
2323

24-
QgsBufferServerRequest( const QString &url, Method method = GetMethod, const QgsServerRequest::Headers &headers = QgsServerRequest::Headers( ), QByteArray *data = 0 );
24+
QgsBufferServerRequest( const QString &url, QgsServerRequest::Method method = QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers = QgsServerRequest::Headers( ), QByteArray *data = 0 );
2525
%Docstring
2626
Constructor
2727

2828
\param url the url string
2929
\param method the request method
3030
%End
3131

32-
QgsBufferServerRequest( const QUrl &url, Method method = GetMethod, const QgsServerRequest::Headers &headers = QgsServerRequest::Headers( ), QByteArray *data = 0 );
32+
QgsBufferServerRequest( const QUrl &url, QgsServerRequest::Method method = QgsServerRequest::GetMethod, const QgsServerRequest::Headers &headers = QgsServerRequest::Headers( ), QByteArray *data = 0 );
3333
%Docstring
3434
Constructor
3535

0 commit comments

Comments
 (0)