NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
mailboxes.h
Go to the documentation of this file.
1
22
23
#ifndef MUTT_COMMANDS_MAILBOXES_H
24
#define MUTT_COMMANDS_MAILBOXES_H
25
26
#include <stdbool.h>
27
#include "
mutt/lib.h
"
28
#include "
core/lib.h
"
29
30
struct
ParseContext
;
31
struct
ParseError
;
32
36
enum
TriBool
37
{
38
TB_UNSET
= -1,
39
TB_FALSE
,
40
TB_TRUE
,
41
};
42
46
struct
ParseMailbox
47
{
48
char
*
path
;
49
char
*
label
;
50
enum
TriBool
poll
;
51
enum
TriBool
notify
;
52
};
53
ARRAY_HEAD
(ParseMailboxArray,
struct
ParseMailbox
);
54
55
void
parse_mailbox_free
(
struct
ParseMailbox
*pm);
56
void
parse_mailbox_array_free
(
struct
ParseMailboxArray *pma);
57
bool
parse_mailboxes_args
(
const
struct
Command
*cmd,
struct
Buffer
*line,
struct
Buffer
*err,
struct
ParseMailboxArray *args);
58
enum
CommandResult
parse_mailboxes_exec
(
const
struct
Command
*cmd,
struct
ParseMailboxArray *args,
struct
Buffer
*err);
59
enum
CommandResult
parse_mailboxes
(
const
struct
Command
*cmd,
struct
Buffer
*line,
const
struct
ParseContext
*pc,
struct
ParseError
*pe);
60
enum
CommandResult
parse_unmailboxes
(
const
struct
Command
*cmd,
struct
Buffer
*line,
const
struct
ParseContext
*pc,
struct
ParseError
*pe);
61
62
bool
mailbox_add_simple
(
const
char
*mailbox,
struct
Buffer
*err);
63
bool
mailbox_remove_simple
(
const
char
*mailbox);
64
65
#endif
/* MUTT_COMMANDS_MAILBOXES_H */
ARRAY_HEAD
#define ARRAY_HEAD(name, T)
Define a named struct for arrays of elements of a certain type.
Definition
array.h:47
CommandResult
CommandResult
Error codes for command_t parse functions.
Definition
command.h:37
lib.h
Convenience wrapper for the core headers.
parse_unmailboxes
enum CommandResult parse_unmailboxes(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'unmailboxes' command - Implements Command::parse() -.
Definition
mailboxes.c:440
parse_mailboxes
enum CommandResult parse_mailboxes(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe)
Parse the 'mailboxes' command - Implements Command::parse() -.
Definition
mailboxes.c:349
mailbox_remove_simple
bool mailbox_remove_simple(const char *mailbox)
Remove a Mailbox.
Definition
mailboxes.c:397
parse_mailbox_free
void parse_mailbox_free(struct ParseMailbox *pm)
Free a ParseMailbox structure.
Definition
mailboxes.c:168
parse_mailbox_array_free
void parse_mailbox_array_free(struct ParseMailboxArray *pma)
Free a ParseMailboxArray.
Definition
mailboxes.c:181
parse_mailboxes_args
bool parse_mailboxes_args(const struct Command *cmd, struct Buffer *line, struct Buffer *err, struct ParseMailboxArray *args)
Parse the 'mailboxes' and 'named-mailboxes' commands.
Definition
mailboxes.c:206
parse_mailboxes_exec
enum CommandResult parse_mailboxes_exec(const struct Command *cmd, struct ParseMailboxArray *args, struct Buffer *err)
Execute the 'mailboxes' or 'named-mailboxes' command.
Definition
mailboxes.c:322
TriBool
TriBool
Tri-state boolean.
Definition
mailboxes.h:37
TB_FALSE
@ TB_FALSE
Value is false.
Definition
mailboxes.h:39
TB_TRUE
@ TB_TRUE
Value is true.
Definition
mailboxes.h:40
TB_UNSET
@ TB_UNSET
Value hasn't been set.
Definition
mailboxes.h:38
mailbox_add_simple
bool mailbox_add_simple(const char *mailbox, struct Buffer *err)
Add a new Mailbox.
Definition
mailboxes.c:157
lib.h
Convenience wrapper for the library headers.
Buffer
String manipulation buffer.
Definition
buffer.h:36
Command
Definition
command.h:161
ParseContext
Context for config parsing (history/backtrace).
Definition
pcontext.h:34
ParseError
Detailed error information from config parsing.
Definition
perror.h:34
ParseMailbox
Parsed data for a single mailbox.
Definition
mailboxes.h:47
ParseMailbox::notify
enum TriBool notify
Enable mailbox notification?
Definition
mailboxes.h:51
ParseMailbox::label
char * label
Descriptive label (strdup'd, may be NULL).
Definition
mailboxes.h:49
ParseMailbox::poll
enum TriBool poll
Enable mailbox polling?
Definition
mailboxes.h:50
ParseMailbox::path
char * path
Mailbox path.
Definition
mailboxes.h:48