| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef BASENETWORKACCESSMANAGER_H |
| 4 | #define BASENETWORKACCESSMANAGER_H |
| 5 | |
| 6 | #include "network-web/networkfactory.h" |
| 7 | |
| 8 | #include <QNetworkAccessManager> |
| 9 | |
| 10 | // This is base class for all network access managers. |
| 11 | class BaseNetworkAccessManager : public QNetworkAccessManager { |
| 12 | Q_OBJECT |
| 13 | |
| 14 | public: |
| 15 | explicit BaseNetworkAccessManager(QObject* parent = nullptr); |
| 16 | |
| 17 | void setSpecificHtpp2Status(NetworkFactory::Http2Status status); |
| 18 | |
| 19 | public slots: |
| 20 | void loadSettings(); |
| 21 | |
| 22 | protected slots: |
| 23 | void onSslErrors(QNetworkReply* reply, const QList<QSslError>& error); |
| 24 | |
| 25 | protected: |
| 26 | QNetworkReply* createRequest(Operation op, const QNetworkRequest& request, QIODevice* outgoingData); |
| 27 | |
| 28 | private: |
| 29 | bool m_enableHttp2; |
| 30 | }; |
| 31 | |
| 32 | #endif // BASENETWORKACCESSMANAGER_H |