File: qgshttpheaders.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (211 lines) | stat: -rw-r--r-- 5,060 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/network/qgshttpheaders.h                                    *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/







class QgsHttpHeaders
{
%Docstring(signature="appended")
This class implements simple http header management.

.. versionadded:: 3.24
%End

%TypeHeaderCode
#include "qgshttpheaders.h"
%End
  public:


    QgsHttpHeaders( const QVariantMap &headers );
%Docstring
Constructor from map

:param headers: 
%End

    QgsHttpHeaders();

 QgsHttpHeaders( const QgsSettings &settings, const QString &key = QString() ) /Deprecated/;
%Docstring
Constructor from :py:class:`QgsSettings` ``settings`` object and root
``key``

:param settings: 
:param key: 

.. deprecated:: 3.30

   Use a variant map settings and the default constructor instead.
%End

    QgsHttpHeaders( const QString &key );
%Docstring
Constructor from default :py:class:`QgsSettings` object and root ``key``

:param key: 
%End

    QgsHttpHeaders( const QDomElement &element );
%Docstring
Constructor from a QDomElement ``element``

:param element: 
%End

    virtual ~QgsHttpHeaders();

    QVariantMap headers() const;
%Docstring
Returns the headers as a variant map

.. versionadded:: 3.30
%End

 bool updateSettings( QgsSettings &settings, const QString &key = QString() ) const /Deprecated/;
%Docstring
Updates the ``settings`` by adding all the http headers in the path
"key/PATH_PREFIX/"

KEY_REFERER value will be available at path
"key/PATH_PREFIX/KEY_REFERER" and path "key/KEY_REFERER" (for backward
compatibility)

:param settings: 
:param key: sub group path

:return: ``True`` if the update succeed

.. deprecated:: 3.30

   Directly use a variant setting instead.
%End

    bool updateNetworkRequest( QNetworkRequest &request ) const;
%Docstring
Updates a ``request`` by adding all the HTTP headers

:return: ``True`` if the update succeed
%End

    bool updateUrlQuery( QUrlQuery &uri ) const;
%Docstring
Updates an ``uri`` by adding all the HTTP headers

:return: ``True`` if the update succeed
%End

    bool updateMap( QVariantMap &map ) const;
%Docstring
Updates a ``map`` by adding all the HTTP headers

KEY_REFERER value will be available at key "KEY_PREFIX+KEY_REFERER" and
key "KEY_REFERER" (for backward compatibility)

:return: ``True`` if the update succeed
%End

 bool updateDomElement( QDomElement &el ) const /Deprecated/;
%Docstring
Updates a DOM element by adding all the HTTP headers.

KEY_REFERER value will be available at attribute
"KEY_PREFIX+KEY_REFERER" and attribute "KEY_REFERER" (for backward
compatibility)

:param el: DOM element

:return: ``True`` if the update succeed

.. deprecated:: 3.42

   Will be removed in QGIS 4.0.
%End


    void setFromSettings( const QgsSettings &settings, const QString &key = QString() );
%Docstring
Loads headers from the ``settings``

key KEY_REFERER will be read at path "key/PATH_PREFIX/KEY_REFERER" and
path "key/KEY_REFERER" (for backward compatibility)

:param settings: 
:param key: sub group path
%End

    void setFromUrlQuery( const QUrlQuery &uri );
%Docstring
Loads headers from the ``uri``

:param uri: 
%End

    void setFromMap( const QVariantMap &map );
%Docstring
Loads headers from the ``map``

key KEY_REFERER will be read from key "KEY_PREFIX+KEY_REFERER" and key
"KEY_REFERER" (for backward compatibility)

:param map: 
%End

    void setFromDomElement( const QDomElement &element );
%Docstring
Loads headers from the ``element``

key KEY_REFERER will be read from attribute "KEY_PREFIX+KEY_REFERER" and
attribute "KEY_REFERER" (for backward compatibility)

:param element: 
%End

    QString sanitizeKey( const QString &key ) const;
%Docstring
Returns a cleansed ``key``

:param key: a key to be sanitized
%End

    QVariant &operator[]( const QString &key );


    void insert( const QString &key, const QVariant &value );
%Docstring
insert a ``key`` with the specific ``value``

:param key: a key to add
:param value: a value to add for the key
%End

    QList<QString> keys() const;
%Docstring
:return: the list of all http header keys
%End

    QString toSpacedString() const;
%Docstring
Returns key/value pairs as strings separated by space
%End


};


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/network/qgshttpheaders.h                                    *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/