|
AWS IoT Device SDK C:
Fleet Provisioning
AWS IoT Fleet Provisioning
|
| Return to main page ↑ |
Implements the internal functions for parsing server responses for the Provisioning library. More...
#include "iot_config.h"#include "iot_error.h"#include "private/aws_iot_provisioning_internal.h"#include "iot_logging_setup.h"Functions | |
| static AwsIotProvisioningError_t | _parseRejectedResponse (IotSerializerDecoderObject_t *pPayloadDecoder, const char *pOperationName, AwsIotProvisioningRejectedResponse_t *pResponseData, AwsIotProvisioningServerStatusCode_t *pStatusCode) |
| Parses the rejected response payload received from the server, and populates the data of the passed pResponseData parameter. More... | |
| static AwsIotProvisioningError_t | _parseKeyedEntryInPayload (IotSerializerDecoderObject_t *pPayloadDecoder, IotSerializerDecoderObject_t *pPayloadEntryDecoder, const char *pKeyString, const char *pOperationString) |
| Utility for parsing a text-string based key-value pair entry from a map container type response payload. More... | |
| static AwsIotProvisioningError_t | _parseCommonCertInfoInResponse (IotSerializerDecoderObject_t *pPayloadDecoder, IotSerializerDecoderObject_t *pCertPemDecoder, IotSerializerDecoderObject_t *pCertIdDecoder, IotSerializerDecoderObject_t *pOwnershipTokenDecoder, const char *pOperationString) |
| Common utility for parsing the Certificate PEM string, Certificate ID, and Ownership token data from the server response. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_ParseKeysAndCertificateResponse (AwsIotStatus_t responseType, const uint8_t *pResponsePayload, size_t payloadLength, const _provisioningCallbackInfo_t *userCallbackInfo) |
| Parses the response received from the server for device credentials, and invokes the provided user-callback with parsed credentials, if parsing was successful. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_ParseCsrResponse (AwsIotStatus_t responseType, const uint8_t *pResponsePayload, size_t payloadLength, const _provisioningCallbackInfo_t *userCallbackInfo) |
| Parses the response from the server received on a Certificate-Signing Request, and invokes the provided user-callback with the parsed response. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_ParseRegisterThingResponse (AwsIotStatus_t responseType, const uint8_t *pResponsePayload, size_t responsePayloadLength, const _provisioningCallbackInfo_t *userCallbackInfo) |
| Parses the response payload received from the server for device provisioning, and invokes the provided user-callback with parsed data, if parsing was successful. More... | |
Implements the internal functions for parsing server responses for the Provisioning library.
|
static |
Parses the rejected response payload received from the server, and populates the data of the passed pResponseData parameter.
| [in] | pPayloadDecoder | The outermost decoder object representing the response payload. |
| [in] | pOperationName | The Provisioning library operation (or API) that the response is associated with. |
| [out] | pResponseData | This will be populated with the data parsed from the response payload, if successful. |
| [out] | pStatusCode | This will be populated with the error status code parsed from the response payload, if successful. |
|
static |
Utility for parsing a text-string based key-value pair entry from a map container type response payload.
| [in] | pPayloadDecoder | The decoder object representing the map container formatted payload. |
| [in,out] | pPayloadEntryDecoder | The decoder object to store the parsed value data of the entry. |
| [in] | pKeyString | The key string to parse from the payload. |
| [in] | pOperationString | The string of the ongoing operation to use for logging. |
|
static |
Common utility for parsing the Certificate PEM string, Certificate ID, and Ownership token data from the server response.
| [in] | pPayloadDecoder | The decoder object that represents the server response payload as a map container. |
| [in,out] | pCertPemDecoder | The decoder object to store the parsed Certificate PEM string in. |
| [in,out] | pCertIdDecoder | The decoder object to store the parsed Certificate ID data in. |
| [in,out] | pOwnershipTokenDecoder | The decoder object to store the parsed Certificate Ownership Token string in. |
| [in] | pOperationString | The string of the ongoing operation to use for logging. |
| AwsIotProvisioningError_t _AwsIotProvisioning_ParseKeysAndCertificateResponse | ( | AwsIotStatus_t | responseType, |
| const uint8_t * | pResponsePayload, | ||
| size_t | payloadLength, | ||
| const _provisioningCallbackInfo_t * | userCallbackInfo | ||
| ) |
Parses the response received from the server for device credentials, and invokes the provided user-callback with parsed credentials, if parsing was successful.
| [in] | responseType | The type of response, "accepted" or "rejected" received from the server for the operation. |
| [in] | pResponsePayload | The response payload from the server to parse. |
| [in] | payloadLength | The length of the response payload. |
| [in] | userCallbackInfo | The user-provided callback to invoke on successful parsing of response. |
| AwsIotProvisioningError_t _AwsIotProvisioning_ParseCsrResponse | ( | AwsIotStatus_t | responseType, |
| const uint8_t * | pResponsePayload, | ||
| size_t | payloadLength, | ||
| const _provisioningCallbackInfo_t * | userCallbackInfo | ||
| ) |
Parses the response from the server received on a Certificate-Signing Request, and invokes the provided user-callback with the parsed response.
| [in] | responseType | The type of response, "accepted" or "rejected" received from the server for the operation. |
| [in] | pResponsePayload | The response payload from the server to parse. |
| [in] | payloadLength | The length of the response payload. |
| [in] | userCallbackInfo | The user-provided callback to invoke on successful parsing of response. |
| AwsIotProvisioningError_t _AwsIotProvisioning_ParseRegisterThingResponse | ( | AwsIotStatus_t | responseType, |
| const uint8_t * | pResponsePayload, | ||
| size_t | responsePayloadLength, | ||
| const _provisioningCallbackInfo_t * | userCallbackInfo | ||
| ) |
Parses the response payload received from the server for device provisioning, and invokes the provided user-callback with parsed data, if parsing was successful.
| [in] | responseType | The type of response, "accepted" or "rejected" received from the server for the operation. |
| [in] | pResponsePayload | The response payload from the server to parse. |
| [in] | responsePayloadLength | The length of the response payload. |
| [in] | userCallbackInfo | The user-provided callback to invoke on successful parsing of response. |
The serializer library allocates memory for the iterator. It can only be released by iterating to the last element in the map containers and "stepping out" of the container Thus, we will iterate to the end of the device configuration container to invalidate the iterator.