12 from PyQt4.QtNetwork import QSslError # __IGNORE_WARNING__ |
12 from PyQt4.QtNetwork import QSslError # __IGNORE_WARNING__ |
13 SSL_AVAILABLE = True |
13 SSL_AVAILABLE = True |
14 except ImportError: |
14 except ImportError: |
15 SSL_AVAILABLE = False |
15 SSL_AVAILABLE = False |
16 |
16 |
|
17 |
17 class NetworkAccessManagerProxy(QNetworkAccessManager): |
18 class NetworkAccessManagerProxy(QNetworkAccessManager): |
18 """ |
19 """ |
19 Class implementing a network access manager proxy for web pages. |
20 Class implementing a network access manager proxy for web pages. |
20 """ |
21 """ |
21 primaryManager = None |
22 primaryManager = None |
22 |
23 |
23 def __init__(self, parent = None): |
24 def __init__(self, parent=None): |
24 """ |
25 """ |
25 Constructor |
26 Constructor |
26 |
27 |
27 @param parent reference to the parent object (QObject) |
28 @param parent reference to the parent object (QObject) |
28 """ |
29 """ |
58 self.__class__.primaryManager.proxyAuthenticationRequired) |
59 self.__class__.primaryManager.proxyAuthenticationRequired) |
59 self.authenticationRequired.connect( |
60 self.authenticationRequired.connect( |
60 self.__class__.primaryManager.authenticationRequired) |
61 self.__class__.primaryManager.authenticationRequired) |
61 self.finished.connect(self.__class__.primaryManager.finished) |
62 self.finished.connect(self.__class__.primaryManager.finished) |
62 |
63 |
63 def createRequest(self, op, request, outgoingData = None): |
64 def createRequest(self, op, request, outgoingData=None): |
64 """ |
65 """ |
65 Protected method to create a request. |
66 Protected method to create a request. |
66 |
67 |
67 @param op the operation to be performed (QNetworkAccessManager.Operation) |
68 @param op the operation to be performed (QNetworkAccessManager.Operation) |
68 @param request reference to the request object (QNetworkRequest) |
69 @param request reference to the request object (QNetworkRequest) |