Microsoft Azure IoTHub client libraries
Dependents: sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more
This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks
Diff: iothub_message.h
- Revision:
- 88:248736be106e
- Parent:
- 77:e4e36df9caee
- Child:
- 89:a2ed767a532e
diff -r 127f440f845b -r 248736be106e iothub_message.h --- a/iothub_message.h Fri May 04 13:24:17 2018 -0700 +++ b/iothub_message.h Mon Jun 11 15:39:23 2018 -0700 @@ -179,6 +179,30 @@ MOCKABLE_FUNCTION(, MAP_HANDLE, IoTHubMessage_Properties, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle); /** +* @brief Sets a property on a Iothub Message. +* +* @param iotHubMessageHandle Handle to the message. +* +* @param key name of the property to set. +* +* @param value of the property to set. +* +* @return An @c IOTHUB_MESSAGE_RESULT value indicating the result of setting the property. +*/ +MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, key, const char*, value); + +/** +* @brief Gets a IotHub Message's properties item. +* +* @param iotHubMessageHandle Handle to the message. +* +* @param key name of the property to retrieve. +* +* @return A string with the property's value, or NULL if it does not exist in the properties list. +*/ +MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, key); + +/** * @brief Gets the MessageId from the IOTHUB_MESSAGE_HANDLE. * * @param iotHubMessageHandle Handle to the message.