1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.13"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>GRPC Core: include/grpc/impl/codegen/byte_buffer.h Source File</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">GRPC Core
-  <span id="projectnumber">6.0.0-dev</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.13 -->
- <script type="text/javascript">
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- </script>
- <div id="main-nav"></div>
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div id="nav-path" class="navpath">
- <ul>
- <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9d7a14d6d9adcbe4c35dbdb88d867e2e.html">grpc</a></li><li class="navelem"><a class="el" href="dir_4b3e2ed696753daba329e2683e0f6479.html">impl</a></li><li class="navelem"><a class="el" href="dir_7a167954ab48275cc692d783196d1f28.html">codegen</a></li> </ul>
- </div>
- </div><!-- top -->
- <div class="header">
- <div class="headertitle">
- <div class="title">byte_buffer.h</div> </div>
- </div><!--header-->
- <div class="contents">
- <a href="impl_2codegen_2byte__buffer_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> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright 2015 gRPC authors.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> *</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> */</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_H</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_H</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <<a class="code" href="impl_2codegen_2port__platform_8h.html">grpc/impl/codegen/port_platform.h</a>></span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include <<a class="code" href="grpc__types_8h.html">grpc/impl/codegen/grpc_types.h</a>></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a5ab72d6615ee89c975c46ad4e50c1387">grpc_raw_byte_buffer_create</a>(<a class="code" href="structgrpc__slice.html">grpc_slice</a>* slices,</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordtype">size_t</span> nslices);</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a49ca36baa74fa2f9ae0c615bf53cec7d">grpc_raw_compressed_byte_buffer_create</a>(</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="structgrpc__slice.html">grpc_slice</a>* slices, <span class="keywordtype">size_t</span> nslices, <a class="code" href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a> compression);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a4ebb8f0714bee2c84fed0be62d0dc259">grpc_byte_buffer_copy</a>(<a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* bb);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <span class="keywordtype">size_t</span> <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a9532c0f54de763057e185a950368b0bb">grpc_byte_buffer_length</a>(<a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* bb);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <span class="keywordtype">void</span> <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a32c878db8b0a48035ce777844360a6f0">grpc_byte_buffer_destroy</a>(<a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* byte_buffer);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">struct </span><a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="impl_2codegen_2byte__buffer_8h.html#a16143f22ea46cc7fa6b53e6cb30715f1"> 60</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a> <a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <span class="keywordtype">int</span> <a class="code" href="impl_2codegen_2byte__buffer_8h.html#affd8fb29176a60c44fe704983fa87406">grpc_byte_buffer_reader_init</a>(<a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>* reader,</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* buffer);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <span class="keywordtype">void</span> <a class="code" href="impl_2codegen_2byte__buffer_8h.html#ae28a4ce16b0d8ddd506f1df3fcb3c619">grpc_byte_buffer_reader_destroy</a>(<a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>* reader);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <span class="keywordtype">int</span> <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a8352c7f73cf930c8195e547bd1a5a242">grpc_byte_buffer_reader_next</a>(<a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>* reader,</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <a class="code" href="structgrpc__slice.html">grpc_slice</a>* slice);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="code" href="structgrpc__slice.html">grpc_slice</a></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <a class="code" href="impl_2codegen_2byte__buffer_8h.html#a4cbf1eb762ea3c6c08bcfc46201c7691">grpc_byte_buffer_reader_readall</a>(<a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>* reader);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <a class="code" href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a> <a class="code" href="structgrpc__byte__buffer.html">grpc_byte_buffer</a>* <a class="code" href="impl_2codegen_2byte__buffer_8h.html#ac7407c6fa60073adb166ca4f3cfbc8e7">grpc_raw_byte_buffer_from_reader</a>(</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a>* reader);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> }</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor">#endif </span><span class="comment">/* GRPC_IMPL_CODEGEN_BYTE_BUFFER_H */</span><span class="preprocessor"></span></div><div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_ac7407c6fa60073adb166ca4f3cfbc8e7"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#ac7407c6fa60073adb166ca4f3cfbc8e7">grpc_raw_byte_buffer_from_reader</a></div><div class="ttdeci">GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_from_reader(grpc_byte_buffer_reader *reader)</div><div class="ttdoc">Returns a RAW byte buffer instance from the output of reader. </div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a8352c7f73cf930c8195e547bd1a5a242"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a8352c7f73cf930c8195e547bd1a5a242">grpc_byte_buffer_reader_next</a></div><div class="ttdeci">GRPCAPI int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, grpc_slice *slice)</div><div class="ttdoc">Updates slice with the next piece of data from from reader and returns. </div></div>
- <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:80</div></div>
- <div class="ttc" id="grpc__types_8h_html"><div class="ttname"><a href="grpc__types_8h.html">grpc_types.h</a></div></div>
- <div class="ttc" id="structgrpc__byte__buffer_html"><div class="ttname"><a href="structgrpc__byte__buffer.html">grpc_byte_buffer</a></div><div class="ttdef"><b>Definition:</b> grpc_types.h:40</div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_affd8fb29176a60c44fe704983fa87406"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#affd8fb29176a60c44fe704983fa87406">grpc_byte_buffer_reader_init</a></div><div class="ttdeci">GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer)</div><div class="ttdoc">Initialize reader to read over buffer. </div></div>
- <div class="ttc" id="compression__types_8h_html_ab9de0f68bfb1ef8ed09bd00643db14c9"><div class="ttname"><a href="compression__types_8h.html#ab9de0f68bfb1ef8ed09bd00643db14c9">grpc_compression_algorithm</a></div><div class="ttdeci">grpc_compression_algorithm</div><div class="ttdoc">The various compression algorithms supported by gRPC. </div><div class="ttdef"><b>Definition:</b> compression_types.h:56</div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a4ebb8f0714bee2c84fed0be62d0dc259"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a4ebb8f0714bee2c84fed0be62d0dc259">grpc_byte_buffer_copy</a></div><div class="ttdeci">GRPCAPI grpc_byte_buffer * grpc_byte_buffer_copy(grpc_byte_buffer *bb)</div><div class="ttdoc">Copies input byte buffer bb. </div></div>
- <div class="ttc" id="impl_2codegen_2port__platform_8h_html_a2865c3b28ea7db75be4c725adb1edc7d"><div class="ttname"><a href="impl_2codegen_2port__platform_8h.html#a2865c3b28ea7db75be4c725adb1edc7d">GRPCAPI</a></div><div class="ttdeci">#define GRPCAPI</div><div class="ttdef"><b>Definition:</b> port_platform.h:470</div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a9532c0f54de763057e185a950368b0bb"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a9532c0f54de763057e185a950368b0bb">grpc_byte_buffer_length</a></div><div class="ttdeci">GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer *bb)</div><div class="ttdoc">Returns the size of the given byte buffer, in bytes. </div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a4cbf1eb762ea3c6c08bcfc46201c7691"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a4cbf1eb762ea3c6c08bcfc46201c7691">grpc_byte_buffer_reader_readall</a></div><div class="ttdeci">GRPCAPI grpc_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader)</div><div class="ttdoc">Merge all data from reader into single slice. </div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a5ab72d6615ee89c975c46ad4e50c1387"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a5ab72d6615ee89c975c46ad4e50c1387">grpc_raw_byte_buffer_create</a></div><div class="ttdeci">GRPCAPI grpc_byte_buffer * grpc_raw_byte_buffer_create(grpc_slice *slices, size_t nslices)</div><div class="ttdoc">Returns a RAW byte buffer instance over the given slices (up to nslices). </div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a49ca36baa74fa2f9ae0c615bf53cec7d"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a49ca36baa74fa2f9ae0c615bf53cec7d">grpc_raw_compressed_byte_buffer_create</a></div><div class="ttdeci">GRPCAPI grpc_byte_buffer * grpc_raw_compressed_byte_buffer_create(grpc_slice *slices, size_t nslices, grpc_compression_algorithm compression)</div><div class="ttdoc">Returns a compressed RAW byte buffer instance over the given slices (up to nslices). </div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_ae28a4ce16b0d8ddd506f1df3fcb3c619"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#ae28a4ce16b0d8ddd506f1df3fcb3c619">grpc_byte_buffer_reader_destroy</a></div><div class="ttdeci">GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader)</div><div class="ttdoc">Cleanup and destroy reader. </div></div>
- <div class="ttc" id="impl_2codegen_2byte__buffer_8h_html_a32c878db8b0a48035ce777844360a6f0"><div class="ttname"><a href="impl_2codegen_2byte__buffer_8h.html#a32c878db8b0a48035ce777844360a6f0">grpc_byte_buffer_destroy</a></div><div class="ttdeci">GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer)</div><div class="ttdoc">Destroys byte_buffer deallocating all its memory. </div></div>
- <div class="ttc" id="structgrpc__byte__buffer__reader_html"><div class="ttname"><a href="structgrpc__byte__buffer__reader.html">grpc_byte_buffer_reader</a></div><div class="ttdef"><b>Definition:</b> byte_buffer_reader.h:28</div></div>
- <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>
- </div><!-- fragment --></div><!-- contents -->
- <!-- start footer part -->
- <hr class="footer"/><address class="footer"><small>
- Generated on Tue May 15 2018 17:01:00 for GRPC Core by  <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/>
- </a> 1.8.13
- </small></address>
- </body>
- </html>
|