3 * All rights reserved. |
3 * All rights reserved. |
4 * |
4 * |
5 * This program is free software: you can redistribute it and/or modify |
5 * This program is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU Lesser General Public License as published by |
6 * it under the terms of the GNU Lesser General Public License as published by |
7 * the Free Software Foundation, version 2.1 of the License. |
7 * the Free Software Foundation, version 2.1 of the License. |
8 * |
8 * |
9 * This program is distributed in the hope that it will be useful, |
9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU Lesser General Public License for more details. |
12 * GNU Lesser General Public License for more details. |
13 * |
13 * |
14 * You should have received a copy of the GNU Lesser General Public License |
14 * You should have received a copy of the GNU Lesser General Public License |
15 * along with this program. If not, |
15 * along with this program. If not, |
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
17 * |
17 * |
18 * Description: |
18 * Description: |
19 * |
19 * |
20 */ |
20 */ |
46 public: |
52 public: |
47 WebNetworkAccessManager(WrtBrowserContainer* page, QObject* parent = 0); |
53 WebNetworkAccessManager(WrtBrowserContainer* page, QObject* parent = 0); |
48 virtual ~WebNetworkAccessManager(); |
54 virtual ~WebNetworkAccessManager(); |
49 |
55 |
50 void onMessageBoxResponse(int retValue); |
56 void onMessageBoxResponse(int retValue); |
51 int activeNetworkInterfaces(); |
57 int activeNetworkInterfaces(); |
52 |
58 void deleteCookiesFromMemory(); |
|
59 |
53 public slots: |
60 public slots: |
54 |
61 |
55 protected: |
62 protected: |
56 virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, |
63 virtual QNetworkReply *createRequest(Operation op, const QNetworkRequest &request, |
57 QIODevice *outgoingData = 0); |
64 QIODevice *outgoingData = 0); |
61 //Handle connection request. |
68 //Handle connection request. |
62 QNetworkReply* createRequestHelper(Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0); |
69 QNetworkReply* createRequestHelper(Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0); |
63 |
70 |
64 private slots: |
71 private slots: |
65 void onfinished(QNetworkReply* reply); |
72 void onfinished(QNetworkReply* reply); |
66 |
73 |
67 private: |
74 private: |
68 WrtBrowserContainer* m_browserContainer; |
75 WrtBrowserContainer* m_browserContainer; |
69 CookieJar* m_cookieJar; |
76 CookieJar* m_cookieJar; |
70 QNetworkReply* m_reply; |
77 QNetworkReply* m_reply; |
71 QNetworkRequest* m_req; |
78 QNetworkRequest* m_req; |
72 SchemeHandler::SchemeHandlerError m_schemeError; |
79 SchemeHandler::SchemeHandlerError m_schemeError; |
73 |
80 |
74 #if QT_VERSION >= 0x040500 |
81 #if QT_VERSION >= 0x040500 |
|
82 #ifndef QTHTTPCACHE |
|
83 FeatherWeightCache *qDiskCache; |
|
84 #else |
75 QNetworkDiskCache *qDiskCache; |
85 QNetworkDiskCache *qDiskCache; |
76 |
86 #endif |
77 #endif |
87 #endif |
78 |
88 |
79 signals: |
89 signals: |
80 void showMessageBox(WRT::MessageBoxProxy* data); |
90 void showMessageBox(WRT::MessageBoxProxy* data); |
81 void networkErrorHappened(const QString & msg); |
91 void networkErrorHappened(const QString & msg); |
82 void networkErrorUrl(const QUrl & url); |
92 void networkErrorUrl(const QUrl & url); |
83 }; |
93 }; |
84 } |
94 } |
85 #endif |
95 #endif |