NeoMutt  2021-10-29-225-gb9986f
Teaching an old dog new tricks
DOXYGEN
mailbox.h File Reference

Representation of a mailbox. More...

#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#include <time.h>
#include "mutt/lib.h"
+ Include dependency graph for mailbox.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Mailbox
 A mailbox. More...
 
struct  MailboxNode
 List of Mailboxes. More...
 
struct  EventMailbox
 An Event that happened to a Mailbox. More...
 

Macros

#define MB_NORMAL   0
 
#define MB_HIDDEN   1
 
#define MUTT_ACL_NO_FLAGS   0
 No flags are set. More...
 
#define MUTT_ACL_ADMIN   (1 << 0)
 Administer the account (get/set permissions) More...
 
#define MUTT_ACL_CREATE   (1 << 1)
 Create a mailbox. More...
 
#define MUTT_ACL_DELETE   (1 << 2)
 Delete a message. More...
 
#define MUTT_ACL_DELMX   (1 << 3)
 Delete a mailbox. More...
 
#define MUTT_ACL_EXPUNGE   (1 << 4)
 Expunge messages. More...
 
#define MUTT_ACL_INSERT   (1 << 5)
 Add/copy into the mailbox (used when editing a message) More...
 
#define MUTT_ACL_LOOKUP   (1 << 6)
 Lookup mailbox (visible to 'list') More...
 
#define MUTT_ACL_POST   (1 << 7)
 Post (submit messages to the server) More...
 
#define MUTT_ACL_READ   (1 << 8)
 Read the mailbox. More...
 
#define MUTT_ACL_SEEN   (1 << 9)
 Change the 'seen' status of a message. More...
 
#define MUTT_ACL_WRITE   (1 << 10)
 Write to a message (for flagging or linking threads) More...
 
#define MUTT_ACL_ALL   ((1 << 11) - 1)
 

Typedefs

typedef uint16_t AclFlags
 ACL Rights - These show permission to... More...
 

Enumerations

enum  MailboxType {
  MUTT_MAILBOX_ANY = -2 , MUTT_MAILBOX_ERROR = -1 , MUTT_UNKNOWN = 0 , MUTT_MBOX ,
  MUTT_MMDF , MUTT_MH , MUTT_MAILDIR , MUTT_NNTP ,
  MUTT_IMAP , MUTT_NOTMUCH , MUTT_POP , MUTT_COMPRESSED
}
 Supported mailbox formats. More...
 
enum  NotifyMailbox {
  NT_MAILBOX_ADD = 1 , NT_MAILBOX_DELETE , NT_MAILBOX_DELETE_ALL , NT_MAILBOX_CHANGE ,
  NT_MAILBOX_INVALID , NT_MAILBOX_RESORT , NT_MAILBOX_SWITCH , NT_MAILBOX_UPDATE ,
  NT_MAILBOX_UNTAG
}
 Types of Mailbox Event. More...
 

Functions

 STAILQ_HEAD (MailboxList, MailboxNode)
 
void mailbox_changed (struct Mailbox *m, enum NotifyMailbox action)
 Notify observers of a change to a Mailbox. More...
 
struct Mailboxmailbox_find (const char *path)
 Find the mailbox with a given path. More...
 
struct Mailboxmailbox_find_name (const char *name)
 Find the mailbox with a given name. More...
 
void mailbox_free (struct Mailbox **ptr)
 Free a Mailbox. More...
 
int mailbox_gen (void)
 Get the next generation number. More...
 
struct Mailboxmailbox_new (void)
 Create a new Mailbox. More...
 
bool mailbox_set_subset (struct Mailbox *m, struct ConfigSubset *sub)
 Set a Mailbox's Config Subset. More...
 
void mailbox_size_add (struct Mailbox *m, const struct Email *e)
 Add an email's size to the total size of a Mailbox. More...
 
void mailbox_size_sub (struct Mailbox *m, const struct Email *e)
 Subtract an email's size from the total size of a Mailbox. More...
 
void mailbox_update (struct Mailbox *m)
 Get the mailbox's current size. More...
 
void mailbox_gc_add (struct Email *e)
 Add an Email to the garbage-collection set. More...
 
void mailbox_gc_run (void)
 Run the garbage-collection. More...
 
const char * mailbox_get_type_name (enum MailboxType type)
 Get the type of a Mailbox. More...
 
static const char * mailbox_path (const struct Mailbox *m)
 Get the Mailbox's path string. More...
 

Detailed Description

Representation of a mailbox.

Authors
  • Michael R. Elkins
  • 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 mailbox.h.

Macro Definition Documentation

◆ MB_NORMAL

