* If the mailbox has been changed then re-compress the tmp file.
* Then delete the tmp file.
*/
-static int comp_mbox_close(struct Context *ctx)
+static int comp_mbox_close(struct Mailbox *m)
{
- if (!ctx || !ctx->mailbox || !ctx->mailbox->compress_info)
+ if (!m || !m->compress_info)
return -1;
- struct Mailbox *m = ctx->mailbox;
struct CompressInfo *ci = m->compress_info;
const struct MxOps *ops = ci->child_ops;
return -1;
}
- ops->mbox_close(ctx);
+ ops->mbox_close(m);
/* sync has already been called, so we only need to delete some files */
if (!m->append)
/**
* imap_mbox_close - Implements MxOps::mbox_close()
*/
-static int imap_mbox_close(struct Context *ctx)
+static int imap_mbox_close(struct Mailbox *m)
{
- if (!ctx || !ctx->mailbox)
+ if (!m)
return -1;
- struct Mailbox *m = ctx->mailbox;
-
struct ImapAccountData *adata = imap_adata_get(m);
struct ImapMboxData *mdata = imap_mdata_get(m);
int maildir_path_parent(char *buf, size_t buflen);
int maildir_path_pretty(char *buf, size_t buflen, const char *folder);
int mh_mbox_check (struct Context *ctx, int *index_hint);
-int mh_mbox_close (struct Context *ctx);
+int mh_mbox_close (struct Mailbox *m);
int mh_mbox_sync (struct Context *ctx, int *index_hint);
int mh_msg_close (struct Mailbox *m, struct Message *msg);
* mh_mbox_close - Implements MxOps::mbox_close()
* @retval 0 Always
*/
-int mh_mbox_close(struct Context *ctx)
+int mh_mbox_close(struct Mailbox *m)
{
return 0;
}
/**
* mbox_mbox_close - Implements MxOps::mbox_close()
*/
-static int mbox_mbox_close(struct Context *ctx)
+static int mbox_mbox_close(struct Mailbox *m)
{
- if (!ctx || !ctx->mailbox)
+ if (!m)
return -1;
- struct Mailbox *m = ctx->mailbox;
-
struct MboxAccountData *adata = mbox_adata_get(m);
if (!adata)
return -1;
mutt_mailbox_setnotified(m);
if (m->mx_ops)
- m->mx_ops->mbox_close(ctx);
+ m->mx_ops->mbox_close(m);
mutt_hash_destroy(&m->subj_hash);
mutt_hash_destroy(&m->id_hash);
int (*mbox_sync) (struct Context *ctx, int *index_hint);
/**
* mbox_close - Close a mailbox
- * @param ctx Mailbox to close
+ * @param m Mailbox to close
* @retval 0 Success
* @retval -1 Failure
*/
- int (*mbox_close) (struct Context *ctx);
+ int (*mbox_close) (struct Mailbox *m);
/**
* msg_open - Open an email message in mailbox
* @param m Mailbox
* nntp_mbox_close - Implements MxOps::mbox_close()
* @retval 0 Always
*/
-static int nntp_mbox_close(struct Context *ctx)
+static int nntp_mbox_close(struct Mailbox *m)
{
- if (!ctx || !ctx->mailbox)
+ if (!m)
return -1;
- struct Mailbox *m = ctx->mailbox;
-
struct NntpMboxData *mdata = m->mdata, *tmp_mdata = NULL;
if (!mdata)
return 0;
*
* Nothing to do.
*/
-static int nm_mbox_close(struct Context *ctx)
+static int nm_mbox_close(struct Mailbox *m)
{
return 0;
}
/**
* pop_mbox_close - Implements MxOps::mbox_close()
*/
-static int pop_mbox_close(struct Context *ctx)
+static int pop_mbox_close(struct Mailbox *m)
{
- if (!ctx || !ctx->mailbox)
+ if (!m)
return -1;
- struct Mailbox *m = ctx->mailbox;
-
struct PopAccountData *adata = pop_get_adata(m);
if (!adata)
return 0;