Documentation/Source/eric4.Helpviewer.CookieJar.CookieJar.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.Helpviewer.CookieJar.CookieJar</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.Helpviewer.CookieJar.CookieJar</h1>
24 <p>
25 Module implementing a QNetworkCookieJar subclass with various accept policies.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#CookieJar">CookieJar</a></td>
35 <td>Class implementing a QNetworkCookieJar subclass with various accept policies.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="CookieJar" ID="CookieJar"></a>
44 <h2>CookieJar</h2>
45 <p>
46 Class implementing a QNetworkCookieJar subclass with various accept policies.
47 </p><h4>Signals</h4>
48 <dl>
49 <dt>cookiesChanged()</dt>
50 <dd>
51 emitted after the cookies have been changed
52 </dd>
53 </dl>
54 <h3>Derived from</h3>
55 QNetworkCookieJar
56 <h3>Class Attributes</h3>
57 <table>
58 <tr><td>AcceptAlways</td></tr><tr><td>AcceptNever</td></tr><tr><td>AcceptOnlyFromSitesNavigatedTo</td></tr><tr><td>Allow</td></tr><tr><td>AllowForSession</td></tr><tr><td>Block</td></tr><tr><td>JAR_VERSION</td></tr><tr><td>KeepUntilExit</td></tr><tr><td>KeepUntilExpire</td></tr><tr><td>KeepUntilTimeLimit</td></tr>
59 </table>
60 <h3>Methods</h3>
61 <table>
62 <tr>
63 <td><a href="#CookieJar.__init__">CookieJar</a></td>
64 <td>Constructor</td>
65 </tr><tr>
66 <td><a href="#CookieJar.__applyRules">__applyRules</a></td>
67 <td>Private method to apply the cookie rules.</td>
68 </tr><tr>
69 <td><a href="#CookieJar.__isOnDomainList">__isOnDomainList</a></td>
70 <td>Private method to check, if either the rule matches the domain exactly or the domain ends with ".rule".</td>
71 </tr><tr>
72 <td><a href="#CookieJar.__purgeOldCookies">__purgeOldCookies</a></td>
73 <td>Private method to purge old cookies</td>
74 </tr><tr>
75 <td><a href="#CookieJar.acceptPolicy">acceptPolicy</a></td>
76 <td>Public method to get the accept policy.</td>
77 </tr><tr>
78 <td><a href="#CookieJar.allowForSessionCookies">allowForSessionCookies</a></td>
79 <td>Public method to return the allowed session cookies.</td>
80 </tr><tr>
81 <td><a href="#CookieJar.allowedCookies">allowedCookies</a></td>
82 <td>Public method to return the allowed cookies.</td>
83 </tr><tr>
84 <td><a href="#CookieJar.blockedCookies">blockedCookies</a></td>
85 <td>Public method to return the blocked cookies.</td>
86 </tr><tr>
87 <td><a href="#CookieJar.clear">clear</a></td>
88 <td>Public method to clear all cookies.</td>
89 </tr><tr>
90 <td><a href="#CookieJar.close">close</a></td>
91 <td>Public slot to close the cookie jar.</td>
92 </tr><tr>
93 <td><a href="#CookieJar.cookies">cookies</a></td>
94 <td>Public method to get the cookies of the cookie jar.</td>
95 </tr><tr>
96 <td><a href="#CookieJar.cookiesForUrl">cookiesForUrl</a></td>
97 <td>Public method to get the cookies for a URL.</td>
98 </tr><tr>
99 <td><a href="#CookieJar.filterTrackingCookies">filterTrackingCookies</a></td>
100 <td>Public method to get the filter tracking cookies flag.</td>
101 </tr><tr>
102 <td><a href="#CookieJar.keepPolicy">keepPolicy</a></td>
103 <td>Private method to get the keep policy.</td>
104 </tr><tr>
105 <td><a href="#CookieJar.load">load</a></td>
106 <td>Public method to load the cookies.</td>
107 </tr><tr>
108 <td><a href="#CookieJar.loadCookies">loadCookies</a></td>
109 <td>Public method to restore the saved cookies.</td>
110 </tr><tr>
111 <td><a href="#CookieJar.save">save</a></td>
112 <td>Public method to save the cookies.</td>
113 </tr><tr>
114 <td><a href="#CookieJar.saveCookies">saveCookies</a></td>
115 <td>Public method to save the cookies.</td>
116 </tr><tr>
117 <td><a href="#CookieJar.setAcceptPolicy">setAcceptPolicy</a></td>
118 <td>Public method to set the accept policy.</td>
119 </tr><tr>
120 <td><a href="#CookieJar.setAllowForSessionCookies">setAllowForSessionCookies</a></td>
121 <td>Public method to set the list of allowed session cookies.</td>
122 </tr><tr>
123 <td><a href="#CookieJar.setAllowedCookies">setAllowedCookies</a></td>
124 <td>Public method to set the list of allowed cookies.</td>
125 </tr><tr>
126 <td><a href="#CookieJar.setBlockedCookies">setBlockedCookies</a></td>
127 <td>Public method to set the list of blocked cookies.</td>
128 </tr><tr>
129 <td><a href="#CookieJar.setCookies">setCookies</a></td>
130 <td>Public method to set all cookies.</td>
131 </tr><tr>
132 <td><a href="#CookieJar.setCookiesFromUrl">setCookiesFromUrl</a></td>
133 <td>Public method to set cookies for a URL.</td>
134 </tr><tr>
135 <td><a href="#CookieJar.setFilterTrackingCookies">setFilterTrackingCookies</a></td>
136 <td>Public method to set the filter tracking cookies flag.</td>
137 </tr><tr>
138 <td><a href="#CookieJar.setKeepPolicy">setKeepPolicy</a></td>
139 <td>Public method to set the keep policy.</td>
140 </tr>
141 </table>
142 <a NAME="CookieJar.__init__" ID="CookieJar.__init__"></a>
143 <h4>CookieJar (Constructor)</h4>
144 <b>CookieJar</b>(<i>parent = None</i>)
145 <p>
146 Constructor
147 </p><dl>
148 <dt><i>parent</i></dt>
149 <dd>
150 reference to the parent object (QObject)
151 </dd>
152 </dl><a NAME="CookieJar.__applyRules" ID="CookieJar.__applyRules"></a>
153 <h4>CookieJar.__applyRules</h4>
154 <b>__applyRules</b>(<i></i>)
155 <p>
156 Private method to apply the cookie rules.
157 </p><a NAME="CookieJar.__isOnDomainList" ID="CookieJar.__isOnDomainList"></a>
158 <h4>CookieJar.__isOnDomainList</h4>
159 <b>__isOnDomainList</b>(<i>rules, domain</i>)
160 <p>
161 Private method to check, if either the rule matches the domain exactly
162 or the domain ends with ".rule".
163 </p><dl>
164 <dt><i>rules</i></dt>
165 <dd>
166 list of rules (list of strings)
167 </dd><dt><i>domain</i></dt>
168 <dd>
169 domain name to check (string)
170 </dd>
171 </dl><dl>
172 <dt>Returns:</dt>
173 <dd>
174 flag indicating a match (boolean)
175 </dd>
176 </dl><a NAME="CookieJar.__purgeOldCookies" ID="CookieJar.__purgeOldCookies"></a>
177 <h4>CookieJar.__purgeOldCookies</h4>
178 <b>__purgeOldCookies</b>(<i></i>)
179 <p>
180 Private method to purge old cookies
181 </p><a NAME="CookieJar.acceptPolicy" ID="CookieJar.acceptPolicy"></a>
182 <h4>CookieJar.acceptPolicy</h4>
183 <b>acceptPolicy</b>(<i></i>)
184 <p>
185 Public method to get the accept policy.
186 </p><dl>
187 <dt>Returns:</dt>
188 <dd>
189 current accept policy
190 </dd>
191 </dl><a NAME="CookieJar.allowForSessionCookies" ID="CookieJar.allowForSessionCookies"></a>
192 <h4>CookieJar.allowForSessionCookies</h4>
193 <b>allowForSessionCookies</b>(<i></i>)
194 <p>
195 Public method to return the allowed session cookies.
196 </p><dl>
197 <dt>Returns:</dt>
198 <dd>
199 list of allowed session cookies (list of strings)
200 </dd>
201 </dl><a NAME="CookieJar.allowedCookies" ID="CookieJar.allowedCookies"></a>
202 <h4>CookieJar.allowedCookies</h4>
203 <b>allowedCookies</b>(<i></i>)
204 <p>
205 Public method to return the allowed cookies.
206 </p><dl>
207 <dt>Returns:</dt>
208 <dd>
209 list of allowed cookies (list of strings)
210 </dd>
211 </dl><a NAME="CookieJar.blockedCookies" ID="CookieJar.blockedCookies"></a>
212 <h4>CookieJar.blockedCookies</h4>
213 <b>blockedCookies</b>(<i></i>)
214 <p>
215 Public method to return the blocked cookies.
216 </p><dl>
217 <dt>Returns:</dt>
218 <dd>
219 list of blocked cookies (list of strings)
220 </dd>
221 </dl><a NAME="CookieJar.clear" ID="CookieJar.clear"></a>
222 <h4>CookieJar.clear</h4>
223 <b>clear</b>(<i></i>)
224 <p>
225 Public method to clear all cookies.
226 </p><a NAME="CookieJar.close" ID="CookieJar.close"></a>
227 <h4>CookieJar.close</h4>
228 <b>close</b>(<i></i>)
229 <p>
230 Public slot to close the cookie jar.
231 </p><a NAME="CookieJar.cookies" ID="CookieJar.cookies"></a>
232 <h4>CookieJar.cookies</h4>
233 <b>cookies</b>(<i></i>)
234 <p>
235 Public method to get the cookies of the cookie jar.
236 </p><dl>
237 <dt>Returns:</dt>
238 <dd>
239 list of all cookies (list of QNetworkCookie)
240 </dd>
241 </dl><a NAME="CookieJar.cookiesForUrl" ID="CookieJar.cookiesForUrl"></a>
242 <h4>CookieJar.cookiesForUrl</h4>
243 <b>cookiesForUrl</b>(<i>url</i>)
244 <p>
245 Public method to get the cookies for a URL.
246 </p><dl>
247 <dt><i>url</i></dt>
248 <dd>
249 URL to get cookies for (QUrl)
250 </dd>
251 </dl><dl>
252 <dt>Returns:</dt>
253 <dd>
254 list of cookies (list of QNetworkCookie)
255 </dd>
256 </dl><a NAME="CookieJar.filterTrackingCookies" ID="CookieJar.filterTrackingCookies"></a>
257 <h4>CookieJar.filterTrackingCookies</h4>
258 <b>filterTrackingCookies</b>(<i></i>)
259 <p>
260 Public method to get the filter tracking cookies flag.
261 </p><dl>
262 <dt>Returns:</dt>
263 <dd>
264 filter tracking cookies flag (boolean)
265 </dd>
266 </dl><a NAME="CookieJar.keepPolicy" ID="CookieJar.keepPolicy"></a>
267 <h4>CookieJar.keepPolicy</h4>
268 <b>keepPolicy</b>(<i></i>)
269 <p>
270 Private method to get the keep policy.
271 </p><a NAME="CookieJar.load" ID="CookieJar.load"></a>
272 <h4>CookieJar.load</h4>
273 <b>load</b>(<i></i>)
274 <p>
275 Public method to load the cookies.
276 </p><a NAME="CookieJar.loadCookies" ID="CookieJar.loadCookies"></a>
277 <h4>CookieJar.loadCookies</h4>
278 <b>loadCookies</b>(<i>cookies</i>)
279 <p>
280 Public method to restore the saved cookies.
281 </p><dl>
282 <dt><i>cookies</i></dt>
283 <dd>
284 byte array containing the saved cookies (QByteArray)
285 </dd>
286 </dl><dl>
287 <dt>Returns:</dt>
288 <dd>
289 list of cookies
290 </dd>
291 </dl><a NAME="CookieJar.save" ID="CookieJar.save"></a>
292 <h4>CookieJar.save</h4>
293 <b>save</b>(<i></i>)
294 <p>
295 Public method to save the cookies.
296 </p><a NAME="CookieJar.saveCookies" ID="CookieJar.saveCookies"></a>
297 <h4>CookieJar.saveCookies</h4>
298 <b>saveCookies</b>(<i>cookiesList</i>)
299 <p>
300 Public method to save the cookies.
301 </p><dl>
302 <dt><i>cookiesList</i></dt>
303 <dd>
304 list of cookies to be saved
305 </dd>
306 </dl><dl>
307 <dt>Returns:</dt>
308 <dd>
309 saved cookies as a byte array (QByteArray)
310 </dd>
311 </dl><a NAME="CookieJar.setAcceptPolicy" ID="CookieJar.setAcceptPolicy"></a>
312 <h4>CookieJar.setAcceptPolicy</h4>
313 <b>setAcceptPolicy</b>(<i>policy</i>)
314 <p>
315 Public method to set the accept policy.
316 </p><dl>
317 <dt><i>policy</i></dt>
318 <dd>
319 accept policy to be set
320 </dd>
321 </dl><a NAME="CookieJar.setAllowForSessionCookies" ID="CookieJar.setAllowForSessionCookies"></a>
322 <h4>CookieJar.setAllowForSessionCookies</h4>
323 <b>setAllowForSessionCookies</b>(<i>list_</i>)
324 <p>
325 Public method to set the list of allowed session cookies.
326 </p><dl>
327 <dt><i>list_</i></dt>
328 <dd>
329 list of allowed session cookies (list of strings)
330 </dd>
331 </dl><a NAME="CookieJar.setAllowedCookies" ID="CookieJar.setAllowedCookies"></a>
332 <h4>CookieJar.setAllowedCookies</h4>
333 <b>setAllowedCookies</b>(<i>list_</i>)
334 <p>
335 Public method to set the list of allowed cookies.
336 </p><dl>
337 <dt><i>list_</i></dt>
338 <dd>
339 list of allowed cookies (list of strings)
340 </dd>
341 </dl><a NAME="CookieJar.setBlockedCookies" ID="CookieJar.setBlockedCookies"></a>
342 <h4>CookieJar.setBlockedCookies</h4>
343 <b>setBlockedCookies</b>(<i>list_</i>)
344 <p>
345 Public method to set the list of blocked cookies.
346 </p><dl>
347 <dt><i>list_</i></dt>
348 <dd>
349 list of blocked cookies (list of strings)
350 </dd>
351 </dl><a NAME="CookieJar.setCookies" ID="CookieJar.setCookies"></a>
352 <h4>CookieJar.setCookies</h4>
353 <b>setCookies</b>(<i>cookies</i>)
354 <p>
355 Public method to set all cookies.
356 </p><dl>
357 <dt><i>cookies</i></dt>
358 <dd>
359 list of cookies to be set (list of QNetworkCookie)
360 </dd>
361 </dl><a NAME="CookieJar.setCookiesFromUrl" ID="CookieJar.setCookiesFromUrl"></a>
362 <h4>CookieJar.setCookiesFromUrl</h4>
363 <b>setCookiesFromUrl</b>(<i>cookieList, url</i>)
364 <p>
365 Public method to set cookies for a URL.
366 </p><dl>
367 <dt><i>cookieList</i></dt>
368 <dd>
369 list of cookies to set (list of QNetworkCookie)
370 </dd><dt><i>url</i></dt>
371 <dd>
372 url to set cookies for (QUrl)
373 </dd>
374 </dl><dl>
375 <dt>Returns:</dt>
376 <dd>
377 flag indicating cookies were set (boolean)
378 </dd>
379 </dl><a NAME="CookieJar.setFilterTrackingCookies" ID="CookieJar.setFilterTrackingCookies"></a>
380 <h4>CookieJar.setFilterTrackingCookies</h4>
381 <b>setFilterTrackingCookies</b>(<i>filterTrackingCookies</i>)
382 <p>
383 Public method to set the filter tracking cookies flag.
384 </p><dl>
385 <dt><i>filterTrackingCookies</i></dt>
386 <dd>
387 filter tracking cookies flag (boolean)
388 </dd>
389 </dl><a NAME="CookieJar.setKeepPolicy" ID="CookieJar.setKeepPolicy"></a>
390 <h4>CookieJar.setKeepPolicy</h4>
391 <b>setKeepPolicy</b>(<i>policy</i>)
392 <p>
393 Public method to set the keep policy.
394 </p><dl>
395 <dt><i>policy</i></dt>
396 <dd>
397 keep policy to be set
398 </dd>
399 </dl>
400 <div align="right"><a href="#top">Up</a></div>
401 <hr />
402 </body></html>

eric ide

mercurial