#ifndef _IMAP_PRIVATE_H
#define _IMAP_PRIVATE_H 1
-#include <inttypes.h>
-
-#include <lib-ui/curses.h>
+#include <lib-sys/mutt_socket.h>
+#include <lib-ui/lib-ui.h>
#include "imap.h"
-#include <lib-sys/mutt_socket.h>
/* -- symbols -- */
#define IMAP_PORT 143
/* -- data structures -- */
typedef struct {
- unsigned int uid;
+ int uid;
char *path;
} IMAP_CACHE;
/* IMAP command structure */
typedef struct {
- char seq[SEQLEN + 1];
- char *buf;
- unsigned int blen;
int state;
+ char seq[SEQLEN + 1];
+ buffer_t buf;
} IMAP_COMMAND;
typedef struct {
CONNECTION *conn;
unsigned char state;
unsigned char status;
+ unsigned char isnew;
/* let me explain capstr: SASL needs the capability string (not bits).
* we have 3 options:
* 1. rerun CAPABILITY inside SASL function.
unsigned int seqno;
time_t lastread; /* last time we read a command for the server */
/* who knows, one day we may run multiple commands in parallel */
+
IMAP_COMMAND cmd;
/* The following data is all specific to the currently SELECTED mbox */
unsigned int newMailCount;
IMAP_CACHE cache[IMAP_CACHE_LEN];
#ifdef USE_HCACHE
- unsigned long uid_validity;
+ long uid_validity;
#endif
/* all folder flags - system flags AND keywords */
IMAP_DATA *imap_new_idata (void);
void imap_free_idata (IMAP_DATA ** idata);
char *imap_fix_path (IMAP_DATA * idata, char *mailbox, char *path,
- size_t plen);
+ ssize_t plen);
int imap_get_literal_count (const char *buf, long *bytes);
char *imap_get_qualifier (char *buf);
char *imap_next_word (char *s);