*
* This backend is seekable iff all of the supplied fastbufs are seekable.
*
- * Please note that no cleanup of underlying fastbufs is provided.
+ * You aren't allowed to do anything with the underlying buffers while these
+ * are connected into fbmulti.
*
- * Also, please be aware of direct operations on the underlying buffers. The
- * fbmulti backend doesn't expect it.
+ * The fbmulti is inited by @fbmulti_create(). It returns an empty fbmulti.
+ * Then you call @fbmulti_append() for each fbmulti.
*
- * The last parameter must be NULL.
+ * If @bclose() is called on fbmulti, all the underlying buffers get closed
+ * recursively.
+ *
+ * If you want to keep an underlying fastbuf open after @bclose, just remove it
+ * by @fbmulti_remove where the second parameter is a pointer to the removed
+ * fastbuf. If you pass NULL, all the underlying fastbufs are removed.
+ *
+ * After @fbmulti_remove, the state of the fbmulti is undefined. The only allowed
+ * operation is either another @fbmulti_remove or @bclose on the fbmulti.
***/
-struct fastbuf* fbmulti_create(uns bufsize, ...) SENTINEL_CHECK;
+/**
+ * Create an empty fbmulti
+ **/
+struct fastbuf *fbmulti_create(void);
+
+/**
+ * Append a fb to fbmulti
+ **/
+void fbmulti_append(struct fastbuf *f, struct fastbuf *fb);
+
+/**
+ * Remove a fb from fbmulti
+ **/
+void fbmulti_remove(struct fastbuf *f, struct fastbuf *fb);
/*** === Configuring stream parameters [[bconfig]] ***/