From: Austin Ray Date: Fri, 7 Dec 2018 00:04:26 +0000 (+0000) Subject: mxapi: add mbox_check_stats() X-Git-Tag: 2019-10-25~460^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f921ea19737a14f1737cd174f5f9519be430f5a7;p=neomutt mxapi: add mbox_check_stats() --- diff --git a/mx.c b/mx.c index efd2e425d..2f958377d 100644 --- a/mx.c +++ b/mx.c @@ -1766,3 +1766,14 @@ void mx_cleanup_context(struct Context *ctx) mutt_pattern_free(&ctx->limit_pattern); memset(ctx, 0, sizeof(struct Context)); } + +/** + * mx_mbox_check_stats - Check the statistics for a mailbox - Wrapper for MxOps::mbox_check_stats + */ +int mx_mbox_check_stats(struct Mailbox *m, int flags) +{ + if (!m) + return -1; + + return m->mx_ops->mbox_check_stats(m, flags); +} diff --git a/mx.h b/mx.h index 4e7ea1fa0..b5881d447 100644 --- a/mx.h +++ b/mx.h @@ -143,6 +143,14 @@ struct MxOps * @retval -1 Error */ int (*mbox_check) (struct Context *ctx, int *index_hint); + /** + * mbox_check_stats - Check the mailbox statistics + * @param m Mailbox to check + * @param flags Function flags + * @retval 0 Success + * @retval -1 Failure + */ + int (*mbox_check_stats)(struct Mailbox *m, int flags); /** * mbox_sync - Save changes to the mailbox * @param ctx Mailbox to sync @@ -254,6 +262,7 @@ struct MxOps /* Wrappers for the Mailbox API, see MxOps */ int mx_mbox_check (struct Context *ctx, int *index_hint); +int mx_mbox_check_stats(struct Mailbox *m, int flags); int mx_mbox_close (struct Context **pctx, int *index_hint); struct Context *mx_mbox_open (struct Mailbox *m, const char *path, int flags); int mx_mbox_sync (struct Context *ctx, int *index_hint);