LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
stream_fake_provider.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-3.0-or-later
2 * Copyright (C) 2026 Sylvain Labopin
3 */
4
21#ifndef LEXLEO_STREAM_FAKE_PROVIDER_H
22#define LEXLEO_STREAM_FAKE_PROVIDER_H
23
25
27
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
38
48
71 stream_fake_t **out_fake,
72 stream_t **out_stream,
73 const osal_mem_ops_t *mem);
74
85 stream_fake_t **fake,
86 stream_t **stream);
87
95
109 stream_fake_t *fake,
110 size_t n,
111 stream_status_t status);
112
123 stream_fake_t *fake,
124 stream_status_t status);
125
139 stream_fake_t *fake,
140 size_t call_idx,
141 stream_status_t status);
142
153
163size_t stream_fake_written_len(const stream_fake_t *fake);
164
174const uint8_t *stream_fake_written_data(const stream_fake_t *fake);
175
176#ifdef __cplusplus
177}
178#endif
179
180#endif // LEXLEO_STREAM_FAKE_PROVIDER_H
const stream_fake_counters_t * stream_fake_counters(const stream_fake_t *fake)
Return the current call counters recorded by the fake stream.
void stream_fake_set_flush_result(stream_fake_t *fake, stream_status_t status)
Configure the result returned by flush operations.
void stream_fake_destroy(stream_fake_t **fake, stream_t **stream)
Destroy a fake stream backend and its associated public stream.
void stream_fake_fail_write_since(stream_fake_t *fake, size_t call_idx, stream_status_t status)
Make fake writes fail starting from a given call index.
void stream_fake_set_write_result(stream_fake_t *fake, size_t n, stream_status_t status)
Configure the result returned by the next write operations.
void stream_fake_reset(stream_fake_t *fake)
Reset the fake stream runtime state and counters.
size_t stream_fake_written_len(const stream_fake_t *fake)
Return the number of bytes captured by the fake stream.
const uint8_t * stream_fake_written_data(const stream_fake_t *fake)
Return the captured bytes written through the fake stream.
stream_status_t stream_fake_create(stream_fake_t **out_fake, stream_t **out_stream, const osal_mem_ops_t *mem)
Create a fake stream backend and its associated public stream_t.
Borrower-visible public types for the stream port.
stream_status_t
Public status codes used by the stream port.
Call counters recorded by the fake stream.
Private handle structure for a stream_t.