#define MB_NORMAL   0

Definition at line 37 of file mailbox.h.

◆ MB_HIDDEN

#define MB_HIDDEN   1

Definition at line 38 of file mailbox.h.

◆ MUTT_ACL_NO_FLAGS

#define MUTT_ACL_NO_FLAGS   0

No flags are set.

Definition at line 63 of file mailbox.h.

◆ MUTT_ACL_ADMIN

#define MUTT_ACL_ADMIN   (1 << 0)

Administer the account (get/set permissions)

Definition at line 64 of file mailbox.h.

◆ MUTT_ACL_CREATE

#define MUTT_ACL_CREATE   (1 << 1)

Create a mailbox.

Definition at line 65 of file mailbox.h.

◆ MUTT_ACL_DELETE

#define MUTT_ACL_DELETE   (1 << 2)

Delete a message.

Definition at line 66 of file mailbox.h.

◆ MUTT_ACL_DELMX

#define MUTT_ACL_DELMX   (1 << 3)

Delete a mailbox.

Definition at line 67 of file mailbox.h.

◆ MUTT_ACL_EXPUNGE

#define MUTT_ACL_EXPUNGE   (1 << 4)

Expunge messages.

Definition at line 68 of file mailbox.h.

◆ MUTT_ACL_INSERT

#define MUTT_ACL_INSERT   (1 << 5)

Add/copy into the mailbox (used when editing a message)

Definition at line 69 of file mailbox.h.

◆ MUTT_ACL_LOOKUP

#define MUTT_ACL_LOOKUP   (1 << 6)

Lookup mailbox (visible to 'list')

Definition at line 70 of file mailbox.h.

◆ MUTT_ACL_POST

#define MUTT_ACL_POST   (1 << 7)

Post (submit messages to the server)

Definition at line 71 of file mailbox.h.

◆ MUTT_ACL_READ

#define MUTT_ACL_READ   (1 << 8)

Read the mailbox.

Definition at line 72 of file mailbox.h.

◆ MUTT_ACL_SEEN

#define MUTT_ACL_SEEN   (1 << 9)

Change the 'seen' status of a message.

Definition at line 73 of file mailbox.h.

◆ MUTT_ACL_WRITE

#define MUTT_ACL_WRITE   (1 << 10)

Write to a message (for flagging or linking threads)

Definition at line 74 of file mailbox.h.

◆ MUTT_ACL_ALL

#define MUTT_ACL_ALL   ((1 << 11) - 1)

Definition at line 76 of file mailbox.h.

Typedef Documentation

◆ AclFlags

typedef uint16_t AclFlags

ACL Rights - These show permission to...

Flags, e.g. MUTT_ACL_ADMIN

Definition at line 62 of file mailbox.h.

Enumeration Type Documentation

◆ MailboxType

Supported mailbox formats.

Enumerator
MUTT_MAILBOX_ANY 

Match any Mailbox type.

MUTT_MAILBOX_ERROR 

Error occurred examining Mailbox.

MUTT_UNKNOWN 

Mailbox wasn't recognised.

MUTT_MBOX 

'mbox' Mailbox type

MUTT_MMDF 

'mmdf' Mailbox type

MUTT_MH 

'MH' Mailbox type

MUTT_MAILDIR 

'Maildir' Mailbox type

MUTT_NNTP 

'NNTP' (Usenet) Mailbox type

MUTT_IMAP 

'IMAP' Mailbox type

MUTT_NOTMUCH 

'Notmuch' (virtual) Mailbox type

MUTT_POP 

'POP3' Mailbox type

MUTT_COMPRESSED 

Compressed file Mailbox type.

Definition at line 43 of file mailbox.h.

44 {
45  MUTT_MAILBOX_ANY = -2,
46  MUTT_MAILBOX_ERROR = -1,
47  MUTT_UNKNOWN = 0,
48  MUTT_MBOX,
49  MUTT_MMDF,
50  MUTT_MH,
51  MUTT_MAILDIR,
52  MUTT_NNTP,
53  MUTT_IMAP,
54  MUTT_NOTMUCH,
55  MUTT_POP,
57 };
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:54
@ MUTT_MMDF
'mmdf' Mailbox type
Definition: mailbox.h:49
@ MUTT_MAILBOX_ERROR
Error occurred examining Mailbox.
Definition: mailbox.h:46
@ MUTT_POP
'POP3' Mailbox type
Definition: mailbox.h:55
@ MUTT_MH
'MH' Mailbox type
Definition: mailbox.h:50
@ MUTT_NNTP
'NNTP' (Usenet) Mailbox type
Definition: mailbox.h:52
@ MUTT_IMAP
'IMAP' Mailbox type
Definition: mailbox.h:53
@ MUTT_MBOX
'mbox' Mailbox type
Definition: mailbox.h:48
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
Definition: mailbox.h:45
@ MUTT_COMPRESSED
Compressed file Mailbox type.
Definition: mailbox.h:56
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
Definition: mailbox.h:47
@ MUTT_MAILDIR
'Maildir' Mailbox type
Definition: mailbox.h:51

