1 | // Copyright (C) 2016 The Qt Company Ltd. |
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 QNETWORKREQUEST_P_H |
5 | #define QNETWORKREQUEST_P_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 | #include "qnetworkrequest.h" |
20 | #include "QtCore/qbytearray.h" |
21 | #include "QtCore/qlist.h" |
22 | #include "QtCore/qhash.h" |
23 | #include "QtCore/qshareddata.h" |
24 | #include "QtCore/qsharedpointer.h" |
25 | #include "QtCore/qpointer.h" |
26 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | // this is the common part between QNetworkRequestPrivate, QNetworkReplyPrivate and QHttpPartPrivate |
30 | class |
31 | { |
32 | public: |
33 | typedef QPair<QByteArray, QByteArray> ; |
34 | typedef QList<RawHeaderPair> ; |
35 | typedef QHash<QNetworkRequest::KnownHeaders, QVariant> ; |
36 | typedef QHash<QNetworkRequest::Attribute, QVariant> ; |
37 | |
38 | RawHeadersList ; |
39 | CookedHeadersMap ; |
40 | AttributesMap ; |
41 | QPointer<QObject> ; |
42 | |
43 | RawHeadersList::ConstIterator (const QByteArray &key) const; |
44 | RawHeadersList () const; |
45 | QList<QByteArray> () const; |
46 | void (const QByteArray &key, const QByteArray &value); |
47 | void (const RawHeadersList &list); |
48 | void (QNetworkRequest::KnownHeaders , const QVariant &value); |
49 | |
50 | static QDateTime (const QByteArray &value); |
51 | static QByteArray (const QDateTime &dt); |
52 | |
53 | private: |
54 | void (const QByteArray &key, const QByteArray &value); |
55 | void parseAndSetHeader(const QByteArray &key, const QByteArray &value); |
56 | }; |
57 | |
58 | Q_DECLARE_TYPEINFO(QNetworkHeadersPrivate::RawHeaderPair, Q_RELOCATABLE_TYPE); |
59 | |
60 | QT_END_NAMESPACE |
61 | |
62 | |
63 | #endif |
64 | |