index-sync-changes.c revision b08b33d1f5ce3721dc2d83586c9cb0ca141331fd
/* Copyright (C) 2007 Timo Sirainen */
#include "lib.h"
#include "array.h"
#include "index-storage.h"
#include "index-sync-changes.h"
struct index_sync_changes_context {
struct index_mailbox *ibox;
struct mail_index_sync_ctx *index_sync_ctx;
struct mail_index_view *sync_view;
struct mail_index_transaction *sync_trans;
struct mail_index_sync_rec sync_rec;
bool dirty_flag_updates;
};
struct index_sync_changes_context *
struct mail_index_sync_ctx *index_sync_ctx,
struct mail_index_view *sync_view,
struct mail_index_transaction *sync_trans,
bool dirty_flag_updates)
{
struct index_sync_changes_context *ctx;
return ctx;
}
{
}
{
}
{
struct mail_index_sync_rec *syncs;
/* keep it */
dest++;
}
}
}
static bool
unsigned int count)
{
const struct mail_index_sync_rec *syncs;
unsigned int i;
for (i = 0; i < count; i++) {
return TRUE;
}
return FALSE;
}
{
unsigned int orig_count;
*sync_expunge_r = FALSE;
*sync_expunge_r = TRUE;
}
break;
}
/* ignore */
break;
break;
if (!ctx->dirty_flag_updates)
break;
/* mark the changes as dirty */
if (seq1 == 0)
break;
(enum mail_flags)MAIL_INDEX_MAIL_FLAG_DIRTY);
break;
}
}
if (!*sync_expunge_r && orig_count > 0) {
}
}
{
}
{
}
enum mailbox_sync_type *sync_type_r)
{
const struct mail_index_sync_rec *syncs;
unsigned int i, count;
enum mailbox_sync_type sync_type = 0;
for (i = 0; i < count; i++) {
break;
if (!array_is_created(keywords)) {
/* no existing keywords */
break;
/* adding, create the array */
}
break;
default:
break;
}
}
*sync_type_r = sync_type;
}