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 f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more
buffer_.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 BUFFER_H 00005 #define BUFFER_H 00006 00007 #ifdef __cplusplus 00008 #include <cstddef> 00009 extern "C" 00010 { 00011 #else 00012 #include <stddef.h> 00013 #include <stdbool.h> 00014 #endif 00015 00016 #include "azure_c_shared_utility/umock_c_prod.h" 00017 00018 typedef struct BUFFER_TAG* BUFFER_HANDLE; 00019 00020 MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_new); 00021 MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_create, const unsigned char*, source, size_t, size); 00022 MOCKABLE_FUNCTION(, void, BUFFER_delete, BUFFER_HANDLE, handle); 00023 MOCKABLE_FUNCTION(, int, BUFFER_pre_build, BUFFER_HANDLE, handle, size_t, size); 00024 MOCKABLE_FUNCTION(, int, BUFFER_build, BUFFER_HANDLE, handle, const unsigned char*, source, size_t, size); 00025 MOCKABLE_FUNCTION(, int, BUFFER_append_build, BUFFER_HANDLE, handle, const unsigned char*, source, size_t, size); 00026 MOCKABLE_FUNCTION(, int, BUFFER_unbuild, BUFFER_HANDLE, handle); 00027 MOCKABLE_FUNCTION(, int, BUFFER_enlarge, BUFFER_HANDLE, handle, size_t, enlargeSize); 00028 MOCKABLE_FUNCTION(, int, BUFFER_shrink, BUFFER_HANDLE, handle, size_t, decreaseSize, bool, fromEnd); 00029 MOCKABLE_FUNCTION(, int, BUFFER_content, BUFFER_HANDLE, handle, const unsigned char**, content); 00030 MOCKABLE_FUNCTION(, int, BUFFER_size, BUFFER_HANDLE, handle, size_t*, size); 00031 MOCKABLE_FUNCTION(, int, BUFFER_append, BUFFER_HANDLE, handle1, BUFFER_HANDLE, handle2); 00032 MOCKABLE_FUNCTION(, int, BUFFER_prepend, BUFFER_HANDLE, handle1, BUFFER_HANDLE, handle2); 00033 MOCKABLE_FUNCTION(, int, BUFFER_fill, BUFFER_HANDLE, handle, unsigned char, fill_char); 00034 MOCKABLE_FUNCTION(, unsigned char*, BUFFER_u_char, BUFFER_HANDLE, handle); 00035 MOCKABLE_FUNCTION(, size_t, BUFFER_length, BUFFER_HANDLE, handle); 00036 MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_clone, BUFFER_HANDLE, handle); 00037 00038 #ifdef __cplusplus 00039 } 00040 #endif 00041 00042 00043 #endif /* BUFFER_H */
Generated on Wed Jul 13 2022 23:38:02 by
1.7.2
