aboutsummaryrefslogtreecommitdiffstats
path: root/src/coap/qcoapclient.cpp
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-02-20 09:40:37 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2019-03-04 13:06:08 +0000
commit185575746b29f475ed5a9643edd5dbace58a0e4b (patch)
tree9bb1e703b80992432033525b2926399466e45ea7 /src/coap/qcoapclient.cpp
parent98b4ac3db7e86feb69e1cc8e80cc00d89c87e890 (diff)
Change QtCoap to be a namespace and improve the docs
- QtCoap was changed to be a namespace instead of a class. - Moved the static QtCoap::randomGenerator to a method returning a reference to a local static object. - The corresponding documentation and function definitions were moved to its .cpp file. - Added the missing documentation. Change-Id: Ie0c60189b18b8f5e8d9a94f91b6fb7b9259984dd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/coap/qcoapclient.cpp')
-rw-r--r--src/coap/qcoapclient.cpp164
1 files changed, 0 insertions, 164 deletions
diff --git a/src/coap/qcoapclient.cpp b/src/coap/qcoapclient.cpp
index fafa0d7..34608c1 100644
--- a/src/coap/qcoapclient.cpp
+++ b/src/coap/qcoapclient.cpp
@@ -41,8 +41,6 @@
QT_BEGIN_NAMESPACE
-QRandomGenerator QtCoap::randomGenerator = QRandomGenerator::securelySeeded();
-
QCoapClientPrivate::QCoapClientPrivate(QCoapProtocol *protocol, QCoapConnection *connection)
: protocol(protocol)
, connection(connection)
@@ -63,168 +61,6 @@ QCoapClientPrivate::~QCoapClientPrivate()
}
/*!
- \enum QtCoap::SecurityMode
-
- Specifies the security mode used for securing a CoAP connection, as defined in
- \l{https://tools.ietf.org/html/rfc7252#section-9}{RFC 7252}.
-
- \value NoSec There is no protocol-level security (DTLS is disabled).
-
- \value PreSharedKey DTLS is enabled, PSK authentication will be used for security.
-
- \value RawPublicKey DTLS is enabled, an asymmetric key pair without a certificate
- (a raw public key) will be used for security. This mode is not
- supported yet.
-
- \value Certificate DTLS is enabled, an asymmetric key pair with an X.509 certificate
- will be used for security.
-*/
-/*!
- \enum QtCoap::Error
-
- Indicates and error condition found during the processing of the request.
-
- \value NoError No error condition.
-
- \value HostNotFoundError The remote host name was not found.
-
- \value AddressInUseError The address is already in use.
-
- \value TimeOutError The response did not arrive in time.
-
- \value BadRequestError The request was not recognized.
-
- \value Unauthorized The client is not authorized to perform
- the requested action.
-
- \value BadOption The request could not be understood by
- the server due to one or more unrecognized
- or malformed options.
-
- \value Forbidden The access to this resource is forbidden.
- This Response Code is like HTTP 403
- "Forbidden".
-
- \value NotFound The resource requested was not found.
- This Response Code is like HTTP 404
- "Not Found".
-
- \value MethodNotAllowed The method used is not allowed by the server.
- This Response Code is like HTTP 405
- "Method Not Allowed" but with no parallel
- to the "Allow" header field.
-
- \value NotAcceptable No resource satisfying the request's acceptance
- criteria was found.
- This Response Code is like HTTP 406
- "Not Acceptable", but with no response entity.
-
- \value RequestEntityIncomplete The server has not received the blocks of
- the request body that it needs to proceed.
- The client has not sent all blocks,
- not sent them in the order required by the
- server, or has sent them long enough ago
- that the server has already discarded them.
-
- \value PreconditionFailed One or more conditions given in the request
- header fields evaluated to false when tested
- on the server.
- This Response Code is like HTTP 412
- "Precondition Failed".
-
- \value RequestEntityTooLarge The request payload is larger than the
- server is willing or able to process.
- This Response Code is like HTTP 413
- "Request Entity Too Large".
-
- \value UnsupportedContentFormat The payload is in a format not supported
- by this method on the target resource.
- This Response Code is like HTTP 415
- "Unsupported Media Type".
-
- \value InternalServerError The server encountered an unexpected
- condition that prevented it from
- fulfilling the request.
- This Response Code is like HTTP 500
- "Internal Server Error".
-
- \value NotImplemented The server does not support the
- functionality required to fulfill the
- request.
- This Response Code is like HTTP 501
- "Not Implemented".
-
- \value BadGateway An error occurred with an upstream
- server.
- This Response Code is like HTTP 502
- "Bad Gateway".
-
- \value ServiceUnavailable Indicates that the service is currently
- Unavailable.
- This Response Code is like HTTP 503
- "Service Unavailable".
-
- \value GatewayTimeout The server, while acting as a gateway
- or proxy, did not receive a timely
- response from an upstream server it needed
- to access in order to complete the request.
- This Response Code is like HTTP 504
- "Gateway Timeout".
-
- \value ProxyingNotSupported The server is unable or unwilling to act
- as a forward-proxy for the URI specified
- in the Proxy-Uri Option or using
- Proxy-Scheme.
-
- \value UnknownError An unknown error occurred.
-
- \sa error()
-*/
-/*!
- \enum QtCoap::ResponseCode
-
- This enum represents the response code from the CoAP protocol, as defined in
- \l{https://tools.ietf.org/html/rfc7252#section-5.9}{RFC 7252} and
- \l{https://tools.ietf.org/html/rfc7959#section-2.9}{RFC 7959}.
-*/
-/*!
- \enum QtCoap::MulticastGroup
-
- This enum represents CoAP multicast group addresses defined in
- \l{https://tools.ietf.org/html/rfc7252#section-12.8}{RFC 7252}.
-
- \value AllCoapNodesIPv4 IPv4 "All CoAP Nodes" address \e {224.0.1.187}, from
- the "IPv4 Multicast Address Space Registry".
-
- \value AllCoapNodesIPv6LinkLocal IPv6 "All CoAP Nodes" link-local scoped address
- \e {FF02::FD}, from the "IPv6 Multicast Address Space
- Registry".
-
- \value AllCoapNodesIPv6SiteLocal IPv6 "All CoAP Nodes" site-local scoped address
- \e {FF05::FD}, from the "IPv6 Multicast Address Space
- Registry".
-*/
-/*!
- \class QtCoap
-
- Returns the QtCoap::Error corresponding to the \a code passed to this
- method.
-*/
-QtCoap::Error QtCoap::responseCodeError(QtCoap::ResponseCode code)
-{
- if (!isError(code))
- return QtCoap::NoError;
-
- switch (code) {
-#define SINGLE_CASE(name, ignored) case name: return name ## Error;
- FOR_EACH_COAP_ERROR(SINGLE_CASE)
-#undef SINGLE_CASE
- default:
- return UnknownError;
- }
-}
-
-/*!
\class QCoapClient
\brief The QCoapClient class allows the application to
send CoAP requests and receive replies.