struct Buffy *inc = NULL;
struct ImapMbox mx;
int count;
- IMAP_STATUS *status = NULL;
+ struct ImapStatus *status = NULL;
unsigned int olduv, oldun;
long litlen;
short new = 0;
/* caller is prepared to handle the result herself */
if (idata->cmddata && idata->cmdtype == IMAP_CT_STATUS)
{
- memcpy(idata->cmddata, status, sizeof(IMAP_STATUS));
+ memcpy(idata->cmddata, status, sizeof(struct ImapStatus));
return;
}
static int imap_open_mailbox(struct Context *ctx)
{
struct ImapData *idata = NULL;
- IMAP_STATUS *status = NULL;
+ struct ImapStatus *status = NULL;
char buf[LONG_STRING];
char bufout[LONG_STRING];
int count = 0;
struct ImapData *idata = NULL;
char buf[LONG_STRING];
char mbox[LONG_STRING];
- IMAP_STATUS *status = NULL;
+ struct ImapStatus *status = NULL;
if (imap_get_mailbox(path, &idata, buf, sizeof(buf)) < 0)
return -1;
}
/* return cached mailbox stats or NULL if create is 0 */
-IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create)
+struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create)
{
struct List *cur = NULL;
- IMAP_STATUS *status = NULL;
- IMAP_STATUS scache;
+ struct ImapStatus *status = NULL;
+ struct ImapStatus scache;
#ifdef USE_HCACHE
header_cache_t *hc = NULL;
void *uidvalidity = NULL;
for (cur = idata->mboxcache; cur; cur = cur->next)
{
- status = (IMAP_STATUS *) cur->data;
+ status = (struct ImapStatus *) cur->data;
if (imap_mxcmp(mbox, status->name) == 0)
return status;
void imap_mboxcache_free(struct ImapData *idata)
{
struct List *cur = NULL;
- IMAP_STATUS *status = NULL;
+ struct ImapStatus *status = NULL;
for (cur = idata->mboxcache; cur; cur = cur->next)
{
- status = (IMAP_STATUS *) cur->data;
+ status = (struct ImapStatus *) cur->data;
FREE(&status->name);
}
char *path;
};
-typedef struct
+struct ImapStatus
{
char *name;
unsigned int uidnext;
unsigned int uidvalidity;
unsigned int unseen;
-} IMAP_STATUS;
+};
struct ImapList
{
int lastcmd;
struct Buffer *cmdbuf;
- /* cache IMAP_STATUS of visited mailboxes */
+ /* cache ImapStatus of visited mailboxes */
struct List *mboxcache;
/* The following data is all specific to the currently SELECTED mbox */
int imap_check(struct ImapData *idata, int force);
int imap_create_mailbox(struct ImapData *idata, char *mailbox);
int imap_rename_mailbox(struct ImapData *idata, struct ImapMbox *mx, const char *newname);
-IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create);
+struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create);
void imap_mboxcache_free(struct ImapData *idata);
int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post,
int flag, int changed, int invert);
char tempfile[_POSIX_PATH_MAX];
int msgno, idx = msgbegin - 1;
struct ImapHeader h;
- IMAP_STATUS *status = NULL;
+ struct ImapStatus *status = NULL;
int rc, mfhrc, oldmsgcount;
int fetchlast = 0;
int maxuid = 0;