NeoMutt  2022-04-29-145-g9b6a0e
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
42 #ifndef MUTT_ALIAS_LIB_H
43 #define MUTT_ALIAS_LIB_H
44 
45 #include <stddef.h>
46 #include "core/lib.h"
47 #include <stdbool.h>
48 #include <stdint.h>
49 
50 struct Address;
51 struct AddressList;
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 void alias_dialog (struct Mailbox *m, struct ConfigSubset *sub);
72 
73 int query_complete(struct Buffer *buf, struct ConfigSubset *sub);
74 void query_index (struct Mailbox *m, struct ConfigSubset *sub);
75 
76 struct Address *alias_reverse_lookup(const struct Address *addr);
77 
78 #endif /* MUTT_ALIAS_LIB_H */
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:298
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
Definition: reverse.c:105
int query_complete(struct Buffer *buf, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlg_query.c:440
void alias_dialog(struct Mailbox *m, struct ConfigSubset *sub)
Open the aliases dialog.
Definition: dlg_alias.c:495
void alias_create(struct AddressList *al, const struct ConfigSubset *sub)
Create a new Alias from an Address.
Definition: alias.c:370
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:574
void alias_init(void)
Set up the Alias globals.
Definition: alias.c:679
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:330
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:312
int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Alias completion routine.
Definition: dlg_alias.c:377
void query_index(struct Mailbox *m, struct ConfigSubset *sub)
Perform an Alias Query and display the results.
Definition: dlg_query.c:531
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:280
void alias_shutdown(void)
Clean up the Alias globals.
Definition: alias.c:687
CommandResult
Error codes for command_t parse functions.
Definition: command.h:34
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: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:57
A mailbox.
Definition: mailbox.h:79