NeoMutt  2024-12-12-14-g7b49f7
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
44#ifndef MUTT_ALIAS_LIB_H
45#define MUTT_ALIAS_LIB_H
46
47#include <stdbool.h>
48#include <stdint.h>
49#include "core/lib.h"
50#include "expando.h" // IWYU pragma: keep
51
52struct Address;
53struct AddressList;
54struct Alias;
55struct Buffer;
56struct ConfigSubset;
57struct Envelope;
58struct TagList;
59
60extern const struct CompleteOps CompleteAliasOps;
61
62void alias_init (void);
63void alias_cleanup(void);
64
65void alias_create (struct AddressList *al, const struct ConfigSubset *sub);
66struct AddressList *alias_lookup (const char *name);
67
68bool mutt_addr_is_user (const struct Address *addr);
69void mutt_expand_aliases_env(struct Envelope *env);
70void mutt_expand_aliases (struct AddressList *al);
71struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
72
73enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
74enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
75
76void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf);
77void parse_alias_comments(struct Alias *alias, const char *com);
78void parse_alias_tags (const char *tags, struct TagList *tl);
79
80int alias_complete(struct Buffer *buf, struct ConfigSubset *sub);
81void alias_dialog (struct Mailbox *m, struct ConfigSubset *sub);
82
83int query_complete(struct Buffer *buf, struct ConfigSubset *sub);
84void query_index (struct Mailbox *m, struct ConfigSubset *sub);
85
86struct Address *alias_reverse_lookup(const struct Address *addr);
87
88#endif /* MUTT_ALIAS_LIB_H */
void alias_cleanup(void)
Clean up the Alias globals.
Definition: alias.c:722
int alias_complete(struct Buffer *buf, struct ConfigSubset *sub)
Alias completion routine.
Definition: dlg_alias.c:335
void parse_alias_comments(struct Alias *alias, const char *com)
Parse the alias/query comment field.
Definition: commands.c:95
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:277
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:295
void parse_alias_tags(const char *tags, struct TagList *tl)
Parse a comma-separated list of tags.
Definition: commands.c:65
const struct CompleteOps CompleteAliasOps
Auto-Completion of Aliases.
Definition: complete.c:108
int query_complete(struct Buffer *buf, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlg_query.c:400
void alias_dialog(struct Mailbox *m, struct ConfigSubset *sub)
Open the aliases dialog.
Definition: dlg_alias.c:460
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
Definition: alias.c:367
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:600
void alias_init(void)
Set up the Alias globals.
Definition: alias.c:714
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:309
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:327
void query_index(struct Mailbox *m, struct ConfigSubset *sub)
Perform an Alias Query and display the results.
Definition: dlg_query.c:476
void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf)
Write a comma-separated list of tags to a Buffer.
Definition: commands.c:49
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
Definition: reverse.c:105
CommandResult
Error codes for command_t parse functions.
Definition: command.h:36
Convenience wrapper for the core headers.
enum CommandResult parse_alias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'alias' command - Implements Command::parse() -.
Definition: commands.c:135
enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unalias' command - Implements Command::parse() -.
Definition: commands.c:251
Sidebar Expando definitions.
An email address.
Definition: address.h:36
A shortcut for an email address or addresses.
Definition: alias.h:35
String manipulation buffer.
Definition: buffer.h:36
A set of inherited config items.
Definition: subset.h:47
The header of an Email.
Definition: envelope.h:57
A mailbox.
Definition: mailbox.h:79