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
qformdatabuilder.h
Go to the documentation of this file.
1// Copyright (C) 2024 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// Qt-Security score:significant reason:default
4
5#ifndef QFORMDATABUILDER_H
6#define QFORMDATABUILDER_H
7
8#include <QtNetwork/qtnetworkglobal.h>
9#include <QtNetwork/qhttpheaders.h>
10#include <QtNetwork/qhttpmultipart.h>
11
12#include <QtCore/qbytearray.h>
13#include <QtCore/qflags.h>
14#include <QtCore/qiodevice.h>
15#include <QtCore/qstring.h>
16
17#include <memory>
18
19#ifndef Q_OS_WASM
21#endif
22
23QT_BEGIN_NAMESPACE
24
25class QHttpPartPrivate;
26class QHttpMultiPart;
27class QDebug;
28
30class QFormDataPartBuilderPrivate;
31
33{
34 QFormDataPartBuilder(QFormDataBuilderPrivate *qfdb, qsizetype idx) : d(qfdb), m_index(idx) {}
35public:
36 void swap(QFormDataPartBuilder &other) noexcept
37 {
38 qt_ptr_swap(d, other.d);
39 std::swap(m_index, other.m_index);
40 }
41
43 // Rule of zero applies
44
49
57private:
61
62 QFormDataPartBuilderPrivate* d_func();
63 const QFormDataPartBuilderPrivate* d_func() const;
64
66 size_t m_index;
67
68 friend class QFormDataBuilder;
69};
70
71Q_DECLARE_SHARED(QFormDataPartBuilder)
72
105Q_DECLARE_OPERATORS_FOR_FLAGS(QFormDataBuilder::Options)
106
107Q_DECLARE_SHARED(QFormDataBuilder)
108
109QT_END_NAMESPACE
110
111#endif // QFORMDATABUILDER_H
std::vector< QFormDataPartBuilderPrivate > parts
The QFormDataBuilder class is a convenience class to simplify the construction of QHttpMultiPart obje...
QFormDataBuilder(QFormDataBuilder &&other) noexcept
The QFormDataPartBuilder class is a convenience class to simplify the construction of QHttpPart objec...
void swap(QFormDataPartBuilder &other) noexcept
QFormDataPartBuilder()=default
static void convertInto_impl(QByteArray &dst, QUtf8StringView in)
static void convertInto(QByteArray &dst, QAnyStringView in)
static void escapeNameAndAppend(QByteArray &dst, QByteArrayView src)
QT_REQUIRE_CONFIG(http)