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

Revision:
74:ea0021abecf7
Parent:
53:1e5a1ca1f274
Child:
77:e4e36df9caee
--- a/iothub_message.h	Fri Aug 11 14:02:31 2017 -0700
+++ b/iothub_message.h	Fri Aug 25 11:22:43 2017 -0700
@@ -114,11 +114,53 @@
  *
  * @param   iotHubMessageHandle Handle to the message.
  *
+ * @remarks This function retrieves the standardized type of the payload, which indicates if @c iotHubMessageHandle was created using a String or a Byte Array.
+ *
  * @return  An @c IOTHUBMESSAGE_CONTENT_TYPE value.
  */
 MOCKABLE_FUNCTION(, IOTHUBMESSAGE_CONTENT_TYPE, IoTHubMessage_GetContentType, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle);
 
 /**
+* @brief   Sets the content-type of the message payload, as per supported values on RFC 2046.
+*
+* @param   iotHubMessageHandle Handle to the message.
+*
+* @param   contentType String defining the type of the payload (e.g., text/plain).
+*
+* @return  An @c IOTHUB_MESSAGE_RESULT value.
+*/
+MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetContentTypeSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, contentType);
+
+/**
+* @brief   Returns the content-type of the message payload, if defined.
+*
+* @param   iotHubMessageHandle Handle to the message.
+*
+* @return  A string with the content-type value if defined (or NULL otherwise).
+*/
+MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetContentTypeSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle);
+
+/**
+* @brief   Sets the content-encoding of the message payload, as per supported values on RFC 2616.
+*
+* @param   iotHubMessageHandle Handle to the message.
+*
+* @param   contentEncoding String defining the encoding of the payload (e.g., utf-8).
+*
+* @return  An @c IOTHUB_MESSAGE_RESULT value.
+*/
+MOCKABLE_FUNCTION(, IOTHUB_MESSAGE_RESULT, IoTHubMessage_SetContentEncodingSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle, const char*, contentEncoding);
+
+/**
+* @brief   Returns the content-encoding of the message payload, if defined.
+*
+* @param   iotHubMessageHandle Handle to the message.
+*
+* @return  A string with the content-encoding value if defined (or NULL otherwise).
+*/
+MOCKABLE_FUNCTION(, const char*, IoTHubMessage_GetContentEncodingSystemProperty, IOTHUB_MESSAGE_HANDLE, iotHubMessageHandle);
+
+/**
  * @brief   Gets a handle to the message's properties map.
  *
  * @param   iotHubMessageHandle Handle to the message.