index-copy.c revision 100e980900f652c9114997d7153e010e0639effe
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter/* Copyright (C) 2002 Timo Sirainen */
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Waltertypedef struct {
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walterstatic int copy_func(MailIndex *index, MailIndexRecord *rec,
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter unsigned int idx_seq __attr_unused__, void *context)
8dc21698c4ed699801d2b6f9135b3d6cb8512917Lukas Slebodnik inbuf = index->open_mail(index, rec, &internal_date, &deleted);
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter /* save it in destination mailbox */
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter failed = !ctx->dest->save(ctx->dest, rec->msg_flags,
1a94716209e40a9ccaedc7e70f9de961d1cced48Lukas Slebodnikint index_storage_copy(Mailbox *box, Mailbox *destbox,
1a94716209e40a9ccaedc7e70f9de961d1cced48Lukas Slebodnik "Destination mailbox is read-only");
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter if (!index_storage_sync_and_lock(ibox, TRUE, lock_type))
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter mail_custom_flags_list_get(ibox->index->custom_flags);
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter failed = index_messageset_foreach(ibox, messageset, uidset,