apr_bucket_type_t Struct Reference
[Bucket Brigades]
#include <apr_buckets.h>
Detailed Description
Basic bucket type
Member Enumeration Documentation
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.
- Enumerator:
APR_BUCKET_DATA |
This bucket type represents actual data to send to the client.
|
APR_BUCKET_METADATA |
This bucket type represents metadata.
|
Field Documentation
Copy the bucket structure (not the data), assuming that this is possible for the bucket type. If it's not, APR_ENOTIMPL is returned.
- Parameters:
-
| e | The bucket to copy |
| c | Returns a pointer to the new bucket |
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 implemented for all bucket types, though it might be a no-op on some of them (namely ones that never allocate any private data structures).
- Parameters:
-
| data | The private data pointer from the bucket to be destroyed |
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.
The name of the bucket type
The number of functions this bucket understands. Can not be less than five.
Read the data from the bucket. This is required to be implemented for all bucket types.
- Parameters:
-
| b | The bucket to read from |
| str | A place to store the data read. Allocation should only be done if absolutely necessary. |
| len | The amount of data read. |
| block | Should this read function block if there is more data that cannot be read immediately. |
Make it possible to set aside the data for at least as long as the given pool. Buckets containing data that could potentially die before this pool (e.g. the data resides on the stack, in a child pool of the given pool, or in a disjoint pool) must somehow copy, shift, or transform the data to have the proper lifetime.
- Parameters:
-
Split one bucket in two at the specified position by duplicating the bucket structure (not the data) and modifying any necessary start/end/offset information. If it's not possible to do this for the bucket type (perhaps the length of the data is indeterminate, as with pipe and socket buckets), then APR_ENOTIMPL is returned.
- Parameters:
-
| e | The bucket to split |
| point | The offset of the first byte in the new bucket |
The documentation for this struct was generated from the following file: