Azure IoT C SDK
Macros | Typedefs | Functions
iothub_client.h File Reference

Extends the IoTHubClient_LL with additional features. More...

#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 "iothub_client_core.h"
#include "iothub_client_ll.h"

Go to the source code of this file.

Typedefs

typedef IOTHUB_CLIENT_CORE_HANDLE IOTHUB_CLIENT_HANDLE
 

Functions

IOTHUB_CLIENT_HANDLE IoTHubClient_CreateFromConnectionString (const char *connectionString, IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol)
 
IOTHUB_CLIENT_HANDLE IoTHubClient_Create (const IOTHUB_CLIENT_CONFIG *config)
 
IOTHUB_CLIENT_HANDLE IoTHubClient_CreateWithTransport (TRANSPORT_HANDLE transportHandle, const IOTHUB_CLIENT_CONFIG *config)
 
IOTHUB_CLIENT_HANDLE IoTHubClient_CreateFromDeviceAuth (const char *iothub_uri, const char *device_id, IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol)
 
void IoTHubClient_Destroy (IOTHUB_CLIENT_HANDLE iotHubClientHandle)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SendEventAsync (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_MESSAGE_HANDLE eventMessageHandle, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK eventConfirmationCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_GetSendStatus (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_STATUS *iotHubClientStatus)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetMessageCallback (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC messageCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetConnectionStatusCallback (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK connectionStatusCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetRetryPolicy (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY retryPolicy, size_t retryTimeoutLimitInSeconds)
 
IOTHUB_CLIENT_RESULT IoTHubClient_GetRetryPolicy (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_RETRY_POLICY *retryPolicy, size_t *retryTimeoutLimitInSeconds)
 
IOTHUB_CLIENT_RESULT IoTHubClient_GetLastMessageReceiveTime (IOTHUB_CLIENT_HANDLE iotHubClientHandle, time_t *lastMessageReceiveTime)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetOption (IOTHUB_CLIENT_HANDLE iotHubClientHandle, const char *optionName, const void *value)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetDeviceTwinCallback (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK deviceTwinCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SendReportedState (IOTHUB_CLIENT_HANDLE iotHubClientHandle, const unsigned char *reportedState, size_t size, IOTHUB_CLIENT_REPORTED_STATE_CALLBACK reportedStateCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetDeviceMethodCallback (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC deviceMethodCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_SetDeviceMethodCallback_Ex (IOTHUB_CLIENT_HANDLE iotHubClientHandle, IOTHUB_CLIENT_INBOUND_DEVICE_METHOD_CALLBACK inboundDeviceMethodCallback, void *userContextCallback)
 
IOTHUB_CLIENT_RESULT IoTHubClient_DeviceMethodResponse (IOTHUB_CLIENT_HANDLE iotHubClientHandle, METHOD_HANDLE methodId, const unsigned char *response, size_t response_size, int statusCode)
 
IOTHUB_CLIENT_RESULT IoTHubClient_UploadToBlobAsync (IOTHUB_CLIENT_HANDLE iotHubClientHandle, const char *destinationFileName, const unsigned char *source, size_t size, IOTHUB_CLIENT_FILE_UPLOAD_CALLBACK iotHubClientFileUploadCallback, void *context)
 
IOTHUB_CLIENT_RESULT IoTHubClient_UploadMultipleBlocksToBlobAsync (IOTHUB_CLIENT_HANDLE iotHubClientHandle, const char *destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK getDataCallback, void *context)
 
IOTHUB_CLIENT_RESULT IoTHubClient_UploadMultipleBlocksToBlobAsyncEx (IOTHUB_CLIENT_HANDLE iotHubClientHandle, const char *destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK_EX getDataCallbackEx, void *context)
 

Detailed Description

Extends the IoTHubClient_LL with additional features.

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

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

Typedef Documentation

◆ IOTHUB_CLIENT_HANDLE

typedef IOTHUB_CLIENT_CORE_HANDLE IOTHUB_CLIENT_HANDLE
Deprecated:
IOTHUB_CLIENT_HANDLE is deprecated. Use IOTHUB_DEVICE_CLIENT_HANDLE instead.

Function Documentation

◆ IoTHubClient_Create()

IOTHUB_CLIENT_HANDLE IoTHubClient_Create ( const IOTHUB_CLIENT_CONFIG config)
Deprecated:
IoTHubClient_Create is deprecated. Use IoTHubDeviceClient_Create() instead.

◆ IoTHubClient_CreateFromConnectionString()

IOTHUB_CLIENT_HANDLE IoTHubClient_CreateFromConnectionString ( const char *  connectionString,
IOTHUB_CLIENT_TRANSPORT_PROVIDER  protocol 
)
Deprecated:
IoTHubClient_CreateFromConnectionString is deprecated. Use IoTHubDeviceClient_CreateFromConnectionString() instead.

◆ IoTHubClient_CreateFromDeviceAuth()

IOTHUB_CLIENT_HANDLE IoTHubClient_CreateFromDeviceAuth ( const char *  iothub_uri,
const char *  device_id,
IOTHUB_CLIENT_TRANSPORT_PROVIDER  protocol 
)
Deprecated:
IoTHubClient_CreateFromDeviceAuth is deprecated. Use IoTHubDeviceClient_CreateFromDeviceAuth() instead.

◆ IoTHubClient_CreateWithTransport()

IOTHUB_CLIENT_HANDLE IoTHubClient_CreateWithTransport ( TRANSPORT_HANDLE  transportHandle,
const IOTHUB_CLIENT_CONFIG config 
)
Deprecated:
IoTHubClient_CreateWithTransport is deprecated. Use IoTHubDeviceClient_CreateWithTransport() instead.

◆ IoTHubClient_Destroy()

void IoTHubClient_Destroy ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle)
Deprecated:
IoTHubClient_Destroy is deprecated. Use IoTHubDeviceClient_Destroy() instead.

◆ IoTHubClient_DeviceMethodResponse()

IOTHUB_CLIENT_RESULT IoTHubClient_DeviceMethodResponse ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
METHOD_HANDLE  methodId,
const unsigned char *  response,
size_t  response_size,
int  statusCode 
)
Deprecated:
IoTHubClient_DeviceMethodResponse is deprecated. Use IoTHubDeviceClient_SetDeviceMethodCallback() instead.

◆ IoTHubClient_GetLastMessageReceiveTime()

IOTHUB_CLIENT_RESULT IoTHubClient_GetLastMessageReceiveTime ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
time_t *  lastMessageReceiveTime 
)
Deprecated:
IoTHubClient_GetLastMessageReceiveTime is deprecated. Use IoTHubDeviceClient_GetLastMessageReceiveTime() instead.

◆ IoTHubClient_GetRetryPolicy()

IOTHUB_CLIENT_RESULT IoTHubClient_GetRetryPolicy ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_RETRY_POLICY retryPolicy,
size_t *  retryTimeoutLimitInSeconds 
)
Deprecated:
IoTHubClient_GetRetryPolicy is deprecated. Use IoTHubDeviceClient_GetRetryPolicy() instead.

◆ IoTHubClient_GetSendStatus()

IOTHUB_CLIENT_RESULT IoTHubClient_GetSendStatus ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_STATUS iotHubClientStatus 
)
Deprecated:
IoTHubClient_GetSendStatus is deprecated. Use IoTHubDeviceClient_GetSendStatus() instead.

◆ IoTHubClient_SendEventAsync()

IOTHUB_CLIENT_RESULT IoTHubClient_SendEventAsync ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_MESSAGE_HANDLE  eventMessageHandle,
IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK  eventConfirmationCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SendEventAsync is deprecated. Use IoTHubDeviceClient_SendEventAsync() instead.

◆ IoTHubClient_SendReportedState()

IOTHUB_CLIENT_RESULT IoTHubClient_SendReportedState ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
const unsigned char *  reportedState,
size_t  size,
IOTHUB_CLIENT_REPORTED_STATE_CALLBACK  reportedStateCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SendReportedState is deprecated. Use IoTHubDeviceClient_SendReportedState() instead.

◆ IoTHubClient_SetConnectionStatusCallback()

IOTHUB_CLIENT_RESULT IoTHubClient_SetConnectionStatusCallback ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK  connectionStatusCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SetConnectionStatusCallback is deprecated. Use IoTHubDeviceClient_SetConnectionStatusCallback() instead.

◆ IoTHubClient_SetDeviceMethodCallback()

IOTHUB_CLIENT_RESULT IoTHubClient_SetDeviceMethodCallback ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC  deviceMethodCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SetDeviceMethodCallback is deprecated. Use IoTHubDeviceClient_SetDeviceMethodCallback() instead.

◆ IoTHubClient_SetDeviceMethodCallback_Ex()

IOTHUB_CLIENT_RESULT IoTHubClient_SetDeviceMethodCallback_Ex ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_INBOUND_DEVICE_METHOD_CALLBACK  inboundDeviceMethodCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SetDeviceMethodCallback_Ex is deprecated. Use IoTHubDeviceClient_SetDeviceMethodCallback() instead.

◆ IoTHubClient_SetDeviceTwinCallback()

IOTHUB_CLIENT_RESULT IoTHubClient_SetDeviceTwinCallback ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK  deviceTwinCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SetDeviceTwinCallback is deprecated. Use IoTHubDeviceClient_SetDeviceTwinCallback() instead.

◆ IoTHubClient_SetMessageCallback()

IOTHUB_CLIENT_RESULT IoTHubClient_SetMessageCallback ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC  messageCallback,
void *  userContextCallback 
)
Deprecated:
IoTHubClient_SetMessageCallback is deprecated. Use IoTHubDeviceClient_SetMessageCallback() instead.

