NeoMutt
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() -.
 
static int maildir_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 mbox_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 809 of file compress.c.

810{
811 if (!m->compress_info)
812 return -1;
813
814 struct CompressInfo *ci = m->compress_info;
815
816 const struct MxOps *ops = ci->child_ops;
817 if (!ops)
818 return -1;
819
820 /* Delegate */
821 return ops->msg_close(m, msg);
822}
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: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 2163 of file message.c.

2164{
2165 return mutt_file_fclose(&msg->fp);
2166}
int mutt_file_fclose(FILE **fp)
Close a FILE handle (and NULL the pointer)
Definition: file.c:152
FILE * fp
pointer to the message data
Definition: message.h:35
+ 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 1599 of file maildir.c.

1600{
1601 return mutt_file_fclose(&msg->fp);
1602}
+ 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 1158 of file mh.c.

1159{
1160 return mutt_file_fclose(&msg->fp);
1161}
+ 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 1526 of file mbox.c.

1527{
1528 if (msg->write)
1529 msg->fp = NULL;
1530 else
1531 mutt_file_fclose(&msg->fp);
1532
1533 return 0;
1534}
bool write
nonzero if message is open for writing
Definition: message.h:38
+ 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 2726 of file nntp.c.

2727{
2728 return mutt_file_fclose(&msg->fp);
2729}
+ 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 2381 of file notmuch.c.

2382{
2383 mutt_file_fclose(&(msg->fp));
2384 return 0;
2385}
+ 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 1129 of file pop.c.

1130{
1131 return mutt_file_fclose(&msg->fp);
1132}
+ Here is the call graph for this function: