NeoMutt  2024-04-25-97-g7d2481
Teaching an old dog new tricks
No Matches
Go to the documentation of this file.
43#ifndef MUTT_ALIAS_LIB_H
44#define MUTT_ALIAS_LIB_H
46#include <stdbool.h>
47#include <stddef.h>
48#include <stdint.h>
49#include "core/lib.h"
50#include "complete/lib.h"
52struct Address;
53struct AddressList;
54struct Alias;
55struct Buffer;
56struct ConfigSubset;
57struct EnterWindowData;
58struct Envelope;
59struct TagList;
61extern const struct CompleteOps CompleteAliasOps;
63void alias_init (void);
64void alias_cleanup(void);
66void alias_create (struct AddressList *al, const struct ConfigSubset *sub);
67struct AddressList *alias_lookup (const char *name);
69bool mutt_addr_is_user (const struct Address *addr);
70void mutt_expand_aliases_env(struct Envelope *env);
71void mutt_expand_aliases (struct AddressList *al);
72struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
74enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
75enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
77void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf);
78void parse_alias_comments(struct Alias *alias, const char *com);
79void parse_alias_tags (const char *tags, struct TagList *tl);
81int alias_complete(struct Buffer *buf, struct ConfigSubset *sub);
82void alias_dialog (struct Mailbox *m, struct ConfigSubset *sub);
84int query_complete(struct Buffer *buf, struct ConfigSubset *sub);
85void query_index (struct Mailbox *m, struct ConfigSubset *sub);
87struct Address *alias_reverse_lookup(const struct Address *addr);
89#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:442
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:480
void alias_dialog(struct Mailbox *m, struct ConfigSubset *sub)
Open the aliases dialog.
Definition: dlg_alias.c:567
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:562
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
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
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
Data to fill the Enter Window.
Definition: wdata.h:46
The header of an Email.
Definition: envelope.h:57
A mailbox.
Definition: mailbox.h:79