1
0

group__jose__io.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  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.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>José: IO</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">José
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.13 -->
  33. <script type="text/javascript">
  34. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  35. </script>
  36. <script type="text/javascript" src="menudata.js"></script>
  37. <script type="text/javascript" src="menu.js"></script>
  38. <script type="text/javascript">
  39. $(function() {
  40. initMenu('',true,false,'search.php','Search');
  41. $(document).ready(function() { init_search(); });
  42. });
  43. </script>
  44. <div id="main-nav"></div>
  45. </div><!-- top -->
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. <div class="header">
  59. <div class="summary">
  60. <a href="#nested-classes">Data Structures</a> &#124;
  61. <a href="#typedef-members">Typedefs</a> &#124;
  62. <a href="#func-members">Functions</a> </div>
  63. <div class="headertitle">
  64. <div class="title">IO</div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <p>IO Chaining.
  68. <a href="#details">More...</a></p>
  69. <table class="memberdecls">
  70. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
  71. Data Structures</h2></td></tr>
  72. <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjose__io__t.html">jose_io_t</a></td></tr>
  73. <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">The interface for chained IO. <a href="structjose__io__t.html#details">More...</a><br /></td></tr>
  74. <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. </table><table class="memberdecls">
  76. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  77. Typedefs</h2></td></tr>
  78. <tr class="memitem:ga5470c8ebb2993293197844f2782616b5"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structjose__io__t.html">jose_io_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#ga5470c8ebb2993293197844f2782616b5">jose_io_auto_t</a></td></tr>
  79. <tr class="memdesc:ga5470c8ebb2993293197844f2782616b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines a <a class="el" href="structjose__io__t.html" title="The interface for chained IO. ">jose_io_t</a> which calls <a class="el" href="group__jose__io.html#ga399c2d4e43b0def36e831cc12a50877e" title="Decreases the reference count of an IO object. ">jose_io_decref()</a> at end of scope. <a href="#ga5470c8ebb2993293197844f2782616b5">More...</a><br /></td></tr>
  80. <tr class="separator:ga5470c8ebb2993293197844f2782616b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. </table><table class="memberdecls">
  82. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  83. Functions</h2></td></tr>
  84. <tr class="memitem:ga7fbb0f97c47943576a424a0351df2413"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#ga7fbb0f97c47943576a424a0351df2413">jose_io_incref</a> (<a class="el" href="structjose__io__t.html">jose_io_t</a> *io)</td></tr>
  85. <tr class="memdesc:ga7fbb0f97c47943576a424a0351df2413"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increases the reference count of an IO object. <a href="#ga7fbb0f97c47943576a424a0351df2413">More...</a><br /></td></tr>
  86. <tr class="separator:ga7fbb0f97c47943576a424a0351df2413"><td class="memSeparator" colspan="2">&#160;</td></tr>
  87. <tr class="memitem:ga399c2d4e43b0def36e831cc12a50877e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#ga399c2d4e43b0def36e831cc12a50877e">jose_io_decref</a> (<a class="el" href="structjose__io__t.html">jose_io_t</a> *io)</td></tr>
  88. <tr class="memdesc:ga399c2d4e43b0def36e831cc12a50877e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decreases the reference count of an IO object. <a href="#ga399c2d4e43b0def36e831cc12a50877e">More...</a><br /></td></tr>
  89. <tr class="separator:ga399c2d4e43b0def36e831cc12a50877e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:gaa3f3eb70079093e1244ffe516fd1627f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#gaa3f3eb70079093e1244ffe516fd1627f">jose_io_malloc</a> (jose_cfg_t *cfg, void **buf, size_t *len)</td></tr>
  91. <tr class="memdesc:gaa3f3eb70079093e1244ffe516fd1627f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new IO object which collects data into a dynamic buffer. <a href="#gaa3f3eb70079093e1244ffe516fd1627f">More...</a><br /></td></tr>
  92. <tr class="separator:gaa3f3eb70079093e1244ffe516fd1627f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:ga4912707bb8e60870c661fb14e837bb69"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#ga4912707bb8e60870c661fb14e837bb69">jose_io_malloc_steal</a> (void **buf)</td></tr>
  94. <tr class="memdesc:ga4912707bb8e60870c661fb14e837bb69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Steals the buffer created by the <a class="el" href="group__jose__io.html#gaa3f3eb70079093e1244ffe516fd1627f" title="Creates a new IO object which collects data into a dynamic buffer. ">jose_io_malloc()</a> IO object. <a href="#ga4912707bb8e60870c661fb14e837bb69">More...</a><br /></td></tr>
  95. <tr class="separator:ga4912707bb8e60870c661fb14e837bb69"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:gaf9372e0f4d1c3d6ece6c38f31ea7c48c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#gaf9372e0f4d1c3d6ece6c38f31ea7c48c">jose_io_buffer</a> (jose_cfg_t *cfg, void *buf, size_t *len)</td></tr>
  97. <tr class="memdesc:gaf9372e0f4d1c3d6ece6c38f31ea7c48c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new IO object which collects data into a static buffer. <a href="#gaf9372e0f4d1c3d6ece6c38f31ea7c48c">More...</a><br /></td></tr>
  98. <tr class="separator:gaf9372e0f4d1c3d6ece6c38f31ea7c48c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:gaa249153384969267f4d3f8d9691e2bef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#gaa249153384969267f4d3f8d9691e2bef">jose_io_file</a> (jose_cfg_t *cfg, FILE *file)</td></tr>
  100. <tr class="memdesc:gaa249153384969267f4d3f8d9691e2bef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new IO object which writes data into a FILE. <a href="#gaa249153384969267f4d3f8d9691e2bef">More...</a><br /></td></tr>
  101. <tr class="separator:gaa249153384969267f4d3f8d9691e2bef"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:ga6ea7adf304754afee8b6ec33597991f7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__jose__io.html#ga6ea7adf304754afee8b6ec33597991f7">jose_io_multiplex</a> (jose_cfg_t *cfg, <a class="el" href="structjose__io__t.html">jose_io_t</a> **nexts, bool all)</td></tr>
  103. <tr class="memdesc:ga6ea7adf304754afee8b6ec33597991f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new IO object which multiplexes data into multiple IO objects. <a href="#ga6ea7adf304754afee8b6ec33597991f7">More...</a><br /></td></tr>
  104. <tr class="separator:ga6ea7adf304754afee8b6ec33597991f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. </table>
  106. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  107. <p>IO Chaining. </p>
  108. <h2 class="groupheader">Typedef Documentation</h2>
  109. <a id="ga5470c8ebb2993293197844f2782616b5"></a>
  110. <h2 class="memtitle"><span class="permalink"><a href="#ga5470c8ebb2993293197844f2782616b5">&#9670;&nbsp;</a></span>jose_io_auto_t</h2>
  111. <div class="memitem">
  112. <div class="memproto">
  113. <table class="memname">
  114. <tr>
  115. <td class="memname">typedef <a class="el" href="structjose__io__t.html">jose_io_t</a> <a class="el" href="group__jose__io.html#ga5470c8ebb2993293197844f2782616b5">jose_io_auto_t</a></td>
  116. </tr>
  117. </table>
  118. </div><div class="memdoc">
  119. <p>Defines a <a class="el" href="structjose__io__t.html" title="The interface for chained IO. ">jose_io_t</a> which calls <a class="el" href="group__jose__io.html#ga399c2d4e43b0def36e831cc12a50877e" title="Decreases the reference count of an IO object. ">jose_io_decref()</a> at end of scope. </p>
  120. <p>For example: </p><pre class="fragment">void foo() {
  121. uint8_t *buf = NULL;
  122. size_t len = 0;
  123. jose_io_auto_t *io = jose_io_malloc(NULL, &amp;buf, &amp;len);
  124. // jose_io_decref() implicitly called
  125. }</pre>
  126. </div>
  127. </div>
  128. <h2 class="groupheader">Function Documentation</h2>
  129. <a id="ga7fbb0f97c47943576a424a0351df2413"></a>
  130. <h2 class="memtitle"><span class="permalink"><a href="#ga7fbb0f97c47943576a424a0351df2413">&#9670;&nbsp;</a></span>jose_io_incref()</h2>
  131. <div class="memitem">
  132. <div class="memproto">
  133. <table class="memname">
  134. <tr>
  135. <td class="memname"><a class="el" href="structjose__io__t.html">jose_io_t</a>* jose_io_incref </td>
  136. <td>(</td>
  137. <td class="paramtype"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td>
  138. <td class="paramname"><em>io</em></td><td>)</td>
  139. <td></td>
  140. </tr>
  141. </table>
  142. </div><div class="memdoc">
  143. <p>Increases the reference count of an IO object. </p>
  144. <p>This function always succeeds.</p>
  145. <dl class="params"><dt>Parameters</dt><dd>
  146. <table class="params">
  147. <tr><td class="paramname">io</td><td>The <a class="el" href="structjose__io__t.html" title="The interface for chained IO. ">jose_io_t</a> entity you are using. </td></tr>
  148. </table>
  149. </dd>
  150. </dl>
  151. <dl class="section return"><dt>Returns</dt><dd>The value of <code>io</code> (for convenience). </dd></dl>
  152. </div>
  153. </div>
  154. <a id="ga399c2d4e43b0def36e831cc12a50877e"></a>
  155. <h2 class="memtitle"><span class="permalink"><a href="#ga399c2d4e43b0def36e831cc12a50877e">&#9670;&nbsp;</a></span>jose_io_decref()</h2>
  156. <div class="memitem">
  157. <div class="memproto">
  158. <table class="memname">
  159. <tr>
  160. <td class="memname">void jose_io_decref </td>
  161. <td>(</td>
  162. <td class="paramtype"><a class="el" href="structjose__io__t.html">jose_io_t</a> *&#160;</td>
  163. <td class="paramname"><em>io</em></td><td>)</td>
  164. <td></td>
  165. </tr>
  166. </table>
  167. </div><div class="memdoc">
  168. <p>Decreases the reference count of an IO object. </p>
  169. <p>When the reference count reaches zero, io-&gt;free() is called.</p>
  170. <dl class="params"><dt>Parameters</dt><dd>
  171. <table class="params">
  172. <tr><td class="paramname">io</td><td>The <a class="el" href="structjose__io__t.html" title="The interface for chained IO. ">jose_io_t</a> entity you are using. </td></tr>
  173. </table>
  174. </dd>
  175. </dl>
  176. </div>
  177. </div>
  178. <a id="gaa3f3eb70079093e1244ffe516fd1627f"></a>
  179. <h2 class="memtitle"><span class="permalink"><a href="#gaa3f3eb70079093e1244ffe516fd1627f">&#9670;&nbsp;</a></span>jose_io_malloc()</h2>
  180. <div class="memitem">
  181. <div class="memproto">
  182. <table class="memname">
  183. <tr>
  184. <td class="memname"><a class="el" href="structjose__io__t.html">jose_io_t</a>* jose_io_malloc </td>
  185. <td>(</td>
  186. <td class="paramtype">jose_cfg_t *&#160;</td>
  187. <td class="paramname"><em>cfg</em>, </td>
  188. </tr>
  189. <tr>
  190. <td class="paramkey"></td>
  191. <td></td>
  192. <td class="paramtype">void **&#160;</td>
  193. <td class="paramname"><em>buf</em>, </td>
  194. </tr>
  195. <tr>
  196. <td class="paramkey"></td>
  197. <td></td>
  198. <td class="paramtype">size_t *&#160;</td>
  199. <td class="paramname"><em>len</em>&#160;</td>
  200. </tr>
  201. <tr>
  202. <td></td>
  203. <td>)</td>
  204. <td></td><td></td>
  205. </tr>
  206. </table>
  207. </div><div class="memdoc">
  208. <p>Creates a new IO object which collects data into a dynamic buffer. </p>
  209. <p>The dynamic buffer is allocated into the <code>buf</code> pointer you provided and the length of the buffer is stored in <code>len</code>. The pointer referenced by <code>buf</code> must remain valid for the entire duration of the returned IO object.</p>
  210. <p>The default behavior is for the IO object to zero and free the buffer when it is freed. This means that, by default, you own the buffer pointer but the buffer itself is owned by the IO object. You can, however, steal the buffer by setting the buffer pointer to NULL.</p>
  211. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__jose__io.html#ga4912707bb8e60870c661fb14e837bb69" title="Steals the buffer created by the jose_io_malloc() IO object. ">jose_io_malloc_steal()</a> </dd></dl>
  212. <dl class="params"><dt>Parameters</dt><dd>
  213. <table class="params">
  214. <tr><td class="paramname">cfg</td><td>The configuration context (optional). </td></tr>
  215. <tr><td class="paramname">buf</td><td>A buffer pointer pointer. </td></tr>
  216. <tr><td class="paramname">len</td><td>A pointer to the length of the buffer. </td></tr>
  217. </table>
  218. </dd>
  219. </dl>
  220. <dl class="section return"><dt>Returns</dt><dd>The new IO object or NULL on error. </dd></dl>
  221. </div>
  222. </div>
  223. <a id="ga4912707bb8e60870c661fb14e837bb69"></a>
  224. <h2 class="memtitle"><span class="permalink"><a href="#ga4912707bb8e60870c661fb14e837bb69">&#9670;&nbsp;</a></span>jose_io_malloc_steal()</h2>
  225. <div class="memitem">
  226. <div class="memproto">
  227. <table class="memname">
  228. <tr>
  229. <td class="memname">void* jose_io_malloc_steal </td>
  230. <td>(</td>
  231. <td class="paramtype">void **&#160;</td>
  232. <td class="paramname"><em>buf</em></td><td>)</td>
  233. <td></td>
  234. </tr>
  235. </table>
  236. </div><div class="memdoc">
  237. <p>Steals the buffer created by the <a class="el" href="group__jose__io.html#gaa3f3eb70079093e1244ffe516fd1627f" title="Creates a new IO object which collects data into a dynamic buffer. ">jose_io_malloc()</a> IO object. </p>
  238. <p>This convenience function simply returns the value of <code>*buf</code> and then sets <code>*buf</code> to NULL.</p>
  239. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group__jose__io.html#gaa3f3eb70079093e1244ffe516fd1627f" title="Creates a new IO object which collects data into a dynamic buffer. ">jose_io_malloc()</a> </dd></dl>
  240. <dl class="params"><dt>Parameters</dt><dd>
  241. <table class="params">
  242. <tr><td class="paramname">buf</td><td>A pointer to the buffer pointer. </td></tr>
  243. </table>
  244. </dd>
  245. </dl>
  246. <dl class="section return"><dt>Returns</dt><dd>The value of <code>*buf</code> before it is set to NULL. </dd></dl>
  247. </div>
  248. </div>
  249. <a id="gaf9372e0f4d1c3d6ece6c38f31ea7c48c"></a>
  250. <h2 class="memtitle"><span class="permalink"><a href="#gaf9372e0f4d1c3d6ece6c38f31ea7c48c">&#9670;&nbsp;</a></span>jose_io_buffer()</h2>
  251. <div class="memitem">
  252. <div class="memproto">
  253. <table class="memname">
  254. <tr>
  255. <td class="memname"><a class="el" href="structjose__io__t.html">jose_io_t</a>* jose_io_buffer </td>
  256. <td>(</td>
  257. <td class="paramtype">jose_cfg_t *&#160;</td>
  258. <td class="paramname"><em>cfg</em>, </td>
  259. </tr>
  260. <tr>
  261. <td class="paramkey"></td>
  262. <td></td>
  263. <td class="paramtype">void *&#160;</td>
  264. <td class="paramname"><em>buf</em>, </td>
  265. </tr>
  266. <tr>
  267. <td class="paramkey"></td>
  268. <td></td>
  269. <td class="paramtype">size_t *&#160;</td>
  270. <td class="paramname"><em>len</em>&#160;</td>
  271. </tr>
  272. <tr>
  273. <td></td>
  274. <td>)</td>
  275. <td></td><td></td>
  276. </tr>
  277. </table>
  278. </div><div class="memdoc">
  279. <p>Creates a new IO object which collects data into a static buffer. </p>
  280. <p>The size of <code>buf</code> MUST be specified in the variable pointed to by <code>len</code>. This will be the maximum data written. However, after the function returns, the variable pointed to by <code>len</code> will contain the current length of data in the buffer.</p>
  281. <p>Unlike <a class="el" href="group__jose__io.html#gaa3f3eb70079093e1244ffe516fd1627f" title="Creates a new IO object which collects data into a dynamic buffer. ">jose_io_malloc()</a>, you own the buffer and it is not zeroed or freed when the IO object is freed.</p>
  282. <dl class="params"><dt>Parameters</dt><dd>
  283. <table class="params">
  284. <tr><td class="paramname">cfg</td><td>The configuration context (optional). </td></tr>
  285. <tr><td class="paramname">buf</td><td>A buffer pointer. </td></tr>
  286. <tr><td class="paramname">len</td><td>A pointer to the length of the buffer. </td></tr>
  287. </table>
  288. </dd>
  289. </dl>
  290. <dl class="section return"><dt>Returns</dt><dd>The new IO object or NULL on error. </dd></dl>
  291. </div>
  292. </div>
  293. <a id="gaa249153384969267f4d3f8d9691e2bef"></a>
  294. <h2 class="memtitle"><span class="permalink"><a href="#gaa249153384969267f4d3f8d9691e2bef">&#9670;&nbsp;</a></span>jose_io_file()</h2>
  295. <div class="memitem">
  296. <div class="memproto">
  297. <table class="memname">
  298. <tr>
  299. <td class="memname"><a class="el" href="structjose__io__t.html">jose_io_t</a>* jose_io_file </td>
  300. <td>(</td>
  301. <td class="paramtype">jose_cfg_t *&#160;</td>
  302. <td class="paramname"><em>cfg</em>, </td>
  303. </tr>
  304. <tr>
  305. <td class="paramkey"></td>
  306. <td></td>
  307. <td class="paramtype">FILE *&#160;</td>
  308. <td class="paramname"><em>file</em>&#160;</td>
  309. </tr>
  310. <tr>
  311. <td></td>
  312. <td>)</td>
  313. <td></td><td></td>
  314. </tr>
  315. </table>
  316. </div><div class="memdoc">
  317. <p>Creates a new IO object which writes data into a FILE. </p>
  318. <p>This function DOES NOT take ownership of the FILE. You are still responsible for calling fclose() at the appropriate time.</p>
  319. <dl class="params"><dt>Parameters</dt><dd>
  320. <table class="params">
  321. <tr><td class="paramname">cfg</td><td>The configuration context (optional). </td></tr>
  322. <tr><td class="paramname">file</td><td>The output file which MUST be opened for writing or appending. </td></tr>
  323. </table>
  324. </dd>
  325. </dl>
  326. <dl class="section return"><dt>Returns</dt><dd>The new IO object or NULL on error. </dd></dl>
  327. </div>
  328. </div>
  329. <a id="ga6ea7adf304754afee8b6ec33597991f7"></a>
  330. <h2 class="memtitle"><span class="permalink"><a href="#ga6ea7adf304754afee8b6ec33597991f7">&#9670;&nbsp;</a></span>jose_io_multiplex()</h2>
  331. <div class="memitem">
  332. <div class="memproto">
  333. <table class="memname">
  334. <tr>
  335. <td class="memname"><a class="el" href="structjose__io__t.html">jose_io_t</a>* jose_io_multiplex </td>
  336. <td>(</td>
  337. <td class="paramtype">jose_cfg_t *&#160;</td>
  338. <td class="paramname"><em>cfg</em>, </td>
  339. </tr>
  340. <tr>
  341. <td class="paramkey"></td>
  342. <td></td>
  343. <td class="paramtype"><a class="el" href="structjose__io__t.html">jose_io_t</a> **&#160;</td>
  344. <td class="paramname"><em>nexts</em>, </td>
  345. </tr>
  346. <tr>
  347. <td class="paramkey"></td>
  348. <td></td>
  349. <td class="paramtype">bool&#160;</td>
  350. <td class="paramname"><em>all</em>&#160;</td>
  351. </tr>
  352. <tr>
  353. <td></td>
  354. <td>)</td>
  355. <td></td><td></td>
  356. </tr>
  357. </table>
  358. </div><div class="memdoc">
  359. <p>Creates a new IO object which multiplexes data into multiple IO objects. </p>
  360. <p>If <code>all</code> is true, the success of all <code>nexts</code> is required. Otherwise, all but one of the <code>nexts</code> can fail before the error is propagated upward.</p>
  361. <dl class="params"><dt>Parameters</dt><dd>
  362. <table class="params">
  363. <tr><td class="paramname">cfg</td><td>The configuration context (optional). </td></tr>
  364. <tr><td class="paramname">nexts</td><td>A NULL-terminated array of IO object pointers. </td></tr>
  365. <tr><td class="paramname">all</td><td>Whether or not the success of all <code>nexts</code> is required. </td></tr>
  366. </table>
  367. </dd>
  368. </dl>
  369. <dl class="section return"><dt>Returns</dt><dd>The new IO object or NULL on error. </dd></dl>
  370. </div>
  371. </div>
  372. </div><!-- contents -->
  373. <!-- start footer part -->
  374. <hr class="footer"/><address class="footer"><small>
  375. Generated by &#160;<a href="http://www.doxygen.org/index.html">
  376. <img class="footer" src="doxygen.png" alt="doxygen"/>
  377. </a> 1.8.13
  378. </small></address>
  379. </body>
  380. </html>