]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/fastbuf.h
UCW::CGI: Documented the changes
[libucw.git] / ucw / fastbuf.h
index aeda6da2e63e451a34d0fa83d9873825f338601a..4f0d99d3190be67c6fad8ae22e4e11a46760167d 100644 (file)
@@ -488,15 +488,37 @@ static inline void fbatomic_commit(struct fastbuf *b)
  *
  * This backend is seekable iff all of the supplied fastbufs are seekable.
  *
  *
  * 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]] ***/
 
 
 /*** === Configuring stream parameters [[bconfig]] ***/