Microsoft Azure IoTHub client MQTT transport
Dependents: STM32F746_iothub_client_sample_mqtt FXOS8700CQ_To_Azure_IoT f767zi_mqtt FXOS8700CQ_To_Azure_IoT ... more
Diff: iothubtransportmqtt.c
- Revision:
- 19:f87dfe76bc70
- Parent:
- 16:14640ee83e99
- Child:
- 20:594780be216d
diff -r ec8e5e97c6a4 -r f87dfe76bc70 iothubtransportmqtt.c --- a/iothubtransportmqtt.c Fri Feb 24 14:00:29 2017 -0800 +++ b/iothubtransportmqtt.c Fri Mar 10 11:47:21 2017 -0800 @@ -8,6 +8,7 @@ #include "azure_c_shared_utility/platform.h" #include "iothubtransport_mqtt_common.h" + static XIO_HANDLE getIoTransportProvider(const char* fqdn) { XIO_HANDLE result; @@ -23,6 +24,8 @@ TLSIO_CONFIG tls_io_config; tls_io_config.hostname = fqdn; tls_io_config.port = 8883; + tls_io_config.underlying_io_interface = NULL; + tls_io_config.underlying_io_parameters = NULL; /* Codes_SRS_IOTHUB_MQTT_TRANSPORT_07_012: [ getIoTransportProvider shall return the XIO_HANDLE returns by xio_create. ] */ result = xio_create(io_interface_description, &tls_io_config); } @@ -83,6 +86,12 @@ return IoTHubTransport_MQTT_Common_DeviceMethod_Response(handle, methodId, response, response_size, status_response); } +/* Codes_SRS_IOTHUB_MQTT_TRANSPORT_10_001: [IoTHubTransportMqtt_SendMessageDisposition shall send the message disposition by calling into the IoTHubMqttAbstract_SendMessageDisposition function.] */ +static IOTHUB_CLIENT_RESULT IoTHubTransportMqtt_SendMessageDisposition(MESSAGE_CALLBACK_INFO* message_data, IOTHUBMESSAGE_DISPOSITION_RESULT disposition) +{ + return IoTHubTransport_MQTT_Common_SendMessageDisposition(message_data, disposition); +} + static IOTHUB_PROCESS_ITEM_RESULT IoTHubTransportMqtt_ProcessItem(TRANSPORT_LL_HANDLE handle, IOTHUB_IDENTITY_TYPE item_type, IOTHUB_IDENTITY_INFO* iothub_item) { return IoTHubTransport_MQTT_Common_ProcessItem(handle, item_type, iothub_item); @@ -133,6 +142,7 @@ static TRANSPORT_PROVIDER myfunc = { + IoTHubTransportMqtt_SendMessageDisposition, /*pfIotHubTransport_SendMessageDisposition IoTHubTransport_SendMessageDisposition;*/ IoTHubTransportMqtt_Subscribe_DeviceMethod, /*pfIoTHubTransport_Subscribe_DeviceMethod IoTHubTransport_Subscribe_DeviceMethod;*/ IoTHubTransportMqtt_Unsubscribe_DeviceMethod, /*pfIoTHubTransport_Unsubscribe_DeviceMethod IoTHubTransport_Unsubscribe_DeviceMethod;*/ IoTHubTransportMqtt_DeviceMethod_Response, /*pfIoTHubTransport_DeviceMethod_Response IoTHubTransport_DeviceMethod_Response;*/