The QCoapResource class holds information about a discovered resource. More...
Header: | #include <QCoapResource> |
qmake: | QT += coap |
Note: All functions in this class are reentrant.
QCoapResource(const QCoapResource &other) | |
QCoapResource() | |
QCoapResource & | operator=(const QCoapResource &other) |
~QCoapResource() | |
uint | contentFormat() const |
QHostAddress | host() const |
QString | interface() const |
int | maximumSize() const |
bool | observable() const |
QString | path() const |
QString | resourceType() const |
void | setContentFormat(uint contentFormat) |
void | setHost(const QHostAddress &host) |
void | setInterface(const QString &interface) |
void | setMaximumSize(int maximumSize) |
void | setObservable(bool observable) |
void | setPath(const QString &path) |
void | setResourceType(const QString &resourceType) |
void | setTitle(const QString &title) |
void | swap(QCoapResource &other) |
QString | title() const |
The QCoapRequest contains data as the path and title of the resource and other ancillary information.
See also QCoapResourceDiscoveryReply.
Constructs a new CoAP resource as a copy of other, making the two resources identical.
Constructs a new QCoapResource.
Copies other into this resource, making the two resources identical. Returns a reference to this QCoapResource.
Destroy the QCoapResource.
Returns the Content-Format code of the resource.
The Content-Format code corresponds to the 'ct' attribute and provides a hint about the Content-Formats this resource returns. It is specified in RFC 7252.
See also setContentFormat().
Returns the host of the resource.
See also setHost().
Returns the interface description of the resource.
The Interface Description 'if' attribute is an opaque string used to provide a name or URI indicating a specific interface definition used to interact with the target resource. It is specified in RFC 6690.
See also setInterface().
Returns the maximum size of the resource.
The maximum size estimate attribute 'sz' gives an indication of the maximum size of the resource representation returned by performing a GET on the target URI. It is specified in RFC 6690.
See also setMaximumSize().
Returns true
if the resource is observable
See also setObservable().
Returns the path of the resource.
See also setPath().
Returns the type of the resource.
See also setResourceType().
Sets the content format of the resource to contentFormat. The content format can be one of the content formats defined in CoAP Content-Formats Registry.
Note: CoAP supports common content formats such as XML, JSON, and so on, but these are text based and consequently heavy both in payload and in processing. One of the recommended content formats to use with CoAP is CBOR, which is designed to be used in such contexts.
See also contentFormat(), QCborStreamWriter, and QCborStreamReader.
Sets the host of the resource to host.
See also host().
Sets the interface of the resource to interface.
See also interface().
Sets the maximum size of the resource to maximumSize.
See also maximumSize().
Makes the resource observable if the observable parameter is true
.
See also observable().
Sets the path of the resource to path.
See also path().
Sets the resource type to resourceType.
See also resourceType().
Sets the title of the resource to title.
See also title().
Swaps this resource with other. This operation is very fast and never fails.
Returns the title of the resource.
See also setTitle().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qcoapresource.html