Go to the documentation of this file.
17 #ifndef _az_IOT_PROVISIONING_CLIENT_H
18 #define _az_IOT_PROVISIONING_CLIENT_H
27 #include <azure/core/_az_cfg_prefix.h>
32 #define AZ_IOT_PROVISIONING_SERVICE_VERSION "2019-03-31"
102 char* mqtt_user_name,
103 size_t mqtt_user_name_size,
104 size_t* out_mqtt_user_name_length);
120 char* mqtt_client_id,
121 size_t mqtt_client_id_size,
122 size_t* out_mqtt_client_id_length);
153 uint64_t token_expiration_epoch_time,
180 az_span base64_hmac_sha256_signature,
181 uint64_t token_expiration_epoch_time,
184 size_t mqtt_password_size,
185 size_t* out_mqtt_password_length);
200 #define AZ_IOT_PROVISIONING_CLIENT_REGISTER_SUBSCRIBE_TOPIC "$dps/registrations/res/#"
268 AZ_IOT_PROVISIONING_STATUS_UNASSIGNED,
269 AZ_IOT_PROVISIONING_STATUS_ASSIGNING,
272 AZ_IOT_PROVISIONING_STATUS_ASSIGNED,
273 AZ_IOT_PROVISIONING_STATUS_FAILED,
274 AZ_IOT_PROVISIONING_STATUS_DISABLED,
304 return (operation_status > AZ_IOT_PROVISIONING_STATUS_ASSIGNING);
326 size_t mqtt_topic_size,
327 size_t* out_mqtt_topic_length);
348 size_t mqtt_topic_size,
349 size_t* out_mqtt_topic_length);
351 #include <azure/core/_az_cfg_suffix.h>
The registration operation state.
Definition: az_iot_provisioning_client.h:208
Definition of az_result and helper functions.
az_span operation_id
Definition: az_iot_provisioning_client.h:230
az_span error_message
Definition: az_iot_provisioning_client.h:214
Azure IoT Provisioning Client.
Definition: az_iot_provisioning_client.h:49
az_result
The type represents the various success and error conditions.
Definition: az_result.h:53
AZ_NODISCARD az_result az_iot_provisioning_client_get_user_name(az_iot_provisioning_client const *client, char *mqtt_user_name, size_t mqtt_user_name_size, size_t *out_mqtt_user_name_length)
Gets the MQTT user name.
AZ_NODISCARD az_result az_iot_provisioning_client_parse_operation_status(az_iot_provisioning_client_register_response *response, az_iot_provisioning_client_operation_status *out_operation_status)
Returns the az_iot_provisioning_client_operation_status of a az_iot_provisioning_client_register_resp...
AZ_NODISCARD az_result az_iot_provisioning_client_query_status_get_publish_topic(az_iot_provisioning_client const *client, az_span operation_id, char *mqtt_topic, size_t mqtt_topic_size, size_t *out_mqtt_topic_length)
Gets the MQTT topic that must be used to submit a Register Status request.
az_span operation_status
Definition: az_iot_provisioning_client.h:231
uint32_t extended_error_code
Definition: az_iot_provisioning_client.h:213
AZ_NODISCARD az_result az_iot_provisioning_client_register_get_publish_topic(az_iot_provisioning_client const *client, char *mqtt_topic, size_t mqtt_topic_size, size_t *out_mqtt_topic_length)
Gets the MQTT topic that must be used to submit a Register request.
Register or query operation response.
Definition: az_iot_provisioning_client.h:225
AZ_INLINE bool az_iot_provisioning_client_operation_complete(az_iot_provisioning_client_operation_status operation_status)
Checks if the status indicates that the service has an authoritative result of the register operation...
Definition: az_iot_provisioning_client.h:301
AZ_NODISCARD az_result az_iot_provisioning_client_sas_get_password(az_iot_provisioning_client const *client, az_span base64_hmac_sha256_signature, uint64_t token_expiration_epoch_time, az_span key_name, char *mqtt_password, size_t mqtt_password_size, size_t *out_mqtt_password_length)
Gets the MQTT password.
az_span error_timestamp
Definition: az_iot_provisioning_client.h:217
AZ_NODISCARD az_result az_iot_provisioning_client_parse_received_topic_and_payload(az_iot_provisioning_client const *client, az_span received_topic, az_span received_payload, az_iot_provisioning_client_register_response *out_response)
Attempts to parse a received message's topic.
az_iot_provisioning_client_operation_status
Azure IoT Provisioning Service operation status.
Definition: az_iot_provisioning_client.h:266
An az_span represents a contiguous byte buffer and is used for string manipulations,...
az_iot_provisioning_client_registration_state registration_result
Definition: az_iot_provisioning_client.h:239
az_span user_agent
Definition: az_iot_provisioning_client.h:40
az_span device_id
Definition: az_iot_provisioning_client.h:211
AZ_NODISCARD az_iot_provisioning_client_options az_iot_provisioning_client_options_default()
Gets the default Azure IoT Provisioning Client options.
AZ_NODISCARD az_result az_iot_provisioning_client_init(az_iot_provisioning_client *client, az_span global_device_hostname, az_span id_scope, az_span registration_id, az_iot_provisioning_client_options const *options)
Initializes an Azure IoT Provisioning Client.
Azure IoT Provisioning Client options.
Definition: az_iot_provisioning_client.h:39
az_iot_status status
Definition: az_iot_provisioning_client.h:226
az_span error_tracking_id
Definition: az_iot_provisioning_client.h:215
AZ_NODISCARD az_result az_iot_provisioning_client_sas_get_signature(az_iot_provisioning_client const *client, uint64_t token_expiration_epoch_time, az_span signature, az_span *out_signature)
Gets the Shared Access clear-text signature.
AZ_NODISCARD az_result az_iot_provisioning_client_get_client_id(az_iot_provisioning_client const *client, char *mqtt_client_id, size_t mqtt_client_id_size, size_t *out_mqtt_client_id_length)
Gets the MQTT client id.
az_iot_status error_code
Definition: az_iot_provisioning_client.h:212
az_iot_status
Azure IoT service status codes.
Definition: az_iot_common.h:39
uint32_t retry_after_seconds
Definition: az_iot_provisioning_client.h:237
Azure IoT common definitions.
az_span assigned_hub_hostname
Definition: az_iot_provisioning_client.h:209
Represents a "view" over a byte buffer that represents a contiguous region of memory....
Definition: az_span.h:33