| 1 | // Copyright (C) 2014 BlackBerry Limited. All rights reserved. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QABSTRACTPROTOCOLHANDLER_H |
| 5 | #define QABSTRACTPROTOCOLHANDLER_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists for the convenience |
| 12 | // of the Network Access API. This header file may change from |
| 13 | // version to version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtNetwork/private/qtnetworkglobal_p.h> |
| 19 | |
| 20 | QT_REQUIRE_CONFIG(http); |
| 21 | |
| 22 | QT_BEGIN_NAMESPACE |
| 23 | |
| 24 | class QHttpNetworkConnectionChannel; |
| 25 | class QHttpNetworkReply; |
| 26 | class QIODevice; |
| 27 | class QHttpNetworkConnection; |
| 28 | |
| 29 | class QAbstractProtocolHandler { |
| 30 | public: |
| 31 | QAbstractProtocolHandler(QHttpNetworkConnectionChannel *channel); |
| 32 | virtual ~QAbstractProtocolHandler(); |
| 33 | |
| 34 | virtual void _q_receiveReply() = 0; |
| 35 | virtual void _q_readyRead() = 0; |
| 36 | virtual bool sendRequest() = 0; |
| 37 | void setReply(QHttpNetworkReply *reply); |
| 38 | |
| 39 | protected: |
| 40 | QHttpNetworkConnectionChannel *m_channel; |
| 41 | QHttpNetworkReply *m_reply; |
| 42 | QIODevice *m_socket; |
| 43 | QHttpNetworkConnection *m_connection; |
| 44 | }; |
| 45 | |
| 46 | QT_END_NAMESPACE |
| 47 | |
| 48 | #endif // QABSTRACTPROTOCOLHANDLER_H |
| 49 | |