uLib
ustream.h
Go to the documentation of this file.
1 // Copyright (c) Microsoft. All rights reserved.
2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3 
10 #ifndef AZ_USTREAM_H
11 #define AZ_USTREAM_H
12 
13 #include "ustream_base.h"
14 
15 #include "azure_macro_utils/macro_utils.h"
16 #include "umock_c/umock_c_prod.h"
17 
18 #ifdef __cplusplus
19 #include <cstdint>
20 #include <cstddef>
21 extern "C" {
22 #else
23 #include <stdint.h>
24 #include <stddef.h>
25 #include <stdbool.h>
26 #endif /* __cplusplus */
27 
63 AZ_ULIB_RESULT az_ustream_init(AZ_USTREAM* ustream_instance,AZ_USTREAM_DATA_CB* ustream_control_block,AZ_RELEASE_CALLBACK control_block_release,const uint8_t* const data_buffer,size_t data_buffer_length,AZ_RELEASE_CALLBACK data_buffer_release);
64 
65 
92 AZ_ULIB_RESULT az_ustream_concat(AZ_USTREAM* ustream_instance,AZ_USTREAM* ustream_to_concat,AZ_USTREAM_MULTI_DATA_CB* multi_data,AZ_RELEASE_CALLBACK multi_data_release);
93 
119 AZ_ULIB_RESULT az_ustream_split(AZ_USTREAM* ustream_instance,AZ_USTREAM* ustream_instance_split,offset_t split_pos);
120 
121 
122 #ifdef __cplusplus
123 }
124 #endif /* __cplusplus */
125 
126 #endif /* AZ_USTREAM_H */
Structure for data control block.
Definition: ustream_base.h:392
AZ_ULIB_RESULT az_ustream_concat(AZ_USTREAM *ustream_instance, AZ_USTREAM *ustream_to_concat, AZ_USTREAM_MULTI_DATA_CB *multi_data, AZ_RELEASE_CALLBACK multi_data_release)
Concatenate a ustream to the existing ustream.
Structure to keep track of concatenated ustreams.
Definition: ustream_base.h:447
Structure for instance control block.
Definition: ustream_base.h:422
AZ_ULIB_RESULT az_ustream_init(AZ_USTREAM *ustream_instance, AZ_USTREAM_DATA_CB *ustream_control_block, AZ_RELEASE_CALLBACK control_block_release, const uint8_t *const data_buffer, size_t data_buffer_length, AZ_RELEASE_CALLBACK data_buffer_release)
Factory to initialize a new ustream.
enum AZ_ULIB_RESULT_TAG AZ_ULIB_RESULT
Enumeration of ulib results.
size_t offset_t
Define offset_t with the same size as size_t.
Definition: ustream_base.h:336
uStream Interface Definition
void(* AZ_RELEASE_CALLBACK)(void *)
Signature of the function to release memory passed to the ustream.
Definition: ustream_base.h:372
AZ_ULIB_RESULT az_ustream_split(AZ_USTREAM *ustream_instance, AZ_USTREAM *ustream_instance_split, offset_t split_pos)
Split a ustream at a given position.