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
amqp_frame_codec.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 AMQP_FRAME_CODEC_H 00005 #define AMQP_FRAME_CODEC_H 00006 00007 #ifdef __cplusplus 00008 extern "C" { 00009 #include <cstdint> 00010 #include <cstddef> 00011 #else 00012 #include <stdint.h> 00013 #include <stddef.h> 00014 #endif /* __cplusplus */ 00015 #include "azure_uamqp_c/frame_codec.h" 00016 00017 #include "azure_c_shared_utility/umock_c_prod.h" 00018 00019 #define AMQP_OPEN (uint64_t)0x10 00020 #define AMQP_BEGIN (uint64_t)0x11 00021 #define AMQP_ATTACH (uint64_t)0x12 00022 #define AMQP_FLOW (uint64_t)0x13 00023 #define AMQP_TRANSFER (uint64_t)0x14 00024 #define AMQP_DISPOSITION (uint64_t)0x15 00025 #define AMQP_DETACH (uint64_t)0x16 00026 #define AMQP_END (uint64_t)0x17 00027 #define AMQP_CLOSE (uint64_t)0x18 00028 00029 typedef struct AMQP_FRAME_CODEC_INSTANCE_TAG* AMQP_FRAME_CODEC_HANDLE; 00030 typedef void(*AMQP_EMPTY_FRAME_RECEIVED_CALLBACK)(void* context, uint16_t channel); 00031 typedef void(*AMQP_FRAME_RECEIVED_CALLBACK)(void* context, uint16_t channel, AMQP_VALUE performative, const unsigned char* payload_bytes, uint32_t frame_payload_size); 00032 typedef void(*AMQP_FRAME_CODEC_ERROR_CALLBACK)(void* context); 00033 00034 MOCKABLE_FUNCTION(, AMQP_FRAME_CODEC_HANDLE, amqp_frame_codec_create, FRAME_CODEC_HANDLE, frame_codec, AMQP_FRAME_RECEIVED_CALLBACK, frame_received_callback, AMQP_EMPTY_FRAME_RECEIVED_CALLBACK, empty_frame_received_callback, AMQP_FRAME_CODEC_ERROR_CALLBACK, amqp_frame_codec_error_callback, void*, callback_context); 00035 MOCKABLE_FUNCTION(, void, amqp_frame_codec_destroy, AMQP_FRAME_CODEC_HANDLE, amqp_frame_codec); 00036 MOCKABLE_FUNCTION(, int, amqp_frame_codec_encode_frame, AMQP_FRAME_CODEC_HANDLE, amqp_frame_codec, uint16_t, channel, const AMQP_VALUE, performative, const PAYLOAD*, payloads, size_t, payload_count, ON_BYTES_ENCODED, on_bytes_encoded, void*, callback_context); 00037 MOCKABLE_FUNCTION(, int, amqp_frame_codec_encode_empty_frame, AMQP_FRAME_CODEC_HANDLE, amqp_frame_codec, uint16_t, channel, ON_BYTES_ENCODED, on_bytes_encoded, void*, callback_context); 00038 00039 #ifdef __cplusplus 00040 } 00041 #endif /* __cplusplus */ 00042 00043 #endif /* AMQP_FRAME_CODEC_H */
Generated on Tue Jul 12 2022 12:43:16 by
