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

/opentcp/pop3/pop3c_callbacks.c File Reference


Detailed Description

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

This file holds empty callback functions needed by the POP3 client to get user-specific e-mail data from the application. Add your own code to perform the requested tasks.

Definition in file pop3c_callbacks.c.

Go to the source code of this file.

Functions

void pop3c_error (void)
 POP3 client error handler.

void pop3c_messages (UINT16 msgs)
 Invoked to inform user app about the number of new e-mails.

INT16 pop3c_msgoffer (UINT16 index, UINT32 msglen, UINT8 *from, UINT8 *subject)
 Offers e-mail message to the user app.

INT8 pop3c_getusername (UINT8 *dbuf)
 Get user name that is to be used for loging to the server.

INT8 pop3c_getpassword (UINT8 *dbuf)
 Get password that is to be used for loging to the server.

void pop3c_allok (void)
 Indicates succesfull reading of E-mails.

void pop3c_data (UINT8 data)
 Receives E-mail data.


Function Documentation

void pop3c_error void   
 

Author:
Date:
11.09.2002
This callback function is called by POP3 Client when there happens error of some kind (timeout, losing of connection etc.).

Definition at line 82 of file pop3c_callbacks.c.

void pop3c_messages UINT16    msgs
 

Author:
Date:
11.09.2002
Parameters:
msgs  Number of new e-mails waiting on the server
This callback function is called by POP3 Client in order to indicate the number of new E-mails on server.

Definition at line 96 of file pop3c_callbacks.c.

INT16 pop3c_msgoffer UINT16    index,
UINT32    msglen,
UINT8 *    from,
UINT8 *    subject
 

Author:
Date:
11.09.2002
Parameters:
index  index number of message
msglen  Length of message data
from  Buffer containing sender (null terminated string)
subject  Buffer containing subject (null terminated string)
Returns:
  • -2 - Reject the e-mail (delete from server)
  • -1 - Skip the e-mail (leave it on server)
  • >=0 - Read and delete the mail from server
This callback function is called by POP3 Client in order to offer the e-mail message to user. User can reject this mail, skip this, mail or read it as indicated with return value

Definition at line 117 of file pop3c_callbacks.c.

INT8 pop3c_getusername UINT8 *    dbuf
 

Author:
Date:
11.09.2002
Parameters:
dbuf  Pointer to buffer to which the username will be stored
Returns:
  • -1 - Error
  • >0 - Number of bytes inserted
This callback function is called by POP3 Client when it wants to know the username of us. The user is responsible of storing that name to destbuf without NULL termination ('\0') and returning number of bytes on that username.

Definition at line 135 of file pop3c_callbacks.c.

INT8 pop3c_getpassword UINT8 *    dbuf
 

Author:
Date:
11.09.2002
Parameters:
dbuf  Pointer to buffer to which the password will be stored
Returns:
  • -1 - Error
  • >0 - Number of bytes inserted
This callback function is called by POP3 Client when it wants to know the password of us. The user is responsible of storing that name to destbuf without NULL termination ('\0') and returning number of bytes on the password.

Definition at line 155 of file pop3c_callbacks.c.

void pop3c_allok void   
 

Author:
Date:
14.10.2002
This callback function is called by POP3 Client to indicate succesfull reading of E-mails

Definition at line 169 of file pop3c_callbacks.c.

void pop3c_data UINT8    data
 

Author:
Date:
14.10.2002
Parameters:
data  E-mail data as received by POP3 client
This callback function is called by POP3 Client in order to give data to application

Definition at line 183 of file pop3c_callbacks.c.


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