Microsoft Azure IoTHub client MQTT transport
Dependents: STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more
iothubtransportmqtt.c@40:cb03d6a6f46d, 2018-06-26 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Tue Jun 26 19:14:02 2018 -0700
- Revision:
- 40:cb03d6a6f46d
- Parent:
- 39:6231984e0179
- Child:
- 41:410450f16a9f
1.2.6
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Azure.IoT Build | 0:5e72a75c31b8 | 1 | // Copyright (c) Microsoft. All rights reserved. |
Azure.IoT Build | 0:5e72a75c31b8 | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
Azure.IoT Build | 0:5e72a75c31b8 | 3 | |
Azure.IoT Build | 0:5e72a75c31b8 | 4 | #include <stdlib.h> |
Azure.IoT Build | 0:5e72a75c31b8 | 5 | #include "iothubtransportmqtt.h" |
AzureIoTClient | 11:31ebaeb51e1e | 6 | #include "azure_c_shared_utility/xio.h" |
Azure.IoT Build | 1:f2e563755d91 | 7 | #include "azure_c_shared_utility/tlsio.h" |
Azure.IoT Build | 1:f2e563755d91 | 8 | #include "azure_c_shared_utility/platform.h" |
AzureIoTClient | 39:6231984e0179 | 9 | #include "internal/iothubtransport_mqtt_common.h" |
AzureIoTClient | 28:0cd355c3294e | 10 | #include "azure_c_shared_utility/xlogging.h" |
AzureIoTClient | 7:7fdd306e6224 | 11 | |
AzureIoTClient | 20:594780be216d | 12 | static XIO_HANDLE getIoTransportProvider(const char* fully_qualified_name, const MQTT_TRANSPORT_PROXY_OPTIONS* mqtt_transport_proxy_options) |
AzureIoTClient | 6:16875b609849 | 13 | { |
AzureIoTClient | 11:31ebaeb51e1e | 14 | XIO_HANDLE result; |
AzureIoTClient | 20:594780be216d | 15 | |
AzureIoTClient | 20:594780be216d | 16 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_01_001: [ `getIoTransportProvider` shall obtain the TLS IO interface handle by calling `platform_get_default_tlsio`. ]*/ |
AzureIoTClient | 11:31ebaeb51e1e | 17 | const IO_INTERFACE_DESCRIPTION* io_interface_description = platform_get_default_tlsio(); |
AzureIoTClient | 20:594780be216d | 18 | (void)mqtt_transport_proxy_options; |
AzureIoTClient | 20:594780be216d | 19 | |
AzureIoTClient | 11:31ebaeb51e1e | 20 | if (io_interface_description == NULL) |
AzureIoTClient | 4:e472f5ce3473 | 21 | { |
AzureIoTClient | 20:594780be216d | 22 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_013: [ If `platform_get_default_tlsio` returns NULL, `getIoTransportProvider` shall return NULL. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 23 | LogError("Failure constructing the provider interface"); |
AzureIoTClient | 4:e472f5ce3473 | 24 | result = NULL; |
AzureIoTClient | 4:e472f5ce3473 | 25 | } |
AzureIoTClient | 4:e472f5ce3473 | 26 | else |
AzureIoTClient | 4:e472f5ce3473 | 27 | { |
AzureIoTClient | 20:594780be216d | 28 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_01_002: [ The TLS IO parameters shall be a `TLSIO_CONFIG` structure filled as below: ]*/ |
AzureIoTClient | 11:31ebaeb51e1e | 29 | TLSIO_CONFIG tls_io_config; |
AzureIoTClient | 20:594780be216d | 30 | |
AzureIoTClient | 20:594780be216d | 31 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_01_003: [ - `hostname` shall be set to `fully_qualified_name`. ]*/ |
AzureIoTClient | 20:594780be216d | 32 | tls_io_config.hostname = fully_qualified_name; |
AzureIoTClient | 20:594780be216d | 33 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_01_004: [ - `port` shall be set to 8883. ]*/ |
AzureIoTClient | 11:31ebaeb51e1e | 34 | tls_io_config.port = 8883; |
AzureIoTClient | 20:594780be216d | 35 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_01_005: [ - `underlying_io_interface` shall be set to NULL. ]*/ |
AzureIoTClient | 19:f87dfe76bc70 | 36 | tls_io_config.underlying_io_interface = NULL; |
AzureIoTClient | 20:594780be216d | 37 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_01_006: [ - `underlying_io_parameters` shall be set to NULL. ]*/ |
AzureIoTClient | 19:f87dfe76bc70 | 38 | tls_io_config.underlying_io_parameters = NULL; |
AzureIoTClient | 20:594780be216d | 39 | |
AzureIoTClient | 20:594780be216d | 40 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_012: [ `getIoTransportProvider` shall return the `XIO_HANDLE` returned by `xio_create`. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 41 | result = xio_create(io_interface_description, &tls_io_config); |
AzureIoTClient | 2:9db4da50abaa | 42 | } |
AzureIoTClient | 4:e472f5ce3473 | 43 | return result; |
Azure.IoT Build | 0:5e72a75c31b8 | 44 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 45 | |
AzureIoTClient | 4:e472f5ce3473 | 46 | static TRANSPORT_LL_HANDLE IoTHubTransportMqtt_Create(const IOTHUBTRANSPORT_CONFIG* config) |
Azure.IoT Build | 0:5e72a75c31b8 | 47 | { |
AzureIoTClient | 11:31ebaeb51e1e | 48 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_001: [IoTHubTransportMqtt_Create shall create a TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Create function.] */ |
AzureIoTClient | 11:31ebaeb51e1e | 49 | return IoTHubTransport_MQTT_Common_Create(config, getIoTransportProvider); |
Azure.IoT Build | 0:5e72a75c31b8 | 50 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 51 | |
AzureIoTClient | 4:e472f5ce3473 | 52 | static void IoTHubTransportMqtt_Destroy(TRANSPORT_LL_HANDLE handle) |
Azure.IoT Build | 0:5e72a75c31b8 | 53 | { |
AzureIoTClient | 11:31ebaeb51e1e | 54 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_002: [ IoTHubTransportMqtt_Destroy shall destroy the TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Destroy function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 55 | IoTHubTransport_MQTT_Common_Destroy(handle); |
Azure.IoT Build | 0:5e72a75c31b8 | 56 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 57 | |
AzureIoTClient | 4:e472f5ce3473 | 58 | static int IoTHubTransportMqtt_Subscribe(IOTHUB_DEVICE_HANDLE handle) |
Azure.IoT Build | 0:5e72a75c31b8 | 59 | { |
AzureIoTClient | 11:31ebaeb51e1e | 60 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_005: [ IoTHubTransportMqtt_Subscribe shall subscribe the TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Subscribe function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 61 | return IoTHubTransport_MQTT_Common_Subscribe(handle); |
Azure.IoT Build | 0:5e72a75c31b8 | 62 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 63 | |
AzureIoTClient | 4:e472f5ce3473 | 64 | static void IoTHubTransportMqtt_Unsubscribe(IOTHUB_DEVICE_HANDLE handle) |
Azure.IoT Build | 0:5e72a75c31b8 | 65 | { |
AzureIoTClient | 11:31ebaeb51e1e | 66 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_006: [ IoTHubTransportMqtt_Unsubscribe shall unsubscribe the TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Unsubscribe function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 67 | IoTHubTransport_MQTT_Common_Unsubscribe(handle); |
Azure.IoT Build | 0:5e72a75c31b8 | 68 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 69 | |
AzureIoTClient | 14:4dc2b011be33 | 70 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_026: [ IoTHubTransportMqtt_Subscribe_DeviceMethod shall subscribe the TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Subscribe_DeviceMethod function. ] */ |
AzureIoTClient | 12:658ca6865de2 | 71 | static int IoTHubTransportMqtt_Subscribe_DeviceMethod(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 12:658ca6865de2 | 72 | { |
AzureIoTClient | 12:658ca6865de2 | 73 | return IoTHubTransport_MQTT_Common_Subscribe_DeviceMethod(handle); |
AzureIoTClient | 12:658ca6865de2 | 74 | } |
AzureIoTClient | 12:658ca6865de2 | 75 | |
AzureIoTClient | 14:4dc2b011be33 | 76 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_027: [ IoTHubTransportMqtt_Unsubscribe_DeviceMethod shall call into the IoTHubMqttAbstract_Unsubscribe_DeviceMethod function. ] */ |
AzureIoTClient | 12:658ca6865de2 | 77 | static void IoTHubTransportMqtt_Unsubscribe_DeviceMethod(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 12:658ca6865de2 | 78 | { |
AzureIoTClient | 12:658ca6865de2 | 79 | IoTHubTransport_MQTT_Common_Unsubscribe_DeviceMethod(handle); |
AzureIoTClient | 12:658ca6865de2 | 80 | } |
AzureIoTClient | 12:658ca6865de2 | 81 | |
AzureIoTClient | 14:4dc2b011be33 | 82 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_025: [ IoTHubTransportMqtt_Subscribe_DeviceTwin shall call into the IoTHubMqttAbstract_Subscribe_DeviceTwin function. ] */ |
AzureIoTClient | 12:658ca6865de2 | 83 | static int IoTHubTransportMqtt_Subscribe_DeviceTwin(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 12:658ca6865de2 | 84 | { |
AzureIoTClient | 12:658ca6865de2 | 85 | return IoTHubTransport_MQTT_Common_Subscribe_DeviceTwin(handle); |
AzureIoTClient | 12:658ca6865de2 | 86 | } |
AzureIoTClient | 12:658ca6865de2 | 87 | |
AzureIoTClient | 14:4dc2b011be33 | 88 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_024: [ IoTHubTransportMqtt_Unsubscribe_DeviceTwin shall shall call into the IoTHubMqttAbstract_Unsubscribe_DeviceTwin function. ] */ |
AzureIoTClient | 12:658ca6865de2 | 89 | static void IoTHubTransportMqtt_Unsubscribe_DeviceTwin(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 12:658ca6865de2 | 90 | { |
AzureIoTClient | 12:658ca6865de2 | 91 | IoTHubTransport_MQTT_Common_Unsubscribe_DeviceTwin(handle); |
AzureIoTClient | 12:658ca6865de2 | 92 | } |
AzureIoTClient | 12:658ca6865de2 | 93 | |
AzureIoTClient | 14:4dc2b011be33 | 94 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_023: [ IoTHubTransportMqtt_DeviceMethod_Response shall call into the IoTHubMqttAbstract_DeviceMethod_Response function. ] */ |
AzureIoTClient | 14:4dc2b011be33 | 95 | static int IoTHubTransportMqtt_DeviceMethod_Response(IOTHUB_DEVICE_HANDLE handle, METHOD_HANDLE methodId, const unsigned char* response, size_t response_size, int status_response) |
AzureIoTClient | 14:4dc2b011be33 | 96 | { |
AzureIoTClient | 14:4dc2b011be33 | 97 | return IoTHubTransport_MQTT_Common_DeviceMethod_Response(handle, methodId, response, response_size, status_response); |
AzureIoTClient | 14:4dc2b011be33 | 98 | } |
AzureIoTClient | 14:4dc2b011be33 | 99 | |
AzureIoTClient | 19:f87dfe76bc70 | 100 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_10_001: [IoTHubTransportMqtt_SendMessageDisposition shall send the message disposition by calling into the IoTHubMqttAbstract_SendMessageDisposition function.] */ |
AzureIoTClient | 19:f87dfe76bc70 | 101 | static IOTHUB_CLIENT_RESULT IoTHubTransportMqtt_SendMessageDisposition(MESSAGE_CALLBACK_INFO* message_data, IOTHUBMESSAGE_DISPOSITION_RESULT disposition) |
AzureIoTClient | 19:f87dfe76bc70 | 102 | { |
AzureIoTClient | 19:f87dfe76bc70 | 103 | return IoTHubTransport_MQTT_Common_SendMessageDisposition(message_data, disposition); |
AzureIoTClient | 19:f87dfe76bc70 | 104 | } |
AzureIoTClient | 19:f87dfe76bc70 | 105 | |
AzureIoTClient | 12:658ca6865de2 | 106 | static IOTHUB_PROCESS_ITEM_RESULT IoTHubTransportMqtt_ProcessItem(TRANSPORT_LL_HANDLE handle, IOTHUB_IDENTITY_TYPE item_type, IOTHUB_IDENTITY_INFO* iothub_item) |
AzureIoTClient | 12:658ca6865de2 | 107 | { |
AzureIoTClient | 12:658ca6865de2 | 108 | return IoTHubTransport_MQTT_Common_ProcessItem(handle, item_type, iothub_item); |
AzureIoTClient | 12:658ca6865de2 | 109 | } |
AzureIoTClient | 12:658ca6865de2 | 110 | |
AzureIoTClient | 12:658ca6865de2 | 111 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_054: [ IoTHubTransportMqtt_DoWork shall subscribe to the Notification and get_state Topics if they are defined. ] */ |
AzureIoTClient | 39:6231984e0179 | 112 | static void IoTHubTransportMqtt_DoWork(TRANSPORT_LL_HANDLE handle, IOTHUB_CLIENT_CORE_LL_HANDLE iotHubClientHandle) |
Azure.IoT Build | 0:5e72a75c31b8 | 113 | { |
AzureIoTClient | 11:31ebaeb51e1e | 114 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_007: [ IoTHubTransportMqtt_DoWork shall call into the IoTHubMqttAbstract_DoWork function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 115 | IoTHubTransport_MQTT_Common_DoWork(handle, iotHubClientHandle); |
Azure.IoT Build | 0:5e72a75c31b8 | 116 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 117 | |
AzureIoTClient | 12:658ca6865de2 | 118 | static int IoTHubTransportMqtt_SetRetryPolicy(TRANSPORT_LL_HANDLE handle, IOTHUB_CLIENT_RETRY_POLICY retryPolicy, size_t retryTimeoutLimitInSeconds) |
AzureIoTClient | 12:658ca6865de2 | 119 | { |
AzureIoTClient | 12:658ca6865de2 | 120 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_25_012: [** IoTHubTransportMqtt_SetRetryPolicy shall call into the IoTHubMqttAbstract_SetRetryPolicy function. ] */ |
AzureIoTClient | 12:658ca6865de2 | 121 | return IoTHubTransport_MQTT_Common_SetRetryPolicy(handle, retryPolicy, retryTimeoutLimitInSeconds); |
AzureIoTClient | 12:658ca6865de2 | 122 | } |
AzureIoTClient | 12:658ca6865de2 | 123 | |
AzureIoTClient | 4:e472f5ce3473 | 124 | static IOTHUB_CLIENT_RESULT IoTHubTransportMqtt_GetSendStatus(IOTHUB_DEVICE_HANDLE handle, IOTHUB_CLIENT_STATUS *iotHubClientStatus) |
Azure.IoT Build | 0:5e72a75c31b8 | 125 | { |
AzureIoTClient | 11:31ebaeb51e1e | 126 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_008: [ IoTHubTransportMqtt_GetSendStatus shall get the send status by calling into the IoTHubMqttAbstract_GetSendStatus function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 127 | return IoTHubTransport_MQTT_Common_GetSendStatus(handle, iotHubClientStatus); |
Azure.IoT Build | 0:5e72a75c31b8 | 128 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 129 | |
AzureIoTClient | 4:e472f5ce3473 | 130 | static IOTHUB_CLIENT_RESULT IoTHubTransportMqtt_SetOption(TRANSPORT_LL_HANDLE handle, const char* option, const void* value) |
Azure.IoT Build | 0:5e72a75c31b8 | 131 | { |
AzureIoTClient | 11:31ebaeb51e1e | 132 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_009: [ IoTHubTransportMqtt_SetOption shall set the options by calling into the IoTHubMqttAbstract_SetOption function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 133 | return IoTHubTransport_MQTT_Common_SetOption(handle, option, value); |
Azure.IoT Build | 0:5e72a75c31b8 | 134 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 135 | |
AzureIoTClient | 39:6231984e0179 | 136 | static IOTHUB_DEVICE_HANDLE IoTHubTransportMqtt_Register(TRANSPORT_LL_HANDLE handle, const IOTHUB_DEVICE_CONFIG* device, IOTHUB_CLIENT_CORE_LL_HANDLE iotHubClientHandle, PDLIST_ENTRY waitingToSend) |
Azure.IoT Build | 0:5e72a75c31b8 | 137 | { |
AzureIoTClient | 11:31ebaeb51e1e | 138 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_003: [ IoTHubTransportMqtt_Register shall register the TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Register function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 139 | return IoTHubTransport_MQTT_Common_Register(handle, device, iotHubClientHandle, waitingToSend); |
Azure.IoT Build | 0:5e72a75c31b8 | 140 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 141 | |
AzureIoTClient | 4:e472f5ce3473 | 142 | static void IoTHubTransportMqtt_Unregister(IOTHUB_DEVICE_HANDLE deviceHandle) |
Azure.IoT Build | 0:5e72a75c31b8 | 143 | { |
AzureIoTClient | 11:31ebaeb51e1e | 144 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_004: [ IoTHubTransportMqtt_Unregister shall register the TRANSPORT_LL_HANDLE by calling into the IoTHubMqttAbstract_Unregister function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 145 | IoTHubTransport_MQTT_Common_Unregister(deviceHandle); |
Azure.IoT Build | 0:5e72a75c31b8 | 146 | } |
Azure.IoT Build | 0:5e72a75c31b8 | 147 | |
AzureIoTClient | 4:e472f5ce3473 | 148 | static STRING_HANDLE IoTHubTransportMqtt_GetHostname(TRANSPORT_LL_HANDLE handle) |
AzureIoTClient | 4:e472f5ce3473 | 149 | { |
AzureIoTClient | 11:31ebaeb51e1e | 150 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_010: [ IoTHubTransportMqtt_GetHostname shall get the hostname by calling into the IoTHubMqttAbstract_GetHostname function. ] */ |
AzureIoTClient | 11:31ebaeb51e1e | 151 | return IoTHubTransport_MQTT_Common_GetHostname(handle); |
AzureIoTClient | 4:e472f5ce3473 | 152 | } |
AzureIoTClient | 4:e472f5ce3473 | 153 | |
AzureIoTClient | 40:cb03d6a6f46d | 154 | static int IotHubTransportMqtt_Subscribe_InputQueue(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 40:cb03d6a6f46d | 155 | { |
AzureIoTClient | 40:cb03d6a6f46d | 156 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_31_14: [ IoTHubTransportMqtt_Subscribe shall subscribe the TRANSPORT_LL_HANDLE by calling into IoTHubTransport_MQTT_Common_Subscribe_InputQueue. ] */ |
AzureIoTClient | 40:cb03d6a6f46d | 157 | return IoTHubTransport_MQTT_Common_Subscribe_InputQueue(handle); |
AzureIoTClient | 40:cb03d6a6f46d | 158 | } |
AzureIoTClient | 40:cb03d6a6f46d | 159 | |
AzureIoTClient | 40:cb03d6a6f46d | 160 | static void IotHubTransportMqtt_Unsubscribe_InputQueue(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 40:cb03d6a6f46d | 161 | { |
AzureIoTClient | 40:cb03d6a6f46d | 162 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_31_015: [IotHubTransportMQTT_Unsubscribe_InputQueue shall unsubscribe by calling into IoTHubTransport_MQTT_Common_Unsubscribe_InputQueue. ] */ |
AzureIoTClient | 40:cb03d6a6f46d | 163 | IoTHubTransport_MQTT_Common_Unsubscribe_InputQueue(handle); |
AzureIoTClient | 40:cb03d6a6f46d | 164 | } |
AzureIoTClient | 40:cb03d6a6f46d | 165 | |
AzureIoTClient | 40:cb03d6a6f46d | 166 | |
AzureIoTClient | 12:658ca6865de2 | 167 | static TRANSPORT_PROVIDER myfunc = |
AzureIoTClient | 12:658ca6865de2 | 168 | { |
AzureIoTClient | 19:f87dfe76bc70 | 169 | IoTHubTransportMqtt_SendMessageDisposition, /*pfIotHubTransport_SendMessageDisposition IoTHubTransport_SendMessageDisposition;*/ |
AzureIoTClient | 12:658ca6865de2 | 170 | IoTHubTransportMqtt_Subscribe_DeviceMethod, /*pfIoTHubTransport_Subscribe_DeviceMethod IoTHubTransport_Subscribe_DeviceMethod;*/ |
AzureIoTClient | 12:658ca6865de2 | 171 | IoTHubTransportMqtt_Unsubscribe_DeviceMethod, /*pfIoTHubTransport_Unsubscribe_DeviceMethod IoTHubTransport_Unsubscribe_DeviceMethod;*/ |
AzureIoTClient | 14:4dc2b011be33 | 172 | IoTHubTransportMqtt_DeviceMethod_Response, /*pfIoTHubTransport_DeviceMethod_Response IoTHubTransport_DeviceMethod_Response;*/ |
AzureIoTClient | 12:658ca6865de2 | 173 | IoTHubTransportMqtt_Subscribe_DeviceTwin, /*pfIoTHubTransport_Subscribe_DeviceTwin IoTHubTransport_Subscribe_DeviceTwin;*/ |
AzureIoTClient | 12:658ca6865de2 | 174 | IoTHubTransportMqtt_Unsubscribe_DeviceTwin, /*pfIoTHubTransport_Unsubscribe_DeviceTwin IoTHubTransport_Unsubscribe_DeviceTwin;*/ |
AzureIoTClient | 12:658ca6865de2 | 175 | IoTHubTransportMqtt_ProcessItem, /*pfIoTHubTransport_ProcessItem IoTHubTransport_ProcessItem;*/ |
AzureIoTClient | 12:658ca6865de2 | 176 | IoTHubTransportMqtt_GetHostname, /*pfIoTHubTransport_GetHostname IoTHubTransport_GetHostname;*/ |
AzureIoTClient | 12:658ca6865de2 | 177 | IoTHubTransportMqtt_SetOption, /*pfIoTHubTransport_SetOption IoTHubTransport_SetOption;*/ |
AzureIoTClient | 12:658ca6865de2 | 178 | IoTHubTransportMqtt_Create, /*pfIoTHubTransport_Create IoTHubTransport_Create;*/ |
AzureIoTClient | 12:658ca6865de2 | 179 | IoTHubTransportMqtt_Destroy, /*pfIoTHubTransport_Destroy IoTHubTransport_Destroy;*/ |
AzureIoTClient | 12:658ca6865de2 | 180 | IoTHubTransportMqtt_Register, /*pfIotHubTransport_Register IoTHubTransport_Register;*/ |
AzureIoTClient | 12:658ca6865de2 | 181 | IoTHubTransportMqtt_Unregister, /*pfIotHubTransport_Unregister IoTHubTransport_Unegister;*/ |
AzureIoTClient | 12:658ca6865de2 | 182 | IoTHubTransportMqtt_Subscribe, /*pfIoTHubTransport_Subscribe IoTHubTransport_Subscribe;*/ |
AzureIoTClient | 12:658ca6865de2 | 183 | IoTHubTransportMqtt_Unsubscribe, /*pfIoTHubTransport_Unsubscribe IoTHubTransport_Unsubscribe;*/ |
AzureIoTClient | 12:658ca6865de2 | 184 | IoTHubTransportMqtt_DoWork, /*pfIoTHubTransport_DoWork IoTHubTransport_DoWork;*/ |
AzureIoTClient | 12:658ca6865de2 | 185 | IoTHubTransportMqtt_SetRetryPolicy, /*pfIoTHubTransport_DoWork IoTHubTransport_SetRetryPolicy;*/ |
AzureIoTClient | 40:cb03d6a6f46d | 186 | IoTHubTransportMqtt_GetSendStatus, /*pfIoTHubTransport_GetSendStatus IoTHubTransport_GetSendStatus;*/ |
AzureIoTClient | 40:cb03d6a6f46d | 187 | IotHubTransportMqtt_Subscribe_InputQueue, /*pfIoTHubTransport_Subscribe_InputQueue IoTHubTransport_Subscribe_InputQueue; */ |
AzureIoTClient | 40:cb03d6a6f46d | 188 | IotHubTransportMqtt_Unsubscribe_InputQueue /*pfIoTHubTransport_Unsubscribe_InputQueue IoTHubTransport_Unsubscribe_InputQueue; */ |
Azure.IoT Build | 0:5e72a75c31b8 | 189 | }; |
Azure.IoT Build | 0:5e72a75c31b8 | 190 | |
AzureIoTClient | 12:658ca6865de2 | 191 | /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_022: [This function shall return a pointer to a structure of type TRANSPORT_PROVIDER */ |
AzureIoTClient | 12:658ca6865de2 | 192 | extern const TRANSPORT_PROVIDER* MQTT_Protocol(void) |
Azure.IoT Build | 0:5e72a75c31b8 | 193 | { |
AzureIoTClient | 4:e472f5ce3473 | 194 | return &myfunc; |
Azure.IoT Build | 0:5e72a75c31b8 | 195 | } |