source: azure_iot_hub/trunk/azure_iohub/iothub_client/inc/internal/iothub_client_ll_uploadtoblob.h@ 388

Last change on this file since 388 was 388, checked in by coas-nagasima, 5 years ago

Azure IoT Hub Device C SDK を使ったサンプルの追加

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