◆ NotifyMailbox

Types of Mailbox Event.

Observers of NT_MAILBOX will be passed an EventMailbox.

Note
Delete notifications are sent before the object is deleted.
Other notifications are sent after the event.
Enumerator
NT_MAILBOX_ADD 

Mailbox has been added.

NT_MAILBOX_DELETE 

Mailbox is about to be deleted.

NT_MAILBOX_DELETE_ALL 

All Mailboxes are about to be deleted.

NT_MAILBOX_CHANGE 

Mailbox has been changed.

NT_MAILBOX_INVALID 

Email list was changed.

NT_MAILBOX_RESORT 

Email list needs resorting.

NT_MAILBOX_SWITCH 

Current Mailbox has changed.

NT_MAILBOX_UPDATE 

Update internal tables.

NT_MAILBOX_UNTAG 

Clear the 'last-tagged' pointer.

Definition at line 171 of file mailbox.h.

172 {
173  NT_MAILBOX_ADD = 1,
177 
178  /* These don't really belong here as they are tied to GUI operations.
179  * Eventually, they'll be eliminated. */
185 };
@ NT_MAILBOX_SWITCH
Current Mailbox has changed.
Definition: mailbox.h:182
@ NT_MAILBOX_UNTAG
Clear the 'last-tagged' pointer.
Definition: mailbox.h:184
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
Definition: mailbox.h:176
@ NT_MAILBOX_RESORT
Email list needs resorting.
Definition: mailbox.h:181
@ NT_MAILBOX_DELETE
Mailbox is about to be deleted.
Definition: mailbox.h:174
@ NT_MAILBOX_INVALID
Email list was changed.
Definition: mailbox.h:180
@ NT_MAILBOX_DELETE_ALL
All Mailboxes are about to be deleted.
Definition: mailbox.h:175
@ NT_MAILBOX_UPDATE
Update internal tables.
Definition: mailbox.h:183
@ NT_MAILBOX_ADD
Mailbox has been added.
Definition: mailbox.h:173

Function Documentation

◆ STAILQ_HEAD()

STAILQ_HEAD ( MailboxList  ,
MailboxNode   
)

◆ mailbox_changed()

void mailbox_changed ( struct Mailbox m,
enum NotifyMailbox  action 
)

Notify observers of a change to a Mailbox.

Parameters
mMailbox
actionChange to Mailbox

Definition at line 211 of file mailbox.c.

212 {
213  if (!m)
214  return;
215 
216  mutt_debug(LL_NOTIFY, "NT_MAILBOX_CHANGE: %s %p\n", mailbox_get_type_name(m->type), m);
217  struct EventMailbox ev_m = { m };
218  notify_send(m->notify, NT_MAILBOX, action, &ev_m);
219 }
#define mutt_debug(LEVEL,...)
Definition: logging.h:84
@ LL_NOTIFY
Log of notifications.
Definition: logging.h:45
const char * mailbox_get_type_name(enum MailboxType type)
Get the type of a Mailbox.
Definition: mailbox.c:299
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:171
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
Definition: notify_type.h:48
An Event that happened to a Mailbox.
Definition: mailbox.h:191
enum MailboxType type
Mailbox type.
Definition: mailbox.h:105
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
Definition: mailbox.h:148
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_find()

struct Mailbox* mailbox_find ( const char *  path)

Find the mailbox with a given path.

Parameters
pathPath to match
Return values
ptrMatching Mailbox

Definition at line 128 of file mailbox.c.

129 {
130  if (!path)
131  return NULL;
132 
133  struct stat st = { 0 };
134  struct stat st_tmp = { 0 };
135 
136  if (stat(path, &st) != 0)
137  return NULL;
138 
139  struct MailboxList ml = STAILQ_HEAD_INITIALIZER(ml);
141  struct MailboxNode *np = NULL;
142  struct Mailbox *m = NULL;
143  STAILQ_FOREACH(np, &ml, entries)
144  {
145  if ((stat(mailbox_path(np->mailbox), &st_tmp) == 0) &&
146  (st.st_dev == st_tmp.st_dev) && (st.st_ino == st_tmp.st_ino))
147  {
148  m = np->mailbox;
149  break;
150  }
151  }
153 
154  return m;
155 }
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition: mailbox.h:215
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
Definition: neomutt.c:141
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
Definition: neomutt.c:164
#define STAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:324
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:352
List of Mailboxes.
Definition: mailbox.h:157
struct Mailbox * mailbox
Mailbox in the list.
Definition: mailbox.h:158
A mailbox.
Definition: mailbox.h:82
Container for Accounts, Notifications.
Definition: neomutt.h:37
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_find_name()

