Xin Zhang / azure-iot-c-sdk-f767zi

Dependents:   samplemqtt

Committer:
XinZhangMS
Date:
Thu Aug 23 06:52:14 2018 +0000
Revision:
0:f7f1f0d76dd6
azure-c-sdk for mbed os supporting NUCLEO_F767ZI

Who changed what in which revision?

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