Microsoft Azure IoTHub client MQTT transport

Dependents:   STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more

Committer:
AzureIoTClient
Date:
Tue Sep 11 11:12:42 2018 -0700
Revision:
41:410450f16a9f
Parent:
40:cb03d6a6f46d
1.2.9

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 39:6231984e0179 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 39:6231984e0179 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 39:6231984e0179 3
AzureIoTClient 39:6231984e0179 4 #ifndef IOTHUBTRANSPORT_MQTT_COMMON_H
AzureIoTClient 39:6231984e0179 5 #define IOTHUBTRANSPORT_MQTT_COMMON_H
AzureIoTClient 39:6231984e0179 6
AzureIoTClient 39:6231984e0179 7 #include "internal/iothub_transport_ll_private.h"
AzureIoTClient 39:6231984e0179 8 #include "azure_c_shared_utility/umock_c_prod.h"
AzureIoTClient 39:6231984e0179 9
AzureIoTClient 39:6231984e0179 10 #ifdef __cplusplus
AzureIoTClient 39:6231984e0179 11 extern "C"
AzureIoTClient 39:6231984e0179 12 {
AzureIoTClient 39:6231984e0179 13 #endif
AzureIoTClient 39:6231984e0179 14
AzureIoTClient 39:6231984e0179 15 typedef struct MQTT_TRANSPORT_PROXY_OPTIONS_TAG
AzureIoTClient 39:6231984e0179 16 {
AzureIoTClient 39:6231984e0179 17 const char* host_address;
AzureIoTClient 39:6231984e0179 18 int port;
AzureIoTClient 39:6231984e0179 19 const char* username;
AzureIoTClient 39:6231984e0179 20 const char* password;
AzureIoTClient 39:6231984e0179 21 } MQTT_TRANSPORT_PROXY_OPTIONS;
AzureIoTClient 39:6231984e0179 22
AzureIoTClient 39:6231984e0179 23 typedef XIO_HANDLE(*MQTT_GET_IO_TRANSPORT)(const char* fully_qualified_name, const MQTT_TRANSPORT_PROXY_OPTIONS* mqtt_transport_proxy_options);
AzureIoTClient 39:6231984e0179 24
AzureIoTClient 39:6231984e0179 25 MOCKABLE_FUNCTION(, TRANSPORT_LL_HANDLE, IoTHubTransport_MQTT_Common_Create, const IOTHUBTRANSPORT_CONFIG*, config, MQTT_GET_IO_TRANSPORT, get_io_transport);
AzureIoTClient 39:6231984e0179 26 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_Destroy, TRANSPORT_LL_HANDLE, handle);
AzureIoTClient 39:6231984e0179 27 MOCKABLE_FUNCTION(, int, IoTHubTransport_MQTT_Common_Subscribe, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 39:6231984e0179 28 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_Unsubscribe, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 39:6231984e0179 29 MOCKABLE_FUNCTION(, int, IoTHubTransport_MQTT_Common_Subscribe_DeviceTwin, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 39:6231984e0179 30 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_Unsubscribe_DeviceTwin, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 39:6231984e0179 31 MOCKABLE_FUNCTION(, int, IoTHubTransport_MQTT_Common_Subscribe_DeviceMethod, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 39:6231984e0179 32 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_Unsubscribe_DeviceMethod, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 39:6231984e0179 33 MOCKABLE_FUNCTION(, int, IoTHubTransport_MQTT_Common_DeviceMethod_Response, IOTHUB_DEVICE_HANDLE, handle, METHOD_HANDLE, methodId, const unsigned char*, response, size_t, response_size, int, status_response);
AzureIoTClient 39:6231984e0179 34 MOCKABLE_FUNCTION(, IOTHUB_PROCESS_ITEM_RESULT, IoTHubTransport_MQTT_Common_ProcessItem, TRANSPORT_LL_HANDLE, handle, IOTHUB_IDENTITY_TYPE, item_type, IOTHUB_IDENTITY_INFO*, iothub_item);
AzureIoTClient 39:6231984e0179 35 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_DoWork, TRANSPORT_LL_HANDLE, handle, IOTHUB_CLIENT_CORE_LL_HANDLE, iotHubClientHandle);
AzureIoTClient 39:6231984e0179 36 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_MQTT_Common_GetSendStatus, IOTHUB_DEVICE_HANDLE, handle, IOTHUB_CLIENT_STATUS*, iotHubClientStatus);
AzureIoTClient 39:6231984e0179 37 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_MQTT_Common_SetOption, TRANSPORT_LL_HANDLE, handle, const char*, option, const void*, value);
AzureIoTClient 39:6231984e0179 38 MOCKABLE_FUNCTION(, IOTHUB_DEVICE_HANDLE, IoTHubTransport_MQTT_Common_Register, TRANSPORT_LL_HANDLE, handle, const IOTHUB_DEVICE_CONFIG*, device, IOTHUB_CLIENT_CORE_LL_HANDLE, iotHubClientHandle, PDLIST_ENTRY, waitingToSend);
AzureIoTClient 39:6231984e0179 39 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_Unregister, IOTHUB_DEVICE_HANDLE, deviceHandle);
AzureIoTClient 39:6231984e0179 40 MOCKABLE_FUNCTION(, int, IoTHubTransport_MQTT_Common_SetRetryPolicy, TRANSPORT_LL_HANDLE, handle, IOTHUB_CLIENT_RETRY_POLICY, retryPolicy, size_t, retryTimeoutLimitInSeconds);
AzureIoTClient 39:6231984e0179 41 MOCKABLE_FUNCTION(, STRING_HANDLE, IoTHubTransport_MQTT_Common_GetHostname, TRANSPORT_LL_HANDLE, handle);
AzureIoTClient 40:cb03d6a6f46d 42 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_MQTT_Common_SendMessageDisposition, MESSAGE_CALLBACK_INFO*, message_data, IOTHUBMESSAGE_DISPOSITION_RESULT, disposition);
AzureIoTClient 40:cb03d6a6f46d 43 MOCKABLE_FUNCTION(, int, IoTHubTransport_MQTT_Common_Subscribe_InputQueue, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 40:cb03d6a6f46d 44 MOCKABLE_FUNCTION(, void, IoTHubTransport_MQTT_Common_Unsubscribe_InputQueue, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 40:cb03d6a6f46d 45
AzureIoTClient 39:6231984e0179 46
AzureIoTClient 39:6231984e0179 47
AzureIoTClient 39:6231984e0179 48 #ifdef __cplusplus
AzureIoTClient 39:6231984e0179 49 }
AzureIoTClient 39:6231984e0179 50 #endif
AzureIoTClient 39:6231984e0179 51
AzureIoTClient 39:6231984e0179 52 #endif /* IOTHUBTRANSPORT_MQTT_COMMON_H */