Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

popserver_functions_t Struct Reference

These functions are called by the pop3 server. More...

#include <popserver.h>


Data Fields

int(* user )(struct popstate_t *p, char *username)
 called when the client sends username

int(* pass )(struct popstate_t *p, char *password)
 called when the client sends password

int(* quit )(struct popstate_t *p)
 called to trucate a section with no mailbox update

int(* quit_update )(struct popstate_t *p)
 called to quit updating mailbox status

int(* top )(struct popstate_t *p, long int msg, long int lines, char **buffer, struct asyncop_t *a)
 called to get first lines of a message

int(* retr )(struct popstate_t *p, int msg, char **buffer, struct asyncop_t *a)
 retrive the full message

int(* stat )(struct popstate_t *p, int *messages, int *size)
 summarize mailbox status

int(* uidl )(struct popstate_t *p, int msg, char **buffer)
 get the UIDL of the message msg

int(* uidl_all )(struct popstate_t *p, char **buffer)
 get all uidls, each line is "msg_number uidl\r\n"

int(* list )(struct popstate_t *p, int msg, char **buffer)
 list a mesage (print the size)

int(* list_all )(struct popstate_t *p, char **buffer)
 lists all messages, each line is "msg_number size\r\n"

int(* rset )(struct popstate_t *p)
 resets the mailbox to the initial state

int(* dele )(struct popstate_t *p, int msg)
 marks for deletion the message

int(* noop )(struct popstate_t *p)
 prevents the timeout

void *(* new_other )(void)
 pointer to a function that creates the "other" fields in struct popstate_t

void(* delete_other )(void *)
 pointer to a function that deletes the "other" fields in struct popstate_t


Detailed Description

These functions are called by the pop3 server.

Parameters:
buffer must be set to a memory region allocated dinamically and must be freed by the popserver after sending it to the client. Multiline answr must have this form "line_1\r\nline_2\r\n.....line_n\r\n"
p is always the same and may be used to decide what to do
Returns:
is 0 on success, see the defines for specific error codes.

Definition at line 83 of file popserver.h.


Field Documentation

int(* popserver_functions_t::dele)(struct popstate_t*p,int msg)
 

marks for deletion the message

void(* popserver_functions_t::delete_other)(void *)
 

pointer to a function that deletes the "other" fields in struct popstate_t

int(* popserver_functions_t::list)(struct popstate_t*p,int msg,char **buffer)
 

list a mesage (print the size)

int(* popserver_functions_t::list_all)(struct popstate_t*p,char **buffer)
 

lists all messages, each line is "msg_number size\r\n"

void*(* popserver_functions_t::new_other)(void)
 

pointer to a function that creates the "other" fields in struct popstate_t

int(* popserver_functions_t::noop)(struct popstate_t*p)
 

prevents the timeout

int(* popserver_functions_t::pass)(struct popstate_t*p,char* password)
 

called when the client sends password

int(* popserver_functions_t::quit)(struct popstate_t*p)
 

called to trucate a section with no mailbox update

int(* popserver_functions_t::quit_update)(struct popstate_t*p)
 

called to quit updating mailbox status

int(* popserver_functions_t::retr)(struct popstate_t*p,int msg,char **buffer, struct asyncop_t *a)
 

retrive the full message

int(* popserver_functions_t::rset)(struct popstate_t*p)
 

resets the mailbox to the initial state

int(* popserver_functions_t::stat)(struct popstate_t*p,int *messages,int* size)
 

summarize mailbox status

Parameters:
messages will be set to the number of messages in the mailbox
size the quota of disk used by the mailbox in octects

int(* popserver_functions_t::top)(struct popstate_t*p, long int msg,long int lines,char **buffer,struct asyncop_t *a)
 

called to get first lines of a message

Parameters:
msg number of the message
lines number of lines, header excluded, to get.
buffer set to NULL on error

int(* popserver_functions_t::uidl)(struct popstate_t*p,int msg,char **buffer)
 

get the UIDL of the message msg

int(* popserver_functions_t::uidl_all)(struct popstate_t*p,char **buffer)
 

get all uidls, each line is "msg_number uidl\r\n"

int(* popserver_functions_t::user)(struct popstate_t*p,char* username)
 

called when the client sends username


The documentation for this struct was generated from the following file:
Generated on Wed May 5 15:48:04 2004 for LiberoPOPs by doxygen 1.3.6-20040222