NeoMutt  2020-06-26-250-g349c94
Teaching an old dog new tricks
DOXYGEN
lib.h
Go to the documentation of this file.
1 
38 #ifndef MUTT_ALIAS_LIB_H
39 #define MUTT_ALIAS_LIB_H
40 
41 #include <stdbool.h>
42 #include <stddef.h>
43 #include <stdint.h>
44 #include "mutt_commands.h"
45 
46 struct Address;
47 struct AddressList;
48 struct Buffer;
49 struct Envelope;
50 
51 /* These Config Variables are only used in dlgalias.c */
52 extern char *C_AliasFormat;
53 extern short C_SortAlias;
54 
55 /* These Config Variables are only used in dlgquery.c */
56 extern char *C_QueryCommand;
57 extern char *C_QueryFormat;
58 
59 extern struct HashTable *ReverseAliases;
60 
61 void alias_init (void);
62 void alias_shutdown(void);
63 
64 void alias_create (struct AddressList *al);
65 struct AddressList *alias_lookup (const char *name);
66 
67 bool mutt_addr_is_user (const struct Address *addr);
68 void mutt_expand_aliases_env(struct Envelope *env);
69 void mutt_expand_aliases (struct AddressList *al);
70 struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
71 
72 enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
73 enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
74 
75 int alias_complete(char *buf, size_t buflen);
76 
77 int query_complete(char *buf, size_t buflen);
78 void query_index (void);
79 
80 struct Address *alias_reverse_lookup(const struct Address *addr);
81 
82 #endif /* MUTT_ALIAS_LIB_H */
A Hash Table.
Definition: hash.h:84
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:144
CommandResult
Error codes for command_t parse functions.
Definition: mutt_commands.h:33
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 alias_shutdown(void)
Clean up the Alias globals.
Definition: alias.c:660
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:326
char * C_QueryCommand
Config: External command to query and external address book.
Definition: dlgquery.c:55
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:276
short C_SortAlias
Config: Sort method for the alias menu.
Definition: dlgalias.c:55
int query_complete(char *buf, size_t buflen)
Perform auto-complete using an Address Query.
Definition: dlgquery.c:515
void alias_create(struct AddressList *al)
Create a new Alias from an Address.
Definition: alias.c:365
char * C_AliasFormat
Config: printf-like format string for the alias menu.
Definition: dlgalias.c:54
char * C_QueryFormat
Config: printf-like format string for the query menu (address book)
Definition: dlgquery.c:56
struct HashTable * ReverseAliases
Hash Table of aliases (email address -> alias)
Definition: reverse.c:37
struct Address * alias_reverse_lookup(const struct Address *addr)
Does the user have an alias for the given address.
Definition: reverse.c:87
void query_index(void)
Perform an Alias Query and display the results.
Definition: dlgquery.c:553
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:544
int alias_complete(char *buf, size_t buflen)
alias completion routine
Definition: dlgalias.c:285
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.
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:650
The header of an Email.
Definition: envelope.h:54