NeoMutt  2021-10-22-8-g9cb437
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 "core/command.h"
48 
49 struct Address;
50 struct AddressList;
51 struct AliasViewArray;
52 struct Buffer;
53 struct ConfigSubset;
54 struct Envelope;
55 
56 void alias_init (void);
57 void alias_shutdown(void);
58 
59 void alias_create (struct AddressList *al, const struct ConfigSubset *sub);
60 struct AddressList *alias_lookup (const char *name);
61 
62 bool mutt_addr_is_user (const struct Address *addr);
63 void mutt_expand_aliases_env(struct Envelope *env);
64 void mutt_expand_aliases (struct AddressList *al);
65 struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
66 
67 enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
68 enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
69 
70 int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub);
71 
72 int query_complete(char *buf, size_t buflen, struct ConfigSubset *sub);
73 void query_index (struct ConfigSubset *sub);
74 
75 struct Address *alias_reverse_lookup(const struct Address *addr);
76 
77 void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub);
78 
79 #endif /* MUTT_ALIAS_LIB_H */
void query_index(struct ConfigSubset *sub)
Perform an Alias Query and display the results.
Definition: dlgquery.c:734
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:300
void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub)
Sort and reindex an AliasViewArray.
Definition: sort.c:157
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
Definition: reverse.c:105
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
Definition: alias.c:372
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:562
void alias_init(void)
Set up the Alias globals.
Definition: alias.c:664
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:332
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:314
int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Alias completion routine.
Definition: dlgalias.c:463
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:282
void alias_shutdown(void)
Clean up the Alias globals.
Definition: alias.c:672
int query_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlgquery.c:694
NeoMutt commands API.
CommandResult
Error codes for command_t parse functions.
Definition: command.h:34
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:48
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:161
An email address.
Definition: address.h:36
String manipulation buffer.
Definition: buffer.h:34
A set of inherited config items.
Definition: subset.h:47
The header of an Email.
Definition: envelope.h:55