Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

/opentcp/pop3/pop3_client.c File Reference


Detailed Description

Author:
Version:
1.0
Date:
20.08.2002
Bug:
Warning:
Todo:

OpenTCP implementation of POP3 client that uses TCP api. For interface functions declarations see /pop3/pop3_client.h.

Definition in file pop3_client.c.

Go to the source code of this file.

Functions

INT8 pop3c_connect (UINT32 ip, UINT16 port)
 Start E-mail reading procedure.

void pop3c_init (void)
 Initialize POP3 client.

UINT8 pop3c_getstate (void)
 Get current POP3 client state.


Variables

UINT8 pop3c_init_done = 0
pop3c_struct pop3_client
 Holds information needed by the POP3 client for successful operation.


Function Documentation

INT8 pop3c_connect UINT32    ip,
UINT16    port
 

Author:
Date:
11.09.2002
Parameters:
ip  IP address of POP3 server from which to read the e-mails
port  Port on the server
Returns:
  • -1 - Error
  • >0 - Connection procedure started (OK)
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.

Definition at line 114 of file pop3_client.c.

References POP3C_CLOSED, POP3C_OPEN_REQUESTED, pop3c_struct::remip, pop3c_struct::remport, pop3c_struct::sochandle, and pop3c_struct::state.

void pop3c_init void   
 

Author:
Date:
12.08.2002
This function should be called once when system starts. Make sure that system services e.g. timers, TCP are initialized before initializing applications!

Definition at line 148 of file pop3_client.c.

References pop3c_struct::charsinheaderbuf, pop3c_struct::curmsghlen, pop3c_struct::curmsgindex, pop3c_struct::curmsgtotlen, pop3c_struct::from, get_timer(), pop3c_struct::headerbuf, pop3c_struct::msgtotal, POP3C_CLOSED, pop3c_init_done, pop3c_struct::remip, pop3c_struct::remport, RESET_SYSTEM, pop3c_struct::sochandle, pop3c_struct::subject, TCP_DEF_TOUT, tcp_getsocket(), TCP_TOS_NORMAL, TCP_TYPE_CLIENT, pop3c_struct::tmrhandle, and pop3c_struct::unacked.

UINT8 pop3c_getstate void   
 

Author:
Date:
10.10.2002
Returns:
Current POP3 client state
Invoke this function to get current state of the POP3 client

Definition at line 194 of file pop3_client.c.

References pop3c_struct::state.


Variable Documentation

UINT8 pop3c_init_done = 0
 

Defines whether pop3c_init has already been invoked or not

Definition at line 77 of file pop3_client.c.

Referenced by pop3c_init().

struct pop3c_struct pop3_client
 

All of the information that the POP3 client is using for operation are stored here. See pop3c_struct definition for more information about the structure fields.

Definition at line 85 of file pop3_client.c.


Generated on Sun Aug 3 20:33:00 2003 for OpenTCP by doxygen1.2.18