libspopc.h   libspopc.h 
skipping to change at line 97 skipping to change at line 97
/* performs a "APOP" secure pop query and returns server's <128 bytes respo nse */ /* performs a "APOP" secure pop query and returns server's <128 bytes respo nse */
/* this one is not in the API, just for libspopc internal use: */ /* this one is not in the API, just for libspopc internal use: */
char* recv_rest(int sock, char* buf, int cs, int bs); char* recv_rest(int sock, char* buf, int cs, int bs);
/* recv rest of data through sock, given a cs bytes filled buffer of total size bs */ /* recv rest of data through sock, given a cs bytes filled buffer of total size bs */
/* end of data is assumed when data has a "\n.\n" or "\n.\0" string */ /* end of data is assumed when data has a "\n.\n" or "\n.\0" string */
/********************* /*********************
* parsing utilities * * parsing utilities *
*********************/ *********************/
#define DOTLINE(s) ((s)[0]=='\n'&&(s)[1]=='.'&&((s)[2]=='\r'||(s)[2]=='\n')
)
/* be careful, it's different to ESR's pop3.c ;-) */
#define DOTBEGIN(s) ((s)[0]=='\n'&&(s)[1]=='.') #define DOTBEGIN(s) ((s)[0]=='\n'&&(s)[1]=='.')
int dotline(char* buf); int dotline(char* buf);
/* returns 1 if buf contains a "\n.\n" or "\n.\0" or \r.(etc) substring */ /* returns 1 if buf contains a "\n.\n" or "\n.\0" or \r.(etc) substring */
/* buf must be erminated by '\0' */ /* buf must be erminated by '\0' */
int pop3_error(char* string); int pop3_error(char* string);
/* returns 1 if pop server error reply (i.e : -ERR ...) */ /* returns 1 if pop server error reply (i.e : -ERR ...) */
/************************************ /************************************
* reply re-formatting, after query * * reply re-formatting, after query *
************************************/ ************************************/
char* nextline(char* string); char* nextline(char* string);
/* returns a pointer to the next line of given string */ /* returns a pointer to the next line of given string */
char* retr2msg(char* data); char* retr2msg(char* data);
/* returns formatted mail from a pop RETR X query */ /* returns formatted mail from a pop RETR X query */
/* must only be called on data returned by pop3_retr() */ /* must only be called on data returned by pop3_retr() */
void freemsg(char* msg);
/* free the message received by reetr2msg */
int* list2array(char* poplist); int* list2array(char* poplist);
/* returns an int array of sizes of messages from a LIST pop query */ /* returns an int array of sizes of messages from a LIST pop query */
/* array[0] holds id of the array's last element */ /* array[0] holds id of the array's last element */
/* must only be called on data received by a pop3_list(sock,0) request */ /* must only be called on data received by a pop3_list(sock,0) request */
void freelistarray(int* array);
/* free the message sizes array created by list2array */
int listi2size(char* resp); int listi2size(char* resp);
/* grep the given size (in bytes) in resp after a pop3_list(sock,ID) reques t */ /* grep the given size (in bytes) in resp after a pop3_list(sock,ID) reques t */
/* do not use after a pop3_list(sock,0) ! */ /* do not use after a pop3_list(sock,0) ! */
int stat2last(char* resp); int stat2last(char* resp);
/* returns the number of stored messages on pop server */ /* returns the number of stored messages on pop server */
int stat2bytes(char* resp); int stat2bytes(char* resp);
/* returns the sumsize in bytes of all stored messages on server */ /* returns the sumsize in bytes of all stored messages on server */
/* must only be called just after a pop3_stat() request */ /* must only be called just after a pop3_stat() request */
char** uidl2array(char* resp); char** uidl2array(char* resp);
/* returns an array of unique strings for each message id */ /* returns an array of unique strings for each message id */
/* array[0] gives array's last id */ /* array[0] gives array's last id */
/* must only be called just after a pop3_uidl(sock,0) request */ /* must only be called just after a pop3_uidl(sock,0) request */
void freeuidlarray(char** arrray);
/* free the uidl array created by uidl2array */
char* uidli2sig(char* resp); char* uidli2sig(char* resp);
/* grep the pop signature of *one* message signature reply*/ /* grep the pop signature of *one* message signature reply*/
/* should only be called on data received by a pop3_uidl(sock,ID) request * / /* should only be called on data received by a pop3_uidl(sock,ID) request * /
/* do not use it after a pop3_uidl(sock,0) ! */ /* do not use it after a pop3_uidl(sock,0) ! */
/*************************************************** /***************************************************
* high-level API for a SIMPLE MDA/MUA * * high-level API for a SIMPLE MDA/MUA *
***************************************************/ ***************************************************/
/************************************************************************** **** /************************************************************************** ****
 End of changes. 4 change blocks. 
3 lines changed or deleted 9 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/