⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pop3c_callbacks.c

📁 opentcp_mcf5282原代码
💻 C
字号:
/***************************************************************************************
File:			pop3c_callbacks.c

Date:			11.9.2002

Version:		0.1

Author:			Jari Lahti (jari@violasystems.com)

Description:	This file contains implementation of POP3 E-mail client callback
				functions (environment depended).

Version Info:	11.9.2002 - First version for ESERV redesign (JaL)
***************************************************************************************/

#include "opentcp.h"

/********************************************************************************
Function:		pop3c_error

Parameters:		void

Return val:		void

Date:			11.9.2002

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

void pop3c_error (void)
{


}


/********************************************************************************
Function:		pop3c_messages

Parameters:		UINT16 msgs

Return val:		void

Date:			11.9.2002

Desc:			This callback function is called by POP3 Client in order to
				indicate the number of new E-mails on server.
*********************************************************************************/

void pop3c_messages (UINT16 msgs)
{

}


/********************************************************************************
Function:		pop3c_msgoffer

Parameters:		UINT16 msgindex - message index
				UINT32 msglen - length of message data
				UINT8* from - buffer containing sender on null terminated string
				UINT8* subject - buffer containing subject on null terminated string

Return val:		INT16 - (-2) reject the mail (delete from server)
						(-1) skip the mail (leave it on server)
						(>=0) read and delete the mail from server

Date:			11.9.2002

Desc:			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
*********************************************************************************/

INT16 pop3c_msgoffer (UINT16 msgindex, UINT32 msglen, UINT8* from, UINT8* subject)
{
	return(-1);
}


/********************************************************************************
Function:		pop3c_getusername

Parameters:		UINT8* dbuf - pointer to buffer to which the username will be stored

Return val:		INT8 - (-1) = Error
					   (>0) = Number of bytes inserted

Date:			11.9.2002

Desc:			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.
*********************************************************************************/

INT8 pop3c_getusername (UINT8* dbuf)
{

	/* Insert your user name to dbuf and return the length of it	*/

	return(-1);

}



/********************************************************************************
Function:		pop3c_getpassword

Parameters:		UINT8* dbuf - pointer to buffer to which the username will be stored

Return val:		INT8 - (-1) = Error
					   (>0) = Number of bytes inserted

Date:			11.9.2002

Desc:			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.
*********************************************************************************/

INT8 pop3c_getpassword (UINT8* dbuf)
{
	/* Insert the password to dbuf and return the length of it	*/

	return(-1);


}


/********************************************************************************
Function:		pop3c_data

Parameters:		UINT8 data

Return val:		void

Date:			14.10.2002

Desc:			This callback function is called by POP3 Client in order to
				give data to application (byte by byte)
*********************************************************************************/

void pop3c_data (UINT8 data)
{

}


/********************************************************************************
Function:		pop3c_allok

Parameters:		void

Return val:		void

Date:			14.10.2002

Desc:			This callback function is called by POP3 Client to indicate
				succesfull reading of E-mails
*********************************************************************************/

void pop3c_allok (void)
{

}

/* EOF	*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -