Apache2
|
Apache filter library. More...
Go to the source code of this file.
Data Structures | |
union | ap_filter_func |
struct | ap_filter_rec_t |
This structure is used for recording information about the registered filters. It associates a name with the filter's callback and filter type. More... | |
struct | ap_filter_t |
The representation of a filter chain. More... | |
Macros | |
#define | ap_fwrite(f, bb, data, nbyte) apr_brigade_write(bb, ap_filter_flush, f, data, nbyte) |
#define | ap_fputs(f, bb, str) apr_brigade_write(bb, ap_filter_flush, f, str, strlen(str)) |
#define | ap_fputc(f, bb, c) apr_brigade_putc(bb, ap_filter_flush, f, c) |
#define | AP_FILTER_PROTO_CHANGE 0x1 |
#define | AP_FILTER_PROTO_CHANGE_LENGTH 0x2 |
#define | AP_FILTER_PROTO_NO_BYTERANGE 0x4 |
#define | AP_FILTER_PROTO_NO_PROXY 0x8 |
#define | AP_FILTER_PROTO_NO_CACHE 0x10 |
#define | AP_FILTER_PROTO_TRANSFORM 0x20 |
#define | AP_BUCKET_IS_WC(e) |
Typedefs | |
typedef struct ap_filter_t | ap_filter_t |
typedef struct ap_filter_rec_t | ap_filter_rec_t |
typedef struct ap_filter_provider_t | ap_filter_provider_t |
Filter callbacks | |
This function type is used for filter callbacks. It will be passed a pointer to "this" filter, and a "bucket brigade" containing the content to be filtered. In filter->ctx, the callback will find its context. This context is provided here, so that a filter may be installed multiple times, each receiving its own per-install context pointer. Callbacks are associated with a filter definition, which is specified by name. See ap_register_input_filter() and ap_register_output_filter() for setting the association between a name for a filter and its associated callback (and other information). If the initialization function argument passed to the registration functions is non-NULL, it will be called iff the filter is in the input or output filter chains and before any data is generated to allow the filter to prepare for processing. The bucket brigade always belongs to the caller, but the filter is free to use the buckets within it as it sees fit. Normally, the brigade will be returned empty. Buckets may not be retained between successive calls to the filter unless they have been "set aside" with a call apr_bucket_setaside. Typically this will be done with ap_save_brigade(). Buckets removed from the brigade become the responsibility of the filter, which must arrange for them to be deleted, either by doing so directly or by inserting them in a brigade which will subsequently be destroyed. For the input and output filters, the return value of a filter should be an APR status value. For the init function, the return value should be an HTTP error code or OK if it was successful. | |
typedef apr_status_t(* | ap_out_filter_func) (ap_filter_t *f, apr_bucket_brigade *b) |
typedef apr_status_t(* | ap_in_filter_func) (ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) |
typedef int(* | ap_init_filter_func) (ap_filter_t *f) |
typedef union ap_filter_func | ap_filter_func |
Enumerations | |
enum | ap_input_mode_t { AP_MODE_READBYTES , AP_MODE_GETLINE , AP_MODE_EATCRLF , AP_MODE_SPECULATIVE , AP_MODE_EXHAUSTIVE , AP_MODE_INIT } |
input filtering modes More... | |
enum | ap_filter_type { AP_FTYPE_RESOURCE = 10 , AP_FTYPE_CONTENT_SET = 20 , AP_FTYPE_PROTOCOL = 30 , AP_FTYPE_TRANSCODE = 40 , AP_FTYPE_CONNECTION = 50 , AP_FTYPE_NETWORK = 60 } |
enum | ap_filter_direction_e { AP_FILTER_INPUT = 1 , AP_FILTER_OUTPUT = 2 } |
Variables | |
AP_DECLARE_DATA const char | ap_bucket_wc_data |
Write Completion (WC) bucket. More... | |
Apache filter library.
enum ap_input_mode_t |
input filtering modes