diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-11 00:26:02 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-05-14 15:15:05 +0000 |
commit | 218d796a1e9a2ae9ad87c71f7487a62d3a7dbab2 (patch) | |
tree | 28cfeae0555f75eb645b6f0a66e3826975c7f35a /src/coap/qcoapresourcediscoveryreply.h | |
parent | a5beff7436aba965d16b63d5677b6d3920724c59 (diff) |
Rename QCoapDiscoveryReply -> QCoapResourceDiscoveryReply
This change is based on the feedback from API review.
Change-Id: I43f08d5bd7f7f172ea4d337718be7bd14e81d64c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/coap/qcoapresourcediscoveryreply.h')
-rw-r--r-- | src/coap/qcoapresourcediscoveryreply.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/coap/qcoapresourcediscoveryreply.h b/src/coap/qcoapresourcediscoveryreply.h new file mode 100644 index 0000000..132f3d7 --- /dev/null +++ b/src/coap/qcoapresourcediscoveryreply.h @@ -0,0 +1,62 @@ +/**************************************************************************** +** +** 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 QCOAPRESOURCEDISCOVERYREPLY_H +#define QCOAPRESOURCEDISCOVERYREPLY_H + +#include <QtCoap/qcoapreply.h> +#include <QtCoap/qcoapresource.h> +#include <QtCore/qlist.h> + +QT_BEGIN_NAMESPACE + +class QCoapResourceDiscoveryReplyPrivate; +class Q_COAP_EXPORT QCoapResourceDiscoveryReply : public QCoapReply +{ + Q_OBJECT + +public: + explicit QCoapResourceDiscoveryReply(const QCoapRequest &request, QObject *parent = nullptr); + + QVector<QCoapResource> resources() const; + + static QVector<QCoapResource> resourcesFromCoreLinkList( + const QHostAddress &sender, const QByteArray &data); + +Q_SIGNALS: + void discovered(QCoapResourceDiscoveryReply *reply, QVector<QCoapResource> resources); + +private: + Q_DECLARE_PRIVATE(QCoapResourceDiscoveryReply) +}; + +QT_END_NAMESPACE + +#endif // QCOAPRESOURCEDISCOVERYREPLY_H |