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"
117 char* mqtt_user_name,
118 size_t mqtt_user_name_size,
119 size_t* out_mqtt_user_name_length);
140 char* mqtt_client_id,
141 size_t mqtt_client_id_size,
142 size_t* out_mqtt_client_id_length);
179 uint64_t token_expiration_epoch_time,
212 az_span base64_hmac_sha256_signature,
213 uint64_t token_expiration_epoch_time,
216 size_t mqtt_password_size,
217 size_t* out_mqtt_password_length);
232 #define AZ_IOT_PROVISIONING_CLIENT_REGISTER_SUBSCRIBE_TOPIC "$dps/registrations/res/#"
418 size_t mqtt_topic_size,
419 size_t* out_mqtt_topic_length);
446 size_t mqtt_topic_size,
447 size_t* out_mqtt_topic_length);
506 az_span custom_payload_property,
508 uint8_t* mqtt_payload,
509 size_t mqtt_payload_size,
510 size_t* out_mqtt_payload_length);
544 az_span custom_payload_property,
546 uint8_t* mqtt_payload,
547 size_t mqtt_payload_size,
548 size_t* out_mqtt_payload_length);
550 #include <azure/core/_az_cfg_suffix.h>
552 #endif // _az_IOT_PROVISIONING_CLIENT_H
The registration operation state.
Definition: az_iot_provisioning_client.h:240
Definition of az_result and helper functions.
Azure IoT Provisioning Client options for az_iot_provisioning_client_get_request_payload() and az_iot...
Definition: az_iot_provisioning_client.h:456
AZ_NODISCARD az_result az_iot_provisioning_client_register_get_request_payload(az_iot_provisioning_client const *client, az_span custom_payload_property, az_iot_provisioning_client_payload_options const *options, uint8_t *mqtt_payload, size_t mqtt_payload_size, size_t *out_mqtt_payload_length)
Builds the optional payload for a provisioning request.
az_span operation_id
Definition: az_iot_provisioning_client.h:325
az_iot_provisioning_client_operation_status operation_status
Definition: az_iot_provisioning_client.h:340
az_span error_message
Definition: az_iot_provisioning_client.h:265
az_iot_provisioning_client_registration_state registration_state
Definition: az_iot_provisioning_client.h:351
Azure IoT Provisioning Client.
Definition: az_iot_provisioning_client.h:51
@ AZ_IOT_PROVISIONING_STATUS_ASSIGNED
Definition: az_iot_provisioning_client.h:303
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.
int32_t az_result
The type represents the various success and error conditions.
Definition: az_result.h:46
AZ_DEPRECATED AZ_NODISCARD az_result az_iot_provisioning_client_get_request_payload(az_iot_provisioning_client const *client, az_span custom_payload_property, az_iot_provisioning_client_payload_options const *options, uint8_t *mqtt_payload, size_t mqtt_payload_size, size_t *out_mqtt_payload_length)
Builds the optional payload for a provisioning request.
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.
uint32_t extended_error_code
Definition: az_iot_provisioning_client.h:260
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:321
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:388
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:275
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:289
@ AZ_IOT_PROVISIONING_STATUS_UNASSIGNED
Definition: az_iot_provisioning_client.h:293
@ AZ_IOT_PROVISIONING_STATUS_ASSIGNING
Definition: az_iot_provisioning_client.h:297
An az_span represents a contiguous byte buffer and is used for string manipulations,...
az_span user_agent
Definition: az_iot_provisioning_client.h:43
az_span device_id
Definition: az_iot_provisioning_client.h:250
az_span payload
Definition: az_iot_provisioning_client.h:280
AZ_NODISCARD az_iot_provisioning_client_options az_iot_provisioning_client_options_default()
Gets the default Azure IoT Provisioning Client options.
@ AZ_IOT_PROVISIONING_STATUS_DISABLED
Definition: az_iot_provisioning_client.h:313
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.
AZ_NODISCARD az_iot_provisioning_client_payload_options az_iot_provisioning_client_payload_options_default()
Gets the default az_iot_provisioning_client_payload_options.
@ AZ_IOT_PROVISIONING_STATUS_FAILED
Definition: az_iot_provisioning_client.h:308
Azure IoT Provisioning Client options.
Definition: az_iot_provisioning_client.h:39
az_iot_status status
Definition: az_iot_provisioning_client.h:335
az_span error_tracking_id
Definition: az_iot_provisioning_client.h:270
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:255
bool unused
Currently, this is unused, but needed as a placeholder since we can't have an empty struct.
Definition: az_iot_provisioning_client.h:460
az_iot_status
Azure IoT service status codes.
Definition: az_iot_common.h:78
uint32_t retry_after_seconds
Definition: az_iot_provisioning_client.h:345
Azure IoT common definitions.
az_span assigned_hub_hostname
Definition: az_iot_provisioning_client.h:245
Represents a "view" over a byte buffer that represents a contiguous region of memory....
Definition: az_span.h:33