NeoMutt  2022-04-29-247-gc6aae8
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
50struct Address;
51struct AddressList;
52struct Buffer;
53struct ConfigSubset;
54struct Envelope;
55
56void alias_init (void);
57void alias_shutdown(void);
58
59void alias_create (struct AddressList *al, const struct ConfigSubset *sub);
60struct AddressList *alias_lookup (const char *name);
61
62bool mutt_addr_is_user (const struct Address *addr);
63void mutt_expand_aliases_env(struct Envelope *env);
64void mutt_expand_aliases (struct AddressList *al);
65struct AddressList *mutt_get_address (struct Envelope *env, const char **prefix);
66
67enum CommandResult parse_alias (struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
68enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err);
69
70int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub);
71void alias_dialog (struct Mailbox *m, struct ConfigSubset *sub);
72
73int query_complete(struct Buffer *buf, struct ConfigSubset *sub);
74void query_index (struct Mailbox *m, struct ConfigSubset *sub);
75
76struct Address *alias_reverse_lookup(const struct Address *addr);
77
78#endif /* MUTT_ALIAS_LIB_H */
struct AddressList * alias_lookup(const char *name)
Find an Alias.
Definition: alias.c:280
void mutt_expand_aliases(struct AddressList *al)
Expand aliases in a List of Addresses.
Definition: alias.c:298
int query_complete(struct Buffer *buf, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
Definition: dlg_query.c:441
void alias_dialog(struct Mailbox *m, struct ConfigSubset *sub)
Open the aliases dialog.
Definition: dlg_alias.c:498
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
void mutt_expand_aliases_env(struct Envelope *env)
Expand aliases in all the fields of an Envelope.
Definition: alias.c:312
struct AddressList * mutt_get_address(struct Envelope *env, const char **prefix)
Get an Address from an Envelope.
Definition: alias.c:330
int alias_complete(char *buf, size_t buflen, struct ConfigSubset *sub)
Alias completion routine.
Definition: dlg_alias.c:380
void query_index(struct Mailbox *m, struct ConfigSubset *sub)
Perform an Alias Query and display the results.
Definition: dlg_query.c:532
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_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