aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix build without Qt Quick moduleKarsten Heimrich2019-05-081-2/+6
| | | | | | Change-Id: Ie1e6d69895abfb7b63254b41aa738b5708691d09 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Improve namings of QCoapSecurityConfigurationSona Kurazyan2019-05-141-1/+1
| | | | | | | | | | - Rename QCoapPrivateKey::isEmpty() -> QCoapPrivateKey::isNull(). - Use 'preSharedKeyIdentity' instead of 'identity'. This change is based on the feedback from API review. Change-Id: Iba517a01a16edede86c4572204d560978b3dc067 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve the API of QCoapMessageSona Kurazyan2019-05-141-2/+2
| | | | | | | | | | | | | - Rename QCoapMessage::MessageType -> QCoapMessage::Type - Rename option() -> optionAt() - Rename removeAllOptions() -> clearOptions() - Hide findOption(). option() is more convenient to use instead. - Add a setOptions() method. This change is based on the feedback from API review. Change-Id: I2093a06ca09eebb95865a82e09d2aa2265379e5d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rename QCoapDiscoveryReply -> QCoapResourceDiscoveryReplySona Kurazyan2019-05-147-20/+20
| | | | | | | This change is based on the feedback from API review. Change-Id: I43f08d5bd7f7f172ea4d337718be7bd14e81d64c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rename QtCoap::SecurityMode::NoSec -> QtCoap::SecurityMode::NoSecuritySona Kurazyan2019-05-143-3/+3
| | | | | | | This change is based on the feedback from API review. Change-Id: I345bc519d6753608ead0bf4b006cf68c4e52c313 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove the "Error" ending from QtCoap::Error enum value namesv5.13.0-rc3v5.13.0-rc2v5.13.0-rc1v5.13.0-beta4v5.13.05.13.0Sona Kurazyan2019-05-033-6/+6
| | | | | | | | | | | | | QtCoap::Error is a scoped enum class, so its value names will get the "Error::" prefix anyway. No need to have it as a suffix for the value names. For the same reason replaced QtCoap::Error::NoError by QtCoap::Error::Ok. Change-Id: Iaf7b51cdab6ea330e940e5af73ba93a55eb48315 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use scoped enumsSona Kurazyan2019-05-036-27/+27
| | | | | | | | | | | Execptions are made for QCoapOption::OptionName and QtCoap::Port enums, because the values of these types are not limited only to the values listed in the enums. In case of using custom values, it would be more convenient to use integers directly, instead of using a static_cast each time the user needs a custom value. Change-Id: Ibc63e26c59629702c03528dd7e5e5eedc6bcc90a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Document the quickmulticastclient exampleSona Kurazyan2019-04-262-0/+127
| | | | | Change-Id: I8bc64842a2d0ed70fc40a5ae4492cb4b2a3611b8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Document the qmlsecurecoapclient exampleSona Kurazyan2019-04-172-0/+220
| | | | | | Change-Id: I4f193b0d65bb3104db6483749cf9dc36547e1861 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add a button for closing the connection in secure client exampleSona Kurazyan2019-04-173-3/+23
| | | | | Change-Id: Icc21315a5a20eeee02b578dc56459d4697a6361d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add secure CoAP client exampleSona Kurazyan2019-04-178-0/+675
| | | | | | | | This example demonstrates sending secure CoAP GET requests in PreSharedKey and Certificate modes. Change-Id: I90ea8c77232bfca1ca86bdd7a73223b6ba8b0c9b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add QML-based multicast discovery exampleSona Kurazyan2019-04-177-0/+526
| | | | | Change-Id: If210c040ec40a828d4c997251ef2a635e2e70d32 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Document the simplecoapclient exampleSona Kurazyan2019-04-153-5/+139
| | | | | Change-Id: I066acf1d2765f4c48392371e50f86f694c1af7bc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move example folders to the 'coap' subdirectorySona Kurazyan2019-04-1519-7/+8
| | | | | Change-Id: Iebded58e8cfd307cd54fc3bdcca3a1002aa21bd4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix observation canceling in the simplecoapclient exampleSona Kurazyan2019-04-151-1/+1
| | | | | | | | | | | Changed th lambda for canceling the resource observation to capture variables by value instead of capturing by reference. If we capture 'url' by reference, it will be already destroyed, when the lambda is called. Fixes: QTBUG-75156 Change-Id: I76792555d4eff8391b0a5075d45cd48b9e3bb918 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Try to resolve host names in the simplecoapclient exampleSona Kurazyan2019-04-121-3/+14
| | | | | | | | This will allow to specify hostames instead of IP addresses, when running the example. Change-Id: Ie7c6e1489508e590351a20b58e6a69510b1c4491 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add example documentation projectv5.13.0-beta2Sona Kurazyan2019-04-105-0/+168
| | | | | | Change-Id: I00c8d6221aa730051733c48816aed3cc4f79abb4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Rename the console example from 'testapp' to 'consolecoapclient'Sona Kurazyan2019-04-105-2/+2
| | | | | Change-Id: I5d1375c195e8a8d1b25b71ab071e1531a77ce659 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add CoAP client exampleSona Kurazyan2019-03-209-0/+1162
| | | | | | | | | | | | Simple Qt Widgets based example demonstrating how to use CoAP API. Covers: - Sending GET/POST/PUT/DELETE requests - Observing resources - Resource discovery Change-Id: I2abb3fd670ff86958e73331413d1f0d0e8ce4a5d Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve logging of the CoAP moduleSona Kurazyan2019-03-191-9/+12
| | | | | | | | | | | | | - Introduced different log categories and categorized log messages accordingly. - Improved logs from console example by: * Changing debug messages to info or warning, * Removing extra spaces from the log messages. Change-Id: Ia6b2006db5e7cce853e59fb7d0a1c20064444c8e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add the sender address to responses for a multicast requestSona Kurazyan2019-03-112-3/+6
| | | | | | | | | | | For the responses to multicast requests the address of the sender of the reply does not match with the host address in the request URI. There should be a way to find out who has sent the response. Change-Id: Icbc6c6ae926198870dbc7dbbb92dc319c46d7de7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix resource discovery exampleSona Kurazyan2019-02-211-1/+1
| | | | | Change-Id: I56f8c2be5394b0ce9bb50cfda5d893ae44eb22ad Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add support for multicast CoAP requestsSona Kurazyan2019-02-212-0/+11
| | | | | | | Change-Id: I9cf6d4f97c863c232b17bc8e560c6b62c3f39624 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add the CoAP module, providing a client for QtAdrien Leravat2018-12-145-0/+282
Features: - Send GET/POST/PUT/DELETE requests - Discover resources (single server) - Observe resources and cancel the observation - Blockwise requests and replies - Requests (and replies) can be confirmable or non-confirmable - Some options can be added to the request - Replies can be received in a separate or piggybacked message Change-Id: I31e0e20a4f19bdc6d6489281fde73a4ff848eda4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>