Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > bdcd72668be70f58bf0aa7c2102b0734 > files > 164

lib64apr-util-devel-1.2.12-4mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Apache Portable Runtime Utility Library: apr_bucket_type_t Struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul>
</div>
<h1>apr_bucket_type_t Struct Reference<br>
<small>
[<a class="el" href="group___a_p_r___util___bucket___brigades.html">Bucket Brigades</a>]</small>
</h1><!-- doxytag: class="apr_bucket_type_t" --><code>#include &lt;<a class="el" href="apr__buckets_8h-source.html">apr_buckets.h</a>&gt;</code>
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="structapr__bucket__type__t.html#117f85e4a58c5e7d7e373705ad138f8553d3ef9d6a275fe2b72a91acea7017d5">APR_BUCKET_DATA</a> =  0, 
<a class="el" href="structapr__bucket__type__t.html#117f85e4a58c5e7d7e373705ad138f859bf38b4eb3ea41c4af230432ac7a5fb1">APR_BUCKET_METADATA</a> =  1
 }</td></tr>

<tr><td colspan="2"><br><h2>Data Fields</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#c6d779be45de214c6abd2cc205c48901">name</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#d4bd2ffb03cb2f5f3b3941ce20468038">num_func</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="34cef542a8eee5bb734ba8dcd8329711"></a><!-- doxytag: member="apr_bucket_type_t::is_metadata" ref="34cef542a8eee5bb734ba8dcd8329711" args="" -->
enum apr_bucket_type_t:: { ... } &nbsp;</td><td class="memItemRight" valign="bottom"><b>is_metadata</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#a5a8ae7611ba3be480e3fd12ff3ac352">destroy</a> )(void *data)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">apr_status_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#8e9f3f5b2a5513691f3cea130a1aa54b">read</a> )(<a class="el" href="structapr__bucket.html">apr_bucket</a> *b, const char **str, apr_size_t *len, <a class="el" href="group___a_p_r___util___bucket___brigades.html#g756973fb6392bd1026c3d96b4519776d">apr_read_type_e</a> block)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">apr_status_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#4e2015fd6e927ed55157a9b003ed5fdb">setaside</a> )(<a class="el" href="structapr__bucket.html">apr_bucket</a> *e, apr_pool_t *pool)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">apr_status_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#f30959bc15fc60e21224d5e3c8c0a814">split</a> )(<a class="el" href="structapr__bucket.html">apr_bucket</a> *e, apr_size_t point)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">apr_status_t(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structapr__bucket__type__t.html#300d6b15d55a3a1f13eeec7379100c38">copy</a> )(<a class="el" href="structapr__bucket.html">apr_bucket</a> *e, <a class="el" href="structapr__bucket.html">apr_bucket</a> **c)</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Basic bucket type <hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="117f85e4a58c5e7d7e373705ad138f85"></a><!-- doxytag: member="apr_bucket_type_t::@0" ref="117f85e4a58c5e7d7e373705ad138f85" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Whether the bucket contains metadata (ie, information that describes the regular contents of the brigade). The metadata is not returned by <a class="el" href="group___a_p_r___util___bucket___brigades.html#ge44ae938c6c60e148430fdb098dcf28f">apr_bucket_read()</a> and is not indicated by the -&gt;length of the <a class="el" href="structapr__bucket.html">apr_bucket</a> 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. <dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="117f85e4a58c5e7d7e373705ad138f8553d3ef9d6a275fe2b72a91acea7017d5"></a><!-- doxytag: member="APR_BUCKET_DATA" ref="117f85e4a58c5e7d7e373705ad138f8553d3ef9d6a275fe2b72a91acea7017d5" args="" -->APR_BUCKET_DATA</em>&nbsp;</td><td>
This bucket type represents actual data to send to the client. </td></tr>
<tr><td valign="top"><em><a class="anchor" name="117f85e4a58c5e7d7e373705ad138f859bf38b4eb3ea41c4af230432ac7a5fb1"></a><!-- doxytag: member="APR_BUCKET_METADATA" ref="117f85e4a58c5e7d7e373705ad138f859bf38b4eb3ea41c4af230432ac7a5fb1" args="" -->APR_BUCKET_METADATA</em>&nbsp;</td><td>
This bucket type represents metadata. </td></tr>
</table>
</dl>

