libspopc.h | libspopc.h | |||
---|---|---|---|---|
skipping to change at line 133 | skipping to change at line 133 | |||
/* 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); | void freelistarray(int* array); | |||
/* free the message sizes array created by list2array */ | /* 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 last message's id 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); | |||
/* WARNING: mus not be called after a mail deletion */ | /* WARNING: mus not be called after a mail deletion */ | |||
/* 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 */ | |||
skipping to change at line 184 | skipping to change at line 184 | |||
char** uidl;/* pop messages signature list */ | char** uidl;/* pop messages signature list */ | |||
int bytes;/* total stored (in bytes) on pop server */ | int bytes;/* total stored (in bytes) on pop server */ | |||
int last;/* last message id */ | int last;/* last message id */ | |||
int del;/* 0|1 flag to ask deletion of retrieved messages */ | int del;/* 0|1 flag to ask deletion of retrieved messages */ | |||
}popsession; | }popsession; | |||
#define popbytes(s) ((s)->bytes) | #define popbytes(s) ((s)->bytes) | |||
/* gives the total stored data size (in bytes) on the pop server */ | /* gives the total stored data size (in bytes) on the pop server */ | |||
/* arg 's' is type 'popsession*'; 'result' is type 'int' */ | /* arg 's' is type 'popsession*'; 'result' is type 'int' */ | |||
#define popnum(s) ((s)->last) | ||||
/* gives the number of messages stored on the pop server before any operati | ||||
on */ | ||||
/* arg 's' is type 'popsession*'; 'result' is type 'int' */ | ||||
#define popsetdel(s) ((s)->del=1) | #define popsetdel(s) ((s)->del=1) | |||
/* asks the session to delete any retrieved messages on the server */ | /* asks the session to delete any retrieved messages on the server */ | |||
/* arg 's' is type 'popsession*' */ | /* arg 's' is type 'popsession*' */ | |||
#define popsetundel(s) ((s)->del=0) | #define popsetundel(s) ((s)->del=0) | |||
/* asks the session to not delete any retrieved message on the server */ | /* asks the session to not delete any retrieved message on the server */ | |||
/* arg 's' is type 'popsession*' */ | /* arg 's' is type 'popsession*' */ | |||
#define popmsgsize(s,i) ((s)->list[(i)]) | #define popmsgsize(s,i) ((s)->list[(i)]) | |||
/* gives the size of message 'i' for session 's' */ | /* gives the size of message 'i' for session 's' */ | |||
/* args are type 'session*'(s) and 'int'(i) */ | /* args are type 'session*'(s) and 'int'(i) */ | |||
/* 'i' must *not* be 0 */ | /* 'i' must *not* be 0 */ | |||
#define popmsguid(s,i) ((s)->uidl[(i)]) | #define popmsguid(s,i) ((s)->uidl[(i)]) | |||
/* points to the 'char*' uid (unique signature) of 'int'(i) message id */ | /* points to the 'char*' uid (unique signature) of 'int'(i) message id */ | |||
int poplast(popsession* session); | ||||
/* gives the id of the last message of the current session */ | ||||
int popnum(popsession* session); | ||||
/* gives the current number of stored message. it is != to poplast() */ | ||||
char* popbegin(const char* servername,const char* user, const char* pass, p opsession** sp); | char* popbegin(const char* servername,const char* user, const char* pass, p opsession** sp); | |||
/* prepares, connect and get lists of messages stored on pop server */ | /* prepares, connect and get lists of messages stored on pop server */ | |||
/* you must give a valid servername, user and pass */ | /* you must give a valid servername, user and pass */ | |||
/* returns an error message if a problem occurs, else NULL */ | /* returns an error message if a problem occurs, else NULL */ | |||
char* popgethead(popsession* session, int id); | char* popgethead(popsession* session, int id); | |||
/* returns the header of a message (id from 1 to popnum()) or NULL if bad i d */ | /* returns the header of a message (id between 1 and poplast()) or NULL if bad id */ | |||
char* popgetmsg(popsession* session, int id); | char* popgetmsg(popsession* session, int id); | |||
/* returns a message (id from 1 to popnum()) or NULL if bad id */ | /* returns a message (id between 1 and poplast()) or NULL if bad id */ | |||
int popdelmsg(popsession* session, int id); | int popdelmsg(popsession* session, int id); | |||
/* deletes message 'id' on pop server */ | /* deletes message 'id' on pop server */ | |||
/* returns -1 if server error, 0 else */ | /* returns -1 if server error, 0 else */ | |||
int popcancel(popsession* session); | int popcancel(popsession* session); | |||
/* cancels all previous deletion on pop server */ | /* cancels all previous deletion on pop server */ | |||
/* returns -1 if server error, 0 else */ | /* returns -1 if server error, 0 else */ | |||
void popend(popsession* session); | void popend(popsession* session); | |||
End of changes. 5 change blocks. | ||||
8 lines changed or deleted | 9 lines changed or added | |||