NeoMutt  2025-12-11-435-g4ac674
Teaching an old dog new tricks
DOXYGEN
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
30struct ParseContext;
31struct ParseError;
32
42
47{
48 char *path;
49 char *label;
52};
53ARRAY_HEAD(ParseMailboxArray, struct ParseMailbox);
54
55void parse_mailbox_free (struct ParseMailbox *pm);
56void parse_mailbox_array_free(struct ParseMailboxArray *pma);
57bool parse_mailboxes_args(const struct Command *cmd, struct Buffer *line, struct Buffer *err, struct ParseMailboxArray *args);
58enum CommandResult parse_mailboxes_exec(const struct Command *cmd, struct ParseMailboxArray *args, struct Buffer *err);
59enum CommandResult parse_mailboxes (const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe);
60enum CommandResult parse_unmailboxes(const struct Command *cmd, struct Buffer *line, const struct ParseContext *pc, struct ParseError *pe);
61
62bool mailbox_add_simple(const char *mailbox, struct Buffer *err);
63bool mailbox_remove_simple(const char *mailbox);
64
65#endif /* MUTT_COMMANDS_MAILBOXES_H */
#define ARRAY_HEAD(name, T)
Define a named struct for arrays of elements of a certain type.
Definition array.h:47
CommandResult
Error codes for command_t parse functions.
Definition command.h:37
Convenience wrapper for the core headers.
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:437
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:346
bool mailbox_remove_simple(const char *mailbox)
Remove a Mailbox.
Definition mailboxes.c:394
void parse_mailbox_free(struct ParseMailbox *pm)
Free a ParseMailbox structure.
Definition mailboxes.c:168
void parse_mailbox_array_free(struct ParseMailboxArray *pma)
Free a ParseMailboxArray.
Definition mailboxes.c:181
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
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:319
TriBool
Tri-state boolean.
Definition mailboxes.h:37
@ TB_FALSE
Value is false.
Definition mailboxes.h:39
@ TB_TRUE
Value is true.
Definition mailboxes.h:40
@ TB_UNSET
Value hasn't been set.
Definition mailboxes.h:38
bool mailbox_add_simple(const char *mailbox, struct Buffer *err)
Add a new Mailbox.
Definition mailboxes.c:157
Convenience wrapper for the library headers.
String manipulation buffer.
Definition buffer.h:36
Context for config parsing (history/backtrace)
Definition pcontext.h:34
Detailed error information from config parsing.
Definition perror.h:34
Parsed data for a single mailbox.
Definition mailboxes.h:47
enum TriBool notify
Enable mailbox notification?
Definition mailboxes.h:51
char * label
Descriptive label (strdup'd, may be NULL)
Definition mailboxes.h:49
enum TriBool poll
Enable mailbox polling?
Definition mailboxes.h:50
char * path
Mailbox path.
Definition mailboxes.h:48