NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.h
Go to the documentation of this file.
1
43#ifndef MUTT_ALIAS_LIB_H
44#define MUTT_ALIAS_LIB_H
45
46#include <stdbool.h>
47#include <stdint.h>
48#include "core/lib.h"
49
50struct Address;
51struct AddressList;
52struct Alias;
53struct Buffer;
54struct ConfigSubset;
55struct Envelope;
56struct TagList;
57
58extern const struct CompleteOps CompleteAliasOps;
59
60void alias_init (void);
61void alias_cleanup(void);
62
63void alias_create (struct AddressList *al, const struct ConfigSubset *sub);
64struct AddressList *alias_lookup (const char *name);
65
66bool mutt_addr_is_user (const struct Address *addr);
67void mutt_expand_aliases_env(struct Envelope *env);
68void mutt_expand_aliases (struct AddressList *al);
69struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
70
71enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
72enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
73
74void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf);
75void parse_alias_comments(struct Alias *alias, const char *com);
76void parse_alias_tags (const char *tags, struct TagList *tl);
77
78int alias_complete(struct Buffer *buf, struct ConfigSubset *sub);
79void alias_dialog (struct Mailbox *m, struct ConfigSubset *sub);
80
81int query_complete(struct Buffer *buf, struct ConfigSubset *sub);
82void query_index (struct Mailbox *m, struct ConfigSubset *sub);
83
84struct Address *alias_reverse_lookup(const struct Address *addr);
85
86#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
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
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