Azure IoT C SDK
|
The IoTHub_Message
component encapsulates one message that can be transferred by an IoT hub client.
More...
#include "azure_macro_utils/macro_utils.h"
#include "azure_c_shared_utility/map.h"
#include "umock_c/umock_c_prod.h"
#include <stddef.h>
Go to the source code of this file.
Data Structures | |
struct | IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA_HANDLE |
diagnostic related data More... | |
Typedefs | |
typedef struct IOTHUB_MESSAGE_HANDLE_DATA_TAG * | IOTHUB_MESSAGE_HANDLE |
Handle representing an IoT Hub message. | |
Enumerations | |
enum | IOTHUB_MESSAGE_RESULT { IOTHUB_MESSAGE_OK , IOTHUB_MESSAGE_INVALID_ARG , IOTHUB_MESSAGE_INVALID_TYPE , IOTHUB_MESSAGE_ERROR , IOTHUB_MESSAGE_BECAUSE_DESTROY } |
Enumeration specifying the status of calls to various APIs in this module. | |
enum | IOTHUBMESSAGE_CONTENT_TYPE { IOTHUBMESSAGE_BYTEARRAY , IOTHUBMESSAGE_STRING , IOTHUBMESSAGE_UNKNOWN } |
Enumeration specifying the content type of a given message. | |
Functions | |
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 . More... | |
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 . More... | |
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. More... | |
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 . More... | |
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 . No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUBMESSAGE_CONTENT_TYPE | IoTHubMessage_GetContentType (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Returns the content type of the message given by parameter iotHubMessageHandle . More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetContentTypeSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *contentType) |
Sets the content-type of the message payload, as per supported values on RFC 2046. More... | |
const char * | IoTHubMessage_GetContentTypeSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Returns the content-type of the message payload, if defined. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetContentEncodingSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *contentEncoding) |
Sets the content-encoding of the message payload, as per supported values on RFC 2616. More... | |
const char * | IoTHubMessage_GetContentEncodingSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Returns the content-encoding of the message payload, if defined. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
MAP_HANDLE | IoTHubMessage_Properties (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets a handle to the message's properties map. Note that when sending messages via the HTTP transport, the key names in the map must not contain spaces. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *key, const char *value) |
Sets a property on a IoT Hub message. More... | |
const char * | IoTHubMessage_GetProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *key) |
Gets a IoT Hub message's properties item. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
const char * | IoTHubMessage_GetMessageId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the messageId from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetMessageId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *messageId) |
Sets the messageId for the IOTHUB_MESSAGE_HANDLE. More... | |
const char * | IoTHubMessage_GetCorrelationId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the CorrelationId from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetCorrelationId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *correlationId) |
Sets the CorrelationId for the IOTHUB_MESSAGE_HANDLE. More... | |
const IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA * | IoTHubMessage_GetDiagnosticPropertyData (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the DiagnosticData from the IOTHUB_MESSAGE_HANDLE. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetDiagnosticPropertyData (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA *diagnosticData) |
Sets the DiagnosticData for the IOTHUB_MESSAGE_HANDLE. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
const char * | IoTHubMessage_GetOutputName (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the output name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetOutputName (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *outputName) |
Sets output for named queues. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
const char * | IoTHubMessage_GetInputName (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the input name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetInputName (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *inputName) |
Sets input for named queues. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
const char * | IoTHubMessage_GetConnectionModuleId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the module name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetConnectionModuleId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *connectionModuleId) |
Sets connection module ID. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
const char * | IoTHubMessage_GetConnectionDeviceId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the connection device ID from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetMessageCreationTimeUtcSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *messageCreationTimeUtc) |
Sets the message creation time in UTC. More... | |
const char * | IoTHubMessage_GetMessageCreationTimeUtcSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the message creation time in UTC from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetMessageUserIdSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *userId) |
Sets the message user id. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
const char * | IoTHubMessage_GetMessageUserIdSystemProperty (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the message user id from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetConnectionDeviceId (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *connectionDeviceId) |
Sets connection device Id. CAUTION: SDK user should not call it directly, it is for internal use only. More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetAsSecurityMessage (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Marks a IoT Hub message as a security message. CAUTION: security messages are special messages not easily accessable by the user. More... | |
bool | IoTHubMessage_IsSecurityMessage (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
returns if this message is a IoT Hub security message or not More... | |
IOTHUB_MESSAGE_RESULT | IoTHubMessage_SetComponentName (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle, const char *componentName) |
Sets component name of the message. More... | |
const char * | IoTHubMessage_GetComponentName (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Gets the component name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message. More... | |
void | IoTHubMessage_Destroy (IOTHUB_MESSAGE_HANDLE iotHubMessageHandle) |
Frees all resources associated with the given message handle. More... | |
The IoTHub_Message
component encapsulates one message that can be transferred by an IoT hub client.
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.
iotHubMessageHandle | Handle to the message that is to be cloned. |
NULL
in case an error occurs. 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
.
byteArray | The byte array from which the message is to be created. |
size | The size of the byte array. |
NULL
in case an error occurs. 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
.
source | The null terminated string from which the message is to be created. |
NULL
in case an error occurs. void IoTHubMessage_Destroy | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Frees all resources associated with the given message handle.
iotHubMessageHandle | Handle to the message. |
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
.
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. |
const char* IoTHubMessage_GetComponentName | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the component name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetConnectionDeviceId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the connection device ID from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetConnectionModuleId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the module name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetContentEncodingSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Returns the content-encoding of the message payload, if defined. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
IOTHUBMESSAGE_CONTENT_TYPE IoTHubMessage_GetContentType | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Returns the content type of the message given by parameter iotHubMessageHandle
.
iotHubMessageHandle | Handle to the message. |
iotHubMessageHandle
was created using a String or a Byte Array.const char* IoTHubMessage_GetContentTypeSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Returns the content-type of the message payload, if defined. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetCorrelationId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the CorrelationId from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA* IoTHubMessage_GetDiagnosticPropertyData | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the DiagnosticData from the IOTHUB_MESSAGE_HANDLE. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetInputName | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the input name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetMessageCreationTimeUtcSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the message creation time in UTC from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetMessageId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the messageId from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetMessageUserIdSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the message user id from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetOutputName | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets the output name from the IOTHUB_MESSAGE_HANDLE. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
const char* IoTHubMessage_GetProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | key | ||
) |
Gets a IoT Hub message's properties item. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
key | name of the property to retrieve. |
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
. No new memory is allocated, the caller is not responsible for freeing the memory. The memory is valid until IoTHubMessage_Destroy is called on the message.
iotHubMessageHandle | Handle to the message. |
NULL
if an error occurs or a pointer to the stored null terminated string otherwise. bool IoTHubMessage_IsSecurityMessage | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
returns if this message is a IoT Hub security message or not
iotHubMessageHandle | Handle to the message. |
MAP_HANDLE IoTHubMessage_Properties | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Gets a handle to the message's properties map. Note that when sending messages via the HTTP transport, the key names in the map must not contain spaces.
DEPRECATED: Use IoTHubMessage_SetProperty and IoTHubMessage_GetProperty instead. **
iotHubMessageHandle | Handle to the message. |
MAP_HANDLE
pointing to the properties map for this message. IOTHUB_MESSAGE_RESULT IoTHubMessage_SetAsSecurityMessage | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle | ) |
Marks a IoT Hub message as a security message. CAUTION: security messages are special messages not easily accessable by the user.
iotHubMessageHandle | Handle to the message. |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetComponentName | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | componentName | ||
) |
Sets component name of the message.
iotHubMessageHandle | Handle to the message. |
componentName | Pointer to the component name. |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetConnectionDeviceId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | connectionDeviceId | ||
) |
Sets connection device Id. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
connectionDeviceId | Pointer to the device ID of connector |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetConnectionModuleId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | connectionModuleId | ||
) |
Sets connection module ID. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
connectionModuleId | Pointer to the module ID of connector |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetContentEncodingSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | contentEncoding | ||
) |
Sets the content-encoding of the message payload, as per supported values on RFC 2616.
iotHubMessageHandle | Handle to the message. |
contentEncoding | String defining the encoding of the payload (e.g., utf-8). |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetContentTypeSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | contentType | ||
) |
Sets the content-type of the message payload, as per supported values on RFC 2046.
iotHubMessageHandle | Handle to the message. |
contentType | String defining the type of the payload (e.g., text/plain). |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetCorrelationId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | correlationId | ||
) |
Sets the CorrelationId for the IOTHUB_MESSAGE_HANDLE.
iotHubMessageHandle | Handle to the message. |
correlationId | Pointer to the memory location of the messageId |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetDiagnosticPropertyData | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const IOTHUB_MESSAGE_DIAGNOSTIC_PROPERTY_DATA * | diagnosticData | ||
) |
Sets the DiagnosticData for the IOTHUB_MESSAGE_HANDLE. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
diagnosticData | Pointer to the memory location of the diagnosticData |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetInputName | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | inputName | ||
) |
Sets input for named queues. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
inputName | Pointer to the queue to input message to |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetMessageCreationTimeUtcSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | messageCreationTimeUtc | ||
) |
Sets the message creation time in UTC.
iotHubMessageHandle | Handle to the message. |
messageCreationTimeUtc | Pointer to the message creation time as null-terminated string |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetMessageId | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | messageId | ||
) |
Sets the messageId for the IOTHUB_MESSAGE_HANDLE.
iotHubMessageHandle | Handle to the message. |
messageId | Pointer to the memory location of the messageId |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetMessageUserIdSystemProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | userId | ||
) |
Sets the message user id. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
userId | Pointer to the message user id as null-terminated string |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetOutputName | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | outputName | ||
) |
Sets output for named queues. CAUTION: SDK user should not call it directly, it is for internal use only.
iotHubMessageHandle | Handle to the message. |
outputName | Pointer to the queue to output message to |
IOTHUB_MESSAGE_RESULT IoTHubMessage_SetProperty | ( | IOTHUB_MESSAGE_HANDLE | iotHubMessageHandle, |
const char * | key, | ||
const char * | value | ||
) |
Sets a property on a IoT Hub message.
iotHubMessageHandle | Handle to the message. |
key | name of the property to set. Note that when sending messages via the HTTP transport, this value must not contain spaces. |
value | of the property to set. @b NOTE: The accepted character sets for the key name and value parameters are dependent on different factors, such as the protocol being used. For more information on the character sets accepted by Azure IoT Hub, see <a href="https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messages-construct">Create and read IoT Hub messages</a>. |