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
constbuffer.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 CONSTBUFFER_H 00005 #define CONSTBUFFER_H 00006 00007 #include "azure_c_shared_utility/buffer_.h" 00008 00009 #ifdef __cplusplus 00010 #include <cstddef> 00011 extern "C" 00012 { 00013 #else 00014 #include <stddef.h> 00015 #endif 00016 00017 #include "azure_c_shared_utility/umock_c_prod.h" 00018 00019 /*this is the handle*/ 00020 typedef struct CONSTBUFFER_HANDLE_DATA_TAG* CONSTBUFFER_HANDLE; 00021 00022 /*this is what is returned when the content of the buffer needs access*/ 00023 typedef struct CONSTBUFFER_TAG 00024 { 00025 const unsigned char* buffer; 00026 size_t size; 00027 } CONSTBUFFER; 00028 00029 /*this creates a new constbuffer from a memory area*/ 00030 MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_Create, const unsigned char*, source, size_t, size); 00031 00032 /*this creates a new constbuffer from an existing BUFFER_HANDLE*/ 00033 MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateFromBuffer, BUFFER_HANDLE, buffer); 00034 00035 MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_Clone, CONSTBUFFER_HANDLE, constbufferHandle); 00036 00037 MOCKABLE_FUNCTION(, const CONSTBUFFER*, CONSTBUFFER_GetContent, CONSTBUFFER_HANDLE, constbufferHandle); 00038 00039 MOCKABLE_FUNCTION(, void, CONSTBUFFER_Destroy, CONSTBUFFER_HANDLE, constbufferHandle); 00040 00041 #ifdef __cplusplus 00042 } 00043 #endif 00044 00045 #endif /* CONSTBUFFER_H */
Generated on Tue Jul 12 2022 12:43:18 by
