corrected version (with typedef struct IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE_DATA* IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE;) included in the sources
Dependents: STM32F746_iothub_client_sample_mqtt
Fork of iothub_client by
iothub_message.h File Reference
The IoTHub_Message
component encapsulates one message that can be transferred by an IoT hub client.
More...
Go to the source code of this file.
Functions | |
DEFINE_ENUM (IOTHUB_MESSAGE_RESULT, IOTHUB_MESSAGE_RESULT_VALUES) | |
Enumeration specifying the status of calls to various APIs in this module. | |
DEFINE_ENUM (IOTHUBMESSAGE_CONTENT_TYPE, IOTHUBMESSAGE_CONTENT_TYPE_VALUES) | |
Enumeration specifying the content type of the a given message. | |
IOTHUB_MESSAGE_HANDLE | IoTHubMessage_CreateFromByteArray (const unsigned char *byteArray, size_t size) |
Creates a new IoT hub message from a byte array. | |
IOTHUB_MESSAGE_HANDLE | IoTHubMessage_CreateFromString (const char *source) |
Creates a new IoT hub message from a null terminated string. | |
IOTHUB_MESSAGE_HANDLE | IoTHubMessage_Clone (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Creates a new IoT hub message with the content identical to that of the iotHubMessageHandle parameter. | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_GetByteArray (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const unsigned char **buffer, size_t *size) |
Fetches a pointer and size for the data associated with the IoT hub message handle. | |
const char * | IoTHubMessage_GetString (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Returns the null terminated string stored in the message. | |
IOTHUBMESSAGE_CONTENT_TYPE | IoTHubMessage_GetContentType (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Returns the content type of the message given by parameter iotHubMessageHandle . | |
MAP_HANDLE | IoTHubMessage_Properties (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets a handle to the message's properties map. | |
const char * | IoTHubMessage_GetMessageId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the MessageId from the IOTHUB_MESSAGE_HANDLE. | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetMessageId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *messageId) |
Sets the MessageId for the IOTHUB_MESSAGE_HANDLE. | |
const char * | IoTHubMessage_GetCorrelationId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the CorrelationId from the IOTHUB_MESSAGE_HANDLE. | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetCorrelationId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *correlationId) |
Sets the CorrelationId for the IOTHUB_MESSAGE_HANDLE. | |
void | IoTHubMessage_Destroy (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Frees all resources associated with the given message handle. |
Detailed Description
The IoTHub_Message
component encapsulates one message that can be transferred by an IoT hub client.
Definition in file iothub_message.h.
Function Documentation
DEFINE_ENUM | ( | IOTHUB_MESSAGE_RESULT | , |
IOTHUB_MESSAGE_RESULT_VALUES | |||
) |
Enumeration specifying the status of calls to various APIs in this module.
DEFINE_ENUM | ( | IOTHUBMESSAGE_CONTENT_TYPE | , |
IOTHUBMESSAGE_CONTENT_TYPE_VALUES | |||
) |
Enumeration specifying the content type of the a given message.
IOTHUB_MESSAGE_HANDLE IoTHubMessage_Clone | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Creates a new IoT hub message with the content identical to that of the iotHubMessageHandle
parameter.
- Parameters:
-
iotHubMessageHandle Handle to the message that is to be cloned.
- Returns:
- A valid
IOTHUB_MESSAGE_HANDLE
if the message was successfully cloned orNULL
in case an error occurs.
Definition at line 173 of file iothub_message.c.
IOTHUB_MESSAGE_HANDLE IoTHubMessage_CreateFromByteArray | ( | const unsigned char * | byteArray, |
size_t | size | ||
) |
Creates a new IoT hub message from a byte array.
The type of the message will be set to IOTHUBMESSAGE_BYTEARRAY
.
- Parameters:
-
byteArray The byte array from which the message is to be created. size The size of the byte array.
- Returns:
- A valid
IOTHUB_MESSAGE_HANDLE
if the message was successfully created orNULL
in case an error occurs.
Definition at line 65 of file iothub_message.c.
IOTHUB_MESSAGE_HANDLE IoTHubMessage_CreateFromString | ( | const char * | source ) |
Creates a new IoT hub message from a null terminated string.
The type of the message will be set to IOTHUBMESSAGE_STRING
.
- Parameters:
-
source The null terminated string from which the message is to be created.
- Returns:
- A valid
IOTHUB_MESSAGE_HANDLE
if the message was successfully created orNULL
in case an error occurs.
Definition at line 131 of file iothub_message.c.
void IoTHubMessage_Destroy | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Frees all resources associated with the given message handle.
- Parameters:
-
iotHubMessageHandle Handle to the message.
Definition at line 503 of file iothub_message.c.
IOTHUB_MESSAGE_RESULT IoTHubMessage_GetByteArray | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const unsigned char ** | buffer, | ||
size_t * | size | ||
) |
Fetches a pointer and size for the data associated with the IoT hub message handle.
If the content type of the message is not IOTHUBMESSAGE_BYTEARRAY
then the function returns IOTHUB_MESSAGE_INVALID_ARG
.
- Parameters:
-
iotHubMessageHandle Handle to the message. buffer Pointer to the memory location where the pointer to the buffer will be written. size The size of the buffer will be written to this address.
- Returns:
- Returns IOTHUB_MESSAGE_OK if the byte array was fetched successfully or an error code otherwise.
Definition at line 310 of file iothub_message.c.
IOTHUBMESSAGE_CONTENT_TYPE IoTHubMessage_GetContentType | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Returns the content type of the message given by parameter iotHubMessageHandle
.
- Parameters:
-
iotHubMessageHandle Handle to the message.
- Returns:
- An
IOTHUBMESSAGE_CONTENT_TYPE
value.
Definition at line 369 of file iothub_message.c.
const char* IoTHubMessage_GetCorrelationId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Gets the CorrelationId from the IOTHUB_MESSAGE_HANDLE.
- Parameters:
-
iotHubMessageHandle Handle to the message.
- Returns:
- A const char* pointing to the Correlation Id.
Definition at line 404 of file iothub_message.c.
const char* IoTHubMessage_GetMessageId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Gets the MessageId from the IOTHUB_MESSAGE_HANDLE.
- Parameters:
-
iotHubMessageHandle Handle to the message.
- Returns:
- A const char* pointing to the Message Id.
Definition at line 485 of file iothub_message.c.
const char* IoTHubMessage_GetString | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Returns the null terminated string stored in the message.
If the content type of the message is not IOTHUBMESSAGE_STRING
then the function returns NULL
.
- Parameters:
-
iotHubMessageHandle Handle to the message.
- Returns:
NULL
if an error occurs or a pointer to the stored null terminated string otherwise.
Definition at line 344 of file iothub_message.c.
MAP_HANDLE IoTHubMessage_Properties | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle ) |
Gets a handle to the message's properties map.
- Parameters:
-
iotHubMessageHandle Handle to the message.
- Returns:
- A
MAP_HANDLE
pointing to the properties map for this message.
Definition at line 386 of file iothub_message.c.
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetCorrelationId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | correlationId | ||
) |
Sets the CorrelationId for the IOTHUB_MESSAGE_HANDLE.
- Parameters:
-
iotHubMessageHandle Handle to the message. correlationId Pointer to the memory location of the messageId
- Returns:
- Returns IOTHUB_MESSAGE_OK if the messageId was set successfully or an error code otherwise.
Definition at line 422 of file iothub_message.c.
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetMessageId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | messageId | ||
) |
Sets the MessageId for the IOTHUB_MESSAGE_HANDLE.
- Parameters:
-
iotHubMessageHandle Handle to the message. messageId Pointer to the memory location of the messageId
- Returns:
- Returns IOTHUB_MESSAGE_OK if the messageId was set successfully or an error code otherwise.
Definition at line 454 of file iothub_message.c.
Generated on Tue Jul 12 2022 19:44:54 by
![doxygen](doxygen.png)