Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qabstractprotocolhandler_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QABSTRACTPROTOCOLHANDLER_H
6#define QABSTRACTPROTOCOLHANDLER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists for the convenience
13// of the Network Access API. This header file may change from
14// version to version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtNetwork/private/qtnetworkglobal_p.h>
20
21#include <QtCore/qtpreprocessorsupport.h>
22
24
25QT_BEGIN_NAMESPACE
26
27class QHttpNetworkConnectionChannel;
28class QHttpNetworkReply;
29class QIODevice;
30class QHttpNetworkConnection;
31
33public:
35 virtual ~QAbstractProtocolHandler();
36
37 virtual void _q_receiveReply() = 0;
38 virtual void _q_readyRead() = 0;
39 virtual bool sendRequest() = 0;
40 // Called when the reply is being destroyed and removing itself from any other internals
41 virtual bool tryRemoveReply(QHttpNetworkReply *reply)
42 {
43 Q_UNUSED(reply);
44 // base implementation is a noop
45 return false;
46 }
47 void setReply(QHttpNetworkReply *reply);
48
49protected:
51 QHttpNetworkReply *m_reply;
52 QIODevice *m_socket;
53 QHttpNetworkConnection *m_connection;
54};
55
56QT_END_NAMESPACE
57
58#endif // QABSTRACTPROTOCOLHANDLER_H
virtual bool tryRemoveReply(QHttpNetworkReply *reply)
QAbstractProtocolHandler(QHttpNetworkConnectionChannel *channel)
virtual void _q_receiveReply()=0
virtual bool sendRequest()=0
QHttpNetworkConnectionChannel * m_channel
virtual void _q_readyRead()=0
QHttpNetworkConnection * m_connection
void setReply(QHttpNetworkReply *reply)
QT_REQUIRE_CONFIG(http)