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
Diff: iothubtransportamqp.c
- Revision:
- 17:597443dc65a4
- Parent:
- 16:a49121e2300b
- Child:
- 18:239d162e3607
diff -r a49121e2300b -r 597443dc65a4 iothubtransportamqp.c --- a/iothubtransportamqp.c Tue Jun 07 10:48:38 2016 -0700 +++ b/iothubtransportamqp.c Fri Jun 17 17:02:10 2016 -0700 @@ -1735,7 +1735,24 @@ } } +static STRING_HANDLE IoTHubTransportAMQP_GetHostname(TRANSPORT_LL_HANDLE handle) +{ + STRING_HANDLE result; + /*Codes_SRS_IOTHUBTRANSPORTAMQP_02_001: [ If parameter handle is NULL then IoTHubTransportAMQP_GetHostname shall return NULL. ]*/ + if (handle == NULL) + { + result = NULL; + } + else + { + /*Codes_SRS_IOTHUBTRANSPORTAMQP_02_002: [ Otherwise IoTHubTransportAMQP_GetHostname shall return a STRING_HANDLE for the hostname. ]*/ + result = ((AMQP_TRANSPORT_INSTANCE*)(handle))->iotHubHostFqdn; + } + return result; +} + static TRANSPORT_PROVIDER thisTransportProvider = { + IoTHubTransportAMQP_GetHostname, IoTHubTransportAMQP_SetOption, IoTHubTransportAMQP_Create, IoTHubTransportAMQP_Destroy, @@ -1747,7 +1764,7 @@ IoTHubTransportAMQP_GetSendStatus }; -extern const void* AMQP_Protocol(void) +extern const TRANSPORT_PROVIDER* AMQP_Protocol(void) { return &thisTransportProvider; }