- Changed POSIX implementation of
az_platform_clock_msec()to useclock_gettime()instead ofclock().
- [#2443] Adding IoT Device Provisioning support for Custom Allocation Payload.
- New APIs:
az_iot_provisioning_client_register_get_request_payload()andaz_iot_provisioning_client_registration_state.payload.
- New APIs:
- [#2437] Update ADU device information payload to GA key/values.
- [#2443] Azure IoT Samples now display errors following the source file:line number format, allowing Visual Studio Code to automatically create links from the output log.
- Azure IoT Device Provisioning Client API deprecation:
az_iot_provisioning_client_get_request_payload()is deprecated in favor ofaz_iot_provisioning_client_register_get_request_payload(). The new API requires an initializedaz_iot_provisioning_client_payload_optionsstructure (usingaz_iot_provisioning_client_payload_options_default()).
- [#2329] Add Base64 URL decoder.
- [#2375] Add Azure Device Update for IoT Hub, enabling Over-the-Air (OTA) updates for embedded devices.
- Modified the
az_json_string_unescape()function signature to acceptaz_spanas the destination.
- [#2372] Incorrect minimum buffer size calculation when logging an HTTP request.
- [#2400] Updated the vcpkg baseline for installing SDK dependencies to the October 2022 tag.
- Added support in
az_json.hto unescape JSON string tokens within anaz_spanusing theaz_json_string_unescape()API.
- Removed unreachable code in
az_http_policy_retry.c.
- [#2152] Fix value in user agent string.
- [#2162] Remove failure if $version is not present in IoT Twin reported properties response topic.
- Added a total bytes written field to the JSON writer.
- Compared to the previous 1.2.0 release, there are no breaking changes.
- Removed
az_storage_blobs.h, which included some beta APIs for Azure Blob Storage such asaz_storage_blobs_blob_client().- These will ship in a future release, and are still available from the previous beta release.
- [#2027] Update IoT user agent to append property name before property value in cases where a custom user agent was specified.
- [#1885] Fix compilation error C4576 with C++ and MSVC 2019. (A community contribution, courtesy of hwmaier)
Thank you to our developer community members who helped to make Azure SDK for C better with their contributions to this release:
- Henrik Maier (GitHub)
- Added
az_http_response_get_status_code()convenience function to get HTTP status code from requests.
- Fixed
az_curlCMake dependency propagation onlibcurl.
- Improved HTTP request telemetry.
- Add
az_iot_provisioning_client_get_request_payload()to create MQTT payload bodies during Device Provisioning. - This version provides new APIs to follow the IoT Plug and Play convention to implement Telemetry, Commands, Properties and Components defined in a DTDL model.
- To read/write properties, the SDK now provides functions to produce the right payload for components, as shown in the header
azure/iot/az_iot_hub_client_properties.h. - To send telemetry messages, the required header is added to identify components.
- When responding to a command invocation the component name is automatically parsed and provided when available.
- All new samples follow the IoT Plug and Play convention and can be connected to IoT Hub (with or without DPS), or IoT Central.
- To read/write properties, the SDK now provides functions to produce the right payload for components, as shown in the header
- [#1905] Fix the internal state of the JSON writer during calls to
az_json_writer_append_json_text()by taking into account the required buffer space for commas. (A community contribution, courtesy of hwmaier)
Thank you to our developer community members who helped to make Azure SDK for C better with their contributions to this release:
- Henrik Maier (GitHub)
- Added a current depth field to the JSON reader.
- Added base64 encoding and decoding APIs that accept
az_span, available from theazure/core/az_base64.hheader. - Public preview version of a new set of APIs to simplify the experience using Azure IoT Plug and Play. To consume this new feature, the
az::iot::hubCMake target has been updated. The APIs can be found in the header files:az_iot_hub_client.handaz_iot_hub_client_properties.h. - New samples showing how to consume the new IoT Plug and Play APIs:
- paho_iot_pnp_component_sample.c
- paho_iot_pnp_sample.c
- paho_iot_pnp_with_provisioning_sample.c
- [#1640] Update precondition on
az_iot_provisioning_client_parse_received_topic_and_payload()to require topic and payload minimum size of 1 instead of 0. - [#1699] Update precondition on
az_iot_message_properties_init()to not allowwritten_lengthlarger than the passed span.
- Compared to the previous 1.0.0 release, there are no breaking changes.
- Removed
az_iot_pnp_client.h, which included some beta APIs related to IoT Plug and Play such asaz_iot_pnp_client().- These will ship in a future release (1.2.0).
- [#1600] Make sure
az_json_writer_append_json_text()appends a comma between elements of a JSON array. - [#1580] Fix build on Ubuntu 18.04 by updating CMake policy and MSVC runtime libraries.
- [#1472] Fix
az_iot_message_properties_next()when the buffer in which the properties were kept was bigger than the length of characters in the buffer.
- [#1473] Add remote server certificate validation on paho and ESP8266 samples.
- [#1449] Add basic reconnection capability for the ESP8266 sample.
- [#1490] Fix static analyzer flagging of non-checked return value in
az_iot_hub_client_c2d_parse_received_topic().
- Added an
az_log_classification_filter_fncallback function type along with a setteraz_log_set_classification_filter_callback(), allowing the caller to filter log messages.
- Fix bounds check while processing incomplete JSON string containing escaped characters to avoid out-of-range access.
- Fix Windows to use /MT when building the CRT and static libraries.
- Fail gracefully on invalid/incomplete HTTP response processing by avoiding reading from size 0 span.
- Add precondition check to validate clients are initialized before passed in to public APIs.
- Add high-level and simplified az_core.h and az_iot.h files for simpler include experience for customers.
- Removed
az_storage_blobs.h, including APIs related to storage service such asaz_storage_blobs_blob_client_init()andaz_storage_blobs_blob_upload(), and types such asaz_storage_blobs_blob_clientandaz_storage_blobs_blob_client_options.- These will ship in the upcoming 1.1.0 release and will continue to be available as preview from the following branch: https://github.com/Azure/azure-sdk-for-c/tree/feature/StorageBlobs
- Updated provisioning client struct member name in
az_iot_provisioning_client_register_responsefromregistration_resulttoregistration_state. - Changed
operation_statusinaz_iot_provisioning_client_register_responsefromaz_spantoaz_iot_provisioning_client_operation_statusenum. - Removed
az_iot_provisioning_client_parse_operation_status()fromaz_iot_provisioning_client.h. - Renamed
az_iot_hub_client_twin_response_typeenum names:AZ_IOT_CLIENT_TWIN_RESPONSE_TYPE_GETtoAZ_IOT_HUB_CLIENT_TWIN_RESPONSE_TYPE_GETAZ_IOT_CLIENT_TWIN_RESPONSE_TYPE_DESIRED_PROPERTIEStoAZ_IOT_HUB_CLIENT_TWIN_RESPONSE_TYPE_DESIRED_PROPERTIESAZ_IOT_CLIENT_TWIN_RESPONSE_TYPE_REPORTED_PROPERTIEStoAZ_IOT_HUB_CLIENT_TWIN_RESPONSE_TYPE_REPORTED_PROPERTIES
- Platform:
az_platform_clock_msec(), andaz_platform_sleep_msec()returnaz_result, which isAZ_ERROR_DEPENDENCY_NOT_PROVIDEDwhenaz_noplatformimplementation is used. - Moved these IoT specific result codes from
az_result.htoaz_iot_common.h:AZ_ERROR_IOT_TOPIC_NO_MATCHAZ_ERROR_IOT_END_OF_PROPERTIES
- Moved these IoT specific log classifications from
az_log.htoaz_iot_common.h:AZ_LOG_MQTT_RECEIVED_TOPICAZ_LOG_MQTT_RECEIVED_PAYLOADAZ_LOG_IOT_RETRYAZ_LOG_IOT_SAS_TOKENAZ_LOG_IOT_AZURERTOS
- Removed
AZ_LOG_END_OF_LISTlog classification andaz_log_set_classifications()fromaz_log.h. - Renamed
az_log_set_callback()toaz_log_set_message_callback(). - Removed
AZ_HTTP_STATUS_CODE_END_OF_LISTHTTP status code andstatus_codesfield fromaz_http_policy_retry_options.
- Fixed [Pe188] warning from IAR when initializing structs using
{ 0 }.
- Add
az_json_writer_append_json_text()to support appending existing JSON with the JSON writer. - Add support for system properties for IoT Hub messages to
az_iot_common.h. - Add new HTTP result named
AZ_ERROR_HTTP_END_OF_HEADERSto designate the end of the headers iterated over byaz_http_response_get_next_header(). - Add new IoT result named
AZ_ERROR_IOT_END_OF_PROPERTIESto designate the end of the properties iterated over byaz_iot_message_properties_next(). - Add
AZ_IOT_MESSAGE_PROPERTIES_USER_IDandAZ_IOT_MESSAGE_PROPERTIES_CREATION_TIMEhelper macros. - Add new
az_resultvalueAZ_ERROR_DEPENDENCY_NOT_PROVIDEDwhich is returned by the HTTP adapter.
- Rename
az_iot_hub_client_propertiestoaz_iot_message_propertiesand move it fromaz_iot_hub_client.htoaz_iot_common.h. - Remove
az_pair, and its usage fromaz_http_request_append_header(),az_http_response_get_next_header(), andaz_iot_message_properties_next()in favor of individual name and valueaz_spanparameters. - Remove
az_credential_client_secretstructure, andaz_credential_client_secret_init()function. - Remove
az_platform_atomic_compare_exchange()from platform. - In
az_result.h, renameaz_failed()toaz_result_failed()andaz_succeeded()toaz_result_succeeded(). az_iot_is_success_status()renamed toaz_iot_status_succeeded().az_iot_is_retriable_status()renamed toaz_iot_status_retriable().az_iot_retry_calc_delay()renamed toaz_iot_calculate_retry_delay().az_iot_hub_client_sas_get_password()parametertoken_expiration_epoch_timemoved to second parameter.az_iot_provisioning_client_init()parameterglobal_device_endpointrenamed toglobal_device_hostname.az_iot_provisioning_client_query_status_get_publish_topic()now accepts theoperation_idfrom theregister_responseas the second parameter instead of the wholeaz_iot_provisioning_client_register_responsestruct.- Renamed the macro
AZ_SPAN_NULLtoAZ_SPAN_EMPTY. - Renamed the
az_resultvalueAZ_ERROR_INSUFFICIENT_SPAN_SIZEtoAZ_ERROR_NOT_ENOUGH_SPACE. - Removed the helper macros
AZ_RETURN_IF_FAILED()andAZ_RETURN_IF_NOT_ENOUGH_SIZE()fromaz_result.h. - Behavioral change to disallow passing
NULLpointers toaz_contextAPIs and update documentation. - Removed
AZ_HUB_CLIENT_DEFAULT_MQTT_TELEMETRY_DUPLICATEandAZ_HUB_CLIENT_DEFAULT_MQTT_TELEMETRY_RETAINnamed constants fromaz_iot_hub_client.h.
- Fix the strict-aliasing issue in
az_span_dtoa()andaz_span_atod(). - Fix the SDK warnings for the release configurations.
- Do not use a shared static scratch buffer for JSON token parsing. Instead use stack space.
- Refactor and update IoT samples.
- Optimize the code size for URL encoding and setting HTTP query parameters.
- Add support for building the SDK on ARM (Cortex M4) and adding it to CI.
- Support for writing JSON to non-contiguous buffers.
- Support for reading JSON from non-contiguous buffers.
- Add support for national cloud auth URLs.
az_span.h:az_span_init()is renamed toaz_span_create().az_span_from_str()is renamed toaz_span_create_from_str().- Removed
az_pair_from_str().
az_context:keyandvalueareconst.az_context_with_expiration()is renamed toaz_context_create_with_expiration().az_context_with_value()is renamed toaz_context_create_with_value().az_context_appis renamed toaz_context_application.
az_credential_client_secret_init()now takes fourth parameter,authority.az_http_policy_retry_options:status_codesnow should be terminated byAZ_HTTP_STATUS_CODE_END_OF_LIST.max_retriesis nowint32_tinstead ofint16_t.
az_config.h:AZ_HTTP_REQUEST_URL_BUF_SIZErenamed toAZ_HTTP_REQUEST_URL_BUFFER_SIZE.AZ_HTTP_REQUEST_BODY_BUF_SIZErenamed toAZ_HTTP_REQUEST_BODY_BUFFER_SIZE.AZ_LOG_MSG_BUF_SIZErenamed toAZ_LOG_MESSAGE_BUFFER_SIZE.
az_result:AZ_ERROR_HTTP_PLATFORMrenamed toAZ_ERROR_HTTP_ADAPTER.AZ_ERROR_EOFrenamed toAZ_ERROR_UNEXPECTED_END.- Removed
AZ_CONTINUE.
az_storage_blobs_blob_client:retryfield renamed toretry_optionsinaz_storage_blobs_blob_client_options.- Moved
az_context* contextparameter fromaz_storage_blobs_blob_upload()into a public field onaz_storage_blobs_blob_upload_options.
az_json_writer:az_json_writer_get_json()is renamed toaz_json_writer_get_bytes_used_in_destination().
- Remove support for non-finite double values while parsing/formatting.
- Use custom, portable implementation of IEEE 754 compliant
isfinite()since some embedded platforms don't have it. - Limit use of
sscanfonly to double parsing, using a custom implementation for {u}int{32|64} parsing because of incompatibility withsscanfformat and theGCC newlib-nanoimplementation.
- Made
az_http_requestand related APIs to get URL, body, and headers, public. - Add and update IoT samples, including DPS.
- Add samples for IoT Hub Plug and Play.
- Updated
az_resultvalues:- Rename
az_resultvalueAZ_ERROR_PARSER_UNEXPECTED_CHARtoAZ_ERROR_UNEXPECTED_CHAR. - Remove unused
az_resulterror codes:AZ_ERROR_JSON_STRING_END,AZ_ERROR_JSON_POINTER_TOKEN_END, andAZ_ERROR_MUTEX.
- Rename
- Add permutations of numeric type parsing and formatting APIs on span - ato[u|i][32|64], atod and the inverse [u|i][32|64]toa, dtoa.
- Updates to the JSON APIs:
- Rename JSON parser/builder APIs to reader/writer.
- Add double parsing and formatting support to JSON reader and JSON writer.
- Redesign JSON reader and JSON token APIs with lazy evaluation of tokens, proper unescaping support, and hardened validation.
- Update samples, README docs along with deep dive video, and VSCode and CMake instructions.
- Add PnP sample for Azure IoT Hub.
- Add log classification for the IoT convenience layer.
- Fixed SAS token generation by URL-encoding the components.
- Rename the http response function
az_http_response_write_spantoaz_http_response_append. - Add thread safety for client secret credential.
- Transform
apply_credentialinto an HTTP policy. - Default behavior for failed preconditions changed to infinite loop instead of thread sleep.
- Update top-level CMakeLists.txt to only add subdirectory for specified platform.
- Add compilation option to remove all logging from SDK code.
Initial release. Please see the README for more information.