1 #ifndef IMAP_H 2 #define IMAP_H 3 4 #define IMAP_BUFSIZE 4096 5 6 #include <openssl/bio.h> 7 8 typedef struct _ImapContext ImapContext; 9 struct _ImapContext { 10 BIO *in; 11 BIO *out; 12 char buf[IMAP_BUFSIZE]; 13 int error; 14 char errstr[IMAP_BUFSIZE]; 15 int recent; 16 }; 17 18 ImapContext *imap_preauth(char * const cmd[]); 19 ImapContext *imap_login(const char *host, const char *login, const char *pass); 20 21 int imap_get_recent(ImapContext *c, const char *folder); 22 23 void imap_destroy(ImapContext *c); 24 25 #endif /* IMAP_H */