<!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"/> <title>libkate: High level API</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> </div> <div class="contents"> <h1>High level API</h1><table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__high.html#ga810984fb4ec910632c250672d39feee4">kate_high_decode_init</a> (<a class="el" href="structkate__state.html">kate_state</a> *k)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__high.html#ga4c9bac57e090c34e778b6f080cd4df82">kate_high_decode_packetin</a> (<a class="el" href="structkate__state.html">kate_state</a> *k, <a class="el" href="structkate__packet.html">kate_packet</a> *kp, kate_const <a class="el" href="structkate__event.html">kate_event</a> **ev)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__high.html#ga8faebcd4839fb5a2bced259f8560f47f">kate_high_decode_clear</a> (<a class="el" href="structkate__state.html">kate_state</a> *k)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structkate__comment.html">kate_comment</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__high.html#gab2e3af474f8d074b4a1beeefcc3c0e3e">kate_high_decode_get_comments</a> (<a class="el" href="structkate__state.html">kate_state</a> *k)</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <hr/><h2>Function Documentation</h2> <a class="anchor" id="ga8faebcd4839fb5a2bced259f8560f47f"></a><!-- doxytag: member="kate_high.c::kate_high_decode_clear" ref="ga8faebcd4839fb5a2bced259f8560f47f" args="(kate_state *k)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int kate_high_decode_clear </td> <td>(</td> <td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> <td class="paramname"> <em>k</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Clears a previously initialized <a class="el" href="structkate__state.html">kate_state</a> structure </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>k</em> </td><td>the <a class="el" href="structkate__state.html">kate_state</a> structure to clear </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>0 success </dd> <dd> KATE_E_* error </dd></dl> <p>References <a class="el" href="kate_8c_source.html#l00074">kate_clear()</a>, <a class="el" href="kate_8h_source.html#l00656">KATE_E_INIT</a>, and <a class="el" href="kate_8h_source.html#l00653">KATE_E_INVALID_PARAMETER</a>.</p> </div> </div> <a class="anchor" id="gab2e3af474f8d074b4a1beeefcc3c0e3e"></a><!-- doxytag: member="kate_high.c::kate_high_decode_get_comments" ref="gab2e3af474f8d074b4a1beeefcc3c0e3e" args="(kate_state *k)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="structkate__comment.html">kate_comment</a>* kate_high_decode_get_comments </td> <td>(</td> <td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> <td class="paramname"> <em>k</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Retrieves the comments structure for the given state </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>k</em> </td><td>the <a class="el" href="structkate__state.html">kate_state</a> structure to retrieve comments from </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the comments structure (NULL if error or not found) </dd></dl> </div> </div> <a class="anchor" id="ga810984fb4ec910632c250672d39feee4"></a><!-- doxytag: member="kate_high.c::kate_high_decode_init" ref="ga810984fb4ec910632c250672d39feee4" args="(kate_state *k)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int kate_high_decode_init </td> <td>(</td> <td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> <td class="paramname"> <em>k</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Initializes a <a class="el" href="structkate__state.html">kate_state</a> for high level decoding. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>k</em> </td><td>the <a class="el" href="structkate__state.html">kate_state</a> structure to initialize </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>0 success </dd> <dd> 1 success, and we're at end of stream </dd> <dd> KATE_E_* error </dd></dl> <p>References <a class="el" href="kate__comment_8c_source.html#l00029">kate_comment_init()</a>, <a class="el" href="kate_8h_source.html#l00653">KATE_E_INVALID_PARAMETER</a>, <a class="el" href="kate_8h_source.html#l00654">KATE_E_OUT_OF_MEMORY</a>, <a class="el" href="kate__info_8c_source.html#l00539">kate_info_clear()</a>, <a class="el" href="kate__info_8c_source.html#l00029">kate_info_init()</a>, and <a class="el" href="kate_8h_source.html#l00326">kate_state::ki</a>.</p> </div> </div> <a class="anchor" id="ga4c9bac57e090c34e778b6f080cd4df82"></a><!-- doxytag: member="kate_high.c::kate_high_decode_packetin" ref="ga4c9bac57e090c34e778b6f080cd4df82" args="(kate_state *k, kate_packet *kp, kate_const kate_event **ev)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int kate_high_decode_packetin </td> <td>(</td> <td class="paramtype"><a class="el" href="structkate__state.html">kate_state</a> * </td> <td class="paramname"> <em>k</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structkate__packet.html">kate_packet</a> * </td> <td class="paramname"> <em>kp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">kate_const <a class="el" href="structkate__event.html">kate_event</a> ** </td> <td class="paramname"> <em>ev</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Processes a packet and outputs an event if possible </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>k</em> </td><td>the <a class="el" href="structkate__state.html">kate_state</a> structure representing the stream to decode </td></tr> <tr><td valign="top"></td><td valign="top"><em>kp</em> </td><td>the packet to decode </td></tr> <tr><td valign="top"></td><td valign="top"><em>ev</em> </td><td>where to place a pointer to an event if there we just decoded one </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>0 success </dd> <dd> KATE_E_* error </dd></dl> <p>References <a class="el" href="kate__decode_8c_source.html#l01462">kate_decode_eventout()</a>, <a class="el" href="kate__decode_8c_source.html#l00950">kate_decode_headerin()</a>, <a class="el" href="kate__decode_8c_source.html#l01421">kate_decode_packetin()</a>, <a class="el" href="kate_8h_source.html#l00656">KATE_E_INIT</a>, and <a class="el" href="kate_8h_source.html#l00653">KATE_E_INVALID_PARAMETER</a>.</p> </div> </div> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Wed Dec 23 04:05:07 2009 for libkate by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>