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
20QT_REQUIRE_CONFIG(http);
21
22QT_BEGIN_NAMESPACE
23
24class QHttpNetworkConnectionChannel;
25class QHttpNetworkReply;
26class QAbstractSocket;
27class QHttpNetworkConnection;
28
29class QAbstractProtocolHandler {
30public:
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
39protected:
40 QHttpNetworkConnectionChannel *m_channel;
41 QHttpNetworkReply *m_reply;
42 QAbstractSocket *m_socket;
43 QHttpNetworkConnection *m_connection;
44};
45
46QT_END_NAMESPACE
47
48#endif // QABSTRACTPROTOCOLHANDLER_H
49

source code of qtbase/src/network/access/qabstractprotocolhandler_p.h