20 #ifndef FREERDP_UTILS_RINGBUFFER_H
21 #define FREERDP_UTILS_RINGBUFFER_H
23 #include <winpr/wtypes.h>
24 #include <freerdp/api.h>
55 FREERDP_API BOOL ringbuffer_init(
RingBuffer* rb,
size_t initialSize);
62 FREERDP_API
void ringbuffer_destroy(
RingBuffer* ringbuffer);
70 FREERDP_API
size_t ringbuffer_used(
const RingBuffer* ringbuffer);
77 FREERDP_API
size_t ringbuffer_capacity(
const RingBuffer* ringbuffer);
87 FREERDP_API BOOL ringbuffer_write(
RingBuffer* rb,
const BYTE* ptr,
size_t sz);
96 FREERDP_API BYTE* ringbuffer_ensure_linear_write(
RingBuffer* rb,
size_t sz);
107 FREERDP_API BOOL ringbuffer_commit_written_bytes(
RingBuffer* rb,
size_t sz);
125 FREERDP_API
void ringbuffer_commit_read_bytes(
RingBuffer* rb,
size_t sz);
a piece of data in the ring buffer, exactly like a glibc iovec