Home | History | Annotate | Download | only in base

Lines Matching defs:Filter

5 // Filter performs filtering on data streams. Sample usage:
9 // Filter* filter = Filter::Factory(filter_type, size);
10 // int pre_filter_data_len = filter->stream_buffer_size();
11 // pre_filter_source->read(filter->stream_buffer(), pre_filter_data_len);
13 // filter->FlushStreamBuffer(pre_filter_data_len);
17 // filter->ReadFilteredData(post_filter_buf, &post_filter_data_len);
19 // To filter a data stream, the caller first gets filter's stream_buffer_
20 // through its accessor and fills in stream_buffer_ with pre-filter data, next
21 // calls FlushStreamBuffer to notify Filter, then calls ReadFilteredData
27 // The lifetime of a Filter instance is completely controlled by its caller.
49 // supplied by the owner of this filter. In the case where there are a chain of
89 // pushed into a filter for processing)?
109 class Filter {
116 // consumed by the filter, but more data is needed in order to continue
117 // filtering. At this point, the caller is free to reuse the filter
120 // Read filtered data successfully, and filter reaches the end of the data
137 virtual ~Filter();
139 // Creates a Filter object.
140 // Parameters: Filter_types specifies the type of filter created;
144 // If success, the function returns the pointer to the Filter object created.
145 // If failed or a filter is not needed, the function returns NULL.
147 // Note: filter_types is an array of filter names (content encoding types as
153 // filter will be sdch decoded.
154 static Filter* Factory(const std::vector<FilterType>& filter_types,
157 // External call to obtain data from this filter chain. If ther is no
158 // next_filter_, then it obtains data from this specific filter.
175 // stream_buffer_, the caller should call this function to notify Filter to
186 // Translate the text of a filter name (from Content-Encoding header) into a
201 explicit Filter(const FilterContext& filter_context);
211 // This function will fail if there is no pre-filter data in the
213 // return. For example, a decoding filter may process some pre-filter data
217 // Copy pre-filter data directly to destination buffer without decoding.
239 // called multiple times during the filter creation process. In most simple
241 // filter_list) if a new filter can't be constructed.
242 static Filter* PrependNewFilter(FilterType type_id,
244 Filter* filter_list);
251 // Helper function to empty our output into the next filter's input.
254 // An optional filter to process output from this filter.
255 scoped_ptr<Filter> next_filter_;
256 // Remember what status or local filter last returned so we can better handle
260 // Context data from the owner of this filter. Some filters need additional
265 DISALLOW_COPY_AND_ASSIGN(Filter);