NeoMutt  2024-04-25-85-g27bab4
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
msg_close()

Close an email. More...

+ Collaboration diagram for msg_close():

Functions

static int comp_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
int imap_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
int maildir_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int mbox_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int mh_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int nntp_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int nm_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 
static int pop_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -.
 

Detailed Description

Close an email.

Parameters
mMailbox
msgMessage to close
Return values
0Success
-1Failure
Precondition
m is not NULL
msg is not NULL

Function Documentation

◆ comp_msg_close()

static int comp_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Definition at line 807 of file compress.c.

808{
809 if (!m->compress_info)
810 return -1;
811
812 struct CompressInfo *ci = m->compress_info;
813
814 const struct MxOps *ops = ci->child_ops;
815 if (!ops)
816 return -1;
817
818 /* Delegate */
819 return ops->msg_close(m, msg);
820}
Private data for compress.
Definition: lib.h:58
const struct MxOps * child_ops
callbacks of de-compressed file
Definition: lib.h:63
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:121
Definition: mxapi.h:91
int(* msg_close)(struct Mailbox *m, struct Message *msg)
Definition: mxapi.h:262

◆ imap_msg_close()

int imap_msg_close ( struct Mailbox m,
struct Message msg 
)

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 2184 of file message.c.

2185{
2186 return mutt_file_fclose(&msg->fp);
2187}
#define mutt_file_fclose(FP)
Definition: file.h:149
FILE * fp
pointer to the message data
Definition: message.h:35

◆ maildir_msg_close()

int maildir_msg_close ( struct Mailbox m,
struct Message msg 
)

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 614 of file message.c.

615{
616 return mutt_file_fclose(&msg->fp);
617}

◆ mbox_msg_close()

static int mbox_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Definition at line 1520 of file mbox.c.

1521{
1522 if (msg->write)
1523 msg->fp = NULL;
1524 else
1525 mutt_file_fclose(&msg->fp);
1526
1527 return 0;
1528}
bool write
nonzero if message is open for writing
Definition: message.h:38

◆ mh_msg_close()

static int mh_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 1182 of file mh.c.

1183{
1184 return mutt_file_fclose(&msg->fp);
1185}

◆ nntp_msg_close()

static int nntp_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Note
May also return EOF Failure, see errno

Definition at line 2778 of file nntp.c.

2779{
2780 return mutt_file_fclose(&msg->fp);
2781}

◆ nm_msg_close()

static int nm_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Definition at line 2395 of file notmuch.c.

2396{
2397 mutt_file_fclose(&(msg->fp));
2398 return 0;
2399}

◆ pop_msg_close()

static int pop_msg_close ( struct Mailbox m,
struct Message msg 
)
static

Close an email - Implements MxOps::msg_close() -.

Return values
0Success
EOFError, see errno

Definition at line 1132 of file pop.c.

1133{
1134 return mutt_file_fclose(&msg->fp);
1135}