NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
41 #ifndef MUTT_ALIAS_LIB_H
42 #define MUTT_ALIAS_LIB_H
43 
44 #include <stddef.h>
45 #include <stdbool.h>
46 #include <stdint.h>
47 #include "mutt_commands.h"
48 #include "sort.h"
49 #include "gui.h"
50 
51 struct Address;
52 struct AddressList;
53 struct AliasViewArray;
54 struct Buffer;
55 struct ConfigSet;
56 struct Envelope;
57 
58 void alias_init (void);
59 void alias_shutdown(void);
60 
61 void alias_create (struct AddressList *al, const struct ConfigSubset *sub);
62 struct AddressList *alias_lookup (const char *name);
63 
64 bool mutt_addr_is_user (const struct Address *addr);
65 void mutt_expand_aliases_env(struct Envelope *env);
66 void mutt_expand_aliases (struct AddressList *al);
67 struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
68 
69 enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
70 enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
71 
72 int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub);
73 
74 int query_complete(char *buf, size_t buflen, struct ConfigSubset *sub);
75 void query_index (struct ConfigSubset *sub);
76 
77 struct Address *alias_reverse_lookup(const struct Address *addr);
78 
79 void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub);
80 
81 #endif /* MUTT_ALIAS_LIB_H */
Envelope
The header of an Email.
Definition: envelope.h:54
alias_init
void alias_init(void)
Set up the Alias globals.
Definition: alias.c:662
parse_alias
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:49
mutt_get_address
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:326
alias_array_sort
void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub)
Sort and reindex an AliasViewArray.
Definition: sort.c:158
Buffer
String manipulation buffer.
Definition: buffer.h:33
alias_create
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
Definition: alias.c:366
query_complete
int query_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlgquery.c:606
alias_shutdown
void alias_shutdown(void)
Clean up the Alias globals.
Definition: alias.c:670
query_index
void query_index(struct ConfigSubset *sub)
Perform an Alias Query and display the results.
Definition: dlgquery.c:646
parse_unalias
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:159
mutt_expand_aliases_env
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:308
CommandResult
CommandResult
Error codes for command_t parse functions.
Definition: mutt_commands.h:34
sort.h
mutt_expand_aliases
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:294
alias_lookup
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:276
alias_complete
int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
alias completion routine
Definition: dlgalias.c:375
ConfigSet
Container for lots of config items.
Definition: set.h:228
gui.h
mutt_commands.h
ConfigSubset
A set of inherited config items.
Definition: subset.h:46
alias_reverse_lookup
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
Definition: reverse.c:105
mutt_addr_is_user
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:556
Address
An email address.
Definition: address.h:34