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.
Dependencies: EthernetInterface NTPClient iothub_amqp_transport iothub_client mbed-rtos mbed
Fork of iothub_client_sample_amqp by
message_receiver.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 MESSAGE_RECEIVER_H 00005 #define MESSAGE_RECEIVER_H 00006 00007 #include "azure_uamqp_c/link.h" 00008 #include "azure_uamqp_c/message.h" 00009 #include "azure_uamqp_c/amqp_definitions.h" 00010 00011 #ifdef __cplusplus 00012 extern "C" { 00013 #endif /* __cplusplus */ 00014 00015 #include "azure_c_shared_utility/umock_c_prod.h" 00016 00017 typedef enum MESSAGE_RECEIVER_STATE_TAG 00018 { 00019 MESSAGE_RECEIVER_STATE_IDLE, 00020 MESSAGE_RECEIVER_STATE_OPENING, 00021 MESSAGE_RECEIVER_STATE_OPEN, 00022 MESSAGE_RECEIVER_STATE_CLOSING, 00023 MESSAGE_RECEIVER_STATE_ERROR 00024 } MESSAGE_RECEIVER_STATE; 00025 00026 typedef struct MESSAGE_RECEIVER_INSTANCE_TAG* MESSAGE_RECEIVER_HANDLE; 00027 typedef AMQP_VALUE (*ON_MESSAGE_RECEIVED)(const void* context, MESSAGE_HANDLE message); 00028 typedef void(*ON_MESSAGE_RECEIVER_STATE_CHANGED)(const void* context, MESSAGE_RECEIVER_STATE new_state, MESSAGE_RECEIVER_STATE previous_state); 00029 00030 MOCKABLE_FUNCTION(, MESSAGE_RECEIVER_HANDLE, messagereceiver_create, LINK_HANDLE, link, ON_MESSAGE_RECEIVER_STATE_CHANGED, on_message_receiver_state_changed, void*, context); 00031 MOCKABLE_FUNCTION(, void, messagereceiver_destroy, MESSAGE_RECEIVER_HANDLE, message_receiver); 00032 MOCKABLE_FUNCTION(, int, messagereceiver_open, MESSAGE_RECEIVER_HANDLE, message_receiver, ON_MESSAGE_RECEIVED, on_message_received, const void*, callback_context); 00033 MOCKABLE_FUNCTION(, int, messagereceiver_close, MESSAGE_RECEIVER_HANDLE, message_receiver); 00034 00035 #ifdef __cplusplus 00036 } 00037 #endif /* __cplusplus */ 00038 00039 #endif /* MESSAGE_RECEIVER_H */
Generated on Tue Jul 12 2022 12:43:21 by
