15 #ifndef IOTHUB_MODULE_CLIENT_H
16 #define IOTHUB_MODULE_CLIENT_H
21 #include "umock_c/umock_c_prod.h"
22 #include "iothub_transport_ll.h"
23 #include "iothub_client_core_ll.h"
24 #include "iothub_client_core.h"
27 #ifndef IOTHUB_MODULE_CLIENT_INSTANCE_TYPE
34 #define IOTHUB_MODULE_CLIENT_INSTANCE_TYPE
279 #ifdef USE_EDGE_MODULES
void(* IOTHUB_CLIENT_PROPERTY_ACKNOWLEDGED_CALLBACK)(int statusCode, void *userContextCallback)
Function callback application implements to receive acknowledgements of properties sent from the clie...
Definition: iothub_client_core_common.h:381
void(* IOTHUB_CLIENT_TELEMETRY_CALLBACK)(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void *userContextCallback)
Function callback application implements to receive notifications when IoT Hub acknowledges telemetry...
Definition: iothub_client_core_common.h:370
void(* IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK)(DEVICE_TWIN_UPDATE_STATE update_state, const unsigned char *payLoad, size_t size, void *userContextCallback)
Signature of the callback that the application implements to process data received from an IoT Hub de...
Definition: iothub_client_core_common.h:201
IOTHUB_CLIENT_RETRY_POLICY
Enumeration specifying the retry strategy the IoT Hub client should use.
Definition: iothub_client_core_common.h:63
void(* IOTHUB_CLIENT_COMMAND_CALLBACK_ASYNC)(const IOTHUB_CLIENT_COMMAND_REQUEST *commandRequest, IOTHUB_CLIENT_COMMAND_RESPONSE *commandResponse, void *userContextCallback)
Function callback application implements to process an incoming command from IoT Hub.
Definition: iothub_client_core_common.h:358
void(* IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK)(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void *userContextCallback)
Signature of the callback that the application implements to process acknowledgement or failures when...
Definition: iothub_client_core_common.h:170
IOTHUBMESSAGE_DISPOSITION_RESULT
Enumeration returned by application callbacks that receive cloud-to-device messages.
Definition: iothub_client_core_common.h:81
void(* IOTHUB_METHOD_INVOKE_CALLBACK)(IOTHUB_CLIENT_RESULT result, int responseStatus, unsigned char *responsePayload, size_t responsePayloadSize, void *context)
Signature of the callback that the application implements to receive notifications of module initiate...
Definition: iothub_client_core_common.h:59
void(* IOTHUB_CLIENT_REPORTED_STATE_CALLBACK)(int status_code, void *userContextCallback)
Signature of the callback that the application implements to receive notifications of device or modul...
Definition: iothub_client_core_common.h:209
int(* IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC)(const char *method_name, const unsigned char *payload, size_t size, unsigned char **response, size_t *response_size, void *userContextCallback)
Signature of the callback that the application implements to receive incoming device or module method...
Definition: iothub_client_core_common.h:227
void(* IOTHUB_CLIENT_PROPERTIES_RECEIVED_CALLBACK)(IOTHUB_CLIENT_PROPERTY_PAYLOAD_TYPE payloadType, const unsigned char *payload, size_t payloadLength, void *userContextCallback)
Function callback application implements to process properties received from IoT Hub.
Definition: iothub_client_core_common.h:392
void(* IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK)(IOTHUB_CLIENT_CONNECTION_STATUS result, IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason, void *userContextCallback)
Signature of the callback that the application implements to process connection status changes betwee...
Definition: iothub_client_core_common.h:179
IOTHUBMESSAGE_DISPOSITION_RESULT(* IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC)(IOTHUB_MESSAGE_HANDLE message, void *userContextCallback)
Signature of the callback that the application implements to process incoming cloud-to-device message...
Definition: iothub_client_core_common.h:189
IOTHUB_CLIENT_RESULT
Enumeration specifying the status of calls to IoT Hub client.
Definition: iothub_client_core_common.h:42
IOTHUB_CLIENT_STATUS
Enumeration returned by the GetSendStatus family of APIs (e.g. IoTHubDeviceClient_LL_GetSendStatus())...
Definition: iothub_client_core_common.h:73
struct IOTHUB_MESSAGE_HANDLE_DATA_TAG * IOTHUB_MESSAGE_HANDLE
Handle representing an IoT Hub message.
Definition: iothub_message.h:32
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SubscribeToCommands(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_COMMAND_CALLBACK_ASYNC commandCallback, void *userContextCallback)
Subscribe to incoming commands from IoT Hub.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetRetryPolicy(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_RETRY_POLICY retryPolicy, size_t retryTimeoutLimitInSeconds)
Sets the Retry Policy feature to control how immediatelly and frequently the SDK will attempt to re-c...
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetConnectionStatusCallback(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_CONNECTION_STATUS_CALLBACK connectionStatusCallback, void *userContextCallback)
Sets up the connection status callback to be invoked representing the status of the connection to IOT...
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendPropertiesAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, const unsigned char *properties, size_t propertiesLength, IOTHUB_CLIENT_PROPERTY_ACKNOWLEDGED_CALLBACK propertyAcknowledgedCallback, void *userContextCallback)
Sends module properties to IoT Hub.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetModuleMethodCallback(IOTHUB_MODULE_CLIENT_HANDLE IoTHubClientHandle, IOTHUB_CLIENT_DEVICE_METHOD_CALLBACK_ASYNC methodCallback, void *userContextCallback)
This API sets callback for async cloud to module method call.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendEventAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_MESSAGE_HANDLE eventMessageHandle, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK eventConfirmationCallback, void *userContextCallback)
Asynchronous call to send the message specified by eventMessageHandle.
IOTHUB_MODULE_CLIENT_HANDLE IoTHubModuleClient_CreateFromConnectionString(const char *connectionString, IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol)
Creates a IoT Hub client for communication with an existing IoT Hub using the specified connection st...
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetInputMessageCallback(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, const char *inputName, IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC eventHandlerCallback, void *userContextCallback)
This API sets callback for method call that is directed to specified 'inputName' queue (e....
IOTHUB_CLIENT_CORE_HANDLE IOTHUB_MODULE_CLIENT_HANDLE
Handle corresponding to a convenience layer module client instance.
Definition: iothub_module_client.h:33
IOTHUB_CLIENT_RESULT IoTHubModuleClient_GetTwinAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK moduleTwinCallback, void *userContextCallback)
This API provides a way to retrieve the complete module Twin properties on-demand.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetMessageCallback(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_MESSAGE_CALLBACK_ASYNC messageCallback, void *userContextCallback)
Sets up the message callback to be invoked when IoT Hub issues a message to the device....
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendReportedState(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, const unsigned char *reportedState, size_t size, IOTHUB_CLIENT_REPORTED_STATE_CALLBACK reportedStateCallback, void *userContextCallback)
This API sends a report of the module's properties and their current values.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_GetLastMessageReceiveTime(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, time_t *lastMessageReceiveTime)
This function returns in the out parameter lastMessageReceiveTime what was the value of the time func...
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetOption(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, const char *optionName, const void *value)
This API sets a runtime option identified by parameter optionName to a value pointed to by value....
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendTelemetryAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_MESSAGE_HANDLE telemetryMessageHandle, IOTHUB_CLIENT_TELEMETRY_CALLBACK telemetryConfirmationCallback, void *userContextCallback)
Asynchronous call to send the telemetry message specified by telemetryMessageHandle.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_GetRetryPolicy(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_RETRY_POLICY *retryPolicy, size_t *retryTimeoutLimitInSeconds)
Gets the Retry Policy setting and timeout value for the current retry policy.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendMessageDisposition(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_MESSAGE_HANDLE message, IOTHUBMESSAGE_DISPOSITION_RESULT disposition)
This API sends an acknowledgement to Azure IoT Hub that a cloud-to-device message has been received a...
IOTHUB_CLIENT_RESULT IoTHubModuleClient_GetPropertiesAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_PROPERTIES_RECEIVED_CALLBACK propertyCallback, void *userContextCallback)
Retrieves all module properties from IoT Hub.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_GetPropertiesAndSubscribeToUpdatesAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_PROPERTIES_RECEIVED_CALLBACK propertyUpdateCallback, void *userContextCallback)
Retrieves all module properties from IoT Hub and also subscribes for updates to writable properties.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SetModuleTwinCallback(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_DEVICE_TWIN_CALLBACK moduleTwinCallback, void *userContextCallback)
This API specifies a call back to be used when the module receives a state update.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_GetSendStatus(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_CLIENT_STATUS *IoTHubClientStatus)
This function returns the current sending status for IoTHubModuleClient.
void IoTHubModuleClient_Destroy(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle)
Disposes of resources allocated by the IoT Hub client. This is a blocking call.
IOTHUB_CLIENT_RESULT IoTHubModuleClient_SendEventToOutputAsync(IOTHUB_MODULE_CLIENT_HANDLE iotHubModuleClientHandle, IOTHUB_MESSAGE_HANDLE eventMessageHandle, const char *outputName, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK eventConfirmationCallback, void *userContextCallback)
Asynchronous call to send the message specified by eventMessageHandle.
APIs that allow a user to communicate with an Azure IoT Hub.