index-status.c revision 2fce6f365c7871e4f2914750130421d6b257d963
/* Copyright (C) 2002 Timo Sirainen */
#include "lib.h"
#include "mail-custom-flags.h"
#include "index-storage.h"
{
unsigned int seq;
/* all are recent */
return hdr->messages_count;
}
/* get the first recent message */
return 0;
return 0;
/* now we know the record, but we'd still need to know how many
messages there's after this. there's two way to do this -
get the sequence number thus far (fast, unless there's deleted
messages) or just start reading messages forward until we're at
the end (fast assuming there's only a few recent messages).
it's a bit easier to use the first method and often it should be
faster too.. */
if (seq == 0) {
return 0;
}
}
{
unsigned int seq, lowwater_uid;
/* no unseen messages */
return 0;
}
if (lowwater_uid != 0) {
/* begin scanning from the low water mark */
i_error("index header's seen_messages_count or "
"first_unseen_uid_lowwater is invalid.");
return 0;
} else {
}
} else {
/* begin scanning from the beginning */
seq = 1;
}
seq++;
}
/* update the low water mark if we can get exclusive
lock immediately. */
}
}
static void
const char *result[MAIL_CUSTOM_FLAGS_COUNT])
{
const char **flags;
int i;
for (i = 0; i < MAIL_CUSTOM_FLAGS_COUNT; i++)
}
{
return FALSE;
return mail_storage_set_index_error(ibox);
/* we can get most of the status items without any trouble */
if (items & STATUS_FIRST_UNSEEN_SEQ) {
}
if (items & STATUS_RECENT)
if (items & STATUS_CUSTOM_FLAGS) {
}
/* STATUS sends EXISTS, so we've synced it */
return mail_storage_set_index_error(ibox);
return TRUE;
}