iothub_client.h

Extends the IoTHubCLient_LL module with additional features.

Includes

#include <stddef.h>
#include <stdint.h>
#include "umock_c/umock_c_prod.h"
#include "iothub_transport_ll.h"
#include "iothub_client_core_ll.h"
#include <time.h>
#include "D:/Docs/test/azure-iot-sdk-c/iothub_client/inc/iothub_client_core_common.h"
#include "iothub_client_core.h"
#include "D:/Docs/test/azure-iot-sdk-c/iothub_client/inc/iothub_client_core_ll.h"
#include "iothub_client_ll.h"

Detailed Description

DEPRECATED. New users use iothub_device_client.h for IoTHubClient APIs.

IoTHubClient is a module that extends the IoTHubCLient_LL module with 2 features:

  • scheduling the work for the IoTHubCLient from a thread, so that the user does not need to create their own thread

  • thread-safe APIs

Functions

Function Name Description
IoTHubClient_CreateFromConnectionString Creates a IoT Hub client for communication with an existing IoT Hub using the specified connection string parameter.
IoTHubClient_Create Creates a IoT Hub client for communication with an existing IoT Hub using the specified parameters.
IoTHubClient_CreateWithTransport Creates a IoT Hub client for communication with an existing IoT Hub using the specified parameters.
IoTHubClient_CreateFromDeviceAuth Creates a IoT Hub client for communication with an existing IoT Hub using the device auth module.
IoTHubClient_Destroy Disposes of resources allocated by the IoT Hub client. This is a blocking call.
IoTHubClient_SendEventAsync Asynchronous call to send the message specified by eventMessageHandle.
IoTHubClient_GetSendStatus This function returns the current sending status for IoTHubClient.
IoTHubClient_SetMessageCallback Sets up the message callback to be invoked when IoT Hub issues a message to the device. This is a blocking call.
IoTHubClient_SetConnectionStatusCallback Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.
IoTHubClient_SetRetryPolicy Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.
IoTHubClient_GetRetryPolicy Sets up the connection status callback to be invoked representing the status of the connection to IOT Hub. This is a blocking call.
IoTHubClient_GetLastMessageReceiveTime This function returns in the out parameter lastMessageReceiveTime what was the value of the time function when the last message was received at the client.
IoTHubClient_SetOption This API sets a runtime option identified by parameter optionName to a value pointed to by value. optionName and the data type value is pointing to are specific for every option.
IoTHubClient_SetDeviceTwinCallback This API specifies a call back to be used when the device receives a state update.
IoTHubClient_SendReportedState This API sends a report of the device's properties and their current values.
IoTHubClient_SetDeviceMethodCallback This API sets callback for cloud to device method call.
IoTHubClient_SetDeviceMethodCallback_Ex This API sets callback for async cloud to device method call.
IoTHubClient_DeviceMethodResponse This API responses to a asnyc method callback identified the methodId.
IoTHubClient_UploadToBlobAsync IoTHubClient_UploadToBlobAsync uploads data from memory to a file in Azure Blob Storage.
IoTHubClient_UploadMultipleBlocksToBlobAsync Uploads a file to a Blob storage in chunks, fed through the callback function provided by the user.
IoTHubClient_UploadMultipleBlocksToBlobAsyncEx Uploads a file to a Blob storage in chunks, fed through the callback function provided by the user.

Macro definitions

IOTHUB_CLIENT_INSTANCE_TYPE

#define IOTHUB_CLIENT_INSTANCE_TYPE

Type definitions

IOTHUB_CLIENT_HANDLE

typedef IOTHUB_CLIENT_CORE_HANDLE IOTHUB_CLIENT_HANDLE;