1 #ifndef __SCHRO_BUFFERLIST_H__
2 #define __SCHRO_BUFFERLIST_H__
4 #include <schroedinger/schroutils.h>
5 #include <schroedinger/schrobuffer.h>
6 #include <schroedinger/schrolist.h>
10 #ifdef SCHRO_ENABLE_UNSTABLE_API
12 typedef struct _SchroBufferList SchroBufferList
;
14 struct _SchroBufferList
20 /* stashed tag for use in next extraction */
24 SchroBufferList
*schro_buflist_new (void);
25 void schro_buflist_free (SchroBufferList
*buflist
);
26 void schro_buflist_append (SchroBufferList
*buflist
, SchroBuffer
*buf
);
27 int schro_buflist_peekbytes (uint8_t *dst
, unsigned len
, SchroBufferList
*buflist
, unsigned offset
);
28 int schro_buflist_findbytes (SchroBufferList
*buflist
, unsigned *start
, const uint8_t *needle
, unsigned needle_len
);
29 void schro_buflist_flush (SchroBufferList
*buflist
, unsigned amount
);
30 SchroBuffer
* schro_buflist_extract (SchroBufferList
*buflist
, unsigned start
, unsigned len
);