CoAP Multicast Discovery example: allow to stop discovery and clear the discovered resources
Multicast discovery takes several minutes by default, and so far the
example did not provide any means to stop it.
Fix it by introducing a new 'isDiscovering' property which allows to
check the current state of the client from QML, and a new invokable
'stopDiscovery()' method, which aborts the current request.
While on it, also delete the finished replies explicitly by calling
deleteLater(). Previously the replies were deleted only when the
parent QmlCoapMulticastClient was destroyed.
On QML side, adjust the discoverButton logic, so that it can start or
stop the discovery, depending on the current state.
Also introduce a new button which allows to clear all the discovered
resources.
Task-number: QTBUG-113858
Pick-to: 6.6 6.5
Change-Id: I7ec3bc2fd5fee1b3c589de74b00862ffb9d6983e
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>