jwoolley 2002/06/02 13:17:52
Modified: include apr_buckets.h
Log:
Add a little extra docco
Revision Changes Path
1.142 +17 -9 apr-util/include/apr_buckets.h
Index: apr_buckets.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_buckets.h,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -d -u -r1.141 -r1.142
--- apr_buckets.h 2 Jun 2002 19:54:49 -0000 1.141
+++ apr_buckets.h 2 Jun 2002 20:17:52 -0000 1.142
@@ -152,11 +152,6 @@
typedef struct apr_bucket apr_bucket;
typedef struct apr_bucket_alloc_t apr_bucket_alloc_t;
-/** This bucket type represents actual data to send to the client. */
-#define APR_BUCKET_DATA 0
-/** This bucket type represents metadata. */
-#define APR_BUCKET_METADATA 1
-
typedef struct apr_bucket_type_t apr_bucket_type_t;
struct apr_bucket_type_t {
/**
@@ -169,9 +164,21 @@
*/
int num_func;
/**
- * Does the bucket contain metadata
+ * Whether the bucket contains metadata (ie, information that
+ * describes the regular contents of the brigade). The metadata
+ * is not returned by apr_bucket_read() and is not indicated by
+ * the ->length of the apr_bucket itself. In other words, an
+ * empty bucket is safe to arbitrarily remove if and only if it
+ * contains no metadata. In this sense, "data" is just raw bytes
+ * that are the "content" of the brigade and "metadata" describes
+ * that data but is not a proper part of it.
*/
- int is_metadata;
+ enum {
+ /** This bucket type represents actual data to send to the client. */
+ APR_BUCKET_DATA = 0,
+ /** This bucket type represents metadata. */
+ APR_BUCKET_METADATA = 1
+ } is_metadata;
/**
* Free the private data and any resources used by the bucket (if they
* aren't shared with another bucket). This function is required to be
@@ -456,7 +463,8 @@
#define APR_BUCKET_INIT(e) APR_RING_ELEM_INIT((e), link)
/**
- * Determind if a bucket contains metadata
+ * Determine if a bucket contains metadata. An empty bucket is
+ * safe to arbitrarily remove if and only if this is false.
* @param e The bucket to inspect
* @return true or false
*/
|