aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bump versionv5.13.25.13.25.13Frederik Gladhorn2019-10-141-1/+1
|
* Fix compilationSona Kurazyan2019-10-043-10/+12
| | | | | | | | | | | - Some compilers don't like using QPointer in connect(). Use QPointer::data() instead. This fixes the build for linux SLES 12. - Enable simplecoapclient example only when Qt is compiled with gui. Fixes: QTBUG-78884 Change-Id: I592e52eaea93f8f94a2b1af18ea29e745c44dde9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve QCoapClient's documentationv5.13.15.13.1Sona Kurazyan2019-07-241-3/+12
| | | | | | | | | | - Added more details for explaining the usage of the disconnect() method. - Fixed a warning. Change-Id: Ifa5a91d9df70592009545a467a47c840889ff516 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix assertion when setting the timeoutSona Kurazyan2019-07-111-3/+10
| | | | | | | | | After 5d7e221bbf9e27e90448243909abc76d81733381 an assertion will be triggered when calling QRandomGenerator::bounded with equal low and high values. Change-Id: Id6d7c0f583285a54303452a6f2538f3ca72adced Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bump versionFrederik Gladhorn2019-07-011-1/+1
|
* Remove deprecated QLatin1LiteralSona Kurazyan2019-06-141-3/+3
| | | | | Change-Id: If2376d7d38689001bc93ebd962507b21a05a09f9 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix compilation with the latest qtbase dev branchSona Kurazyan2019-06-144-24/+0
| | | | | | | | | Copies of the QObjectData (as a result, also QObjectPrivate) have been disabled recently. Removed unnecessary copy constructors of the private classes and their usages. Change-Id: I15dd766abc88a657a267cbdc95f0c95346a47f72 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix warningsSona Kurazyan2019-06-142-11/+11
| | | | | | | | | | - qcoapprotocol.cpp:387: implicit conversion changes signedness: 'int' to 'uint' (aka 'unsigned int') - tst_qcoapclient.cpp:365: implicit conversion loses integer precision: 'int' to 'quint16' (aka 'unsigned short') - tst_qcoapclient.cpp:502: implicit conversion changes signedness: 'int' to 'uint' (aka 'unsigned int') - tst_qcoapclient.cpp:504: implicit conversion changes signedness: 'int' to 'uint' (aka 'unsigned int') Change-Id: I5bec42fc69925f04641285c6473d9ddc3ba6ec56 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Fix calculation of MAX_TRANSMIT_SPANSona Kurazyan2019-06-121-1/+3
| | | | | | | Fixed a wrong closing parenthesis location, based on the RFC. Change-Id: I3aa369a66411bbef1ca6f7b8b8c72fad9281c60c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix parsing of option valuesSona Kurazyan2019-06-072-2/+4
| | | | | | | | | | When parsing the CoAP option values, pointers to temporary QByteArray data were used, which could lead to parsing garbage instead of the option value. So far this stayed undetected, when compiling with most of the compilers, except for MSVC. Change-Id: I4751b514dee008d9186306857f3d6737547f31fb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add block option testsSona Kurazyan2019-05-213-2/+138
| | | | | Change-Id: I8f18562fd543f087bd9d5f4c1d9b3bce7146025e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* 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>
* Fix handling of multiple CoAP messagesSona Kurazyan2019-05-071-2/+4
| | | | | | | | | | | When sending multiple CoAP messages at once, some of the frames may wait in the pending frames queue until the transport gets to "Connected" state. After the state is changed to "Connected", we need to send all pending frames, instead of sending only one frame. Change-Id: I7d22f6018894881bb5c074202c4ad235d72a1fea Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix 'observe' requests creation in the secure modeSona Kurazyan2019-05-201-1/+4
| | | | | | | | As a result of the recent refactoring, the security mode was being ignored when crating 'observe' requests. Added the missing parameter. Change-Id: Ib24d68c6794700164274ef66e48aa758918f6c91 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix a typo: setMinumumTokenSize -> setMinimumTokenSizeSona Kurazyan2019-05-245-6/+6
| | | | | Change-Id: Ifcef69e73ea89f30499063452920dd9abb446f7e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a method for setting the minimum token sizeSona Kurazyan2019-05-225-3/+81
| | | | | | | | | | For security reasons it is recommended to use tokens with a length of at least 4 bytes. Added a method for setting the minimum token size and changed it to be 4 by default. Change-Id: Ib589b338df8e59ccaf24dceab6691f92d92f861c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove QCoapClien's constructor for specifying a custom connectionSona Kurazyan2019-05-235-17/+37
| | | | | Change-Id: I5b51c71ab11cbce5755a69c58f34bfa5e7cd5385 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Conditionally enable subprojects for the private class testsSona Kurazyan2019-05-145-73/+8
| | | | | | | | Instead of using #ifdefs for the private class tests, conditionally enable/disable subprojects for them. Change-Id: I574dc34dd895a4fc2eeb311dfb91a149a6715e28 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace Q_DECL_NOTHROW -> noexceptSona Kurazyan2019-05-148-18/+18
| | | | | | | This change is based on the feedback from API review. Change-Id: I422f08cfc31d442893feefcacfa34271e8d7954b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use maximum/minimum instead of max/minSona Kurazyan2019-05-145-62/+62
| | | | | | | This change is based on the feedback from API review. Change-Id: Ia17d061c60fcf7aa4da38542d96d75ae621f657a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve namings of QCoapSecurityConfigurationSona Kurazyan2019-05-144-12/+12
| | | | | | | | | | - 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 QCoapOptionSona Kurazyan2019-05-1410-124/+102
| | | | | | | | | | | | - The RFC specifies the following option formats: empty, opaque, uint and string. Leave only the construcors for the specified types. - Rename value getters to reflect the expected value type. - Move the internally used setter methods to the private class. This change is based on the feedback from API review. Change-Id: I0b482770b9c02e64b0f345384ebf58ec29a7e9bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Forbid creation of QCoapReply and QCoapResourceDiscoveryReply objectsSona Kurazyan2019-05-148-103/+58
| | | | | | | | | | | Replies are created internally, and pointers to created objects are returned to the user. Users should not be able to create instances of QCoapReply or QCoapResourceDiscoveryReply. This change is based on the feedback from API review. Change-Id: Ibd59c62fd19c4b312253d4c4621b195bf5816340 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve the API of QCoapRequestSona Kurazyan2019-05-1410-101/+82
| | | | | | | | | | | | | - Moved internally used methods to the private class. - Replaced the internally used protected constructor with a static method in the private class. - Removed the internally used setMethod(), no need for it anymore. - Removed the isValid() method, no point in keeping it. This change is based on the feedback from API review. Change-Id: I177efdb1d436266549dea3e8d2b01160648fce90 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve the API of QCoapMessageSona Kurazyan2019-05-1416-102/+113
| | | | | | | | | | | | | - 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>
* Move resourcesFromCoreLinkList() to the private classSona Kurazyan2019-05-145-7/+17
| | | | | | | This change is based on the feedback from API review. Change-Id: I189b2505c64ba01f6a6294853a12074a0035585a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rename QCoapDiscoveryReply -> QCoapResourceDiscoveryReplySona Kurazyan2019-05-1421-88/+91
| | | | | | | This change is based on the feedback from API review. Change-Id: I43f08d5bd7f7f172ea4d337718be7bd14e81d64c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Hide internally used methods from QtCoap namespaceSona Kurazyan2019-05-148-15/+89
| | | | | | | | | Additionally rename responseCodeError() -> errorForResponseCode(). This change is based on the feedback from API review. Change-Id: Ida63a854f628d3d92a93bd54bd80f2368de48d8d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Rename QtCoap::SecurityMode::NoSec -> QtCoap::SecurityMode::NoSecuritySona Kurazyan2019-05-1412-20/+20
| | | | | | | This change is based on the feedback from API review. Change-Id: I345bc519d6753608ead0bf4b006cf68c4e52c313 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove the protected constructor from QCoapClientSona Kurazyan2019-05-143-19/+4
| | | | | | | This change is based on the feedback from API review. Change-Id: I99f00d15e9474b2844a436113ac7771ead7b33c6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Hide the API of QCoapProtocolSona Kurazyan2019-05-148-104/+98
| | | | | | | | No need to keep this class public, there is no public API for accessing it anyway. Change-Id: I231a560becb5799667819c30eca6372282adeb41 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Hide the APIs of QCoapConnection and QCoapQUdpConnectionSona Kurazyan2019-05-1413-190/+153
| | | | | | | | | | | | At the moment only the QCoapQUdpConnection class implements the QCoapConnection interface. If later we decide to add other implementations, and it turns out that the current API is not good enough, it won't be possible to change it without breaking the source compatibility. Let's make these classes private, we can make them public when there is a need for it. Change-Id: I41336dda0e6eaa762f0eb9c8f4aa98a9c7b62a2c 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-0310-56/+58
| | | | | | | | | | | | | 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-0334-206/+217
| | | | | | | | | | | 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>
* Fix the location of '&' in a method signatureSona Kurazyan2019-04-263-3/+3
| | | | | Change-Id: Ibf19500b897c0d2eb3a9ab9420ee98b04074b20a 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>
* Move the declaration of QCoapInternalMessage to the private headerSona Kurazyan2019-04-265-78/+33
| | | | | | | | This class is intended for internal use only, so it should not have a public header. Change-Id: I18f2433d06e978582b470e14dc89a7c0e404f7d4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Replace the Q_DECL_OVERRIDE macros with 'override'Sona Kurazyan2019-04-264-6/+6
| | | | | Change-Id: I32f3712ed2c160e1dc26397d58114fa441c0fc9b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make QCoapMessage::addOption non-virtualSona Kurazyan2019-04-261-2/+2
| | | | | | | This method doesn't need to be virtual, no one overrides it. Change-Id: Ia8c06c40fcb7cb97e413da6dc0458553540803cf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Mention CBOR when documenting CoAP's content formatsSona Kurazyan2019-04-253-4/+21
| | | | | Change-Id: Ifb15180619c1d7e056a5578c30d22e2e9e16edd5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add an API for closing the connection's transportSona Kurazyan2019-04-258-10/+98
| | | | | | Change-Id: I916ddb226b653aaf563ecf0adc3a1110d6da3132 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add documentation for Qt CoAP overviewv5.13.0-beta3Sona Kurazyan2019-04-173-2/+209
| | | | | | | Change-Id: I1ebf03d68c267f87ca2b690d4c666c26717f8d07 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@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>
* Fix URL adjustment of URLs with no hostSona Kurazyan2019-04-171-0/+5
| | | | | | | | | | | | QUrl can have an empty host, but still considered to be valid. This is possible, for example, when setting an invalid host address or when the URL is a path. Adjusting such URLs leads to unexpected results. Added a check for preventing sending requests to URLs with no host. Fixes: QTBUG-75155 Change-Id: I6c899f824233f32cddb8c9255fd3d1c333bb6385 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add navigation homepage for the QtCoAP moduleSona Kurazyan2019-04-161-0/+1
| | | | | Change-Id: I565cd306ab36230371cde6475d8417b40752a2a5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@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-1520-8/+9
| | | | | Change-Id: Iebded58e8cfd307cd54fc3bdcca3a1002aa21bd4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>