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, void *data)
 retrive first lines of message, must use the calback
int(* retr )(struct popstate_t *p, int msg, void *data)
 retrive the full message, should use the callback
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(* 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 62 of file popserver.h.


Field Documentation

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

called when the client sends username

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::top)(struct popstate_t *p, long int msg, long int lines, void *data)

retrive first lines of message, must use the calback

int(* popserver_functions_t::retr)(struct popstate_t *p, int msg, void *data)

retrive the full message, should use the callback

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::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::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"

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

resets the mailbox to the initial state

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

marks for deletion the message

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

prevents the timeout

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


The documentation for this struct was generated from the following file:

Generated on Sat Nov 1 15:55:53 2008 for FreePOPs by  doxygen 1.5.6