📄 pop3__client_8c.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>pop3_client.c File Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="main.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> <a class="qindex" href="pages.html">Related Pages</a> <a class="qindex" href="examples.html">Examples</a> </center><hr><h1>/opentcp/pop3/pop3_client.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> <dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Version: </b></dt><dd>1.0 </dl><dl compact><dt><b>Date: </b></dt><dd>20.08.2002 </dl><dl compact><dt><b><a class="el" href="bug.html#_bug000016">Bug: </a></b></dt><dd></dl> <dl compact><dt><b>Warning: </b></dt><dd> </dl><dl compact><dt><b><a class="el" href="todo.html#_todo000018">Todo: </a></b></dt><dd></dl><p>OpenTCP implementation of POP3 client that uses TCP api. For interface functions declarations see <a class="el" href="pop3__client_8h.html">/pop3/pop3_client.h</a>.<p><p>Definition in file <a class="el" href="pop3__client_8c-source.html">pop3_client.c</a>.<p><a href="pop3__client_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Functions</h2></td></tr><tr><td nowrap align=right valign=top>INT8 </td><td valign=bottom><a class="el" href="pop3__client_8c.html#a2">pop3c_connect</a> (UINT32 ip, UINT16 port)</td></tr><tr><td> </td><td><font size=-1><em>Start E-mail reading procedure.</em> <a href="#a2"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="pop3__client_8c.html#a3">pop3c_init</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Initialize POP3 client.</em> <a href="#a3"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="pop3__client_8c.html#a4">pop3c_getstate</a> (void)</td></tr><tr><td> </td><td><font size=-1><em>Get current POP3 client state.</em> <a href="#a4"></a><em></em></font><br><br></td></tr><tr><td colspan=2><br><h2>Variables</h2></td></tr><tr><td nowrap align=right valign=top>UINT8 </td><td valign=bottom><a class="el" href="pop3__client_8c.html#a0">pop3c_init_done</a> = 0</td></tr><tr><td nowrap align=right valign=top><a class="el" href="structpop3c__struct.html">pop3c_struct</a> </td><td valign=bottom><a class="el" href="pop3__client_8c.html#a1">pop3_client</a></td></tr><tr><td> </td><td><font size=-1><em>Holds information needed by the POP3 client for successful operation.</em> <a href="#a1"></a><em></em></font><br><br></td></tr></table><hr><h2>Function Documentation</h2><a name="a2" doxytag="pop3_client.c::pop3c_connect"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> INT8 pop3c_connect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">UINT32 </td> <td class="mdname" nowrap> <em>ip</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>UINT16 </td> <td class="mdname" nowrap> <em>port</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>11.09.2002 </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>ip</em> </td><td>IP address of POP3 server from which to read the e-mails </td></tr><tr><td valign=top><em>port</em> </td><td>Port on the server </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd> <ul><li> -1 - Error <li> >0 - Connection procedure started (OK)</ul></dl>This function is called by user when she wants to start E-mail reading procedure. The function is responsible of establishing connection to POP3 server. After connection is established the POP3 client engine starts to make callbacks to user functions in order to get username information, data etc. <p>Definition at line <a class="el" href="pop3__client_8c-source.html#l00114">114</a> of file <a class="el" href="pop3__client_8c-source.html">pop3_client.c</a>.<p>References <a class="el" href="pop3__client_8h-source.html#l00108">POP3C_CLOSED</a>, <a class="el" href="pop3__client_8h-source.html#l00109">POP3C_OPEN_REQUESTED</a>, <a class="el" href="pop3__client_8h-source.html#l00088">pop3c_struct::remip</a>, <a class="el" href="pop3__client_8h-source.html#l00089">pop3c_struct::remport</a>, <a class="el" href="pop3__client_8h-source.html#l00090">pop3c_struct::sochandle</a>, and <a class="el" href="pop3__client_8h-source.html#l00087">pop3c_struct::state</a>. </td> </tr></table><a name="a3" doxytag="pop3_client.c::pop3c_init"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void pop3c_init </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>12.08.2002</dl>This function should be called once when system starts. Make sure that system services e.g. timers, TCP are initialized before initializing applications! <p>Definition at line <a class="el" href="pop3__client_8c-source.html#l00148">148</a> of file <a class="el" href="pop3__client_8c-source.html">pop3_client.c</a>.<p>References <a class="el" href="pop3__client_8h-source.html#l00098">pop3c_struct::charsinheaderbuf</a>, <a class="el" href="pop3__client_8h-source.html#l00096">pop3c_struct::curmsghlen</a>, <a class="el" href="pop3__client_8h-source.html#l00094">pop3c_struct::curmsgindex</a>, <a class="el" href="pop3__client_8h-source.html#l00095">pop3c_struct::curmsgtotlen</a>, <a class="el" href="pop3__client_8h-source.html#l00099">pop3c_struct::from</a>, <a class="el" href="timers_8c-source.html#l00131">get_timer()</a>, <a class="el" href="pop3__client_8h-source.html#l00097">pop3c_struct::headerbuf</a>, <a class="el" href="pop3__client_8h-source.html#l00093">pop3c_struct::msgtotal</a>, <a class="el" href="pop3__client_8h-source.html#l00108">POP3C_CLOSED</a>, <a class="el" href="pop3__client_8c-source.html#l00077">pop3c_init_done</a>, <a class="el" href="pop3__client_8h-source.html#l00088">pop3c_struct::remip</a>, <a class="el" href="pop3__client_8h-source.html#l00089">pop3c_struct::remport</a>, <a class="el" href="system_8h-source.html#l00163">RESET_SYSTEM</a>, <a class="el" href="pop3__client_8h-source.html#l00090">pop3c_struct::sochandle</a>, <a class="el" href="pop3__client_8h-source.html#l00100">pop3c_struct::subject</a>, <a class="el" href="tcp__ip_8h-source.html#l00225">TCP_DEF_TOUT</a>, <a class="el" href="tcp_8c-source.html#l00155">tcp_getsocket()</a>, <a class="el" href="tcp__ip_8h-source.html#l00214">TCP_TOS_NORMAL</a>, <a class="el" href="tcp__ip_8h-source.html#l00320">TCP_TYPE_CLIENT</a>, <a class="el" href="pop3__client_8h-source.html#l00091">pop3c_struct::tmrhandle</a>, and <a class="el" href="pop3__client_8h-source.html#l00092">pop3c_struct::unacked</a>. </td> </tr></table><a name="a4" doxytag="pop3_client.c::pop3c_getstate"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 pop3c_getstate </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">void </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p><dl compact><dt><b>Author: </b></dt><dd> <ul><li> Jari Lahti (<a href="mailto:jari.lahti@violasystems.com">jari.lahti@violasystems.com</a>) </ul></dl><dl compact><dt><b>Date: </b></dt><dd>10.10.2002 </dl><dl compact><dt><b>Returns: </b></dt><dd>Current POP3 client state</dl>Invoke this function to get current state of the POP3 client <p>Definition at line <a class="el" href="pop3__client_8c-source.html#l00194">194</a> of file <a class="el" href="pop3__client_8c-source.html">pop3_client.c</a>.<p>References <a class="el" href="pop3__client_8h-source.html#l00087">pop3c_struct::state</a>. </td> </tr></table><hr><h2>Variable Documentation</h2><a name="a0" doxytag="pop3_client.c::pop3c_init_done"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> UINT8 pop3c_init_done = 0 </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Defines whether pop3c_init has already been invoked or not <p>Definition at line <a class="el" href="pop3__client_8c-source.html#l00077">77</a> of file <a class="el" href="pop3__client_8c-source.html">pop3_client.c</a>.<p>Referenced by <a class="el" href="pop3__client_8c-source.html#l00148">pop3c_init()</a>. </td> </tr></table><a name="a1" doxytag="pop3_client.c::pop3_client"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> struct <a class="el" href="structpop3c__struct.html">pop3c_struct</a> pop3_client </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>All of the information that the POP3 client is using for operation are stored here. See <a class="el" href="structpop3c__struct.html">pop3c_struct</a> definition for more information about the structure fields. <p>Definition at line <a class="el" href="pop3__client_8c-source.html#l00085">85</a> of file <a class="el" href="pop3__client_8c-source.html">pop3_client.c</a>. </td> </tr></table><hr><address style="align: right;"><small>Generated on Sun Aug 3 20:33:00 2003 for OpenTCP by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -