Microsoft Azure IoTHub client libraries

Dependents:   sht15_remote_monitoring RobotArmDemo iothub_client_sample_amqp f767zi_mqtt ... more

This library implements the Microsoft Azure IoTHub client library. The code is replicated from https://github.com/Azure/azure-iot-sdks

Committer:
AzureIoTClient
Date:
Tue Jun 26 19:14:28 2018 -0700
Revision:
89:a2ed767a532e
Parent:
88:248736be106e
Child:
92:97148cf9aa2a
1.2.6

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 88:248736be106e 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 88:248736be106e 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 88:248736be106e 3
AzureIoTClient 88:248736be106e 4 #ifndef IOTHUB_TRANSPORT_H
AzureIoTClient 88:248736be106e 5 #define IOTHUB_TRANSPORT_H
AzureIoTClient 88:248736be106e 6
AzureIoTClient 88:248736be106e 7 #include "azure_c_shared_utility/lock.h"
AzureIoTClient 88:248736be106e 8 #include "azure_c_shared_utility/crt_abstractions.h"
AzureIoTClient 88:248736be106e 9 #include "iothub_transport_ll.h"
AzureIoTClient 88:248736be106e 10 #include "iothub_client_core.h"
AzureIoTClient 88:248736be106e 11 #include "internal/iothub_client_private.h"
AzureIoTClient 88:248736be106e 12 #include "internal/iothub_transport_ll_private.h"
AzureIoTClient 88:248736be106e 13 #include "iothub_client_authorization.h"
AzureIoTClient 88:248736be106e 14
AzureIoTClient 88:248736be106e 15 #ifndef IOTHUB_CLIENT_CORE_INSTANCE_TYPE
AzureIoTClient 88:248736be106e 16 typedef struct IOTHUB_CLIENT_CORE_INSTANCE_TAG* IOTHUB_CLIENT_CORE_HANDLE;
AzureIoTClient 88:248736be106e 17 #define IOTHUB_CLIENT_CORE_INSTANCE_TYPE
AzureIoTClient 88:248736be106e 18 #endif // IOTHUB_CLIENT_CORE_INSTANCE
AzureIoTClient 88:248736be106e 19
AzureIoTClient 88:248736be106e 20 #ifdef __cplusplus
AzureIoTClient 88:248736be106e 21 extern "C"
AzureIoTClient 88:248736be106e 22 {
AzureIoTClient 88:248736be106e 23 #else
AzureIoTClient 88:248736be106e 24 #include <stdbool.h>
AzureIoTClient 88:248736be106e 25 #endif
AzureIoTClient 88:248736be106e 26
AzureIoTClient 88:248736be106e 27 #include "azure_c_shared_utility/umock_c_prod.h"
AzureIoTClient 89:a2ed767a532e 28
AzureIoTClient 89:a2ed767a532e 29 /** @brief This struct captures IoTHub transport configuration. */
AzureIoTClient 89:a2ed767a532e 30 struct IOTHUBTRANSPORT_CONFIG_TAG
AzureIoTClient 89:a2ed767a532e 31 {
AzureIoTClient 89:a2ed767a532e 32 const IOTHUB_CLIENT_CONFIG* upperConfig;
AzureIoTClient 89:a2ed767a532e 33 PDLIST_ENTRY waitingToSend;
AzureIoTClient 89:a2ed767a532e 34 IOTHUB_AUTHORIZATION_HANDLE auth_module_handle;
AzureIoTClient 89:a2ed767a532e 35 const char* moduleId;
AzureIoTClient 89:a2ed767a532e 36 };
AzureIoTClient 89:a2ed767a532e 37
AzureIoTClient 89:a2ed767a532e 38 typedef void(*IOTHUB_CLIENT_MULTIPLEXED_DO_WORK)(void* iotHubClientInstance);
AzureIoTClient 89:a2ed767a532e 39
AzureIoTClient 89:a2ed767a532e 40 MOCKABLE_FUNCTION(, LOCK_HANDLE, IoTHubTransport_GetLock, TRANSPORT_HANDLE, transportHandle);
AzureIoTClient 89:a2ed767a532e 41 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubTransport_StartWorkerThread, TRANSPORT_HANDLE, transportHandle, IOTHUB_CLIENT_CORE_HANDLE, clientHandle, IOTHUB_CLIENT_MULTIPLEXED_DO_WORK, muxDoWork);
AzureIoTClient 89:a2ed767a532e 42 MOCKABLE_FUNCTION(, bool, IoTHubTransport_SignalEndWorkerThread, TRANSPORT_HANDLE, transportHandle, IOTHUB_CLIENT_CORE_HANDLE, clientHandle);
AzureIoTClient 89:a2ed767a532e 43 MOCKABLE_FUNCTION(, void, IoTHubTransport_JoinWorkerThread, TRANSPORT_HANDLE, transportHandle, IOTHUB_CLIENT_CORE_HANDLE, clientHandle);
AzureIoTClient 88:248736be106e 44
AzureIoTClient 88:248736be106e 45 #ifdef __cplusplus
AzureIoTClient 88:248736be106e 46 }
AzureIoTClient 88:248736be106e 47 #endif
AzureIoTClient 88:248736be106e 48
AzureIoTClient 88:248736be106e 49 #endif /* IOTHUB_TRANSPORT_H */