/* Libpop3 - (C)opyright 2000-2001 Kristian Van Der Vliet This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef _PLATON_NET_POP3_H #define _PLATON_NET_POP3_H #define POP3_PORT 110 enum pop3_return_codes { POP3_OK = 0, POP3_UNKNOWN_SERVER, POP3_CONNECT_FAILED, POP3_INVALID_USER_PASS, POP3_GENERAL_FAILURE, POP3_DELE_FAILED, POP3_INVALID_MESSAGE_NUM, POP3_TIMED_OUT, POP3_NO_MAIL }; struct pop3_mail { char *zTo; char *zCc; char *zBcc; char *zReplyTo; char *zSubject; char *zBody; char *zMessageId; char *zFrom; char *zSender; char *zDate; char *zContent; char *zEncoding; char *zInReplyTo; /* Not implemented? char *zHeaders; */ }; #ifdef __cplusplus extern "C"{ #endif int pop3_connect(const char* zServer, int nPort); int pop3_login(const char* zUsername, const char* zPassword); int pop3_getmailcount(void); int pop3_getmailsize(int nMessageNo); int* pop3_getmailsizelist(void); int pop3_getmail(int nMessageNo, int nMessageSize, struct pop3_mail *mail); void pop3_freemail(struct pop3_mail *mail); int pop3_deletemail(int nMessageNo); int pop3_disconnect(void); int pop3_set_timeout(unsigned long nTimeout); #ifdef __cplusplus } #endif #endif /* _PLATON_NET_POP3_H */