corrected version (with typedef struct IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE_DATA* IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE;) included in the sources
Dependents: STM32F746_iothub_client_sample_mqtt
Fork of iothub_client by
blob.h@44:126f118a71ba, 2016-06-19 (annotated)
- Committer:
- DieterGraef
- Date:
- Sun Jun 19 20:50:15 2016 +0000
- Revision:
- 44:126f118a71ba
- Parent:
- 42:448eecc3676e
got compiling errors when typedef struct IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE_DATA* IOTHUB_CLIENT_LL_UPLOADTOBLOB_HANDLE; was not included in the sources
Who changed what in which revision?
User | Revision | Line number | New 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 blob.h |
AzureIoTClient | 42:448eecc3676e | 5 | * @brief Contains blob APIs needed for File Upload feature of IoTHub client. |
AzureIoTClient | 42:448eecc3676e | 6 | * |
AzureIoTClient | 42:448eecc3676e | 7 | * @details IoTHub client needs to upload a byte array by using blob storage API |
AzureIoTClient | 42:448eecc3676e | 8 | * IoTHub service provides the complete SAS URI to execute a PUT request |
AzureIoTClient | 42:448eecc3676e | 9 | * that will upload the data. |
AzureIoTClient | 42:448eecc3676e | 10 | * |
AzureIoTClient | 42:448eecc3676e | 11 | */ |
AzureIoTClient | 42:448eecc3676e | 12 | |
AzureIoTClient | 42:448eecc3676e | 13 | #ifndef BLOB_H |
AzureIoTClient | 42:448eecc3676e | 14 | #define BLOB_H |
AzureIoTClient | 42:448eecc3676e | 15 | |
AzureIoTClient | 42:448eecc3676e | 16 | #include "azure_c_shared_utility/macro_utils.h" |
AzureIoTClient | 42:448eecc3676e | 17 | #include "azure_c_shared_utility/buffer_.h" |
AzureIoTClient | 42:448eecc3676e | 18 | |
AzureIoTClient | 42:448eecc3676e | 19 | #ifdef __cplusplus |
AzureIoTClient | 42:448eecc3676e | 20 | #include <cstddef> |
AzureIoTClient | 42:448eecc3676e | 21 | extern "C" |
AzureIoTClient | 42:448eecc3676e | 22 | { |
AzureIoTClient | 42:448eecc3676e | 23 | #else |
AzureIoTClient | 42:448eecc3676e | 24 | #include <stddef.h> |
AzureIoTClient | 42:448eecc3676e | 25 | #endif |
AzureIoTClient | 42:448eecc3676e | 26 | |
AzureIoTClient | 42:448eecc3676e | 27 | #include "azure_c_shared_utility/umock_c_prod.h" |
AzureIoTClient | 42:448eecc3676e | 28 | |
AzureIoTClient | 42:448eecc3676e | 29 | #define BLOB_RESULT_VALUES \ |
AzureIoTClient | 42:448eecc3676e | 30 | BLOB_OK, \ |
AzureIoTClient | 42:448eecc3676e | 31 | BLOB_ERROR, \ |
AzureIoTClient | 42:448eecc3676e | 32 | BLOB_NOT_IMPLEMENTED, \ |
AzureIoTClient | 42:448eecc3676e | 33 | BLOB_HTTP_ERROR, \ |
AzureIoTClient | 42:448eecc3676e | 34 | BLOB_INVALID_ARG |
AzureIoTClient | 42:448eecc3676e | 35 | |
AzureIoTClient | 42:448eecc3676e | 36 | DEFINE_ENUM(BLOB_RESULT, BLOB_RESULT_VALUES) |
AzureIoTClient | 42:448eecc3676e | 37 | |
AzureIoTClient | 42:448eecc3676e | 38 | /** |
AzureIoTClient | 42:448eecc3676e | 39 | * @brief Synchronously uploads a byte array to blob storage |
AzureIoTClient | 42:448eecc3676e | 40 | * |
AzureIoTClient | 42:448eecc3676e | 41 | * @param SASURI The URI to use to upload data |
AzureIoTClient | 42:448eecc3676e | 42 | * @param size The size of the data to be uploaded (can be 0) |
AzureIoTClient | 42:448eecc3676e | 43 | * @param source A pointer to the byte array to be uploaded (can be NULL, but then size needs to be zero) |
AzureIoTClient | 42:448eecc3676e | 44 | * @param httpStatus A pointer to an out argument receiving the HTTP status (available only when the return value is BLOB_OK) |
AzureIoTClient | 42:448eecc3676e | 45 | * @param httpResponse A BUFFER_HANDLE that receives the HTTP response from the server (available only when the return value is BLOB_OK) |
AzureIoTClient | 42:448eecc3676e | 46 | * |
AzureIoTClient | 42:448eecc3676e | 47 | * @return A @c BLOB_RESULT. BLOB_OK means the blob has been uploaded successfully. Any other value indicates an error |
AzureIoTClient | 42:448eecc3676e | 48 | */ |
AzureIoTClient | 42:448eecc3676e | 49 | MOCKABLE_FUNCTION(, BLOB_RESULT, Blob_UploadFromSasUri,const char*, SASURI, const unsigned char*, source, size_t, size, unsigned int*, httpStatus, BUFFER_HANDLE, httpResponse) |
AzureIoTClient | 42:448eecc3676e | 50 | |
AzureIoTClient | 42:448eecc3676e | 51 | #ifdef __cplusplus |
AzureIoTClient | 42:448eecc3676e | 52 | } |
AzureIoTClient | 42:448eecc3676e | 53 | #endif |
AzureIoTClient | 42:448eecc3676e | 54 | |
AzureIoTClient | 42:448eecc3676e | 55 | #endif /* BLOB_H */ |