|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.EricNetwork.EricNetworkProxyFactory</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric7.EricNetwork.EricNetworkProxyFactory</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing a network proxy factory. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#EricNetworkProxyFactory">EricNetworkProxyFactory</a></td> |
|
39 <td>Class implementing a network proxy factory.</td> |
|
40 </tr> |
|
41 <tr> |
|
42 <td><a href="#HostnameMatcher">HostnameMatcher</a></td> |
|
43 <td>Class implementing a matcher for host names.</td> |
|
44 </tr> |
|
45 </table> |
|
46 <h3>Functions</h3> |
|
47 |
|
48 <table> |
|
49 |
|
50 <tr> |
|
51 <td><a href="#proxyAuthenticationRequired">proxyAuthenticationRequired</a></td> |
|
52 <td>Module slot to handle a proxy authentication request.</td> |
|
53 </tr> |
|
54 <tr> |
|
55 <td><a href="#schemeFromProxyType">schemeFromProxyType</a></td> |
|
56 <td>Module function to determine the scheme name from the proxy type.</td> |
|
57 </tr> |
|
58 </table> |
|
59 <hr /> |
|
60 <hr /> |
|
61 <a NAME="EricNetworkProxyFactory" ID="EricNetworkProxyFactory"></a> |
|
62 <h2>EricNetworkProxyFactory</h2> |
|
63 |
|
64 <p> |
|
65 Class implementing a network proxy factory. |
|
66 </p> |
|
67 <h3>Derived from</h3> |
|
68 QNetworkProxyFactory |
|
69 <h3>Class Attributes</h3> |
|
70 |
|
71 <table> |
|
72 <tr><td>None</td></tr> |
|
73 </table> |
|
74 <h3>Class Methods</h3> |
|
75 |
|
76 <table> |
|
77 <tr><td>None</td></tr> |
|
78 </table> |
|
79 <h3>Methods</h3> |
|
80 |
|
81 <table> |
|
82 |
|
83 <tr> |
|
84 <td><a href="#EricNetworkProxyFactory.__init__">EricNetworkProxyFactory</a></td> |
|
85 <td>Constructor</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#EricNetworkProxyFactory.__setExceptions">__setExceptions</a></td> |
|
89 <td>Private method to set the host name exceptions.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#EricNetworkProxyFactory.queryProxy">queryProxy</a></td> |
|
93 <td>Public method to determine a proxy for a given query.</td> |
|
94 </tr> |
|
95 </table> |
|
96 <h3>Static Methods</h3> |
|
97 |
|
98 <table> |
|
99 <tr><td>None</td></tr> |
|
100 </table> |
|
101 |
|
102 <a NAME="EricNetworkProxyFactory.__init__" ID="EricNetworkProxyFactory.__init__"></a> |
|
103 <h4>EricNetworkProxyFactory (Constructor)</h4> |
|
104 <b>EricNetworkProxyFactory</b>(<i></i>) |
|
105 |
|
106 <p> |
|
107 Constructor |
|
108 </p> |
|
109 <a NAME="EricNetworkProxyFactory.__setExceptions" ID="EricNetworkProxyFactory.__setExceptions"></a> |
|
110 <h4>EricNetworkProxyFactory.__setExceptions</h4> |
|
111 <b>__setExceptions</b>(<i>exceptions</i>) |
|
112 |
|
113 <p> |
|
114 Private method to set the host name exceptions. |
|
115 </p> |
|
116 <dl> |
|
117 |
|
118 <dt><i>exceptions</i> (str)</dt> |
|
119 <dd> |
|
120 list of exceptions separated by ',' |
|
121 </dd> |
|
122 </dl> |
|
123 <a NAME="EricNetworkProxyFactory.queryProxy" ID="EricNetworkProxyFactory.queryProxy"></a> |
|
124 <h4>EricNetworkProxyFactory.queryProxy</h4> |
|
125 <b>queryProxy</b>(<i>query</i>) |
|
126 |
|
127 <p> |
|
128 Public method to determine a proxy for a given query. |
|
129 </p> |
|
130 <dl> |
|
131 |
|
132 <dt><i>query</i></dt> |
|
133 <dd> |
|
134 reference to the query object (QNetworkProxyQuery) |
|
135 </dd> |
|
136 </dl> |
|
137 <dl> |
|
138 <dt>Return:</dt> |
|
139 <dd> |
|
140 list of proxies in order of preference (list of QNetworkProxy) |
|
141 </dd> |
|
142 </dl> |
|
143 <div align="right"><a href="#top">Up</a></div> |
|
144 <hr /> |
|
145 <hr /> |
|
146 <a NAME="HostnameMatcher" ID="HostnameMatcher"></a> |
|
147 <h2>HostnameMatcher</h2> |
|
148 |
|
149 <p> |
|
150 Class implementing a matcher for host names. |
|
151 </p> |
|
152 <h3>Derived from</h3> |
|
153 None |
|
154 <h3>Class Attributes</h3> |
|
155 |
|
156 <table> |
|
157 <tr><td>None</td></tr> |
|
158 </table> |
|
159 <h3>Class Methods</h3> |
|
160 |
|
161 <table> |
|
162 <tr><td>None</td></tr> |
|
163 </table> |
|
164 <h3>Methods</h3> |
|
165 |
|
166 <table> |
|
167 |
|
168 <tr> |
|
169 <td><a href="#HostnameMatcher.__init__">HostnameMatcher</a></td> |
|
170 <td>Constructor</td> |
|
171 </tr> |
|
172 <tr> |
|
173 <td><a href="#HostnameMatcher.match">match</a></td> |
|
174 <td>Public method to test the given string.</td> |
|
175 </tr> |
|
176 <tr> |
|
177 <td><a href="#HostnameMatcher.pattern">pattern</a></td> |
|
178 <td>Public method to get the match pattern.</td> |
|
179 </tr> |
|
180 <tr> |
|
181 <td><a href="#HostnameMatcher.setPattern">setPattern</a></td> |
|
182 <td>Public method to set the match pattern.</td> |
|
183 </tr> |
|
184 </table> |
|
185 <h3>Static Methods</h3> |
|
186 |
|
187 <table> |
|
188 <tr><td>None</td></tr> |
|
189 </table> |
|
190 |
|
191 <a NAME="HostnameMatcher.__init__" ID="HostnameMatcher.__init__"></a> |
|
192 <h4>HostnameMatcher (Constructor)</h4> |
|
193 <b>HostnameMatcher</b>(<i>pattern</i>) |
|
194 |
|
195 <p> |
|
196 Constructor |
|
197 </p> |
|
198 <dl> |
|
199 |
|
200 <dt><i>pattern</i> (str)</dt> |
|
201 <dd> |
|
202 pattern to be matched against |
|
203 </dd> |
|
204 </dl> |
|
205 <a NAME="HostnameMatcher.match" ID="HostnameMatcher.match"></a> |
|
206 <h4>HostnameMatcher.match</h4> |
|
207 <b>match</b>(<i>host</i>) |
|
208 |
|
209 <p> |
|
210 Public method to test the given string. |
|
211 </p> |
|
212 <dl> |
|
213 |
|
214 <dt><i>host</i> (str)</dt> |
|
215 <dd> |
|
216 host name to be matched |
|
217 </dd> |
|
218 </dl> |
|
219 <dl> |
|
220 <dt>Return:</dt> |
|
221 <dd> |
|
222 flag indicating a successful match |
|
223 </dd> |
|
224 </dl> |
|
225 <dl> |
|
226 <dt>Return Type:</dt> |
|
227 <dd> |
|
228 bool |
|
229 </dd> |
|
230 </dl> |
|
231 <a NAME="HostnameMatcher.pattern" ID="HostnameMatcher.pattern"></a> |
|
232 <h4>HostnameMatcher.pattern</h4> |
|
233 <b>pattern</b>(<i></i>) |
|
234 |
|
235 <p> |
|
236 Public method to get the match pattern. |
|
237 </p> |
|
238 <dl> |
|
239 <dt>Return:</dt> |
|
240 <dd> |
|
241 match pattern |
|
242 </dd> |
|
243 </dl> |
|
244 <dl> |
|
245 <dt>Return Type:</dt> |
|
246 <dd> |
|
247 str |
|
248 </dd> |
|
249 </dl> |
|
250 <a NAME="HostnameMatcher.setPattern" ID="HostnameMatcher.setPattern"></a> |
|
251 <h4>HostnameMatcher.setPattern</h4> |
|
252 <b>setPattern</b>(<i>pattern</i>) |
|
253 |
|
254 <p> |
|
255 Public method to set the match pattern. |
|
256 </p> |
|
257 <dl> |
|
258 |
|
259 <dt><i>pattern</i></dt> |
|
260 <dd> |
|
261 pattern to be matched against |
|
262 </dd> |
|
263 </dl> |
|
264 <div align="right"><a href="#top">Up</a></div> |
|
265 <hr /> |
|
266 <hr /> |
|
267 <a NAME="proxyAuthenticationRequired" ID="proxyAuthenticationRequired"></a> |
|
268 <h2>proxyAuthenticationRequired</h2> |
|
269 <b>proxyAuthenticationRequired</b>(<i>proxy, auth</i>) |
|
270 |
|
271 <p> |
|
272 Module slot to handle a proxy authentication request. |
|
273 </p> |
|
274 <dl> |
|
275 |
|
276 <dt><i>proxy</i></dt> |
|
277 <dd> |
|
278 reference to the proxy object (QNetworkProxy) |
|
279 </dd> |
|
280 <dt><i>auth</i></dt> |
|
281 <dd> |
|
282 reference to the authenticator object (QAuthenticator) |
|
283 </dd> |
|
284 </dl> |
|
285 <div align="right"><a href="#top">Up</a></div> |
|
286 <hr /> |
|
287 <hr /> |
|
288 <a NAME="schemeFromProxyType" ID="schemeFromProxyType"></a> |
|
289 <h2>schemeFromProxyType</h2> |
|
290 <b>schemeFromProxyType</b>(<i>proxyType</i>) |
|
291 |
|
292 <p> |
|
293 Module function to determine the scheme name from the proxy type. |
|
294 </p> |
|
295 <dl> |
|
296 |
|
297 <dt><i>proxyType</i></dt> |
|
298 <dd> |
|
299 type of the proxy (QNetworkProxy.ProxyType) |
|
300 </dd> |
|
301 </dl> |
|
302 <dl> |
|
303 <dt>Return:</dt> |
|
304 <dd> |
|
305 scheme (string, one of Http, Https, Ftp) |
|
306 </dd> |
|
307 </dl> |
|
308 <div align="right"><a href="#top">Up</a></div> |
|
309 <hr /> |
|
310 </body></html> |