impl_2codegen_2slice_8h_source.html 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.6"/>
  7. <title>GRPC Core: include/grpc/impl/codegen/slice.h Source File</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  12. <script type="text/javascript" src="search/search.js"></script>
  13. <script type="text/javascript">
  14. $(document).ready(function() { searchBox.OnSelectItem(0); });
  15. </script>
  16. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  17. </head>
  18. <body>
  19. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  20. <div id="titlearea">
  21. <table cellspacing="0" cellpadding="0">
  22. <tbody>
  23. <tr style="height: 56px;">
  24. <td style="padding-left: 0.5em;">
  25. <div id="projectname">GRPC Core
  26. &#160;<span id="projectnumber">4.0.0</span>
  27. </div>
  28. </td>
  29. </tr>
  30. </tbody>
  31. </table>
  32. </div>
  33. <!-- end header part -->
  34. <!-- Generated by Doxygen 1.8.6 -->
  35. <script type="text/javascript">
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. </script>
  38. <div id="navrow1" class="tabs">
  39. <ul class="tablist">
  40. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  41. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  42. <li><a href="modules.html"><span>Modules</span></a></li>
  43. <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
  44. <li class="current"><a href="files.html"><span>Files</span></a></li>
  45. <li>
  46. <div id="MSearchBox" class="MSearchBoxInactive">
  47. <span class="left">
  48. <img id="MSearchSelect" src="search/mag_sel.png"
  49. onmouseover="return searchBox.OnSearchSelectShow()"
  50. onmouseout="return searchBox.OnSearchSelectHide()"
  51. alt=""/>
  52. <input type="text" id="MSearchField" value="Search" accesskey="S"
  53. onfocus="searchBox.OnSearchFieldFocus(true)"
  54. onblur="searchBox.OnSearchFieldFocus(false)"
  55. onkeyup="searchBox.OnSearchFieldChange(event)"/>
  56. </span><span class="right">
  57. <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
  58. </span>
  59. </div>
  60. </li>
  61. </ul>
  62. </div>
  63. <div id="navrow2" class="tabs2">
  64. <ul class="tablist">
  65. <li><a href="files.html"><span>File&#160;List</span></a></li>
  66. <li><a href="globals.html"><span>Globals</span></a></li>
  67. </ul>
  68. </div>
  69. <!-- window showing the filter options -->
  70. <div id="MSearchSelectWindow"
  71. onmouseover="return searchBox.OnSearchSelectShow()"
  72. onmouseout="return searchBox.OnSearchSelectHide()"
  73. onkeydown="return searchBox.OnSearchSelectKey(event)">
  74. <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>
  75. <!-- iframe showing the search results (closed by default) -->
  76. <div id="MSearchResultsWindow">
  77. <iframe src="javascript:void(0)" frameborder="0"
  78. name="MSearchResults" id="MSearchResults">
  79. </iframe>
  80. </div>
  81. <div id="nav-path" class="navpath">
  82. <ul>
  83. <li class="navelem"><a class="el" href="dir_bda73758a0a4d8c0ff603a7983866e1c.html">include</a></li><li class="navelem"><a class="el" href="dir_8ae8e534eeef321a81935092729b7078.html">grpc</a></li><li class="navelem"><a class="el" href="dir_27c65f9b8b3387c47015966ca861342b.html">impl</a></li><li class="navelem"><a class="el" href="dir_2d2a7752fa77ea824010e525334e7867.html">codegen</a></li> </ul>
  84. </div>
  85. </div><!-- top -->
  86. <div class="header">
  87. <div class="headertitle">
  88. <div class="title">slice.h</div> </div>
  89. </div><!--header-->
  90. <div class="contents">
  91. <a href="impl_2codegen_2slice_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div>
  92. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> *</span></div>
  93. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * Copyright 2015, Google Inc.</span></div>
  94. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * All rights reserved.</span></div>
  95. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div>
  96. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
  97. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are</span></div>
  98. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * met:</span></div>
  99. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div>
  100. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * * Redistributions of source code must retain the above copyright</span></div>
  101. <div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div>
  102. <div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * * Redistributions in binary form must reproduce the above</span></div>
  103. <div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * copyright notice, this list of conditions and the following disclaimer</span></div>
  104. <div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * in the documentation and/or other materials provided with the</span></div>
  105. <div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * distribution.</span></div>
  106. <div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * * Neither the name of Google Inc. nor the names of its</span></div>
  107. <div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * contributors may be used to endorse or promote products derived from</span></div>
  108. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * this software without specific prior written permission.</span></div>
  109. <div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> *</span></div>
  110. <div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS</span></div>
  111. <div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT</span></div>
  112. <div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR</span></div>
  113. <div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT</span></div>
  114. <div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,</span></div>
  115. <div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT</span></div>
  116. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,</span></div>
  117. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY</span></div>
  118. <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
  119. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div>
  120. <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
  121. <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment"> *</span></div>
  122. <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="comment"> */</span></div>
  123. <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div>
  124. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#ifndef GRPC_IMPL_CODEGEN_SLICE_H</span></div>
  125. <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GRPC_IMPL_CODEGEN_SLICE_H</span></div>
  126. <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor"></span></div>
  127. <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="impl_2codegen_2port__platform_8h.html">grpc/impl/codegen/port_platform.h</a>&gt;</span></div>
  128. <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
  129. <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div>
  130. <div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div>
  131. <div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="exec__ctx__fwd_8h.html">grpc/impl/codegen/exec_ctx_fwd.h</a>&gt;</span></div>
  132. <div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="gpr__slice_8h.html">grpc/impl/codegen/gpr_slice.h</a>&gt;</span></div>
  133. <div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div>
  134. <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a2a5f8eaa5d8784bfec46ac983644dca2"> 44</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice.html">grpc_slice</a> <a class="code" href="structgrpc__slice.html">grpc_slice</a>;</div>
  135. <div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div>
  136. <div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html"> 59</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount__vtable.html">grpc_slice_refcount_vtable</a> {</div>
  137. <div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#aab9280224bc6e9e86fabe51ea90f216b"> 60</a></span>&#160; void (*<a class="code" href="structgrpc__slice__refcount__vtable.html#aab9280224bc6e9e86fabe51ea90f216b">ref</a>)(<span class="keywordtype">void</span> *);</div>
  138. <div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#a791191ed3fb5c11e2fd234adf28e4707"> 61</a></span>&#160; void (*<a class="code" href="structgrpc__slice__refcount__vtable.html#a791191ed3fb5c11e2fd234adf28e4707">unref</a>)(<a class="code" href="exec__ctx__fwd_8h.html#aabc6a414771ff6697446fc9d5d708057">grpc_exec_ctx</a> *exec_ctx, <span class="keywordtype">void</span> *);</div>
  139. <div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#a9f914a5a0b094a7343a23894b1a2de40"> 62</a></span>&#160; int (*<a class="code" href="structgrpc__slice__refcount__vtable.html#a9f914a5a0b094a7343a23894b1a2de40">eq</a>)(<a class="code" href="structgrpc__slice.html">grpc_slice</a> a, <a class="code" href="structgrpc__slice.html">grpc_slice</a> b);</div>
  140. <div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#a38e78e171f83371fe401c0c349309798"> 63</a></span>&#160; uint32_t (*<a class="code" href="structgrpc__slice__refcount__vtable.html#a38e78e171f83371fe401c0c349309798">hash</a>)(<a class="code" href="structgrpc__slice.html">grpc_slice</a> slice);</div>
  141. <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;} <a class="code" href="impl_2codegen_2slice_8h.html#a0ba9a84b74d6308678a2f53212b5b3fd">grpc_slice_refcount_vtable</a>;</div>
  142. <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div>
  143. <div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount.html"> 71</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount.html">grpc_slice_refcount</a> {</div>
  144. <div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount.html#ab35b82d586e9ca84f9d42af591616f98"> 72</a></span>&#160; <span class="keyword">const</span> <a class="code" href="structgrpc__slice__refcount__vtable.html">grpc_slice_refcount_vtable</a> *<a class="code" href="structgrpc__slice__refcount.html#ab35b82d586e9ca84f9d42af591616f98">vtable</a>;</div>
  145. <div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount.html#a113ae62eac88e4180feb9ecc80e0f2f9"> 77</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount.html">grpc_slice_refcount</a> *<a class="code" href="structgrpc__slice__refcount.html#a113ae62eac88e4180feb9ecc80e0f2f9">sub_refcount</a>;</div>
  146. <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;} <a class="code" href="impl_2codegen_2slice_8h.html#acb7fc89ea8343fde6d0c09f1ea70dbc4">grpc_slice_refcount</a>;</div>
  147. <div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div>
  148. <div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#ae65fc74cb3afbcd3299a1c93f90bae20"> 80</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_INLINED_SIZE (sizeof(size_t) + sizeof(uint8_t *) - 1)</span></div>
  149. <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;<span class="preprocessor"></span></div>
  150. <div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="structgrpc__slice.html"> 91</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structgrpc__slice.html">grpc_slice</a> {</div>
  151. <div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="structgrpc__slice.html#a467ef319d024f1897c7ff3bdadb78493"> 92</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount.html">grpc_slice_refcount</a> *<a class="code" href="structgrpc__slice.html#a467ef319d024f1897c7ff3bdadb78493">refcount</a>;</div>
  152. <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">union </span>{</div>
  153. <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">struct </span>{</div>
  154. <div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="structgrpc__slice.html#a2906db76ad7ddaba549ccf723f361c6d"> 95</a></span>&#160; uint8_t *<a class="code" href="structgrpc__slice.html#a2906db76ad7ddaba549ccf723f361c6d">bytes</a>;</div>
  155. <div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="structgrpc__slice.html#a009b6a19b442f8f4fa1858a37aac31fd"> 96</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice.html#a009b6a19b442f8f4fa1858a37aac31fd">length</a>;</div>
  156. <div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; } <a class="code" href="structgrpc__slice.html#aec2c91588f0932cae0454d9f84777324">refcounted</a>;</div>
  157. <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keyword">struct </span>{</div>
  158. <div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structgrpc__slice.html#ac7fc18f903b510ccb4eea00df42c0181"> 99</a></span>&#160; uint8_t <a class="code" href="structgrpc__slice.html#ac7fc18f903b510ccb4eea00df42c0181">length</a>;</div>
  159. <div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structgrpc__slice.html#ab907f771b5785a1ebeb24679d503facf"> 100</a></span>&#160; uint8_t <a class="code" href="structgrpc__slice.html#a2906db76ad7ddaba549ccf723f361c6d">bytes</a>[<a class="code" href="impl_2codegen_2slice_8h.html#ae65fc74cb3afbcd3299a1c93f90bae20">GRPC_SLICE_INLINED_SIZE</a>];</div>
  160. <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; } <a class="code" href="structgrpc__slice.html#a11faeefc4356e324b379ef03f528cf0c">inlined</a>;</div>
  161. <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; } <a class="code" href="structgrpc__slice.html#a32c399d6e3c813a7586c92ef1bd88030">data</a>;</div>
  162. <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;};</div>
  163. <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div>
  164. <div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a81db47a2be0a079aa797cd77f3864809"> 105</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8</span></div>
  165. <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="preprocessor"></span></div>
  166. <div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html"> 109</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
  167. <div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#a52a8e83b31006d685d98ce4db16520d8"> 112</a></span>&#160; <a class="code" href="structgrpc__slice.html">grpc_slice</a> *<a class="code" href="structgrpc__slice__buffer.html#a52a8e83b31006d685d98ce4db16520d8">base_slices</a>;</div>
  168. <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
  169. <div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#ac37e9d19ec31eab8f429d2b4af908256"> 115</a></span>&#160; <a class="code" href="structgrpc__slice.html">grpc_slice</a> *<a class="code" href="structgrpc__slice__buffer.html#ac37e9d19ec31eab8f429d2b4af908256">slices</a>;</div>
  170. <div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#ac6b9b99f100ac02280fe6ba0edc754cc"> 117</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice__buffer.html#ac6b9b99f100ac02280fe6ba0edc754cc">count</a>;</div>
  171. <div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#a8f35fa07c9a4d9f9a4e088a1155e5833"> 120</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice__buffer.html#a8f35fa07c9a4d9f9a4e088a1155e5833">capacity</a>;</div>
  172. <div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#ad796dcdd16fbb680a7a5368228d20127"> 122</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice__buffer.html#ad796dcdd16fbb680a7a5368228d20127">length</a>;</div>
  173. <div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#a27c76a4e972a41ab5ac6504c4426fab9"> 124</a></span>&#160; <a class="code" href="structgrpc__slice.html">grpc_slice</a> inlined[<a class="code" href="impl_2codegen_2slice_8h.html#a81db47a2be0a079aa797cd77f3864809">GRPC_SLICE_BUFFER_INLINE_ELEMENTS</a>];</div>
  174. <div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;} <a class="code" href="structgrpc__slice__buffer.html">grpc_slice_buffer</a>;</div>
  175. <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
  176. <div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a8a15783c251cdeb18c3f8b0ad41d0352"> 127</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_START_PTR(slice) \</span></div>
  177. <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.bytes \</span></div>
  178. <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor"> : (slice).data.inlined.bytes)</span></div>
  179. <div class="line"><a name="l00130"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#ae965fb2ee1a646253cdbd49d82b0b6c5"> 130</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GRPC_SLICE_LENGTH(slice) \</span></div>
  180. <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.length \</span></div>
  181. <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="preprocessor"> : (slice).data.inlined.length)</span></div>
  182. <div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a6791fa7be0a1a9144e005cfea7baea84"> 133</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GRPC_SLICE_SET_LENGTH(slice, newlen) \</span></div>
  183. <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor"> ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \</span></div>
  184. <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="preprocessor"> : ((slice).data.inlined.length = (uint8_t)(newlen)))</span></div>
  185. <div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a96535019e10a540192c1f276ec049a56"> 136</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GRPC_SLICE_END_PTR(slice) \</span></div>
  186. <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="preprocessor"> GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)</span></div>
  187. <div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a829178b3baec8b96a992a5607ad3ed93"> 138</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)</span></div>
  188. <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="preprocessor"></span></div>
  189. <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="preprocessor">#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS</span></div>
  190. <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="preprocessor"></span></div>
  191. <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="comment">/* Duplicate GPR_* definitions */</span></div>
  192. <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="preprocessor">#define GPR_SLICE_START_PTR(slice) \</span></div>
  193. <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.bytes \</span></div>
  194. <div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="preprocessor"> : (slice).data.inlined.bytes)</span></div>
  195. <div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GPR_SLICE_LENGTH(slice) \</span></div>
  196. <div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.length \</span></div>
  197. <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;<span class="preprocessor"> : (slice).data.inlined.length)</span></div>
  198. <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GPR_SLICE_SET_LENGTH(slice, newlen) \</span></div>
  199. <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;<span class="preprocessor"> ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \</span></div>
  200. <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="preprocessor"> : ((slice).data.inlined.length = (uint8_t)(newlen)))</span></div>
  201. <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GPR_SLICE_END_PTR(slice) \</span></div>
  202. <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="preprocessor"> GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)</span></div>
  203. <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)</span></div>
  204. <div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;<span class="preprocessor"></span></div>
  205. <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */</span><span class="preprocessor"></span></div>
  206. <div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor"></span></div>
  207. <div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* GRPC_IMPL_CODEGEN_SLICE_H */</span><span class="preprocessor"></span></div>
  208. <div class="ttc" id="impl_2codegen_2slice_8h_html_a0ba9a84b74d6308678a2f53212b5b3fd"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#a0ba9a84b74d6308678a2f53212b5b3fd">grpc_slice_refcount_vtable</a></div><div class="ttdeci">struct grpc_slice_refcount_vtable grpc_slice_refcount_vtable</div><div class="ttdoc">Slice API. </div></div>
  209. <div class="ttc" id="structgrpc__slice__refcount_html"><div class="ttname"><a href="structgrpc__slice__refcount.html">grpc_slice_refcount</a></div><div class="ttdoc">Reference count container for grpc_slice. </div><div class="ttdef"><b>Definition:</b> slice.h:71</div></div>
  210. <div class="ttc" id="structgrpc__slice__refcount_html_a113ae62eac88e4180feb9ecc80e0f2f9"><div class="ttname"><a href="structgrpc__slice__refcount.html#a113ae62eac88e4180feb9ecc80e0f2f9">grpc_slice_refcount::sub_refcount</a></div><div class="ttdeci">struct grpc_slice_refcount * sub_refcount</div><div class="ttdoc">If a subset of this slice is taken, use this pointer for the refcount. </div><div class="ttdef"><b>Definition:</b> slice.h:77</div></div>
  211. <div class="ttc" id="structgrpc__slice_html_a11faeefc4356e324b379ef03f528cf0c"><div class="ttname"><a href="structgrpc__slice.html#a11faeefc4356e324b379ef03f528cf0c">grpc_slice::inlined</a></div><div class="ttdeci">struct grpc_slice::@19::@21 inlined</div></div>
  212. <div class="ttc" id="structgrpc__slice_html_a32c399d6e3c813a7586c92ef1bd88030"><div class="ttname"><a href="structgrpc__slice.html#a32c399d6e3c813a7586c92ef1bd88030">grpc_slice::data</a></div><div class="ttdeci">union grpc_slice::@19 data</div></div>
  213. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_a791191ed3fb5c11e2fd234adf28e4707"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#a791191ed3fb5c11e2fd234adf28e4707">grpc_slice_refcount_vtable::unref</a></div><div class="ttdeci">void(* unref)(grpc_exec_ctx *exec_ctx, void *)</div><div class="ttdef"><b>Definition:</b> slice.h:61</div></div>
  214. <div class="ttc" id="structgrpc__slice_html"><div class="ttname"><a href="structgrpc__slice.html">grpc_slice</a></div><div class="ttdoc">A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. ...</div><div class="ttdef"><b>Definition:</b> slice.h:91</div></div>
  215. <div class="ttc" id="structgrpc__slice__buffer_html_ac37e9d19ec31eab8f429d2b4af908256"><div class="ttname"><a href="structgrpc__slice__buffer.html#ac37e9d19ec31eab8f429d2b4af908256">grpc_slice_buffer::slices</a></div><div class="ttdeci">grpc_slice * slices</div><div class="ttdoc">slices in the array (Points to the first valid grpc_slice in the array) </div><div class="ttdef"><b>Definition:</b> slice.h:115</div></div>
  216. <div class="ttc" id="structgrpc__slice__buffer_html"><div class="ttname"><a href="structgrpc__slice__buffer.html">grpc_slice_buffer</a></div><div class="ttdoc">Represents an expandable array of slices, to be interpreted as a single item. </div><div class="ttdef"><b>Definition:</b> slice.h:109</div></div>
  217. <div class="ttc" id="structgrpc__slice_html_aec2c91588f0932cae0454d9f84777324"><div class="ttname"><a href="structgrpc__slice.html#aec2c91588f0932cae0454d9f84777324">grpc_slice::refcounted</a></div><div class="ttdeci">struct grpc_slice::@19::@20 refcounted</div></div>
  218. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_aab9280224bc6e9e86fabe51ea90f216b"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#aab9280224bc6e9e86fabe51ea90f216b">grpc_slice_refcount_vtable::ref</a></div><div class="ttdeci">void(* ref)(void *)</div><div class="ttdef"><b>Definition:</b> slice.h:60</div></div>
  219. <div class="ttc" id="structgrpc__slice__refcount__vtable_html"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html">grpc_slice_refcount_vtable</a></div><div class="ttdoc">Slice API. </div><div class="ttdef"><b>Definition:</b> slice.h:59</div></div>
  220. <div class="ttc" id="structgrpc__slice__buffer_html_ad796dcdd16fbb680a7a5368228d20127"><div class="ttname"><a href="structgrpc__slice__buffer.html#ad796dcdd16fbb680a7a5368228d20127">grpc_slice_buffer::length</a></div><div class="ttdeci">size_t length</div><div class="ttdoc">the combined length of all slices in the array </div><div class="ttdef"><b>Definition:</b> slice.h:122</div></div>
  221. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_a9f914a5a0b094a7343a23894b1a2de40"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#a9f914a5a0b094a7343a23894b1a2de40">grpc_slice_refcount_vtable::eq</a></div><div class="ttdeci">int(* eq)(grpc_slice a, grpc_slice b)</div><div class="ttdef"><b>Definition:</b> slice.h:62</div></div>
  222. <div class="ttc" id="structgrpc__slice_html_a467ef319d024f1897c7ff3bdadb78493"><div class="ttname"><a href="structgrpc__slice.html#a467ef319d024f1897c7ff3bdadb78493">grpc_slice::refcount</a></div><div class="ttdeci">struct grpc_slice_refcount * refcount</div><div class="ttdef"><b>Definition:</b> slice.h:92</div></div>
  223. <div class="ttc" id="structgrpc__slice__buffer_html_a52a8e83b31006d685d98ce4db16520d8"><div class="ttname"><a href="structgrpc__slice__buffer.html#a52a8e83b31006d685d98ce4db16520d8">grpc_slice_buffer::base_slices</a></div><div class="ttdeci">grpc_slice * base_slices</div><div class="ttdoc">This is for internal use only. </div><div class="ttdef"><b>Definition:</b> slice.h:112</div></div>
  224. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_a38e78e171f83371fe401c0c349309798"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#a38e78e171f83371fe401c0c349309798">grpc_slice_refcount_vtable::hash</a></div><div class="ttdeci">uint32_t(* hash)(grpc_slice slice)</div><div class="ttdef"><b>Definition:</b> slice.h:63</div></div>
  225. <div class="ttc" id="structgrpc__slice__buffer_html_a8f35fa07c9a4d9f9a4e088a1155e5833"><div class="ttname"><a href="structgrpc__slice__buffer.html#a8f35fa07c9a4d9f9a4e088a1155e5833">grpc_slice_buffer::capacity</a></div><div class="ttdeci">size_t capacity</div><div class="ttdoc">the number of slices allocated in the array. </div><div class="ttdef"><b>Definition:</b> slice.h:120</div></div>
  226. <div class="ttc" id="exec__ctx__fwd_8h_html_aabc6a414771ff6697446fc9d5d708057"><div class="ttname"><a href="exec__ctx__fwd_8h.html#aabc6a414771ff6697446fc9d5d708057">grpc_exec_ctx</a></div><div class="ttdeci">struct grpc_exec_ctx grpc_exec_ctx</div><div class="ttdef"><b>Definition:</b> exec_ctx_fwd.h:39</div></div>
  227. <div class="ttc" id="impl_2codegen_2slice_8h_html_a81db47a2be0a079aa797cd77f3864809"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#a81db47a2be0a079aa797cd77f3864809">GRPC_SLICE_BUFFER_INLINE_ELEMENTS</a></div><div class="ttdeci">#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS</div><div class="ttdef"><b>Definition:</b> slice.h:105</div></div>
  228. <div class="ttc" id="structgrpc__slice_html_a2906db76ad7ddaba549ccf723f361c6d"><div class="ttname"><a href="structgrpc__slice.html#a2906db76ad7ddaba549ccf723f361c6d">grpc_slice::bytes</a></div><div class="ttdeci">uint8_t * bytes</div><div class="ttdef"><b>Definition:</b> slice.h:95</div></div>
  229. <div class="ttc" id="impl_2codegen_2slice_8h_html_ae65fc74cb3afbcd3299a1c93f90bae20"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#ae65fc74cb3afbcd3299a1c93f90bae20">GRPC_SLICE_INLINED_SIZE</a></div><div class="ttdeci">#define GRPC_SLICE_INLINED_SIZE</div><div class="ttdef"><b>Definition:</b> slice.h:80</div></div>
  230. <div class="ttc" id="structgrpc__slice_html_a009b6a19b442f8f4fa1858a37aac31fd"><div class="ttname"><a href="structgrpc__slice.html#a009b6a19b442f8f4fa1858a37aac31fd">grpc_slice::length</a></div><div class="ttdeci">size_t length</div><div class="ttdef"><b>Definition:</b> slice.h:96</div></div>
  231. <div class="ttc" id="impl_2codegen_2slice_8h_html_acb7fc89ea8343fde6d0c09f1ea70dbc4"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#acb7fc89ea8343fde6d0c09f1ea70dbc4">grpc_slice_refcount</a></div><div class="ttdeci">struct grpc_slice_refcount grpc_slice_refcount</div><div class="ttdoc">Reference count container for grpc_slice. </div></div>
  232. <div class="ttc" id="structgrpc__slice_html_ac7fc18f903b510ccb4eea00df42c0181"><div class="ttname"><a href="structgrpc__slice.html#ac7fc18f903b510ccb4eea00df42c0181">grpc_slice::length</a></div><div class="ttdeci">uint8_t length</div><div class="ttdef"><b>Definition:</b> slice.h:99</div></div>
  233. <div class="ttc" id="structgrpc__slice__buffer_html_ac6b9b99f100ac02280fe6ba0edc754cc"><div class="ttname"><a href="structgrpc__slice__buffer.html#ac6b9b99f100ac02280fe6ba0edc754cc">grpc_slice_buffer::count</a></div><div class="ttdeci">size_t count</div><div class="ttdoc">the number of slices in the array </div><div class="ttdef"><b>Definition:</b> slice.h:117</div></div>
  234. <div class="ttc" id="structgrpc__slice__refcount_html_ab35b82d586e9ca84f9d42af591616f98"><div class="ttname"><a href="structgrpc__slice__refcount.html#ab35b82d586e9ca84f9d42af591616f98">grpc_slice_refcount::vtable</a></div><div class="ttdeci">const grpc_slice_refcount_vtable * vtable</div><div class="ttdef"><b>Definition:</b> slice.h:72</div></div>
  235. <div class="ttc" id="exec__ctx__fwd_8h_html"><div class="ttname"><a href="exec__ctx__fwd_8h.html">exec_ctx_fwd.h</a></div></div>
  236. <div class="ttc" id="impl_2codegen_2port__platform_8h_html"><div class="ttname"><a href="impl_2codegen_2port__platform_8h.html">port_platform.h</a></div></div>
  237. <div class="ttc" id="gpr__slice_8h_html"><div class="ttname"><a href="gpr__slice_8h.html">gpr_slice.h</a></div></div>
  238. </div><!-- fragment --></div><!-- contents -->
  239. <!-- start footer part -->
  240. <hr class="footer"/><address class="footer"><small>
  241. Generated on Wed Jun 21 2017 14:13:07 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  242. <img class="footer" src="doxygen.png" alt="doxygen"/>
  243. </a> 1.8.6
  244. </small></address>
  245. </body>
  246. </html>