NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
alias.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_ALIAS_H
25 #define MUTT_ALIAS_H
26 
27 #include <stddef.h>
28 #include <stdbool.h>
29 #include "mutt/mutt.h"
30 #include "address/lib.h"
31 
32 struct Envelope;
33 
37 struct Alias
38 {
39  char *name;
40  struct AddressList addr;
41  bool tagged;
42  bool del;
43  short num;
44  TAILQ_ENTRY(Alias) entries;
45 };
46 TAILQ_HEAD(AliasList, Alias);
47 
48 struct Alias *mutt_alias_new(void);
49 void mutt_alias_free(struct Alias **ptr);
50 void mutt_alias_create(struct Envelope *cur, struct AddressList *al);
51 void mutt_aliaslist_free(struct AliasList *a_list);
52 struct AddressList *mutt_alias_lookup(const char *s);
53 void mutt_expand_aliases_env(struct Envelope *env);
54 void mutt_expand_aliases(struct AddressList *al);
55 struct AddressList *mutt_get_address(struct Envelope *env, const char **pfxp);
56 
57 bool mutt_addr_is_user(const struct Address *addr);
58 int mutt_alias_complete(char *buf, size_t buflen);
59 void mutt_alias_add_reverse(struct Alias *t);
60 void mutt_alias_delete_reverse(struct Alias *t);
61 struct Address *mutt_alias_reverse_lookup(const struct Address *a);
62 
63 #endif /* MUTT_ALIAS_H */
A shortcut for an email address.
Definition: alias.h:37
char * name
Short name.
Definition: alias.h:39
TAILQ_ENTRY(Alias) entries
Linked list.
TAILQ_HEAD(AliasList, Alias)
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:304
struct Address * mutt_alias_reverse_lookup(const struct Address *a)
Does the user have an alias for the given address.
Definition: alias.c:542
short num
Index number in list.
Definition: alias.h:43
An email address.
Definition: address.h:34
int mutt_alias_complete(char *buf, size_t buflen)
alias completion routine
Definition: alias.c:604
struct AddressList * mutt_get_address(struct Envelope *env, const char **pfxp)
Get an Address from an Envelope.
Definition: alias.c:336
void mutt_aliaslist_free(struct AliasList *a_list)
Free a List of Aliases.
Definition: alias.c:759
Email Address Handling.
bool mutt_addr_is_user(const struct Address *addr)
Does the address belong to the user.
Definition: alias.c:683
bool del
Is it deleted?
Definition: alias.h:42
void mutt_alias_create(struct Envelope *cur, struct AddressList *al)
Create a new Alias from an Envelope or an Address.
Definition: alias.c:376
void mutt_alias_free(struct Alias **ptr)
Free an Alias.
Definition: alias.c:742
struct AddressList * mutt_alias_lookup(const char *s)
Find an Alias.
Definition: alias.c:286
void mutt_alias_delete_reverse(struct Alias *t)
Remove an email address lookup for an Alias.
Definition: alias.c:576
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:318
struct Alias * mutt_alias_new(void)
Create a new Alias.
Definition: alias.c:145
struct AddressList addr
List of Addresses the Alias expands to.
Definition: alias.h:40
void mutt_alias_add_reverse(struct Alias *t)
Add an email address lookup for an Alias.
Definition: alias.c:554
The header of an Email.
Definition: envelope.h:54
bool tagged
Is it tagged?
Definition: alias.h:41