mail-index-view.c revision b20fb5b1df9d604a7541f5118fc5b4b466d211ef
/* Copyright (C) 2003-2004 Timo Sirainen */
#include "lib.h"
#include "buffer.h"
#include "mail-index-view-private.h"
#include "mail-transaction-log.h"
const struct mail_index_view *src)
{
}
{
}
{
}
{
unsigned int lock_id;
return 0;
return -1;
return -1;
}
/* index was rebuilt */
return -1;
}
} else if (update_index) {
return -1;
}
return 0;
}
{
return -1;
}
{
}
}
{
return view->inconsistent;
}
{
}
{
view->transactions++;
}
{
view->transactions--;
}
struct mail_index_map *map)
{
const struct mail_index_map *const *maps;
for (i = 0; i < size; i++) {
return;
}
} else {
}
}
{
struct mail_index_map *const *maps;
return;
for (i = 0; i < size; i++)
}
{
return view->messages_count;
}
static const struct mail_index_header *
{
}
struct mail_index_map **map_r,
const struct mail_index_record **rec_r)
{
struct mail_index_map *map;
if (mail_index_view_lock(view) < 0)
return -1;
return 1;
}
return -1;
/* look for it in the head mapping */
if (seq == 0) {
return 0;
}
do {
// FIXME: we could be skipping more by uid diff
seq--;
break;
} while (seq > 0);
return 1;
} else {
return 0;
}
}
{
if (mail_index_view_lock(view) < 0)
return -1;
return 0;
}
int nearest_side)
{
else
break;
}
/* no messages available */
return 0;
}
*left_idx_p = left_idx;
if (nearest_side > 0) {
/* we want uid or larger */
} else {
/* we want uid or smaller */
}
}
return idx+1;
}
{
if (mail_index_view_lock(view) < 0)
return -1;
*first_seq_r = 0;
*last_seq_r = 0;
return 0;
}
}
left_idx = 0;
if (*first_seq_r == 0 ||
*first_seq_r = 0;
*last_seq_r = 0;
return 0;
}
*last_seq_r = *first_seq_r;
return 0;
}
/* optimization - binary lookup only from right side: */
return 0;
}
{
#define LOW_UPDATE(x) \
const struct mail_index_record *rec;
*seq_r = 0;
if (mail_index_view_lock(view) < 0)
return -1;
if (low_uid == 1)
seq = 1;
else {
return -1;
if (seq == 0)
return 0;
}
break;
}
}
return 0;
}
const void **data_r)
{
const struct mail_index_ext *ext;
const struct mail_index_record *rec;
int ret;
return -1;
return ret;
}
return ret;
}
{
const struct mail_index_ext *ext;
if (mail_index_view_lock(view) < 0)
return -1;
} else {
return -1;
}
return 0;
}
{
return;
}
{
return view->messages_count;
}
const struct mail_index_header *
{
}
const struct mail_index_record **rec_r)
{
struct mail_index_map *map;
}
struct mail_index_map **map_r,
const struct mail_index_record **rec_r)
{
}
{
}
{
}
{
}
{
struct mail_index_map *map;
}
const void **data_r)
{
}
{
}
{
}
static struct mail_index_view_methods view_methods = {
};
{
struct mail_index_view *view;
return view;
}
struct mail_index_view **view_r)
{
unsigned int lock_id;
return -1;
return -1;
}
return 0;
}
const struct mail_index_ext *
{
const struct mail_index_ext *ext;
return 0;
}