1// Copyright (C) 2017 Witekio.
2// Copyright (C) 2018 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QCOAPREQUEST_P_H
7#define QCOAPREQUEST_P_H
8
9#include <private/qcoapnamespace_p.h>
10#include <QtCoap/qcoaprequest.h>
11#include <private/qcoapmessage_p.h>
12
13//
14// W A R N I N G
15// -------------
16//
17// This file is not part of the Qt API. It exists purely as an
18// implementation detail. This header file may change from version to
19// version without notice, or even be removed.
20//
21// We mean it.
22//
23
24QT_BEGIN_NAMESPACE
25
26class Q_AUTOTEST_EXPORT QCoapRequestPrivate : public QCoapMessagePrivate
27{
28public:
29 QCoapRequestPrivate(const QUrl &url = QUrl(),
30 QCoapMessage::Type type = QCoapMessage::Type::NonConfirmable,
31 const QUrl &proxyUrl = QUrl());
32 ~QCoapRequestPrivate();
33
34 QCoapRequestPrivate *clone() const override;
35
36 void setUrl(const QUrl &url);
37 void adjustUrl(bool secure);
38
39 static QCoapRequest createRequest(const QCoapRequest &other, QtCoap::Method method,
40 bool isSecure = false);
41 static QUrl adjustedUrl(const QUrl &url, bool secure);
42 static bool isUrlValid(const QUrl &url);
43
44 QUrl uri;
45 QUrl proxyUri;
46 QtCoap::Method method = QtCoap::Method::Invalid;
47
48protected:
49 QCoapRequestPrivate(const QCoapRequestPrivate &other) = default;
50};
51
52QT_END_NAMESPACE
53
54#endif // QCOAPREQUEST_P_H
55

source code of qtcoap/src/coap/qcoaprequest_p.h