Azure IoT / iothub_amqp_transport

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp iothub_client_sample_amqp ... more

Committer:
AzureIoTClient
Date:
Mon Jun 11 15:38:09 2018 -0700
Revision:
53:e21e1e88460f
Child:
55:6420ea342cd1
1.2.5

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 53:e21e1e88460f 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 53:e21e1e88460f 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 53:e21e1e88460f 3
AzureIoTClient 53:e21e1e88460f 4 #ifndef IOTHUBTRANSPORTAMQP_COMMON_H
AzureIoTClient 53:e21e1e88460f 5 #define IOTHUBTRANSPORTAMQP_COMMON_H
AzureIoTClient 53:e21e1e88460f 6
AzureIoTClient 53:e21e1e88460f 7 #include "azure_c_shared_utility/strings.h"
AzureIoTClient 53:e21e1e88460f 8 #include "azure_c_shared_utility/umock_c_prod.h"
AzureIoTClient 53:e21e1e88460f 9 #include "internal/iothub_transport_ll_private.h"
AzureIoTClient 53:e21e1e88460f 10
AzureIoTClient 53:e21e1e88460f 11 #ifdef __cplusplus
AzureIoTClient 53:e21e1e88460f 12 extern "C"
AzureIoTClient 53:e21e1e88460f 13 {
AzureIoTClient 53:e21e1e88460f 14 #endif
AzureIoTClient 53:e21e1e88460f 15
AzureIoTClient 53:e21e1e88460f 16 typedef struct AMQP_TRANSPORT_PROXY_OPTIONS_TAG
AzureIoTClient 53:e21e1e88460f 17 {
AzureIoTClient 53:e21e1e88460f 18 const char* host_address;
AzureIoTClient 53:e21e1e88460f 19 int port;
AzureIoTClient 53:e21e1e88460f 20 const char* username;
AzureIoTClient 53:e21e1e88460f 21 const char* password;
AzureIoTClient 53:e21e1e88460f 22 } AMQP_TRANSPORT_PROXY_OPTIONS;
AzureIoTClient 53:e21e1e88460f 23
AzureIoTClient 53:e21e1e88460f 24 typedef XIO_HANDLE(*AMQP_GET_IO_TRANSPORT)(const char* target_fqdn, const AMQP_TRANSPORT_PROXY_OPTIONS* amqp_transport_proxy_options);
AzureIoTClient 53:e21e1e88460f 25 static const char* OPTION_EVENT_SEND_TIMEOUT_SECS = "event_send_timeout_secs";
AzureIoTClient 53:e21e1e88460f 26
AzureIoTClient 53:e21e1e88460f 27 MOCKABLE_FUNCTION(, TRANSPORT_LL_HANDLE, IoTHubTransport_AMQP_Common_Create, const IOTHUBTRANSPORT_CONFIG*, config, AMQP_GET_IO_TRANSPORT, get_io_transport);
AzureIoTClient 53:e21e1e88460f 28 MOCKABLE_FUNCTION(, void, IoTHubTransport_AMQP_Common_Destroy, TRANSPORT_LL_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 29 MOCKABLE_FUNCTION(, int, IoTHubTransport_AMQP_Common_Subscribe, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 30 MOCKABLE_FUNCTION(, void, IoTHubTransport_AMQP_Common_Unsubscribe, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 31 MOCKABLE_FUNCTION(, int, IoTHubTransport_AMQP_Common_Subscribe_DeviceTwin, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 32 MOCKABLE_FUNCTION(, void, IoTHubTransport_AMQP_Common_Unsubscribe_DeviceTwin, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 33 MOCKABLE_FUNCTION(, int, IoTHubTransport_AMQP_Common_Subscribe_DeviceMethod, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 34 MOCKABLE_FUNCTION(, void, IoTHubTransport_AMQP_Common_Unsubscribe_DeviceMethod, IOTHUB_DEVICE_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 35 MOCKABLE_FUNCTION(, int, IoTHubTransport_AMQP_Common_DeviceMethod_Response, IOTHUB_DEVICE_HANDLE, handle, METHOD_HANDLE, methodId, const unsigned char*, response, size_t, response_size, int, status_response);
AzureIoTClient 53:e21e1e88460f 36 MOCKABLE_FUNCTION(, IOTHUB_PROCESS_ITEM_RESULT, IoTHubTransport_AMQP_Common_ProcessItem, TRANSPORT_LL_HANDLE, handle, IOTHUB_IDENTITY_TYPE, item_type, IOTHUB_IDENTITY_INFO*, iothub_item);
AzureIoTClient 53:e21e1e88460f 37 MOCKABLE_FUNCTION(, void, IoTHubTransport_AMQP_Common_DoWork, TRANSPORT_LL_HANDLE, handle, IOTHUB_CLIENT_CORE_LL_HANDLE, iotHubClientHandle);
AzureIoTClient 53:e21e1e88460f 38 MOCKABLE_FUNCTION(, int, IoTHubTransport_AMQP_Common_SetRetryPolicy, TRANSPORT_LL_HANDLE, handle, IOTHUB_CLIENT_RETRY_POLICY, retryPolicy, size_t, retryTimeoutLimitInSeconds);
AzureIoTClient 53:e21e1e88460f 39 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_AMQP_Common_GetSendStatus, IOTHUB_DEVICE_HANDLE, handle, IOTHUB_CLIENT_STATUS*, iotHubClientStatus);
AzureIoTClient 53:e21e1e88460f 40 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_AMQP_Common_SetOption, TRANSPORT_LL_HANDLE, handle, const char*, option, const void*, value);
AzureIoTClient 53:e21e1e88460f 41 MOCKABLE_FUNCTION(, IOTHUB_DEVICE_HANDLE, IoTHubTransport_AMQP_Common_Register, TRANSPORT_LL_HANDLE, handle, const IOTHUB_DEVICE_CONFIG*, device, IOTHUB_CLIENT_CORE_LL_HANDLE, iotHubClientHandle, PDLIST_ENTRY, waitingToSend);
AzureIoTClient 53:e21e1e88460f 42 MOCKABLE_FUNCTION(, void, IoTHubTransport_AMQP_Common_Unregister, IOTHUB_DEVICE_HANDLE, deviceHandle);
AzureIoTClient 53:e21e1e88460f 43 MOCKABLE_FUNCTION(, STRING_HANDLE, IoTHubTransport_AMQP_Common_GetHostname, TRANSPORT_LL_HANDLE, handle);
AzureIoTClient 53:e21e1e88460f 44 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_AMQP_Common_SendMessageDisposition, MESSAGE_CALLBACK_INFO*, message_data, IOTHUBMESSAGE_DISPOSITION_RESULT, disposition);
AzureIoTClient 53:e21e1e88460f 45
AzureIoTClient 53:e21e1e88460f 46 #ifdef __cplusplus
AzureIoTClient 53:e21e1e88460f 47 }
AzureIoTClient 53:e21e1e88460f 48 #endif
AzureIoTClient 53:e21e1e88460f 49
AzureIoTClient 53:e21e1e88460f 50 #endif /* IOTHUBTRANSPORTAMQP_COMMON_H */