CEF4Delphi/docs/html/uCEFInterfaces.ICefResponseFilter.html
Salvador Díaz Fau 82f6d8eeb6 Added more code comments.
Added documentation for ICefResponseFilter, TCustomResponseFilter, TCefResponseFilterRef and TCefResponseFilterOwn
2024-04-20 17:46:13 +02:00

109 lines
6.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>cef4delphi: uCEFInterfaces: Interface ICefResponseFilter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="ICefResponseFilter"></span><h1 class="cio">Interface ICefResponseFilter</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section">Properties</div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uCEFInterfaces.html">uCEFInterfaces</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type ICefResponseFilter = interface(<a class="normal" href="uCEFInterfaces.ICefBaseRefCounted.html">ICefBaseRefCounted</a>)</code></p>
<h2 class="description">Description</h2>
<p>
Implement this interface to filter resource response content. The functions of this interface will be called on the browser process IO thread. </p>
<p>
<p>UNKNOWN
<p>&lt;see href=&quot;<a href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_response_filter_capi.h">https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_response_filter_capi.h</a>&quot;&gt;CEF source file: /include/capi/cef_response_filter_capi.h (cef_response_filter_t))</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">IInterface</li>
<li class="ancestor"><a class="normal" href="uCEFInterfaces.ICefBaseRefCounted.html">ICefBaseRefCounted</a></li>
<li class="thisitem">ICefResponseFilter</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFInterfaces.ICefResponseFilter.html#InitFilter">InitFilter</a></strong>: Boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>function <strong><a href="uCEFInterfaces.ICefResponseFilter.html#Filter-Pointer-NativeUInt-NativeUInt-Pointer-NativeUInt-NativeUInt-">Filter</a></strong>(data_in: Pointer; data_in_size: <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>; var data_in_read: <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>; data_out: Pointer; data_out_size : <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>; var data_out_written: <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>): <a href="uCEFTypes.html#TCefResponseFilterStatus">TCefResponseFilterStatus</a>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="InitFilter"></span><code>function <strong>InitFilter</strong>: Boolean;</code></td>
</tr>
<tr><td colspan="2">
<p>
Initialize the response filter. Will only be called a single time. The filter will not be installed if this function returns false (0). </p>
<h6 class="description_section">Attributes</h6>
<dl class="attributes">
<dt>GUID['{5013BC3C-F1AE-407A-A571-A4C6B1D6831E}']</dt>
<dd></dd>
</dl>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Filter-Pointer-NativeUInt-NativeUInt-Pointer-NativeUInt-NativeUInt-"></span><code>function <strong>Filter</strong>(data_in: Pointer; data_in_size: <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>; var data_in_read: <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>; data_out: Pointer; data_out_size : <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>; var data_out_written: <a href="uCEFTypes.html#NativeUInt">NativeUInt</a>): <a href="uCEFTypes.html#TCefResponseFilterStatus">TCefResponseFilterStatus</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
<p>Called to filter a chunk of data. Expected usage is as follows:
<p></p>
<pre class="preformatted">
1. Read input data from |data_in| and set |data_in_read| to the number of
bytes that were read up to a maximum of |data_in_size|. |data_in| will
be NULL if |data_in_size| is zero.
2. Write filtered output data to |data_out| and set |data_out_written| to
the number of bytes that were written up to a maximum of
|data_out_size|. If no output data was written then all data must be
read from |data_in| (user must set |data_in_read| = |data_in_size|).
3. Return RESPONSE_FILTER_DONE if all output data was written or
RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.</pre>
<p>
<p>This function will be called repeatedly until the input buffer has been fully read (user sets |data_in_read| = |data_in_size|) and there is no more input data to filter (the resource response is complete). This function may then be called an additional time with an NULL input buffer if the user filled the output buffer (set |data_out_written| = |data_out_size|) and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is still pending.
<p>Calls to this function will stop when one of the following conditions is met:
<p></p>
<pre class="preformatted">
1. There is no more input data to filter (the resource response is
complete) and the user sets |data_out_written| = 0 or returns
RESPONSE_FILTER_DONE to indicate that all data has been written, or;
2. The user returns RESPONSE_FILTER_ERROR to indicate an error.</pre>
<p>
<p>Do not keep a reference to the buffers passed to this function.
<p></p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>