aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-04-25 15:20:46 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-04-26 09:11:33 +0000
commit4505ac832c19870a0d3f7ff198f80c75e3b249e7 (patch)
tree14e275b7d7b24d2a68c1384a823f22b7fdd77c03
parent13e971992160f7e0ff90af59bdc9eef1c17f53e5 (diff)
Move the declaration of QCoapInternalMessage to the private header
This class is intended for internal use only, so it should not have a public header. Change-Id: I18f2433d06e978582b470e14dc89a7c0e404f7d4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/coap/coap.pro1
-rw-r--r--src/coap/qcoapinternalmessage.h74
-rw-r--r--src/coap/qcoapinternalmessage_p.h34
-rw-r--r--src/coap/qcoapinternalreply_p.h1
-rw-r--r--src/coap/qcoapinternalrequest_p.h1
5 files changed, 33 insertions, 78 deletions
diff --git a/src/coap/coap.pro b/src/coap/coap.pro
index 571b746..024de15 100644
--- a/src/coap/coap.pro
+++ b/src/coap/coap.pro
@@ -10,7 +10,6 @@ PUBLIC_HEADERS += \
qcoapconnection.h \
qcoapdiscoveryreply.h \
qcoapglobal.h \
- qcoapinternalmessage.h \
qcoapmessage.h \
qcoapnamespace.h \
qcoapoption.h \
diff --git a/src/coap/qcoapinternalmessage.h b/src/coap/qcoapinternalmessage.h
deleted file mode 100644
index af858bf..0000000
--- a/src/coap/qcoapinternalmessage.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 Witekio.
-** Copyright (C) 2018 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCoap module.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QCOAPINTERNALMESSAGE_H
-#define QCOAPINTERNALMESSAGE_H
-
-#include <QtCoap/qcoapmessage.h>
-#include <QtCore/qobject.h>
-
-QT_BEGIN_NAMESPACE
-
-class QCoapInternalMessagePrivate;
-class Q_AUTOTEST_EXPORT QCoapInternalMessage : public QObject
-{
- Q_OBJECT
-public:
- explicit QCoapInternalMessage(QObject *parent = nullptr);
- explicit QCoapInternalMessage(const QCoapMessage &message, QObject *parent = nullptr);
- QCoapInternalMessage(const QCoapInternalMessage &other, QObject *parent = nullptr);
- virtual ~QCoapInternalMessage() {}
-
- void addOption(QCoapOption::OptionName name, const QByteArray &value);
- void addOption(QCoapOption::OptionName name, quint32 value);
- virtual void addOption(const QCoapOption &option);
- void removeOption(QCoapOption::OptionName name);
-
- QCoapMessage *message();
- const QCoapMessage *message() const;
-
- uint currentBlockNumber() const;
- bool hasMoreBlocksToReceive() const;
- uint blockSize() const;
-
- virtual bool isValid() const;
- static bool isUrlValid(const QUrl &url);
-
-protected:
- explicit QCoapInternalMessage(QCoapInternalMessagePrivate &dd, QObject *parent = nullptr);
-
- void setFromDescriptiveBlockOption(const QCoapOption &option);
-
- Q_DECLARE_PRIVATE(QCoapInternalMessage)
-};
-
-QT_END_NAMESPACE
-
-#endif // QCOAPINTERNALMESSAGE_H
diff --git a/src/coap/qcoapinternalmessage_p.h b/src/coap/qcoapinternalmessage_p.h
index b239ca6..8ed1309 100644
--- a/src/coap/qcoapinternalmessage_p.h
+++ b/src/coap/qcoapinternalmessage_p.h
@@ -31,7 +31,6 @@
#ifndef QCOAPINTERNALMESSAGE_P_H
#define QCOAPINTERNALMESSAGE_P_H
-#include <QtCoap/qcoapinternalmessage.h>
#include <private/qcoapmessage_p.h>
#include <private/qobject_p.h>
@@ -48,6 +47,39 @@
QT_BEGIN_NAMESPACE
+class QCoapInternalMessagePrivate;
+class Q_AUTOTEST_EXPORT QCoapInternalMessage : public QObject
+{
+ Q_OBJECT
+public:
+ explicit QCoapInternalMessage(QObject *parent = nullptr);
+ explicit QCoapInternalMessage(const QCoapMessage &message, QObject *parent = nullptr);
+ QCoapInternalMessage(const QCoapInternalMessage &other, QObject *parent = nullptr);
+ virtual ~QCoapInternalMessage() {}
+
+ void addOption(QCoapOption::OptionName name, const QByteArray &value);
+ void addOption(QCoapOption::OptionName name, quint32 value);
+ virtual void addOption(const QCoapOption &option);
+ void removeOption(QCoapOption::OptionName name);
+
+ QCoapMessage *message();
+ const QCoapMessage *message() const;
+
+ uint currentBlockNumber() const;
+ bool hasMoreBlocksToReceive() const;
+ uint blockSize() const;
+
+ virtual bool isValid() const;
+ static bool isUrlValid(const QUrl &url);
+
+protected:
+ explicit QCoapInternalMessage(QCoapInternalMessagePrivate &dd, QObject *parent = nullptr);
+
+ void setFromDescriptiveBlockOption(const QCoapOption &option);
+
+ Q_DECLARE_PRIVATE(QCoapInternalMessage)
+};
+
class Q_AUTOTEST_EXPORT QCoapInternalMessagePrivate : public QObjectPrivate
{
public:
diff --git a/src/coap/qcoapinternalreply_p.h b/src/coap/qcoapinternalreply_p.h
index 8022769..db9a052 100644
--- a/src/coap/qcoapinternalreply_p.h
+++ b/src/coap/qcoapinternalreply_p.h
@@ -33,7 +33,6 @@
#include <QtCoap/qcoapglobal.h>
#include <QtCoap/qcoapnamespace.h>
-#include <QtCoap/qcoapinternalmessage.h>
#include <private/qcoapinternalmessage_p.h>
#include <QtNetwork/qhostaddress.h>
diff --git a/src/coap/qcoapinternalrequest_p.h b/src/coap/qcoapinternalrequest_p.h
index 0f354b8..1b50aae 100644
--- a/src/coap/qcoapinternalrequest_p.h
+++ b/src/coap/qcoapinternalrequest_p.h
@@ -35,7 +35,6 @@
#include <QtCoap/qcoapglobal.h>
#include <QtCoap/qcoapnamespace.h>
-#include <QtCoap/qcoapinternalmessage.h>
#include <QtCoap/qcoapconnection.h>
#include <QtCore/qglobal.h>