blob: f6d863f6ab190bfa930c2711deb1622a1ee80a2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// Copyright (C) 2017 Witekio.
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#ifndef QCOAPRESOURCE_H
#define QCOAPRESOURCE_H
#include <QtCoap/qcoapglobal.h>
#include <QtCore/qshareddata.h>
#include <QtNetwork/qhostaddress.h>
#ifdef interface
# undef interface
#endif
QT_BEGIN_NAMESPACE
class QCoapResourcePrivate;
class Q_COAP_EXPORT QCoapResource
{
public:
QCoapResource();
QCoapResource(const QCoapResource &other);
~QCoapResource();
QCoapResource &operator =(const QCoapResource &other);
void swap(QCoapResource &other) noexcept;
QHostAddress host() const;
QString path() const;
QString title() const;
bool observable() const;
QString resourceType() const;
QString interface() const;
int maximumSize() const;
uint contentFormat() const;
void setHost(const QHostAddress &host);
void setPath(const QString &path);
void setTitle(const QString &title);
void setObservable(bool observable);
void setResourceType(const QString &resourceType);
void setInterface(const QString &interface);
void setMaximumSize(int maximumSize);
void setContentFormat(uint contentFormat);
private:
QSharedDataPointer<QCoapResourcePrivate> d;
};
Q_DECLARE_SHARED(QCoapResource)
QT_END_NAMESPACE
#endif // QCOAPRESOURCE_H
|