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
iothub_client_ll.h@0:e393db310d89, 2015-09-15 (annotated)
- Committer:
- AzureIoTClient
- Date:
- Tue Sep 15 21:47:12 2015 -0700
- Revision:
- 0:e393db310d89
- Child:
- 9:3ec7e2695f98
Automatic build commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AzureIoTClient | 0:e393db310d89 | 1 | // Copyright (c) Microsoft. All rights reserved. |
AzureIoTClient | 0:e393db310d89 | 2 | // Licensed under the MIT license. See LICENSE file in the project root for full license information. |
AzureIoTClient | 0:e393db310d89 | 3 | |
AzureIoTClient | 0:e393db310d89 | 4 | #ifndef IOTHUB_CLIENT_LL_H |
AzureIoTClient | 0:e393db310d89 | 5 | #define IOTHUB_CLIENT_LL_H |
AzureIoTClient | 0:e393db310d89 | 6 | |
AzureIoTClient | 0:e393db310d89 | 7 | #include "agenttime.h" |
AzureIoTClient | 0:e393db310d89 | 8 | |
AzureIoTClient | 0:e393db310d89 | 9 | #include "macro_utils.h" |
AzureIoTClient | 0:e393db310d89 | 10 | |
AzureIoTClient | 0:e393db310d89 | 11 | #include "iothub_message.h" |
AzureIoTClient | 0:e393db310d89 | 12 | |
AzureIoTClient | 0:e393db310d89 | 13 | #ifdef __cplusplus |
AzureIoTClient | 0:e393db310d89 | 14 | extern "C" |
AzureIoTClient | 0:e393db310d89 | 15 | { |
AzureIoTClient | 0:e393db310d89 | 16 | #endif |
AzureIoTClient | 0:e393db310d89 | 17 | |
AzureIoTClient | 0:e393db310d89 | 18 | #define IOTHUB_CLIENT_RESULT_VALUES \ |
AzureIoTClient | 0:e393db310d89 | 19 | IOTHUB_CLIENT_OK, \ |
AzureIoTClient | 0:e393db310d89 | 20 | IOTHUB_CLIENT_INVALID_ARG, \ |
AzureIoTClient | 0:e393db310d89 | 21 | IOTHUB_CLIENT_ERROR, \ |
AzureIoTClient | 0:e393db310d89 | 22 | IOTHUB_CLIENT_INVALID_SIZE, \ |
AzureIoTClient | 0:e393db310d89 | 23 | IOTHUB_CLIENT_INDEFINITE_TIME \ |
AzureIoTClient | 0:e393db310d89 | 24 | |
AzureIoTClient | 0:e393db310d89 | 25 | DEFINE_ENUM(IOTHUB_CLIENT_RESULT, IOTHUB_CLIENT_RESULT_VALUES); |
AzureIoTClient | 0:e393db310d89 | 26 | |
AzureIoTClient | 0:e393db310d89 | 27 | #define IOTHUB_CLIENT_CONFIRMATION_RESULT_VALUES \ |
AzureIoTClient | 0:e393db310d89 | 28 | IOTHUB_CLIENT_CONFIRMATION_OK, \ |
AzureIoTClient | 0:e393db310d89 | 29 | IOTHUB_CLIENT_CONFIRMATION_BECAUSE_DESTROY, \ |
AzureIoTClient | 0:e393db310d89 | 30 | IOTHUB_CLIENT_CONFIRMATION_ERROR \ |
AzureIoTClient | 0:e393db310d89 | 31 | |
AzureIoTClient | 0:e393db310d89 | 32 | DEFINE_ENUM(IOTHUB_CLIENT_CONFIRMATION_RESULT, IOTHUB_CLIENT_CONFIRMATION_RESULT_VALUES); |
AzureIoTClient | 0:e393db310d89 | 33 | |
AzureIoTClient | 0:e393db310d89 | 34 | #define IOTHUB_CLIENT_STATUS_VALUES \ |
AzureIoTClient | 0:e393db310d89 | 35 | IOTHUB_CLIENT_SEND_STATUS_IDLE, \ |
AzureIoTClient | 0:e393db310d89 | 36 | IOTHUB_CLIENT_SEND_STATUS_BUSY \ |
AzureIoTClient | 0:e393db310d89 | 37 | |
AzureIoTClient | 0:e393db310d89 | 38 | DEFINE_ENUM(IOTHUB_CLIENT_STATUS, IOTHUB_CLIENT_STATUS_VALUES); |
AzureIoTClient | 0:e393db310d89 | 39 | |
AzureIoTClient | 0:e393db310d89 | 40 | #define TRANSPORT_TYPE_VALUES \ |
AzureIoTClient | 0:e393db310d89 | 41 | TRANSPORT_LL, /*LL comes from "LowLevel" */ \ |
AzureIoTClient | 0:e393db310d89 | 42 | TRANSPORT_THREADED |
AzureIoTClient | 0:e393db310d89 | 43 | |
AzureIoTClient | 0:e393db310d89 | 44 | DEFINE_ENUM(TRANSPORT_TYPE, TRANSPORT_TYPE_VALUES); |
AzureIoTClient | 0:e393db310d89 | 45 | |
AzureIoTClient | 0:e393db310d89 | 46 | #define IOTHUBMESSAGE_DISPOSITION_RESULT_VALUES \ |
AzureIoTClient | 0:e393db310d89 | 47 | IOTHUBMESSAGE_ACCEPTED, \ |
AzureIoTClient | 0:e393db310d89 | 48 | IOTHUBMESSAGE_REJECTED, \ |
AzureIoTClient | 0:e393db310d89 | 49 | IOTHUBMESSAGE_ABANDONED |
AzureIoTClient | 0:e393db310d89 | 50 | |
AzureIoTClient | 0:e393db310d89 | 51 | DEFINE_ENUM(IOTHUBMESSAGE_DISPOSITION_RESULT, IOTHUBMESSAGE_DISPOSITION_RESULT_VALUES); |
AzureIoTClient | 0:e393db310d89 | 52 | |
AzureIoTClient | 0:e393db310d89 | 53 | typedef void* IOTHUB_CLIENT_LL_HANDLE; |
AzureIoTClient | 0:e393db310d89 | 54 | typedef void(*IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK)(IOTHUB_CLIENT_CONFIRMATION_RESULT result, void* userContextCallback); |
AzureIoTClient | 0:e393db310d89 | 55 | typedef IOTHUBMESSAGE_DISPOSITION_RESULT (*IOTHUB_CLIENT_NOTIFICATION_CALLBACK_ASYNC)(IOTHUB_MESSAGE_HANDLE notificationMessage, void* userContextCallback); |
AzureIoTClient | 0:e393db310d89 | 56 | typedef const void*(*IOTHUB_CLIENT_TRANSPORT_PROVIDER)(void); |
AzureIoTClient | 0:e393db310d89 | 57 | |
AzureIoTClient | 0:e393db310d89 | 58 | typedef struct IOTHUB_CLIENT_CONFIG_TAG |
AzureIoTClient | 0:e393db310d89 | 59 | { |
AzureIoTClient | 0:e393db310d89 | 60 | IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol; |
AzureIoTClient | 0:e393db310d89 | 61 | const char* deviceId; |
AzureIoTClient | 0:e393db310d89 | 62 | const char* deviceKey; |
AzureIoTClient | 0:e393db310d89 | 63 | const char* iotHubName; |
AzureIoTClient | 0:e393db310d89 | 64 | const char* iotHubSuffix; |
AzureIoTClient | 0:e393db310d89 | 65 | const char* protocolGatewayHostName; |
AzureIoTClient | 0:e393db310d89 | 66 | } IOTHUB_CLIENT_CONFIG; |
AzureIoTClient | 0:e393db310d89 | 67 | |
AzureIoTClient | 0:e393db310d89 | 68 | extern IOTHUB_CLIENT_LL_HANDLE IoTHubClient_LL_CreateFromConnectionString(const char* connectionString, IOTHUB_CLIENT_TRANSPORT_PROVIDER protocol); |
AzureIoTClient | 0:e393db310d89 | 69 | extern IOTHUB_CLIENT_LL_HANDLE IoTHubClient_LL_Create(const IOTHUB_CLIENT_CONFIG* config); |
AzureIoTClient | 0:e393db310d89 | 70 | extern void IoTHubClient_LL_Destroy(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle); |
AzureIoTClient | 0:e393db310d89 | 71 | |
AzureIoTClient | 0:e393db310d89 | 72 | extern IOTHUB_CLIENT_RESULT IoTHubClient_LL_SendEventAsync(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle, IOTHUB_MESSAGE_HANDLE eventMessageHandle, IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK eventConfirmationCallback, void* userContextCallback); |
AzureIoTClient | 0:e393db310d89 | 73 | extern IOTHUB_CLIENT_RESULT IoTHubClient_LL_GetSendStatus(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle, IOTHUB_CLIENT_STATUS *iotHubClientStatus); |
AzureIoTClient | 0:e393db310d89 | 74 | extern IOTHUB_CLIENT_RESULT IoTHubClient_LL_SetNotificationCallback(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle, IOTHUB_CLIENT_NOTIFICATION_CALLBACK_ASYNC notificationCallback, void* userContextCallback); |
AzureIoTClient | 0:e393db310d89 | 75 | extern IOTHUB_CLIENT_RESULT IoTHubClient_LL_GetLastNotificationReceiveTime(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle, time_t* lastNotificationReceiveTime); |
AzureIoTClient | 0:e393db310d89 | 76 | extern void IoTHubClient_LL_DoWork(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle); |
AzureIoTClient | 0:e393db310d89 | 77 | extern IOTHUB_CLIENT_RESULT IoTHubClient_LL_SetOption(IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle, const char* optionName, const void* value); |
AzureIoTClient | 0:e393db310d89 | 78 | |
AzureIoTClient | 0:e393db310d89 | 79 | #ifdef __cplusplus |
AzureIoTClient | 0:e393db310d89 | 80 | } |
AzureIoTClient | 0:e393db310d89 | 81 | #endif |
AzureIoTClient | 0:e393db310d89 | 82 | |
AzureIoTClient | 0:e393db310d89 | 83 | #endif /* IOTHUB_CLIENT_LL_H */ |