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 Mar 20 10:29:00 2018 -0700
Revision:
85:de16c0a8a196
Parent:
82:f94e6bed4495
1.2.1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 42:448eecc3676e 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 42:448eecc3676e 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 42:448eecc3676e 3
AzureIoTClient 42:448eecc3676e 4 /** @file iothub_client_ll.h
AzureIoTClient 42:448eecc3676e 5 * @brief APIs that allow a user (usually a device) to communicate
AzureIoTClient 42:448eecc3676e 6 * with an Azure IoTHub.
AzureIoTClient 42:448eecc3676e 7 *
AzureIoTClient 42:448eecc3676e 8 * @details IoTHubClient_LL is a module that allows a user (usually a
AzureIoTClient 42:448eecc3676e 9 * device) to communicate with an Azure IoTHub. It can send events
AzureIoTClient 42:448eecc3676e 10 * and receive messages. At any given moment in time there can only
AzureIoTClient 42:448eecc3676e 11 * be at most 1 message callback function.
AzureIoTClient 42:448eecc3676e 12 *
AzureIoTClient 42:448eecc3676e 13 * This API surface contains a set of APIs that allows the user to
AzureIoTClient 42:448eecc3676e 14 * interact with the lower layer portion of the IoTHubClient. These APIs
AzureIoTClient 42:448eecc3676e 15 * contain @c _LL_ in their name, but retain the same functionality like the
AzureIoTClient 42:448eecc3676e 16 * @c IoTHubClient_... APIs, with one difference. If the @c _LL_ APIs are
AzureIoTClient 42:448eecc3676e 17 * used then the user is responsible for scheduling when the actual work done
AzureIoTClient 42:448eecc3676e 18 * by the IoTHubClient happens (when the data is sent/received on/from the wire).
AzureIoTClient 42:448eecc3676e 19 * This is useful for constrained devices where spinning a separate thread is
AzureIoTClient 42:448eecc3676e 20 * often not desired.
AzureIoTClient 42:448eecc3676e 21 */
AzureIoTClient 42:448eecc3676e 22
AzureIoTClient 44:33dd78697616 23 #ifndef DONT_USE_UPLOADTOBLOB
AzureIoTClient 43:038d8511e817 24
AzureIoTClient 42:448eecc3676e 25 #ifndef IOTHUB_CLIENT_LL_UPLOADTOBLOB_H
AzureIoTClient 42:448eecc3676e 26 #define IOTHUB_CLIENT_LL_UPLOADTOBLOB_H
AzureIoTClient 42:448eecc3676e 27
AzureIoTClient 42:448eecc3676e 28 #include "iothub_client_ll.h"
AzureIoTClient 42:448eecc3676e 29
AzureIoTClient 42:448eecc3676e 30 #include "azure_c_shared_utility/umock_c_prod.h"
AzureIoTClient 42:448eecc3676e 31 #ifdef __cplusplus
AzureIoTClient 42:448eecc3676e 32 #include <cstddef>
AzureIoTClient 42:448eecc3676e 33 extern "C"
AzureIoTClient 42:448eecc3676e 34 {
AzureIoTClient 42:448eecc3676e 35 #else
AzureIoTClient 42:448eecc3676e 36 #include <stddef.h>
AzureIoTClient 42:448eecc3676e 37 #endif
AzureIoTClient 42:448eecc3676e 38
AzureIoTClient 42:448eecc3676e 39 typedef struct IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE_DATA* IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE;
AzureIoTClient 42:448eecc3676e 40
AzureIoTClient 42:448eecc3676e 41 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE, IoTHubClient_LL_UploadToBlob_Create, const IOTHUB_CLIENT_CONFIG*, config);
AzureIoTClient 42:448eecc3676e 42 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadToBlob_Impl, IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE, handle, const char*, destinationFileName, const unsigned char*, source, size_t, size);
AzureIoTClient 82:f94e6bed4495 43 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadMultipleBlocksToBlob_Impl, IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE, handle, const char*, destinationFileName, IOTHUB_CLIENT_FILE_UPLOAD_GET_DATA_CALLBACK_EX, getDataCallbackEx, void*, context);
AzureIoTClient 46:6a69294b6119 44 MOCKABLE_FUNCTION(, IOTHUB_CLIENT_RESULT, IoTHubClient_LL_UploadToBlob_SetOption, IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE, handle, const char*, optionName, const void*, value);
AzureIoTClient 42:448eecc3676e 45 MOCKABLE_FUNCTION(, void, IoTHubClient_LL_UploadToBlob_Destroy, IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE, handle);
AzureIoTClient 80:db5f5237bc95 46
AzureIoTClient 42:448eecc3676e 47 #ifdef __cplusplus
AzureIoTClient 42:448eecc3676e 48 }
AzureIoTClient 42:448eecc3676e 49 #endif
AzureIoTClient 42:448eecc3676e 50
AzureIoTClient 42:448eecc3676e 51 #endif /* IOTHUB_CLIENT_LL_UPLOADTOBLOB_H */
AzureIoTClient 43:038d8511e817 52
AzureIoTClient 43:038d8511e817 53 #else
AzureIoTClient 44:33dd78697616 54 #error "trying to #include iothub_client_ll_uploadtoblob.h in the presence of #define DONT_USE_UPLOADTOBLOB"
AzureIoTClient 44:33dd78697616 55 #endif /*DONT_USE_UPLOADTOBLOB*/