Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: STM32F746_iothub_client_sample_mqtt
Fork of iothub_client by
iothub_client_private.h@34:578a1a3636cc, 2016-02-04 (annotated)
- Committer:
- Azure.IoT Build
- Date:
- Thu Feb 04 11:28:52 2016 -0800
- Revision:
- 34:578a1a3636cc
- Parent:
- 32:6e9d81a62085
- Child:
- 36:67300d5a4c1f
1.0.0
Who changed what in which revision?
| User | Revision | Line number | New 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 | 32:6e9d81a62085 | 32 | #define CLIENT_DEVICE_TYPE_PREFIX "iothubclient" |
| AzureIoTClient | 32:6e9d81a62085 | 33 | #define CLIENT_DEVICE_BACKSLASH "/" |
| AzureIoTClient | 16:deba40344375 | 34 | #define CBS_REPLY_TO "cbs" |
| AzureIoTClient | 16:deba40344375 | 35 | #define CBS_ENDPOINT "/$" CBS_REPLY_TO |
| Azure.IoT Build | 34:578a1a3636cc | 36 | #define API_VERSION "?api-version=2016-02-03" |
| AzureIoTClient | 16:deba40344375 | 37 | #define REJECT_QUERY_PARAMETER "&reject" |
| AzureIoTClient | 16:deba40344375 | 38 | |
| AzureIoTClient | 16:deba40344375 | 39 | extern void IoTHubClient_LL_SendComplete(IOTHUB_CLIENT_LL_HANDLE handle, PDLIST_ENTRY completed, IOTHUB_BATCHSTATE_RESULT result); |
| AzureIoTClient | 16:deba40344375 | 40 | extern IOTHUBMESSAGE_DISPOSITION_RESULT IoTHubClient_LL_MessageCallback(IOTHUB_CLIENT_LL_HANDLE handle, IOTHUB_MESSAGE_HANDLE message); |
| AzureIoTClient | 16:deba40344375 | 41 | |
| AzureIoTClient | 16:deba40344375 | 42 | typedef struct IOTHUBTRANSPORT_CONFIG_TAG |
| AzureIoTClient | 16:deba40344375 | 43 | { |
| AzureIoTClient | 16:deba40344375 | 44 | const IOTHUB_CLIENT_CONFIG* upperConfig; |
| AzureIoTClient | 16:deba40344375 | 45 | PDLIST_ENTRY waitingToSend; |
| AzureIoTClient | 16:deba40344375 | 46 | }IOTHUBTRANSPORT_CONFIG; |
| AzureIoTClient | 16:deba40344375 | 47 | |
| AzureIoTClient | 16:deba40344375 | 48 | typedef struct IOTHUB_MESSAGE_LIST_TAG |
| AzureIoTClient | 16:deba40344375 | 49 | { |
| AzureIoTClient | 16:deba40344375 | 50 | IOTHUB_MESSAGE_HANDLE messageHandle; |
| AzureIoTClient | 16:deba40344375 | 51 | IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK callback; |
| AzureIoTClient | 16:deba40344375 | 52 | void* context; |
| AzureIoTClient | 16:deba40344375 | 53 | DLIST_ENTRY entry; |
| AzureIoTClient | 16:deba40344375 | 54 | }IOTHUB_MESSAGE_LIST; |
| AzureIoTClient | 16:deba40344375 | 55 | |
| AzureIoTClient | 16:deba40344375 | 56 | typedef void* TRANSPORT_HANDLE; |
| AzureIoTClient | 16:deba40344375 | 57 | |
| AzureIoTClient | 16:deba40344375 | 58 | typedef IOTHUB_CLIENT_RESULT(*pfIoTHubTransport_SetOption)(TRANSPORT_HANDLE handle, const char *optionName, const void* value); |
| AzureIoTClient | 16:deba40344375 | 59 | typedef TRANSPORT_HANDLE(*pfIoTHubTransport_Create)(const IOTHUBTRANSPORT_CONFIG* config); |
| AzureIoTClient | 16:deba40344375 | 60 | typedef void (*pfIoTHubTransport_Destroy)(TRANSPORT_HANDLE handle); |
| AzureIoTClient | 16:deba40344375 | 61 | typedef int (*pfIoTHubTransport_Subscribe)(TRANSPORT_HANDLE handle); |
| AzureIoTClient | 16:deba40344375 | 62 | typedef void (*pfIoTHubTransport_Unsubscribe)(TRANSPORT_HANDLE handle); |
| AzureIoTClient | 16:deba40344375 | 63 | typedef void (*pfIoTHubTransport_DoWork)(TRANSPORT_HANDLE handle, IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle); |
| AzureIoTClient | 16:deba40344375 | 64 | typedef IOTHUB_CLIENT_RESULT(*pfIoTHubTransport_GetSendStatus)(TRANSPORT_HANDLE handle, IOTHUB_CLIENT_STATUS *iotHubClientStatus); |
| AzureIoTClient | 16:deba40344375 | 65 | |
| AzureIoTClient | 16:deba40344375 | 66 | #define TRANSPORT_PROVIDER_FIELDS \ |
| AzureIoTClient | 16:deba40344375 | 67 | pfIoTHubTransport_SetOption IoTHubTransport_SetOption; \ |
| AzureIoTClient | 16:deba40344375 | 68 | pfIoTHubTransport_Create IoTHubTransport_Create; \ |
| AzureIoTClient | 16:deba40344375 | 69 | pfIoTHubTransport_Destroy IoTHubTransport_Destroy; \ |
| AzureIoTClient | 16:deba40344375 | 70 | pfIoTHubTransport_Subscribe IoTHubTransport_Subscribe; \ |
| AzureIoTClient | 16:deba40344375 | 71 | pfIoTHubTransport_Unsubscribe IoTHubTransport_Unsubscribe; \ |
| AzureIoTClient | 16:deba40344375 | 72 | pfIoTHubTransport_DoWork IoTHubTransport_DoWork; \ |
| AzureIoTClient | 16:deba40344375 | 73 | pfIoTHubTransport_GetSendStatus IoTHubTransport_GetSendStatus /*there's an intentional missing ; on this line*/ \ |
| AzureIoTClient | 16:deba40344375 | 74 | |
| AzureIoTClient | 16:deba40344375 | 75 | typedef struct TRANSPORT_PROVIDER_TAG |
| AzureIoTClient | 16:deba40344375 | 76 | { |
| AzureIoTClient | 16:deba40344375 | 77 | TRANSPORT_PROVIDER_FIELDS; |
| AzureIoTClient | 16:deba40344375 | 78 | }TRANSPORT_PROVIDER; |
| AzureIoTClient | 16:deba40344375 | 79 | |
| AzureIoTClient | 16:deba40344375 | 80 | #ifdef __cplusplus |
| AzureIoTClient | 16:deba40344375 | 81 | } |
| AzureIoTClient | 16:deba40344375 | 82 | #endif |
| AzureIoTClient | 16:deba40344375 | 83 | |
| AzureIoTClient | 16:deba40344375 | 84 | #endif /* IOTHUB_CLIENT_PRIVATE_H */ |
