NeoMutt  2025-12-11-911-gd8d604
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mxapi.h File Reference

API for mx backends. More...

#include <stdbool.h>
#include <stdint.h>
#include "mailbox.h"
+ Include dependency graph for mxapi.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  MxOps
 

Typedefs

typedef uint8_t OpenMailboxFlags
 
typedef uint8_t CheckStatsFlags
 

Enumerations

enum  OpenMailboxFlag {
  MUTT_OPEN_NONE = 0 , MUTT_NOSORT = 1U << 0 , MUTT_APPEND = 1U << 1 , MUTT_READONLY = 1U << 2 ,
  MUTT_QUIET = 1U << 3 , MUTT_PEEK = 1U << 5 , MUTT_APPENDNEW = 1U << 6
}
 Flags for mutt_open_mailbox(), e.g. More...
 
enum  CheckStatsFlag { MUTT_MAILBOX_CHECK_NONE = 0 , MUTT_MAILBOX_CHECK_POSTPONED = 1U << 0 , MUTT_MAILBOX_CHECK_STATS = 1U << 1 , MUTT_MAILBOX_CHECK_IMMEDIATE = 1U << 2 }
 Flags for mutt_mailbox_check. More...
 
enum  MxStatus {
  MX_STATUS_ERROR = -1 , MX_STATUS_OK , MX_STATUS_NEW_MAIL , MX_STATUS_LOCKED ,
  MX_STATUS_REOPENED , MX_STATUS_FLAGS
}
 Return values from mbox_check(), mbox_check_stats(), mbox_sync(), and mbox_close() More...
 
enum  MxOpenReturns { MX_OPEN_OK , MX_OPEN_ERROR , MX_OPEN_ABORT }
 Return values for mbox_open() More...
 

Detailed Description

API for mx backends.

Authors
  • Pietro Cerutti
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file mxapi.h.

Typedef Documentation

◆ OpenMailboxFlags

typedef uint8_t OpenMailboxFlags

Definition at line 51 of file mxapi.h.

◆ CheckStatsFlags

typedef uint8_t CheckStatsFlags

Definition at line 63 of file mxapi.h.

Enumeration Type Documentation

◆ OpenMailboxFlag

Flags for mutt_open_mailbox(), e.g.

MUTT_NOSORT

Enumerator
MUTT_OPEN_NONE 

No flags are set.

MUTT_NOSORT 

Do not sort the mailbox after opening it.

MUTT_APPEND 

Open mailbox for appending messages.

MUTT_READONLY 

Open in read-only mode.

MUTT_QUIET 

Do not print any messages.

MUTT_PEEK 

Revert atime back after taking a look (if applicable)

MUTT_APPENDNEW 

Set in mx_open_mailbox_append if the mailbox doesn't exist.

Used by maildir/mh to create the mailbox.

Definition at line 40 of file mxapi.h.

41{
42 MUTT_OPEN_NONE = 0,
43 MUTT_NOSORT = 1U << 0,
44 MUTT_APPEND = 1U << 1,
45 MUTT_READONLY = 1U << 2,
46 MUTT_QUIET = 1U << 3,
47 MUTT_PEEK = 1U << 5,
48 MUTT_APPENDNEW = 1U << 6,
50};
@ MUTT_QUIET
Do not print any messages.
Definition mxapi.h:46
@ MUTT_APPENDNEW
Set in mx_open_mailbox_append if the mailbox doesn't exist.
Definition mxapi.h:48
@ MUTT_READONLY
Open in read-only mode.
Definition mxapi.h:45
@ MUTT_NOSORT
Do not sort the mailbox after opening it.
Definition mxapi.h:43
@ MUTT_APPEND
Open mailbox for appending messages.
Definition mxapi.h:44
@ MUTT_OPEN_NONE
No flags are set.
Definition mxapi.h:42
@ MUTT_PEEK
Revert atime back after taking a look (if applicable)
Definition mxapi.h:47

◆ CheckStatsFlag

Flags for mutt_mailbox_check.

Enumerator
MUTT_MAILBOX_CHECK_NONE 

No flags are set.

MUTT_MAILBOX_CHECK_POSTPONED 

Make sure the number of postponed messages is updated.

MUTT_MAILBOX_CHECK_STATS 

Ignore mail_check_stats and calculate statistics (used by <check-stats>)

MUTT_MAILBOX_CHECK_IMMEDIATE 

Don't postpone the actual checking.

Definition at line 56 of file mxapi.h.

57{
60 MUTT_MAILBOX_CHECK_STATS = 1U << 1,
62};
@ MUTT_MAILBOX_CHECK_STATS
Ignore mail_check_stats and calculate statistics (used by <check-stats>)
Definition mxapi.h:60
@ MUTT_MAILBOX_CHECK_POSTPONED
Make sure the number of postponed messages is updated.
Definition mxapi.h:59
@ MUTT_MAILBOX_CHECK_NONE
No flags are set.
Definition mxapi.h:58
@ MUTT_MAILBOX_CHECK_IMMEDIATE
Don't postpone the actual checking.
Definition mxapi.h:61

◆ MxStatus

enum MxStatus

Return values from mbox_check(), mbox_check_stats(), mbox_sync(), and mbox_close()

Enumerator
MX_STATUS_ERROR 

An error occurred.

MX_STATUS_OK 

No changes.

MX_STATUS_NEW_MAIL 

New mail received in Mailbox.

MX_STATUS_LOCKED 

Couldn't lock the Mailbox.

MX_STATUS_REOPENED 

Mailbox was reopened.

MX_STATUS_FLAGS 

Nondestructive flags change (IMAP)

Definition at line 69 of file mxapi.h.

70{
71 MX_STATUS_ERROR = -1,
77};
@ MX_STATUS_LOCKED
Couldn't lock the Mailbox.
Definition mxapi.h:74
@ MX_STATUS_ERROR
An error occurred.
Definition mxapi.h:71
@ MX_STATUS_OK
No changes.
Definition mxapi.h:72
@ MX_STATUS_FLAGS
Nondestructive flags change (IMAP)
Definition mxapi.h:76
@ MX_STATUS_REOPENED
Mailbox was reopened.
Definition mxapi.h:75
@ MX_STATUS_NEW_MAIL
New mail received in Mailbox.
Definition mxapi.h:73

◆ MxOpenReturns

Return values for mbox_open()

Enumerator
MX_OPEN_OK 

Open succeeded.

MX_OPEN_ERROR 

Open failed with an error.

MX_OPEN_ABORT 

Open was aborted.

Definition at line 82 of file mxapi.h.

83{
87};
@ MX_OPEN_ERROR
Open failed with an error.
Definition mxapi.h:85
@ MX_OPEN_ABORT
Open was aborted.
Definition mxapi.h:86
@ MX_OPEN_OK
Open succeeded.
Definition mxapi.h:84