NeoMutt  2023-03-22
Teaching an old dog new tricks
DOXYGEN
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() -. More...
 
int imap_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int maildir_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int mh_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int mbox_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int nntp_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int nm_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 
static int pop_msg_close (struct Mailbox *m, struct Message *msg)
 Close an email - Implements MxOps::msg_close() -. More...
 

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 796 of file compress.c.

797{
798 if (!m->compress_info)
799 return -1;
800
801 struct CompressInfo *ci = m->compress_info;
802
803 const struct MxOps *ops = ci->child_ops;
804 if (!ops)
805 return -1;
806
807 /* Delegate */
808 return ops->msg_close(m, msg);
809}
Private data for compress.
Definition: lib.h:47
const struct MxOps * child_ops
callbacks of de-compressed file
Definition: lib.h:52
void * compress_info
Compressed mbox module private data.
Definition: mailbox.h:120
Definition: mxapi.h:112
int(* msg_close)(struct Mailbox *m, struct Message *msg)
Definition: mxapi.h:283

◆ 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 2153 of file message.c.

2154{
2155 return mutt_file_fclose(&msg->fp);
2156}
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:151
FILE * fp
pointer to the message data
Definition: mxapi.h:44
+ Here is the call graph for this function:

◆ maildir_msg_close()

static int maildir_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 1563 of file maildir.c.

1564{
1565 return mutt_file_fclose(&msg->fp);
1566}
+ Here is the call graph for this function:

◆ 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 1167 of file mh.c.

1168{
1169 return mutt_file_fclose(&msg->fp);
1170}
+ Here is the call graph for this function:

◆ 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 1620 of file mbox.c.

1621{
1622 if (msg->write)
1623 msg->fp = NULL;
1624 else
1625 mutt_file_fclose(&msg->fp);
1626
1627 return 0;
1628}
bool write
nonzero if message is open for writing
Definition: mxapi.h:47
+ Here is the call graph for this function:

◆ 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 2693 of file nntp.c.

2694{
2695 return mutt_file_fclose(&msg->fp);
2696}
+ Here is the call graph for this function:

◆ 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 2373 of file notmuch.c.

2374{
2375 mutt_file_fclose(&(msg->fp));
2376 return 0;
2377}
+ Here is the call graph for this function:

◆ 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 1133 of file pop.c.

1134{
1135 return mutt_file_fclose(&msg->fp);
1136}
+ Here is the call graph for this function: