equal
deleted
inserted
replaced
56 #include "qnetworkaccessmanager.h" |
56 #include "qnetworkaccessmanager.h" |
57 #include "qnetworkaccesscache_p.h" |
57 #include "qnetworkaccesscache_p.h" |
58 #include "qnetworkaccessbackend_p.h" |
58 #include "qnetworkaccessbackend_p.h" |
59 #include "private/qobject_p.h" |
59 #include "private/qobject_p.h" |
60 #include "QtNetwork/qnetworkproxy.h" |
60 #include "QtNetwork/qnetworkproxy.h" |
|
61 #include "QtNetwork/qnetworksession.h" |
61 |
62 |
62 QT_BEGIN_NAMESPACE |
63 QT_BEGIN_NAMESPACE |
63 |
64 |
64 class QAuthenticator; |
65 class QAuthenticator; |
65 class QAbstractNetworkCache; |
66 class QAbstractNetworkCache; |
71 public: |
72 public: |
72 QNetworkAccessManagerPrivate() |
73 QNetworkAccessManagerPrivate() |
73 : networkCache(0), cookieJar(0), |
74 : networkCache(0), cookieJar(0), |
74 #ifndef QT_NO_NETWORKPROXY |
75 #ifndef QT_NO_NETWORKPROXY |
75 proxyFactory(0), |
76 proxyFactory(0), |
|
77 #endif |
|
78 #ifndef QT_NO_BEARERMANAGEMENT |
|
79 networkSession(0), |
|
80 networkAccessible(QNetworkAccessManager::Accessible), |
|
81 online(false), |
|
82 initializeSession(true), |
76 #endif |
83 #endif |
77 cookieJarCreated(false) |
84 cookieJarCreated(false) |
78 { } |
85 { } |
79 ~QNetworkAccessManagerPrivate(); |
86 ~QNetworkAccessManagerPrivate(); |
80 |
87 |
97 QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query); |
104 QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query); |
98 #endif |
105 #endif |
99 |
106 |
100 QNetworkAccessBackend *findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request); |
107 QNetworkAccessBackend *findBackend(QNetworkAccessManager::Operation op, const QNetworkRequest &request); |
101 |
108 |
|
109 #ifndef QT_NO_BEARERMANAGEMENT |
|
110 void createSession(const QNetworkConfiguration &config); |
|
111 |
|
112 void _q_networkSessionClosed(); |
|
113 void _q_networkSessionNewConfigurationActivated(); |
|
114 void _q_networkSessionPreferredConfigurationChanged(const QNetworkConfiguration &config, |
|
115 bool isSeamless); |
|
116 void _q_networkSessionStateChanged(QNetworkSession::State state); |
|
117 #endif |
|
118 |
102 // this is the cache for storing downloaded files |
119 // this is the cache for storing downloaded files |
103 QAbstractNetworkCache *networkCache; |
120 QAbstractNetworkCache *networkCache; |
104 |
121 |
105 QNetworkCookieJar *cookieJar; |
122 QNetworkCookieJar *cookieJar; |
106 |
123 |
108 #ifndef QT_NO_NETWORKPROXY |
125 #ifndef QT_NO_NETWORKPROXY |
109 QNetworkProxy proxy; |
126 QNetworkProxy proxy; |
110 QNetworkProxyFactory *proxyFactory; |
127 QNetworkProxyFactory *proxyFactory; |
111 #endif |
128 #endif |
112 |
129 |
|
130 #ifndef QT_NO_BEARERMANAGEMENT |
|
131 QNetworkSession *networkSession; |
|
132 QString networkConfiguration; |
|
133 QNetworkAccessManager::NetworkAccessibility networkAccessible; |
|
134 bool online; |
|
135 bool initializeSession; |
|
136 #endif |
|
137 |
113 bool cookieJarCreated; |
138 bool cookieJarCreated; |
114 |
|
115 |
139 |
116 // this cache can be used by individual backends to cache e.g. their TCP connections to a server |
140 // this cache can be used by individual backends to cache e.g. their TCP connections to a server |
117 // and use the connections for multiple requests. |
141 // and use the connections for multiple requests. |
118 QNetworkAccessCache objectCache; |
142 QNetworkAccessCache objectCache; |
119 static inline QNetworkAccessCache *getObjectCache(QNetworkAccessBackend *backend) |
143 static inline QNetworkAccessCache *getObjectCache(QNetworkAccessBackend *backend) |