NeoMutt  2020-11-20
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 bool config_init_alias(struct ConfigSet *cs);
80 
81 void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub);
82 
83 #endif /* MUTT_ALIAS_LIB_H */
Container for lots of config items.
Definition: set.h:228
bool config_init_alias(struct ConfigSet *cs)
Register alias config variables - Implements module_init_config_t.
Definition: config.c:69
enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the &#39;unalias&#39; command - Implements Command::parse()
Definition: commands.c:159
CommandResult
Error codes for command_t parse functions.
Definition: mutt_commands.h:34
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
Definition: alias.c:366
enum CommandResult parse_alias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the &#39;alias&#39; command - Implements Command::parse()
Definition: commands.c:49
String manipulation buffer.
Definition: buffer.h:33
An email address.
Definition: address.h:34
void query_index(struct ConfigSubset *sub)
Perform an Alias Query and display the results.
Definition: dlgquery.c:645
void alias_shutdown(void)
Clean up the Alias globals.
Definition: alias.c:661
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:326
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:276
void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub)
Sort and reindex an AliasViewArray.
Definition: sort.c:158
Assorted sorting methods.
int query_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlgquery.c:605
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
Definition: reverse.c:105
A set of inherited config items.
Definition: subset.h:46
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:547
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:308
Definitions of NeoMutt commands.
int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
alias completion routine
Definition: dlgalias.c:375
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:294
void alias_init(void)
Set up the Alias globals.
Definition: alias.c:653
Shared code for the Alias and Query Dialogs.
The header of an Email.
Definition: envelope.h:54