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 Azure IoT

Committer:
AzureIoTClient
Date:
Fri Jan 15 15:49:41 2016 -0800
Revision:
22:b8732db970af
Parent:
16:deba40344375
Child:
32:6e9d81a62085
v1.0.0-preview.4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AzureIoTClient 16:deba40344375 1 // Copyright (c) Microsoft. All rights reserved.
AzureIoTClient 16:deba40344375 2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
AzureIoTClient 16:deba40344375 3
AzureIoTClient 16:deba40344375 4 #ifndef IOTHUB_CLIENT_PRIVATE_H
AzureIoTClient 16:deba40344375 5 #define IOTHUB_CLIENT_PRIVATE_H
AzureIoTClient 16:deba40344375 6
AzureIoTClient 16:deba40344375 7 #include <signal.h>
AzureIoTClient 16:deba40344375 8
AzureIoTClient 16:deba40344375 9 #include "macro_utils.h"
AzureIoTClient 16:deba40344375 10 #include "threadapi.h"
AzureIoTClient 16:deba40344375 11 #include "lock.h"
AzureIoTClient 16:deba40344375 12 #include "crt_abstractions.h"
AzureIoTClient 16:deba40344375 13
AzureIoTClient 16:deba40344375 14 #include "doublylinkedlist.h"
AzureIoTClient 16:deba40344375 15 #include "iothub_message.h"
AzureIoTClient 16:deba40344375 16 #include "iothub_client_ll.h"
AzureIoTClient 16:deba40344375 17
AzureIoTClient 16:deba40344375 18 #ifdef __cplusplus
AzureIoTClient 16:deba40344375 19 extern "C"
AzureIoTClient 16:deba40344375 20 {
AzureIoTClient 16:deba40344375 21 #endif
AzureIoTClient 16:deba40344375 22
AzureIoTClient 16:deba40344375 23 #define IOTHUB_BATCHSTATE_RESULT_VALUES IOTHUB_BATCHSTATE_SUCCESS, \
AzureIoTClient 16:deba40344375 24 IOTHUB_BATCHSTATE_FAILED
AzureIoTClient 16:deba40344375 25
AzureIoTClient 16:deba40344375 26 DEFINE_ENUM(IOTHUB_BATCHSTATE_RESULT, IOTHUB_BATCHSTATE_RESULT_VALUES);
AzureIoTClient 16:deba40344375 27
AzureIoTClient 16:deba40344375 28 #define EVENT_ENDPOINT "/messages/events"
AzureIoTClient 16:deba40344375 29 #define MESSAGE_ENDPOINT "/messages/devicebound"
AzureIoTClient 16:deba40344375 30 #define MESSAGE_ENDPOINT_HTTP "/messages/devicebound"
AzureIoTClient 16:deba40344375 31 #define MESSAGE_ENDPOINT_HTTP_ETAG "/messages/devicebound/"
AzureIoTClient 22:b8732db970af 32 #define CLIENT_DEVICE_TYPE_PREFIX "iothubclient/"
AzureIoTClient 16:deba40344375 33 #define CBS_REPLY_TO "cbs"
AzureIoTClient 16:deba40344375 34 #define CBS_ENDPOINT "/$" CBS_REPLY_TO
AzureIoTClient 16:deba40344375 35 #define API_VERSION "?api-version=2015-08-15-preview"
AzureIoTClient 16:deba40344375 36 #define REJECT_QUERY_PARAMETER "&reject"
AzureIoTClient 16:deba40344375 37 #define PROTON_EVENT_OUTGOING_WINDOW_SIZE (10)
AzureIoTClient 16:deba40344375 38 #define PROTON_CBS_OUTGOING_WINDOW_SIZE (1)
AzureIoTClient 16:deba40344375 39 #define PROTON_MESSAGE_INCOMING_WINDOW_SIZE (1)
AzureIoTClient 16:deba40344375 40 #define PROTON_CBS_INCOMING_WINDOW_SIZE (1)
AzureIoTClient 16:deba40344375 41 #define PROTON_INCOMING_WINDOW_SIZE (PROTON_MESSAGE_INCOMING_WINDOW_SIZE + PROTON_CBS_INCOMING_WINDOW_SIZE)
AzureIoTClient 16:deba40344375 42 #define PROTON_OUTGOING_WINDOW_SIZE (PROTON_EVENT_OUTGOING_WINDOW_SIZE + PROTON_CBS_OUTGOING_WINDOW_SIZE)
AzureIoTClient 16:deba40344375 43 #define PROTON_PROCESSING_YIELD_IN_MILLISECONDS (100)
AzureIoTClient 16:deba40344375 44 #define PROTON_MESSENGER_STOP_TRIES (10)
AzureIoTClient 16:deba40344375 45 #define PROTON_MAXIMUM_EVENT_LENGTH (256*1024)
AzureIoTClient 16:deba40344375 46
AzureIoTClient 16:deba40344375 47
AzureIoTClient 16:deba40344375 48
AzureIoTClient 16:deba40344375 49 extern void IoTHubClient_LL_SendComplete(IOTHUB_CLIENT_LL_HANDLE handle, PDLIST_ENTRY completed, IOTHUB_BATCHSTATE_RESULT result);
AzureIoTClient 16:deba40344375 50 extern IOTHUBMESSAGE_DISPOSITION_RESULT IoTHubClient_LL_MessageCallback(IOTHUB_CLIENT_LL_HANDLE handle, IOTHUB_MESSAGE_HANDLE message);
AzureIoTClient 16:deba40344375 51
AzureIoTClient 16:deba40344375 52 typedef struct IOTHUBTRANSPORT_CONFIG_TAG
AzureIoTClient 16:deba40344375 53 {
AzureIoTClient 16:deba40344375 54 const IOTHUB_CLIENT_CONFIG* upperConfig;
AzureIoTClient 16:deba40344375 55 PDLIST_ENTRY waitingToSend;
AzureIoTClient 16:deba40344375 56 }IOTHUBTRANSPORT_CONFIG;
AzureIoTClient 16:deba40344375 57
AzureIoTClient 16:deba40344375 58 typedef struct IOTHUB_MESSAGE_LIST_TAG
AzureIoTClient 16:deba40344375 59 {
AzureIoTClient 16:deba40344375 60 IOTHUB_MESSAGE_HANDLE messageHandle;
AzureIoTClient 16:deba40344375 61 IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK callback;
AzureIoTClient 16:deba40344375 62 void* context;
AzureIoTClient 16:deba40344375 63 DLIST_ENTRY entry;
AzureIoTClient 16:deba40344375 64 }IOTHUB_MESSAGE_LIST;
AzureIoTClient 16:deba40344375 65
AzureIoTClient 16:deba40344375 66 typedef void* TRANSPORT_HANDLE;
AzureIoTClient 16:deba40344375 67
AzureIoTClient 16:deba40344375 68 typedef IOTHUB_CLIENT_RESULT(*pfIoTHubTransport_SetOption)(TRANSPORT_HANDLE handle, const char *optionName, const void* value);
AzureIoTClient 16:deba40344375 69 typedef TRANSPORT_HANDLE(*pfIoTHubTransport_Create)(const IOTHUBTRANSPORT_CONFIG* config);
AzureIoTClient 16:deba40344375 70 typedef void (*pfIoTHubTransport_Destroy)(TRANSPORT_HANDLE handle);
AzureIoTClient 16:deba40344375 71 typedef int (*pfIoTHubTransport_Subscribe)(TRANSPORT_HANDLE handle);
AzureIoTClient 16:deba40344375 72 typedef void (*pfIoTHubTransport_Unsubscribe)(TRANSPORT_HANDLE handle);
AzureIoTClient 16:deba40344375 73 typedef void (*pfIoTHubTransport_DoWork)(TRANSPORT_HANDLE handle, IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle);
AzureIoTClient 16:deba40344375 74 typedef IOTHUB_CLIENT_RESULT(*pfIoTHubTransport_GetSendStatus)(TRANSPORT_HANDLE handle, IOTHUB_CLIENT_STATUS *iotHubClientStatus);
AzureIoTClient 16:deba40344375 75
AzureIoTClient 16:deba40344375 76 #define TRANSPORT_PROVIDER_FIELDS \
AzureIoTClient 16:deba40344375 77 pfIoTHubTransport_SetOption IoTHubTransport_SetOption; \
AzureIoTClient 16:deba40344375 78 pfIoTHubTransport_Create IoTHubTransport_Create; \
AzureIoTClient 16:deba40344375 79 pfIoTHubTransport_Destroy IoTHubTransport_Destroy; \
AzureIoTClient 16:deba40344375 80 pfIoTHubTransport_Subscribe IoTHubTransport_Subscribe; \
AzureIoTClient 16:deba40344375 81 pfIoTHubTransport_Unsubscribe IoTHubTransport_Unsubscribe; \
AzureIoTClient 16:deba40344375 82 pfIoTHubTransport_DoWork IoTHubTransport_DoWork; \
AzureIoTClient 16:deba40344375 83 pfIoTHubTransport_GetSendStatus IoTHubTransport_GetSendStatus /*there's an intentional missing ; on this line*/ \
AzureIoTClient 16:deba40344375 84
AzureIoTClient 16:deba40344375 85 typedef struct TRANSPORT_PROVIDER_TAG
AzureIoTClient 16:deba40344375 86 {
AzureIoTClient 16:deba40344375 87 TRANSPORT_PROVIDER_FIELDS;
AzureIoTClient 16:deba40344375 88 }TRANSPORT_PROVIDER;
AzureIoTClient 16:deba40344375 89
AzureIoTClient 16:deba40344375 90 #ifdef __cplusplus
AzureIoTClient 16:deba40344375 91 }
AzureIoTClient 16:deba40344375 92 #endif
AzureIoTClient 16:deba40344375 93
AzureIoTClient 16:deba40344375 94 #endif /* IOTHUB_CLIENT_PRIVATE_H */