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_client.h
- Revision:
- 55:59b527ab3452
- Parent:
- 54:6dcad9019a64
- Child:
- 62:5a4cdacf5090
--- a/iothub_client.h Wed Dec 14 15:59:51 2016 -0800 +++ b/iothub_client.h Sun Jan 08 11:11:58 2017 -0800 @@ -300,6 +300,32 @@ */ MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetDeviceMethodCallback, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC, deviceMethodCallback, void*, userContextCallback); + /** + * @brief This API sets callback for async cloud to device method call. + * + * @param iotHubClientHandle The handle created by a call to the create function. + * @param inboundDeviceMethodCallback The callback which will be called by IoTHub. + * @param userContextCallback User specified context that will be provided to the + * callback. This can be @c NULL. + * + * @return IOTHUB_CLIENT_OK upon success or an error code upon failure. + */ + MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_SetDeviceMethodCallback_Ex, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, IOTHUB_CLIENT_INBOUND_DEVICE_METHOD_CALLBACK, inboundDeviceMethodCallback, void*, userContextCallback); + + + /** + * @brief This API responses to a asnyc method callback identified the methodId. + * + * @param iotHubClientHandle The handle created by a call to the create function. + * @param methodId The methodId of the Device Method callback. + * @param response The response data for the method callback. + * @param response_size The size of the response data buffer. + * @param status_response The status response of the method callback. + * + * @return IOTHUB_CLIENT_OK upon success or an error code upon failure. + */ + MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_DeviceMethodResponse, IOTHUB_CLIENT_HANDLE, iotHubClientHandle, METHOD_HANDLE, methodId, const unsigned char*, response, size_t, response_size, int, statusCode); + #ifndef DONT_USE_UPLOADTOBLOB /** * @brief IoTHubClient_UploadToBlobAsync uploads data from memory to a file in Azure Blob Storage.