libspopc.h   libspopc.h 
skipping to change at line 115 skipping to change at line 115
typedef int pop3sock_t; typedef int pop3sock_t;
#define BAD_SOCK -1 #define BAD_SOCK -1
#endif /* SSL/Non-SSL */ #endif /* SSL/Non-SSL */
/*************************************** /***************************************
* low-level methods for a pop3 client * * low-level methods for a pop3 client *
***************************************/ ***************************************/
#define SOCKET_TIMEOUT 15 /* seconds a socket can block read/write */ #define SOCKET_TIMEOUT 15 /* seconds a socket can block read/write */
#define TCPBUFLEN 512 /* length of the socket buffer */ #define TCPBUFLEN 512 /* length of generic socket buffer */
#define POPBUF 512 /* lenght of the pop response: 512 bytes as say RFC 1939 #define POPBUF 513 /* length of the pop resp: 512 bytes (RFC1939) + '\0' */
*/
/************************************************************************** **** /************************************************************************** ****
* Be careful, using the low-level API is uncompliant with using the high * Be careful, using the low-level API is uncompliant with using the high
* level API. Here, you make your choice. If you don't know the pop3 protoc ol * level API. Here, you make your choice. If you don't know the pop3 protoc ol
* or what a socket is, it is then warmly recommended to use the *high-leve l* * or what a socket is, it is then warmly recommended to use the *high-leve l*
* API if which is shown far below on this file. * API if which is shown far below on this file.
************************************************************************** ****/ ************************************************************************** ****/
/************** /**************
* connecting * * connecting *
**************/ **************/
skipping to change at line 142 skipping to change at line 142
/* connects to the server through the sock and returns server's welcome */ /* connects to the server through the sock and returns server's welcome */
void pop3_disconnect(pop3sock_t sock, struct hostent* server); void pop3_disconnect(pop3sock_t sock, struct hostent* server);
/* close socket and free server info */ /* close socket and free server info */
/**************** /****************
* pop3 queries * * pop3 queries *
****************/ ****************/
char* pop3_user(pop3sock_t sock, const char* name); char* pop3_user(pop3sock_t sock, const char* name);
/* performs "USER" pop query and returns server's <512 bytes response */ /* performs "USER" pop query and returns server's <=512 bytes resp */
char* pop3_pass(pop3sock_t sock, const char* pw); char* pop3_pass(pop3sock_t sock, const char* pw);
/* performs "PASS" pop query and return server's <512 bytes response */ /* performs "PASS" pop query and return server's <=512 bytes resp */
char* pop3_quit(pop3sock_t sock); char* pop3_quit(pop3sock_t sock);
/* performs "QUIT" pop query and returns server's <512 bytes response */ /* performs "QUIT" pop query and returns server's <=512 bytes resp */
char* pop3_stat(pop3sock_t sock); char* pop3_stat(pop3sock_t sock);
/* performs "STAT" pop query and returns server's <512 bytes response */ /* performs "STAT" pop query and returns server's <=512 bytes resp */
char* pop3_list(pop3sock_t sock, int id); char* pop3_list(pop3sock_t sock, int id);
/* performs a "LIST" pop query and returns server's (long) response */ /* performs a "LIST" pop query and returns server's (long) resp */
char* pop3_retr(pop3sock_t sock, int id); char* pop3_retr(pop3sock_t sock, int id);
/* performs a "RETR" pop query and returns server's (long) response */ /* performs a "RETR" pop query and returns server's (long) resp */
char* pop3_dele(pop3sock_t sock, int id); char* pop3_dele(pop3sock_t sock, int id);
/* performs a "DELE" pop query and returns server's <512 bytes response */ /* performs a "DELE" pop query and returns server's <=512 bytes resp */
char* pop3_noop(pop3sock_t sock); char* pop3_noop(pop3sock_t sock);
/* performs a "NOOP" pop query and returns server's <512 bytes response */ /* performs a "NOOP" pop query and returns server's <=512 bytes resp */
char* pop3_rset(pop3sock_t sock); char* pop3_rset(pop3sock_t sock);
/* performs a "RSET" pop query and returns server's <512 bytes response */ /* performs a "RSET" pop query and returns server's <=512 bytes resp */
char* pop3_top(pop3sock_t sock, int id, int lines); char* pop3_top(pop3sock_t sock, int id, int lines);
/* performs a "TOP" pop query and returns server's (long) response */ /* performs a "TOP" pop query and returns server's (long) resp */
char* pop3_uidl(pop3sock_t sock, int id); char* pop3_uidl(pop3sock_t sock, int id);
/* performs a "UIDL" pop query and returns server's (long) response */ /* performs a "UIDL" pop query and returns server's (long) resp */
char* pop3_apop(pop3sock_t sock, const char* name, const char* digest); char* pop3_apop(pop3sock_t sock, const char* name, const char* digest);
/* performs a "APOP" secure pop query and returns server's <512 bytes respo nse */ /* performs a "APOP" secure pop query and returns server's <=512 bytes resp */
/********************* /*********************
* parsing utilities * * parsing utilities *
*********************/ *********************/
#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 terminated by '\0' */ * buf must be terminated by '\0' */
 End of changes. 13 change blocks. 
15 lines changed or deleted 14 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/