struct Mailbox* mailbox_find_name ( const char *  name)

Find the mailbox with a given name.

Parameters
nameName to match
Return values
ptrMatching Mailbox
NULLNo matching mailbox found
Note
This searches across all Accounts

Definition at line 165 of file mailbox.c.

166 {
167  if (!name)
168  return NULL;
169 
170  struct MailboxList ml = STAILQ_HEAD_INITIALIZER(ml);
172  struct MailboxNode *np = NULL;
173  struct Mailbox *m = NULL;
174  STAILQ_FOREACH(np, &ml, entries)
175  {
176  if (mutt_str_equal(np->mailbox->name, name))
177  {
178  m = np->mailbox;
179  break;
180  }
181  }
183 
184  return m;
185 }
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:715
char * name
A short name for the Mailbox.
Definition: mailbox.h:85
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_free()

void mailbox_free ( struct Mailbox **  ptr)

Free a Mailbox.

Parameters
[out]ptrMailbox to free

Definition at line 87 of file mailbox.c.

88 {
89  if (!ptr || !*ptr)
90  return;
91 
92  struct Mailbox *m = *ptr;
93 
94  mutt_debug(LL_NOTIFY, "NT_MAILBOX_DELETE: %s %p\n", mailbox_get_type_name(m->type), m);
95  struct EventMailbox ev_m = { m };
97 
98  mutt_debug(LL_NOTIFY, "NT_EMAIL_DELETE_ALL\n");
99  struct EventEmail ev_e = { 0, NULL };
101 
102  for (size_t i = 0; i < m->email_max; i++)
103  email_free(&m->emails[i]);
104 
105  if (m->mdata_free && m->mdata)
106  m->mdata_free(&m->mdata);
107 
109  cs_subset_free(&m->sub);
110  FREE(&m->name);
111  FREE(&m->realpath);
112  FREE(&m->emails);
113  FREE(&m->v2r);
114  notify_free(&m->notify);
115  mailbox_gc_run();
116 
117  /* The NT_MAILBOX_DELETE notification might already have caused *ptr to be NULL,
118  * so call free() on the m pointer */
119  *ptr = NULL;
120  FREE(&m);
121 }
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:294
void email_free(struct Email **ptr)
Free an Email.
Definition: email.c:44
@ NT_EMAIL_DELETE_ALL
All the Emails are about to be deleted.
Definition: email.h:149
void mailbox_gc_run(void)
Run the garbage-collection.
Definition: mailbox.c:285
#define FREE(x)
Definition: memory.h:40
void notify_free(struct Notify **ptr)
Free a notification handler.
Definition: notify.c:73
@ NT_EMAIL
Email has changed, NotifyEmail, EventEmail.
Definition: notify_type.h:44
An Event that happened to an Email.
Definition: email.h:157
void(* mdata_free)(void **ptr)
Free the private data attached to the Mailbox.
Definition: mailbox.h:146
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
Definition: mailbox.h:84
int * v2r
Mapping from virtual to real msgno.
Definition: mailbox.h:101
int email_max
Number of pointers in emails.
Definition: mailbox.h:100
void * mdata
Driver specific data.
Definition: mailbox.h:136
struct Email ** emails
Array of Emails.
Definition: mailbox.h:99
struct Buffer pathbuf
Path of the Mailbox.
Definition: mailbox.h:83
struct ConfigSubset * sub
Inherited config items.
Definition: mailbox.h:86
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
Definition: subset.c:104
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_gen()

int mailbox_gen ( void  )

Get the next generation number.

Definition at line 58 of file mailbox.c.

59 {
60  static int gen = 0;
61  return gen++;
62 }
+ Here is the caller graph for this function:

◆ mailbox_new()

struct Mailbox* mailbox_new ( void  )

Create a new Mailbox.

Return values
ptrNew Mailbox

Definition at line 68 of file mailbox.c.

