imap-status.c revision a91a2767511952acb79044b8405f69cfd8f1d15b
/* Copyright (C) 2002-2007 Timo Sirainen */
#include "common.h"
#include "str.h"
#include "imap-quote.h"
#include "imap-status.h"
enum mailbox_status_items *items_r)
{
const char *item;
enum mailbox_status_items items;
items = 0;
/* list may contain only atoms */
"Status list contains non-atoms.");
return -1;
}
items |= STATUS_MESSAGES;
items |= STATUS_RECENT;
items |= STATUS_UIDNEXT;
items |= STATUS_UNSEEN;
else {
return -1;
}
}
return 0;
}
struct mailbox_status *status_r)
{
/* this mailbox is selected */
} else {
/* open the mailbox */
return FALSE;
if (imap_sync_nonselected(box, 0) < 0)
}
if (!failed)
mailbox_close(&box);
return !failed;
}
enum mailbox_status_items items,
const struct mailbox_status *status)
{
if (items & STATUS_MESSAGES)
if (items & STATUS_RECENT)
if (items & STATUS_UIDNEXT)
if (items & STATUS_UIDVALIDITY)
if (items & STATUS_UNSEEN)
if (items != 0)
}