</div>
</div><p>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="c6d779be45de214c6abd2cc205c48901"></a><!-- doxytag: member="apr_bucket_type_t::name" ref="c6d779be45de214c6abd2cc205c48901" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* <a class="el" href="structapr__bucket__type__t.html#c6d779be45de214c6abd2cc205c48901">apr_bucket_type_t::name</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The name of the bucket type 
</div>
</div><p>
<a class="anchor" name="d4bd2ffb03cb2f5f3b3941ce20468038"></a><!-- doxytag: member="apr_bucket_type_t::num_func" ref="d4bd2ffb03cb2f5f3b3941ce20468038" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="structapr__bucket__type__t.html#d4bd2ffb03cb2f5f3b3941ce20468038">apr_bucket_type_t::num_func</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The number of functions this bucket understands. Can not be less than five. 
</div>
</div><p>
<a class="anchor" name="a5a8ae7611ba3be480e3fd12ff3ac352"></a><!-- doxytag: member="apr_bucket_type_t::destroy" ref="a5a8ae7611ba3be480e3fd12ff3ac352" args=")(void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void(* <a class="el" href="structapr__bucket__type__t.html#a5a8ae7611ba3be480e3fd12ff3ac352">apr_bucket_type_t::destroy</a>)(void *data)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
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). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>The private data pointer from the bucket to be destroyed </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="8e9f3f5b2a5513691f3cea130a1aa54b"></a><!-- doxytag: member="apr_bucket_type_t::read" ref="8e9f3f5b2a5513691f3cea130a1aa54b" args=")(apr_bucket *b, const char **str, apr_size_t *len, apr_read_type_e block)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">apr_status_t(* <a class="el" href="structapr__bucket__type__t.html#8e9f3f5b2a5513691f3cea130a1aa54b">apr_bucket_type_t::read</a>)(<a class="el" href="structapr__bucket.html">apr_bucket</a> *b, const char **str, apr_size_t *len, <a class="el" href="group___a_p_r___util___bucket___brigades.html#g756973fb6392bd1026c3d96b4519776d">apr_read_type_e</a> block)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Read the data from the bucket. This is required to be implemented for all bucket types. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>b</em>&nbsp;</td><td>The bucket to read from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>A place to store the data read. Allocation should only be done if absolutely necessary. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>The amount of data read. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>block</em>&nbsp;</td><td>Should this read function block if there is more data that cannot be read immediately. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="4e2015fd6e927ed55157a9b003ed5fdb"></a><!-- doxytag: member="apr_bucket_type_t::setaside" ref="4e2015fd6e927ed55157a9b003ed5fdb" args=")(apr_bucket *e, apr_pool_t *pool)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">apr_status_t(* <a class="el" href="structapr__bucket__type__t.html#4e2015fd6e927ed55157a9b003ed5fdb">apr_bucket_type_t::setaside</a>)(<a class="el" href="structapr__bucket.html">apr_bucket</a> *e, apr_pool_t *pool)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>e</em>&nbsp;</td><td>The bucket to convert </td></tr>
  </table>
</dl>
<dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Some bucket types contain data that will always outlive the bucket itself. For example no data (EOS and FLUSH), or the data resides in global, constant memory (IMMORTAL), or the data is on the heap (HEAP). For these buckets, apr_bucket_setaside_noop can be used. </dd></dl>

</div>
</div><p>
<a class="anchor" name="f30959bc15fc60e21224d5e3c8c0a814"></a><!-- doxytag: member="apr_bucket_type_t::split" ref="f30959bc15fc60e21224d5e3c8c0a814" args=")(apr_bucket *e, apr_size_t point)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">apr_status_t(* <a class="el" href="structapr__bucket__type__t.html#f30959bc15fc60e21224d5e3c8c0a814">apr_bucket_type_t::split</a>)(<a class="el" href="structapr__bucket.html">apr_bucket</a> *e, apr_size_t point)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
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. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>e</em>&nbsp;</td><td>The bucket to split </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>point</em>&nbsp;</td><td>The offset of the first byte in the new bucket </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="300d6b15d55a3a1f13eeec7379100c38"></a><!-- doxytag: member="apr_bucket_type_t::copy" ref="300d6b15d55a3a1f13eeec7379100c38" args=")(apr_bucket *e, apr_bucket **c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">apr_status_t(* <a class="el" href="structapr__bucket__type__t.html#300d6b15d55a3a1f13eeec7379100c38">apr_bucket_type_t::copy</a>)(<a class="el" href="structapr__bucket.html">apr_bucket</a> *e, <a class="el" href="structapr__bucket.html">apr_bucket</a> **c)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy the bucket structure (not the data), assuming that this is possible for the bucket type. If it's not, APR_ENOTIMPL is returned. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>e</em>&nbsp;</td><td>The bucket to copy </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>c</em>&nbsp;</td><td>Returns a pointer to the new bucket </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>include/<a class="el" href="apr__buckets_8h-source.html">apr_buckets.h</a></ul>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 24 02:22:55 2008 for Apache Portable Runtime Utility Library by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>