Microsoft Azure IoTHub client AMQP transport
Dependents: sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp iothub_client_sample_amqp ... more
This library implements the AMQP transport for Microsoft Azure IoTHub client. The code is replicated from https://github.com/Azure/azure-iot-sdks
iothubtransportamqp.c@56:8704100b3b54, 2018-09-11 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Tue Sep 11 11:11:47 2018 -0700
- Revision:
- 56:8704100b3b54
- Parent:
- 54:830550fef7ea
1.2.9
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AzureIoTClient | 4:57e049bce51e | 1 | // Copyright (c) Microsoft. All rights reserved. |
AzureIoTClient | 4:57e049bce51e | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
AzureIoTClient | 4:57e049bce51e | 3 | |
AzureIoTClient | 56:8704100b3b54 | 4 | #include "iothubtransportamqp.h" |
AzureIoTClient | 53:e21e1e88460f | 5 | #include "internal/iothubtransport_amqp_common.h" |
Azure.IoT Build | 12:841a4c36bd36 | 6 | #include "azure_c_shared_utility/tlsio.h" |
AzureIoTClient | 25:63f7d371c030 | 7 | #include "azure_c_shared_utility/platform.h" |
AzureIoTClient | 41:71c01aa3df1a | 8 | #include "azure_c_shared_utility/xlogging.h" |
AzureIoTClient | 22:8b70cf813f25 | 9 | |
Azure.IoT Build | 7:07bc440836b3 | 10 | #define RESULT_OK 0 |
Azure.IoT Build | 7:07bc440836b3 | 11 | #define DEFAULT_IOTHUB_AMQP_PORT 5671 |
AzureIoTClient | 4:57e049bce51e | 12 | |
AzureIoTClient | 31:adadaef857c1 | 13 | static XIO_HANDLE getTLSIOTransport(const char* fqdn, const AMQP_TRANSPORT_PROXY_OPTIONS* amqp_transport_proxy_options) |
Azure.IoT Build | 7:07bc440836b3 | 14 | { |
AzureIoTClient | 20:8dec76e7ba34 | 15 | XIO_HANDLE result; |
AzureIoTClient | 19:ea016664011a | 16 | TLSIO_CONFIG tls_io_config; |
AzureIoTClient | 30:20a85b733111 | 17 | |
AzureIoTClient | 31:adadaef857c1 | 18 | (void)amqp_transport_proxy_options; |
AzureIoTClient | 31:adadaef857c1 | 19 | |
AzureIoTClient | 31:adadaef857c1 | 20 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_01_009: [ `getIoTransportProvider` shall obtain the TLS IO interface handle by calling `platform_get_default_tlsio`. ]*/ |
Azure.IoT Build | 10:75c5e0d8537d | 21 | const IO_INTERFACE_DESCRIPTION* io_interface_description = platform_get_default_tlsio(); |
AzureIoTClient | 31:adadaef857c1 | 22 | if (io_interface_description == NULL) |
AzureIoTClient | 31:adadaef857c1 | 23 | { |
AzureIoTClient | 31:adadaef857c1 | 24 | LogError("Failed obtaining default TLS IO interface"); |
AzureIoTClient | 31:adadaef857c1 | 25 | result = NULL; |
AzureIoTClient | 31:adadaef857c1 | 26 | } |
AzureIoTClient | 31:adadaef857c1 | 27 | else |
AzureIoTClient | 31:adadaef857c1 | 28 | { |
AzureIoTClient | 31:adadaef857c1 | 29 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_01_010: [ The TLS IO parameters shall be a `TLSIO_CONFIG` structure filled as below: ]*/ |
AzureIoTClient | 31:adadaef857c1 | 30 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_01_011: [ - `hostname` shall be set to `fqdn`. ]*/ |
AzureIoTClient | 31:adadaef857c1 | 31 | tls_io_config.hostname = fqdn; |
AzureIoTClient | 31:adadaef857c1 | 32 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_01_012: [ - `port` shall be set to 443. ]*/ |
AzureIoTClient | 31:adadaef857c1 | 33 | tls_io_config.port = DEFAULT_IOTHUB_AMQP_PORT; |
AzureIoTClient | 4:57e049bce51e | 34 | |
AzureIoTClient | 31:adadaef857c1 | 35 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_01_013: [ `underlying_io_interface` shall be set to NULL. ]*/ |
AzureIoTClient | 31:adadaef857c1 | 36 | tls_io_config.underlying_io_interface = NULL; |
AzureIoTClient | 31:adadaef857c1 | 37 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_01_014: [ `underlying_io_parameters` shall be set to NULL. ]*/ |
AzureIoTClient | 31:adadaef857c1 | 38 | tls_io_config.underlying_io_parameters = NULL; |
AzureIoTClient | 31:adadaef857c1 | 39 | |
AzureIoTClient | 31:adadaef857c1 | 40 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_09_003: [If `platform_get_default_tlsio` returns NULL `getTLSIOTransport` shall return NULL.] */ |
AzureIoTClient | 31:adadaef857c1 | 41 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_09_004: [`getTLSIOTransport` shall return the `XIO_HANDLE` created using `xio_create`.] */ |
AzureIoTClient | 31:adadaef857c1 | 42 | if ((result = xio_create(io_interface_description, &tls_io_config)) == NULL) |
AzureIoTClient | 31:adadaef857c1 | 43 | { |
AzureIoTClient | 31:adadaef857c1 | 44 | LogError("Failed to get the TLS/IO transport (xio_create failed)"); |
AzureIoTClient | 31:adadaef857c1 | 45 | } |
AzureIoTClient | 4:57e049bce51e | 46 | } |
Azure.IoT Build | 11:62d7b956e76e | 47 | |
Azure.IoT Build | 7:07bc440836b3 | 48 | return result; |
AzureIoTClient | 4:57e049bce51e | 49 | } |
Azure.IoT Build | 7:07bc440836b3 | 50 | |
AzureIoTClient | 25:63f7d371c030 | 51 | // API functions |
AzureIoTClient | 25:63f7d371c030 | 52 | static TRANSPORT_LL_HANDLE IoTHubTransportAMQP_Create(const IOTHUBTRANSPORT_CONFIG* config) |
AzureIoTClient | 4:57e049bce51e | 53 | { |
AzureIoTClient | 26:ee14eed604f6 | 54 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_001: [IoTHubTransportAMQP_Create shall create a TRANSPORT_LL_HANDLE by calling into the IoTHubTransport_AMQP_Common_Create function, passing `config` and getTLSIOTransport.] |
AzureIoTClient | 26:ee14eed604f6 | 55 | return IoTHubTransport_AMQP_Common_Create(config, getTLSIOTransport); |
AzureIoTClient | 20:8dec76e7ba34 | 56 | } |
AzureIoTClient | 20:8dec76e7ba34 | 57 | |
AzureIoTClient | 25:63f7d371c030 | 58 | static IOTHUB_PROCESS_ITEM_RESULT IoTHubTransportAMQP_ProcessItem(TRANSPORT_LL_HANDLE handle, IOTHUB_IDENTITY_TYPE item_type, IOTHUB_IDENTITY_INFO* iothub_item) |
Azure.IoT Build | 7:07bc440836b3 | 59 | { |
AzureIoTClient | 26:ee14eed604f6 | 60 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_014: [IoTHubTransportAMQP_ProcessItem shall invoke IoTHubTransport_AMQP_Common_ProcessItem() and return its result.] |
AzureIoTClient | 26:ee14eed604f6 | 61 | return IoTHubTransport_AMQP_Common_ProcessItem(handle, item_type, iothub_item); |
AzureIoTClient | 4:57e049bce51e | 62 | } |
AzureIoTClient | 4:57e049bce51e | 63 | |
AzureIoTClient | 53:e21e1e88460f | 64 | static void IoTHubTransportAMQP_DoWork(TRANSPORT_LL_HANDLE handle, IOTHUB_CLIENT_CORE_LL_HANDLE iotHubClientHandle) |
AzureIoTClient | 4:57e049bce51e | 65 | { |
AzureIoTClient | 26:ee14eed604f6 | 66 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_015: [IoTHubTransportAMQP_DoWork shall call into the IoTHubTransport_AMQP_Common_DoWork()] |
AzureIoTClient | 26:ee14eed604f6 | 67 | IoTHubTransport_AMQP_Common_DoWork(handle, iotHubClientHandle); |
Azure.IoT Build | 7:07bc440836b3 | 68 | } |
Azure.IoT Build | 7:07bc440836b3 | 69 | |
AzureIoTClient | 25:63f7d371c030 | 70 | static int IoTHubTransportAMQP_Subscribe(IOTHUB_DEVICE_HANDLE handle) |
Azure.IoT Build | 7:07bc440836b3 | 71 | { |
AzureIoTClient | 26:ee14eed604f6 | 72 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_012: [IoTHubTransportAMQP_Subscribe shall subscribe for D2C messages by calling into the IoTHubTransport_AMQP_Common_Subscribe().] |
AzureIoTClient | 26:ee14eed604f6 | 73 | return IoTHubTransport_AMQP_Common_Subscribe(handle); |
AzureIoTClient | 4:57e049bce51e | 74 | } |
AzureIoTClient | 4:57e049bce51e | 75 | |
AzureIoTClient | 25:63f7d371c030 | 76 | static void IoTHubTransportAMQP_Unsubscribe(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 19:ea016664011a | 77 | { |
AzureIoTClient | 26:ee14eed604f6 | 78 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_013: [IoTHubTransportAMQP_Unsubscribe shall subscribe for D2C messages by calling into the IoTHubTransport_AMQP_Common_Unsubscribe().] |
AzureIoTClient | 26:ee14eed604f6 | 79 | IoTHubTransport_AMQP_Common_Unsubscribe(handle); |
AzureIoTClient | 25:63f7d371c030 | 80 | } |
AzureIoTClient | 25:63f7d371c030 | 81 | |
AzureIoTClient | 25:63f7d371c030 | 82 | static int IoTHubTransportAMQP_Subscribe_DeviceTwin(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 25:63f7d371c030 | 83 | { |
AzureIoTClient | 26:ee14eed604f6 | 84 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_008: [IoTHubTransportAMQP_Subscribe_DeviceTwin shall invoke IoTHubTransport_AMQP_Common_Subscribe_DeviceTwin() and return its result.] |
AzureIoTClient | 26:ee14eed604f6 | 85 | return IoTHubTransport_AMQP_Common_Subscribe_DeviceTwin(handle); |
AzureIoTClient | 19:ea016664011a | 86 | } |
AzureIoTClient | 19:ea016664011a | 87 | |
AzureIoTClient | 25:63f7d371c030 | 88 | static void IoTHubTransportAMQP_Unsubscribe_DeviceTwin(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 4:57e049bce51e | 89 | { |
AzureIoTClient | 26:ee14eed604f6 | 90 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_009: [IoTHubTransportAMQP_Unsubscribe_DeviceTwin shall invoke IoTHubTransport_AMQP_Common_Unsubscribe_DeviceTwin()] |
AzureIoTClient | 26:ee14eed604f6 | 91 | IoTHubTransport_AMQP_Common_Unsubscribe_DeviceTwin(handle); |
AzureIoTClient | 25:63f7d371c030 | 92 | } |
AzureIoTClient | 4:57e049bce51e | 93 | |
AzureIoTClient | 25:63f7d371c030 | 94 | static int IoTHubTransportAMQP_Subscribe_DeviceMethod(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 25:63f7d371c030 | 95 | { |
AzureIoTClient | 26:ee14eed604f6 | 96 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_010: [IoTHubTransportAMQP_Subscribe_DeviceMethod shall invoke IoTHubTransport_AMQP_Common_Subscribe_DeviceMethod() and return its result.] |
AzureIoTClient | 26:ee14eed604f6 | 97 | return IoTHubTransport_AMQP_Common_Subscribe_DeviceMethod(handle); |
AzureIoTClient | 25:63f7d371c030 | 98 | } |
AzureIoTClient | 4:57e049bce51e | 99 | |
AzureIoTClient | 25:63f7d371c030 | 100 | static void IoTHubTransportAMQP_Unsubscribe_DeviceMethod(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 25:63f7d371c030 | 101 | { |
AzureIoTClient | 26:ee14eed604f6 | 102 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_011: [IoTHubTransportAMQP_Unsubscribe_DeviceMethod shall invoke IoTHubTransport_AMQP_Common_Unsubscribe_DeviceMethod()] |
AzureIoTClient | 26:ee14eed604f6 | 103 | IoTHubTransport_AMQP_Common_Unsubscribe_DeviceMethod(handle); |
AzureIoTClient | 26:ee14eed604f6 | 104 | } |
AzureIoTClient | 26:ee14eed604f6 | 105 | |
AzureIoTClient | 26:ee14eed604f6 | 106 | static int IoTHubTransportAMQP_DeviceMethod_Response(IOTHUB_DEVICE_HANDLE handle, METHOD_HANDLE methodId, const unsigned char* response, size_t response_size, int status_response) |
AzureIoTClient | 26:ee14eed604f6 | 107 | { |
AzureIoTClient | 26:ee14eed604f6 | 108 | return IoTHubTransport_AMQP_Common_DeviceMethod_Response(handle, methodId, response, response_size, status_response); |
AzureIoTClient | 25:63f7d371c030 | 109 | } |
AzureIoTClient | 19:ea016664011a | 110 | |
AzureIoTClient | 25:63f7d371c030 | 111 | static IOTHUB_CLIENT_RESULT IoTHubTransportAMQP_GetSendStatus(IOTHUB_DEVICE_HANDLE handle, IOTHUB_CLIENT_STATUS *iotHubClientStatus) |
AzureIoTClient | 25:63f7d371c030 | 112 | { |
AzureIoTClient | 26:ee14eed604f6 | 113 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_016: [IoTHubTransportAMQP_GetSendStatus shall get the send status by calling into the IoTHubTransport_AMQP_Common_GetSendStatus()] |
AzureIoTClient | 26:ee14eed604f6 | 114 | return IoTHubTransport_AMQP_Common_GetSendStatus(handle, iotHubClientStatus); |
AzureIoTClient | 25:63f7d371c030 | 115 | } |
AzureIoTClient | 19:ea016664011a | 116 | |
AzureIoTClient | 25:63f7d371c030 | 117 | static IOTHUB_CLIENT_RESULT IoTHubTransportAMQP_SetOption(TRANSPORT_LL_HANDLE handle, const char* option, const void* value) |
AzureIoTClient | 25:63f7d371c030 | 118 | { |
AzureIoTClient | 26:ee14eed604f6 | 119 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_017: [IoTHubTransportAMQP_SetOption shall set the options by calling into the IoTHubTransport_AMQP_Common_SetOption()] |
AzureIoTClient | 26:ee14eed604f6 | 120 | return IoTHubTransport_AMQP_Common_SetOption(handle, option, value); |
AzureIoTClient | 25:63f7d371c030 | 121 | } |
AzureIoTClient | 19:ea016664011a | 122 | |
AzureIoTClient | 53:e21e1e88460f | 123 | static IOTHUB_DEVICE_HANDLE IoTHubTransportAMQP_Register(TRANSPORT_LL_HANDLE handle, const IOTHUB_DEVICE_CONFIG* device, IOTHUB_CLIENT_CORE_LL_HANDLE iotHubClientHandle, PDLIST_ENTRY waitingToSend) |
AzureIoTClient | 25:63f7d371c030 | 124 | { |
AzureIoTClient | 26:ee14eed604f6 | 125 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_006: [IoTHubTransportAMQP_Register shall register the device by calling into the IoTHubTransport_AMQP_Common_Register().] |
AzureIoTClient | 26:ee14eed604f6 | 126 | return IoTHubTransport_AMQP_Common_Register(handle, device, iotHubClientHandle, waitingToSend); |
AzureIoTClient | 25:63f7d371c030 | 127 | } |
Azure.IoT Build | 7:07bc440836b3 | 128 | |
AzureIoTClient | 25:63f7d371c030 | 129 | static void IoTHubTransportAMQP_Unregister(IOTHUB_DEVICE_HANDLE deviceHandle) |
AzureIoTClient | 25:63f7d371c030 | 130 | { |
AzureIoTClient | 26:ee14eed604f6 | 131 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_007: [IoTHubTransportAMQP_Unregister shall unregister the device by calling into the IoTHubTransport_AMQP_Common_Unregister().] |
AzureIoTClient | 26:ee14eed604f6 | 132 | IoTHubTransport_AMQP_Common_Unregister(deviceHandle); |
AzureIoTClient | 4:57e049bce51e | 133 | } |
AzureIoTClient | 4:57e049bce51e | 134 | |
Azure.IoT Build | 11:62d7b956e76e | 135 | static void IoTHubTransportAMQP_Destroy(TRANSPORT_LL_HANDLE handle) |
AzureIoTClient | 4:57e049bce51e | 136 | { |
AzureIoTClient | 26:ee14eed604f6 | 137 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_005: [IoTHubTransportAMQP_Destroy shall destroy the TRANSPORT_LL_HANDLE by calling into the IoTHubTransport_AMQP_Common_Destroy().] |
AzureIoTClient | 26:ee14eed604f6 | 138 | IoTHubTransport_AMQP_Common_Destroy(handle); |
AzureIoTClient | 4:57e049bce51e | 139 | } |
AzureIoTClient | 4:57e049bce51e | 140 | |
AzureIoTClient | 25:63f7d371c030 | 141 | static int IoTHubTransportAMQP_SetRetryPolicy(TRANSPORT_LL_HANDLE handle, IOTHUB_CLIENT_RETRY_POLICY retryPolicy, size_t retryTimeoutLimitInSeconds) |
AzureIoTClient | 4:57e049bce51e | 142 | { |
AzureIoTClient | 30:20a85b733111 | 143 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_020: [IoTHubTransportAMQP_SetRetryPolicy shall call into the IoTHubTransport_AMQP_Common_SetRetryPolicy().] |
AzureIoTClient | 26:ee14eed604f6 | 144 | return IoTHubTransport_AMQP_Common_SetRetryPolicy(handle, retryPolicy, retryTimeoutLimitInSeconds); |
Azure.IoT Build | 10:75c5e0d8537d | 145 | } |
Azure.IoT Build | 10:75c5e0d8537d | 146 | |
AzureIoTClient | 17:597443dc65a4 | 147 | static STRING_HANDLE IoTHubTransportAMQP_GetHostname(TRANSPORT_LL_HANDLE handle) |
AzureIoTClient | 17:597443dc65a4 | 148 | { |
AzureIoTClient | 26:ee14eed604f6 | 149 | // Codes_SRS_IOTHUBTRANSPORTAMQP_09_018: [IoTHubTransportAMQP_GetHostname shall get the hostname by calling into the IoTHubTransport_AMQP_Common_GetHostname()] |
AzureIoTClient | 26:ee14eed604f6 | 150 | return IoTHubTransport_AMQP_Common_GetHostname(handle); |
AzureIoTClient | 17:597443dc65a4 | 151 | } |
AzureIoTClient | 17:597443dc65a4 | 152 | |
AzureIoTClient | 30:20a85b733111 | 153 | static IOTHUB_CLIENT_RESULT IoTHubTransportAMQP_SendMessageDisposition(MESSAGE_CALLBACK_INFO* message_data, IOTHUBMESSAGE_DISPOSITION_RESULT disposition) |
AzureIoTClient | 30:20a85b733111 | 154 | { |
AzureIoTClient | 30:20a85b733111 | 155 | // Codes_SRS_IOTHUBTRANSPORTAMQP_10_001: [IoTHubTransportAMQP_SendMessageDisposition shall send the message disposition by calling into the IoTHubTransport_AMQP_Common_SendMessageDispostion().] |
AzureIoTClient | 30:20a85b733111 | 156 | return IoTHubTransport_AMQP_Common_SendMessageDisposition(message_data, disposition); |
AzureIoTClient | 30:20a85b733111 | 157 | } |
AzureIoTClient | 30:20a85b733111 | 158 | |
AzureIoTClient | 54:830550fef7ea | 159 | static int IotHubTransportAMQP_Subscribe_InputQueue(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 54:830550fef7ea | 160 | { |
AzureIoTClient | 54:830550fef7ea | 161 | // Codes_SRS_IOTHUBTRANSPORTAMQP_31_021: [IoTHubTransportAMQP_Subscribe_InputQueue shall return a failure as input queues are not implemented for AMQP] |
AzureIoTClient | 54:830550fef7ea | 162 | (void)handle; |
AzureIoTClient | 54:830550fef7ea | 163 | LogError("AMQP does not support input queues"); |
AzureIoTClient | 54:830550fef7ea | 164 | return __FAILURE__; |
AzureIoTClient | 54:830550fef7ea | 165 | } |
AzureIoTClient | 54:830550fef7ea | 166 | |
AzureIoTClient | 54:830550fef7ea | 167 | static void IotHubTransportAMQP_Unsubscribe_InputQueue(IOTHUB_DEVICE_HANDLE handle) |
AzureIoTClient | 54:830550fef7ea | 168 | { |
AzureIoTClient | 54:830550fef7ea | 169 | // Codes_SRS_IOTHUBTRANSPORTAMQP_31_022: [IotHubTransportAMQP_Unsubscribe_InputQueue shall do nothing as input queues are not implemented for AMQP] |
AzureIoTClient | 54:830550fef7ea | 170 | (void)handle; |
AzureIoTClient | 54:830550fef7ea | 171 | LogError("AMQP does not support input queues"); |
AzureIoTClient | 54:830550fef7ea | 172 | } |
AzureIoTClient | 54:830550fef7ea | 173 | |
AzureIoTClient | 56:8704100b3b54 | 174 | static TRANSPORT_PROVIDER thisTransportProvider = |
AzureIoTClient | 25:63f7d371c030 | 175 | { |
AzureIoTClient | 30:20a85b733111 | 176 | IoTHubTransportAMQP_SendMessageDisposition, /*pfIotHubTransport_Send_Message_Disposition IoTHubTransport_Send_Message_Disposition;*/ |
AzureIoTClient | 25:63f7d371c030 | 177 | IoTHubTransportAMQP_Subscribe_DeviceMethod, /*pfIoTHubTransport_Subscribe_DeviceMethod IoTHubTransport_Subscribe_DeviceMethod;*/ |
AzureIoTClient | 25:63f7d371c030 | 178 | IoTHubTransportAMQP_Unsubscribe_DeviceMethod, /*pfIoTHubTransport_Unsubscribe_DeviceMethod IoTHubTransport_Unsubscribe_DeviceMethod;*/ |
AzureIoTClient | 26:ee14eed604f6 | 179 | IoTHubTransportAMQP_DeviceMethod_Response, |
AzureIoTClient | 25:63f7d371c030 | 180 | IoTHubTransportAMQP_Subscribe_DeviceTwin, /*pfIoTHubTransport_Subscribe_DeviceTwin IoTHubTransport_Subscribe_DeviceTwin;*/ |
AzureIoTClient | 25:63f7d371c030 | 181 | IoTHubTransportAMQP_Unsubscribe_DeviceTwin, /*pfIoTHubTransport_Unsubscribe_DeviceTwin IoTHubTransport_Unsubscribe_DeviceTwin;*/ |
AzureIoTClient | 25:63f7d371c030 | 182 | IoTHubTransportAMQP_ProcessItem, /*pfIoTHubTransport_ProcessItem IoTHubTransport_ProcessItem;*/ |
AzureIoTClient | 25:63f7d371c030 | 183 | IoTHubTransportAMQP_GetHostname, /*pfIoTHubTransport_GetHostname IoTHubTransport_GetHostname;*/ |
AzureIoTClient | 25:63f7d371c030 | 184 | IoTHubTransportAMQP_SetOption, /*pfIoTHubTransport_SetOption IoTHubTransport_SetOption;*/ |
AzureIoTClient | 25:63f7d371c030 | 185 | IoTHubTransportAMQP_Create, /*pfIoTHubTransport_Create IoTHubTransport_Create;*/ |
AzureIoTClient | 25:63f7d371c030 | 186 | IoTHubTransportAMQP_Destroy, /*pfIoTHubTransport_Destroy IoTHubTransport_Destroy;*/ |
AzureIoTClient | 25:63f7d371c030 | 187 | IoTHubTransportAMQP_Register, /*pfIotHubTransport_Register IoTHubTransport_Register;*/ |
AzureIoTClient | 25:63f7d371c030 | 188 | IoTHubTransportAMQP_Unregister, /*pfIotHubTransport_Unregister IoTHubTransport_Unegister;*/ |
AzureIoTClient | 25:63f7d371c030 | 189 | IoTHubTransportAMQP_Subscribe, /*pfIoTHubTransport_Subscribe IoTHubTransport_Subscribe;*/ |
AzureIoTClient | 25:63f7d371c030 | 190 | IoTHubTransportAMQP_Unsubscribe, /*pfIoTHubTransport_Unsubscribe IoTHubTransport_Unsubscribe;*/ |
AzureIoTClient | 25:63f7d371c030 | 191 | IoTHubTransportAMQP_DoWork, /*pfIoTHubTransport_DoWork IoTHubTransport_DoWork;*/ |
AzureIoTClient | 25:63f7d371c030 | 192 | IoTHubTransportAMQP_SetRetryPolicy, /*pfIoTHubTransport_DoWork IoTHubTransport_SetRetryPolicy;*/ |
AzureIoTClient | 54:830550fef7ea | 193 | IoTHubTransportAMQP_GetSendStatus, /*pfIoTHubTransport_GetSendStatus IoTHubTransport_GetSendStatus;*/ |
AzureIoTClient | 54:830550fef7ea | 194 | IotHubTransportAMQP_Subscribe_InputQueue, /*pfIoTHubTransport_Subscribe_InputQueue IoTHubTransport_Subscribe_InputQueue; */ |
AzureIoTClient | 54:830550fef7ea | 195 | IotHubTransportAMQP_Unsubscribe_InputQueue, /*pfIoTHubTransport_Unsubscribe_InputQueue IoTHubTransport_Unsubscribe_InputQueue; */ |
AzureIoTClient | 4:57e049bce51e | 196 | }; |
AzureIoTClient | 4:57e049bce51e | 197 | |
AzureIoTClient | 25:63f7d371c030 | 198 | /* Codes_SRS_IOTHUBTRANSPORTAMQP_09_019: [This function shall return a pointer to a structure of type TRANSPORT_PROVIDER having the following values for it's fields: |
AzureIoTClient | 30:20a85b733111 | 199 | IoTHubTransport_SendMessageDisposition = IoTHubTransportAMQP_SendMessageDisposition |
AzureIoTClient | 25:63f7d371c030 | 200 | IoTHubTransport_Subscribe_DeviceMethod = IoTHubTransportAMQP_Subscribe_DeviceMethod |
AzureIoTClient | 25:63f7d371c030 | 201 | IoTHubTransport_Unsubscribe_DeviceMethod = IoTHubTransportAMQP_Unsubscribe_DeviceMethod |
AzureIoTClient | 25:63f7d371c030 | 202 | IoTHubTransport_Subscribe_DeviceTwin = IoTHubTransportAMQP_Subscribe_DeviceTwin |
AzureIoTClient | 25:63f7d371c030 | 203 | IoTHubTransport_Unsubscribe_DeviceTwin = IoTHubTransportAMQP_Unsubscribe_DeviceTwin |
AzureIoTClient | 25:63f7d371c030 | 204 | IoTHubTransport_ProcessItem - IoTHubTransportAMQP_ProcessItem |
AzureIoTClient | 25:63f7d371c030 | 205 | IoTHubTransport_GetHostname = IoTHubTransportAMQP_GetHostname |
AzureIoTClient | 25:63f7d371c030 | 206 | IoTHubTransport_Create = IoTHubTransportAMQP_Create |
AzureIoTClient | 25:63f7d371c030 | 207 | IoTHubTransport_Destroy = IoTHubTransportAMQP_Destroy |
AzureIoTClient | 25:63f7d371c030 | 208 | IoTHubTransport_Subscribe = IoTHubTransportAMQP_Subscribe |
AzureIoTClient | 25:63f7d371c030 | 209 | IoTHubTransport_Unsubscribe = IoTHubTransportAMQP_Unsubscribe |
AzureIoTClient | 25:63f7d371c030 | 210 | IoTHubTransport_DoWork = IoTHubTransportAMQP_DoWork |
AzureIoTClient | 30:20a85b733111 | 211 | IoTHubTransport_SetRetryPolicy = IoTHubTransportAMQP_SetRetryPolicy |
AzureIoTClient | 25:63f7d371c030 | 212 | IoTHubTransport_SetOption = IoTHubTransportAMQP_SetOption]*/ |
AzureIoTClient | 17:597443dc65a4 | 213 | extern const TRANSPORT_PROVIDER* AMQP_Protocol(void) |
AzureIoTClient | 4:57e049bce51e | 214 | { |
Azure.IoT Build | 7:07bc440836b3 | 215 | return &thisTransportProvider; |
AzureIoTClient | 4:57e049bce51e | 216 | } |