◆ IoTHubClient_SetOption()

IOTHUB_CLIENT_RESULT IoTHubClient_SetOption ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
const char *  optionName,
const void *  value 
)
Deprecated:
IoTHubClient_SetOption is deprecated. Use IoTHubDeviceClient_SetOption() instead.

◆ IoTHubClient_SetRetryPolicy()

IOTHUB_CLIENT_RESULT IoTHubClient_SetRetryPolicy ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
IOTHUB_CLIENT_RETRY_POLICY  retryPolicy,
size_t  retryTimeoutLimitInSeconds 
)
Deprecated:
IoTHubClient_SetRetryPolicy is deprecated. Use IoTHubDeviceClient_SetRetryPolicy() instead.

◆ IoTHubClient_UploadMultipleBlocksToBlobAsync()

IOTHUB_CLIENT_RESULT IoTHubClient_UploadMultipleBlocksToBlobAsync ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
const char *  destinationFileName,
IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK  getDataCallback,
void *  context 
)
Deprecated:
IoTHubClient_UploadMultipleBlocksToBlobAsync is deprecated. Use IoTHubDeviceClient_UploadMultipleBlocksToBlobAsync() instead.

◆ IoTHubClient_UploadMultipleBlocksToBlobAsyncEx()

IOTHUB_CLIENT_RESULT IoTHubClient_UploadMultipleBlocksToBlobAsyncEx ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
const char *  destinationFileName,
IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK_EX  getDataCallbackEx,
void *  context 
)
Deprecated:
IoTHubClient_UploadMultipleBlocksToBlobAsyncEx is deprecated. Use IoTHubDeviceClient_UploadMultipleBlocksToBlobAsync() instead.

◆ IoTHubClient_UploadToBlobAsync()

IOTHUB_CLIENT_RESULT IoTHubClient_UploadToBlobAsync ( IOTHUB_CLIENT_HANDLE  iotHubClientHandle,
const char *  destinationFileName,
const unsigned char *  source,
size_t  size,
IOTHUB_CLIENT_FILE_UPLOAD_CALLBACK  iotHubClientFileUploadCallback,
void *  context 
)
Deprecated:
IoTHubClient_UploadToBlobAsync is deprecated. Use IoTHubDeviceClient_UploadToBlobAsync() instead.