69 {
70  struct Mailbox *m = mutt_mem_calloc(1, sizeof(struct Mailbox));
71 
73  m->notify = notify_new();
74 
75  m->email_max = 25;
76  m->emails = mutt_mem_calloc(m->email_max, sizeof(struct Email *));
77  m->v2r = mutt_mem_calloc(m->email_max, sizeof(int));
78  m->gen = mailbox_gen();
79 
80  return m;
81 }
struct Buffer * mutt_buffer_init(struct Buffer *buf)
Initialise a new Buffer.
Definition: buffer.c:46
int mailbox_gen(void)
Get the next generation number.
Definition: mailbox.c:58
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
Definition: memory.c:50
struct Notify * notify_new(void)
Create a new notifications handler.
Definition: notify.c:60
The envelope/body of an email.
Definition: email.h:37
int gen
Generation number, for sorting.
Definition: mailbox.h:150
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_set_subset()

bool mailbox_set_subset ( struct Mailbox m,
struct ConfigSubset sub 
)

Set a Mailbox's Config Subset.

Parameters
mMailbox
subParent Config Subset
Return values
trueSuccess

Definition at line 247 of file mailbox.c.

248 {
249  if (!m || m->sub || !sub)
250  return false;
251 
252  m->sub = cs_subset_new(m->name, sub, m->notify);
254  return true;
255 }
enum ConfigScope scope
Scope of Subset, e.g. SET_SCOPE_ACCOUNT.
Definition: subset.h:49
struct ConfigSubset * cs_subset_new(const char *name, struct ConfigSubset *sub_parent, struct Notify *not_parent)
Create a new Config Subset.
Definition: subset.c:144
@ SET_SCOPE_MAILBOX
This Config is Mailbox-specific.
Definition: subset.h:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_size_add()

void mailbox_size_add ( struct Mailbox m,
const struct Email e 
)

Add an email's size to the total size of a Mailbox.

Parameters
mMailbox
eEmail

Definition at line 226 of file mailbox.c.

227 {
228  m->size += email_size(e);
229 }
size_t email_size(const struct Email *e)
Compute the size of an email.
Definition: email.c:125
off_t size
Size of the Mailbox.
Definition: mailbox.h:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_size_sub()

void mailbox_size_sub ( struct Mailbox m,
const struct Email e 
)

Subtract an email's size from the total size of a Mailbox.

Parameters
mMailbox
eEmail

Definition at line 236 of file mailbox.c.

237 {
238  m->size -= email_size(e);
239 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_update()

void mailbox_update ( struct Mailbox m)

Get the mailbox's current size.

Parameters
mMailbox to check
Note
Only applies to local Mailboxes

Definition at line 193 of file mailbox.c.

194 {
195  struct stat st = { 0 };
196 
197  if (!m)
198  return;
199 
200  if (stat(mailbox_path(m), &st) == 0)
201  m->size = (off_t) st.st_size;
202  else
203  m->size = 0;
204 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_gc_add()

void mailbox_gc_add ( struct Email e)

Add an Email to the garbage-collection set.

Parameters
eEmail
Precondition
e != NULL

Definition at line 271 of file mailbox.c.

272 {
273  assert(e);
274  if (gc.idx == mutt_array_size(gc.arr))
275  {
276  mailbox_gc_run();
277  }
278  gc.arr[gc.idx] = e;
279  gc.idx++;
280 }
static struct EmailGarbageCollector gc
#define mutt_array_size(x)
Definition: memory.h:33
size_t idx
Current position.
Definition: mailbox.c:263
struct Email * arr[10]
Array of Emails to be deleted.
Definition: mailbox.c:262
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_gc_run()

void mailbox_gc_run ( void  )

Run the garbage-collection.

Definition at line 285 of file mailbox.c.

286 {
287  for (size_t i = 0; i < gc.idx; i++)
288  {
289  email_free(&gc.arr[i]);
290  }
291  gc.idx = 0;
292 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_get_type_name()

const char* mailbox_get_type_name ( enum MailboxType  type)

Get the type of a Mailbox.

Parameters
typeMailbox type, e.g. MUTT_IMAP
Return values
ptrString describing Mailbox type

Definition at line 299 of file mailbox.c.

300 {
301  const char *name = mutt_map_get_name(type, MailboxTypes);
302  if (name)
303  return name;
304  return "UNKNOWN";
305 }
static const struct Mapping MailboxTypes[]
Lookups for Mailbox types.
Definition: mailbox.c:40
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition: mapping.c:42
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mailbox_path()

static const char* mailbox_path ( const struct Mailbox m)
inlinestatic

Get the Mailbox's path string.

Parameters
mMailbox
Return values
ptrPath string

Definition at line 215 of file mailbox.h.

216 {
217  return mutt_buffer_string(&m->pathbuf); // LCOV_EXCL_LINE
218 }
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:77