14#include <interface99.h> 
   17#include <smolrtsp/priv/compiler_attrs.h> 
   22#define SmolRTSP_Writer_IFACE                                                  \ 
   31    vfunc99(ssize_t, write, VSelf99, CharSlice99 data)                         \ 
   36    vfunc99(void, lock, VSelf99)                                               \ 
 
   41    vfunc99(void, unlock, VSelf99)                                             \ 
   46    vfunc99(size_t, filled, VSelf99)                                           \ 
   55    vfunc99(int, writef, VSelf99, const char *restrict fmt, ...)               \ 
 
   60    vfunc99(int, vwritef, VSelf99, const char *restrict fmt, va_list ap) 
   74#define SMOLRTSP_WRITE_SLICES(w, ...)                                          \ 
   75    smolrtsp_write_slices(                                                     \ 
   76        w, SLICE99_ARRAY_LEN((const CharSlice99[])__VA_ARGS__),                \ 
   77        (const CharSlice99[])__VA_ARGS__) 
   91    SmolRTSP_Writer w, 
size_t len,
 
   92    const CharSlice99 data[restrict 
static len]) SMOLRTSP_PRIV_MUST_USE;
 
SmolRTSP_Writer smolrtsp_string_writer(char *buffer) SMOLRTSP_PRIV_MUST_USE
A writer that invokes strncat on a provided buffer.
 
SmolRTSP_Writer smolrtsp_fd_writer(int *fd) SMOLRTSP_PRIV_MUST_USE
A writer that invokes write on a provided file descriptor.
 
SmolRTSP_Writer smolrtsp_file_writer(FILE *stream) SMOLRTSP_PRIV_MUST_USE
A writer that invokes fwrite on a provided file pointer.
 
interface99(SmolRTSP_Writer)
Defines the SmolRTSP_Writer interface.
 
ssize_t smolrtsp_write_slices(SmolRTSP_Writer w, size_t len, const CharSlice99 data[restrict static len]) SMOLRTSP_PRIV_MUST_USE
Sequentially writes all items in data to w.