NeoMutt  2024-04-16-36-g75b6fb
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mxapi.h File Reference

API for mx backends. More...

#include "config.h"
#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
 

Macros

#define MUTT_OPEN_NO_FLAGS   0
 No flags are set.
 
#define MUTT_NOSORT   (1 << 0)
 Do not sort the mailbox after opening it.
 
#define MUTT_APPEND   (1 << 1)
 Open mailbox for appending messages.
 
#define MUTT_READONLY   (1 << 2)
 Open in read-only mode.
 
#define MUTT_QUIET   (1 << 3)
 Do not print any messages.
 
#define MUTT_NEWFOLDER   (1 << 4)
 Create a new folder - same as MUTT_APPEND, but uses mutt_file_fopen() with mode "w" for mbox-style folders.
 
#define MUTT_PEEK   (1 << 5)
 Revert atime back after taking a look (if applicable)
 
#define MUTT_APPENDNEW   (1 << 6)
 Set in mx_open_mailbox_append if the mailbox doesn't exist.
 
#define MUTT_MAILBOX_CHECK_NO_FLAGS   0
 No flags are set.
 
#define MUTT_MAILBOX_CHECK_FORCE   (1 << 0)
 Ignore MailboxTime and check for new mail.
 
#define MUTT_MAILBOX_CHECK_FORCE_STATS   (1 << 1)
 Ignore MailboxType and calculate statistics.
 
#define MUTT_MAILBOX_CHECK_IMMEDIATE   (1 << 2)
 Don't postpone the actual checking.
 

Typedefs

typedef uint8_t OpenMailboxFlags
 Flags for mutt_open_mailbox(), e.g. MUTT_NOSORT.
 
typedef uint8_t CheckStatsFlags
 Flags for mutt_mailbox_check.
 

Enumerations

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.

Macro Definition Documentation

◆ MUTT_OPEN_NO_FLAGS

#define MUTT_OPEN_NO_FLAGS   0

No flags are set.

Definition at line 40 of file mxapi.h.

◆ MUTT_NOSORT

#define MUTT_NOSORT   (1 << 0)

Do not sort the mailbox after opening it.

Definition at line 41 of file mxapi.h.

◆ MUTT_APPEND

#define MUTT_APPEND   (1 << 1)

Open mailbox for appending messages.

Definition at line 42 of file mxapi.h.

◆ MUTT_READONLY

#define MUTT_READONLY   (1 << 2)

Open in read-only mode.

Definition at line 43 of file mxapi.h.

◆ MUTT_QUIET

#define MUTT_QUIET   (1 << 3)

Do not print any messages.

Definition at line 44 of file mxapi.h.

◆ MUTT_NEWFOLDER

#define MUTT_NEWFOLDER   (1 << 4)

Create a new folder - same as MUTT_APPEND, but uses mutt_file_fopen() with mode "w" for mbox-style folders.

This will truncate an existing file.

Definition at line 47 of file mxapi.h.

◆ MUTT_PEEK

#define MUTT_PEEK   (1 << 5)

Revert atime back after taking a look (if applicable)

Definition at line 48 of file mxapi.h.

◆ MUTT_APPENDNEW

#define MUTT_APPENDNEW   (1 << 6)

Set in mx_open_mailbox_append if the mailbox doesn't exist.

Used by maildir/mh to create the mailbox.

Definition at line 50 of file mxapi.h.

◆ MUTT_MAILBOX_CHECK_NO_FLAGS

#define MUTT_MAILBOX_CHECK_NO_FLAGS   0

No flags are set.

Definition at line 53 of file mxapi.h.

◆ MUTT_MAILBOX_CHECK_FORCE

#define MUTT_MAILBOX_CHECK_FORCE   (1 << 0)

Ignore MailboxTime and check for new mail.

Definition at line 54 of file mxapi.h.

◆ MUTT_MAILBOX_CHECK_FORCE_STATS

#define MUTT_MAILBOX_CHECK_FORCE_STATS   (1 << 1)

Ignore MailboxType and calculate statistics.

Definition at line 55 of file mxapi.h.

◆ MUTT_MAILBOX_CHECK_IMMEDIATE

#define MUTT_MAILBOX_CHECK_IMMEDIATE   (1 << 2)

Don't postpone the actual checking.

Definition at line 56 of file mxapi.h.

Typedef Documentation

◆ OpenMailboxFlags

typedef uint8_t OpenMailboxFlags

Flags for mutt_open_mailbox(), e.g. MUTT_NOSORT.

Definition at line 39 of file mxapi.h.

◆ CheckStatsFlags

typedef uint8_t CheckStatsFlags

Flags for mutt_mailbox_check.

Definition at line 52 of file mxapi.h.

Enumeration Type Documentation

◆ 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 62 of file mxapi.h.

63{
64 MX_STATUS_ERROR = -1,
70};
@ MX_STATUS_LOCKED
Couldn't lock the Mailbox.
Definition: mxapi.h:67
@ MX_STATUS_ERROR
An error occurred.
Definition: mxapi.h:64
@ MX_STATUS_OK
No changes.
Definition: mxapi.h:65
@ MX_STATUS_FLAGS
Nondestructive flags change (IMAP)
Definition: mxapi.h:69
@ MX_STATUS_REOPENED
Mailbox was reopened.
Definition: mxapi.h:68
@ MX_STATUS_NEW_MAIL
New mail received in Mailbox.
Definition: mxapi.h:66

◆ 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 75 of file mxapi.h.

76{
80};
@ MX_OPEN_ERROR
Open failed with an error.
Definition: mxapi.h:78
@ MX_OPEN_ABORT
Open was aborted.
Definition: mxapi.h:79
@ MX_OPEN_OK
Open succeeded.
Definition: mxapi.h:77