Mark Radbourne / Mbed 2 deprecated FXOS8700CQ_To_Azure_IoT

Dependencies:   azure_umqtt_c iothub_mqtt_transport mbed-rtos mbed wolfSSL Socket lwip-eth lwip-sys lwip

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers iothub_client_private.h Source File

iothub_client_private.h

00001 // Copyright (c) Microsoft. All rights reserved.
00002 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
00003 
00004 #ifndef IOTHUB_CLIENT_PRIVATE_H
00005 #define IOTHUB_CLIENT_PRIVATE_H
00006 
00007 #include <signal.h>
00008 
00009 #include "azure_c_shared_utility/macro_utils.h"
00010 #include "azure_c_shared_utility/crt_abstractions.h"
00011 #include "azure_c_shared_utility/doublylinkedlist.h"
00012 #include "azure_c_shared_utility/umock_c_prod.h"
00013 #include "azure_c_shared_utility/constbuffer.h"
00014 
00015 #include "iothub_message.h"
00016 #include "iothub_client_ll.h"
00017 #include "azure_c_shared_utility/macro_utils.h"
00018 #include "azure_c_shared_utility/umock_c_prod.h"
00019 
00020 #ifdef __cplusplus
00021 extern "C"
00022 {
00023 #endif
00024 
00025 #define EVENT_ENDPOINT "/messages/events"
00026 #define MESSAGE_ENDPOINT "/messages/devicebound"
00027 #define MESSAGE_ENDPOINT_HTTP "/messages/devicebound"
00028 #define MESSAGE_ENDPOINT_HTTP_ETAG "/messages/devicebound/"
00029 #define CLIENT_DEVICE_TYPE_PREFIX "iothubclient"
00030 #define CLIENT_DEVICE_BACKSLASH "/"
00031 #define CBS_REPLY_TO "cbs"
00032 #define CBS_ENDPOINT "/$" CBS_REPLY_TO
00033 #define API_VERSION "?api-version=2016-11-14"
00034 #define REJECT_QUERY_PARAMETER "&reject"
00035 
00036 MOCKABLE_FUNCTION(, void, IoTHubClient_LL_SendComplete, IOTHUB_CLIENT_LL_HANDLE, handle, PDLIST_ENTRY, completed, IOTHUB_CLIENT_CONFIRMATION_RESULT, result);
00037 MOCKABLE_FUNCTION(, void, IoTHubClient_LL_ReportedStateComplete, IOTHUB_CLIENT_LL_HANDLE, handle, uint32_t, item_id, int, status_code);
00038 MOCKABLE_FUNCTION(, IOTHUBMESSAGE_DISPOSITION_RESULT, IoTHubClient_LL_MessageCallback, IOTHUB_CLIENT_LL_HANDLE,  handle, IOTHUB_MESSAGE_HANDLE, message);
00039 MOCKABLE_FUNCTION(, void, IoTHubClient_LL_RetrievePropertyComplete, IOTHUB_CLIENT_LL_HANDLE, handle, DEVICE_TWIN_UPDATE_STATE, update_state, const unsigned char*, payLoad, size_t, size);
00040 MOCKABLE_FUNCTION(, int, IoTHubClient_LL_DeviceMethodComplete, IOTHUB_CLIENT_LL_HANDLE, handle, const char*, method_name, const unsigned char*, payLoad, size_t, size, BUFFER_HANDLE, result_payload);
00041 MOCKABLE_FUNCTION(, void, IotHubClient_LL_ConnectionStatusCallBack, IOTHUB_CLIENT_LL_HANDLE, handle, IOTHUB_CLIENT_CONNECTION_STATUS, status, IOTHUB_CLIENT_CONNECTION_STATUS_REASON, reason);
00042 typedef struct IOTHUB_MESSAGE_LIST_TAG
00043 {
00044     IOTHUB_MESSAGE_HANDLE messageHandle;
00045     IOTHUB_CLIENT_EVENT_CONFIRMATION_CALLBACK callback;
00046     void* context; 
00047     DLIST_ENTRY entry;
00048     uint64_t ms_timesOutAfter; /* a value of "0" means "no timeout", if the IOTHUBCLIENT_LL's handle tickcounter > msTimesOutAfer then the message shall timeout*/
00049 }IOTHUB_MESSAGE_LIST;
00050 
00051 typedef struct IOTHUB_DEVICE_TWIN_TAG
00052 {
00053     uint32_t item_id;
00054     uint64_t ms_timesOutAfter; /* a value of "0" means "no timeout", if the IOTHUBCLIENT_LL's handle tickcounter > msTimesOutAfer then the message shall timeout*/
00055     IOTHUB_CLIENT_REPORTED_STATE_CALLBACK reported_state_callback;
00056     CONSTBUFFER_HANDLE report_data_handle;
00057     void* context;
00058     DLIST_ENTRY entry;
00059 } IOTHUB_DEVICE_TWIN;
00060 union IOTHUB_IDENTITY_INFO_TAG
00061 {
00062     IOTHUB_DEVICE_TWIN* device_twin;
00063     IOTHUB_MESSAGE_LIST* iothub_message;
00064 };
00065 
00066 
00067 #ifdef __cplusplus
00068 }
00069 #endif
00070 
00071 #endif /* IOTHUB_CLIENT_PRIVATE_H */